FormalConjectures/HilbertProblems/17.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
8 declarations, 3 contain sorry, 0 declared as axioms
Hilbert's 17th problem
Let $f(x_1, \dots, x_n)$ be a multivariable polynomial with real coefficients that takes only nonnegative values for all real inputs. Hilbert's 17th problem asks whether there exist rational functions $g_1, \dots, g_m$ such that $f = g_1^2 + g_2^2 + \cdots + g_m^2$. Resolved affirmatively by Artin in 1927. References:
- Wikipedia
- Motzkin, "The arithmetic-geometric inequality". In Shisha, Oved (ed.). Inequalities. Academic Press. pp. 205–224.
Imports (1)
- theorem
Hilbert17.hilbert_17th_problemHilbert's 17th problem: every non-negative multivariate polynomial is a sum of squares of rational functions sorry line 43 sourceSource documentation
Hilbert's 17th problem: every non-negative multivariate polynomial is a sum of squares of rational functions.
depends on sorry what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,MvPolynomial,Fin,Real,LE.le,RingHom,Finsupp,MvPolynomial.eval,Exists, MvRatFunc,Eq,nonZeroDivisors,Algebra.algebraMap,Finset.sum,Finset.univ,HPow.hPowProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous80 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem hilbert_17th_problem {n : ℕ} (hn : 0 < n) (f : MvPolynomial (Fin n) ℝ) (h : ∀ x : Fin n → ℝ, 0 ≤ f.eval x) : ∃ (m : ℕ) (g : Fin m → MvRatFunc (Fin n) ℝ), algebraMap _ _ f = ∑ i, (g i) ^ 2 := by …Mentions: Hilbert17.f, MvRatFunc
- def
Hilbert17.fThe statement is false in general if we restrict to polynomials line 53 sourceSource documentation
The statement is false in general if we restrict to polynomials. The polynomial (by Motzkin) $f(x, y) = x^4 y^2 + x^2 y^4 - 3 x^2 y^2 + 1$ takes only nonnegative values but cannot be written as a sum of squares of polynomials.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MvPolynomial,Fin,OfNat.ofNat,Nat,RealProof uses:
HAdd.hAdd,Finsupp,HSub.hSub,HMul.hMul,HPow.hPow,MvPolynomial.X37 instances, coercions and auxiliary constants left out.
noncomputable def f : MvPolynomial (Fin 2) ℝ := …
- theorem
Hilbert17.f_nonnegThe Motzkin polynomial is non-negative everywhere line 59 sourceSource documentation
The Motzkin polynomial is non-negative everywhere.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LE.le,OfNat.ofNat,RingHom,MvPolynomial,Fin,Nat.succ,Nat,Finsupp,MvPolynomial.eval,Matrix.vecCons,Matrix.vecEmpty, Hilbert17.fProof uses:
Eq.mpr,HAdd.hAdd,HSub.hSub,HMul.hMul,HPow.hPow,id,Eq,congrArg,Eq.trans,MvPolynomial.X,map_add,congr,map_sub,map_mul,map_pow,congrFun',MvPolynomial.eval_X,Matrix.cons_val_fin_one,MvPolynomial.eval_ofNat,map_oneand 95 more147 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
theorem f_nonneg : ∀ x y : ℝ, 0 ≤ f.eval ![x, y] := by …
- theorem
Hilbert17.f_not_sum_of_squaresThe Motzkin polynomial cannot be written as a sum of squares of polynomials sorry line 73 sourceSource documentation
The Motzkin polynomial cannot be written as a sum of squares of polynomials.
depends on sorry what this means
Statement uses:
Not,Exists,Nat,LT.lt,OfNat.ofNat,Fin,MvPolynomial,Real,Eq, Hilbert17.f,Finset.sum,Finsupp,Finset.univ,HPow.hPowProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous30 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem f_not_sum_of_squares : ¬∃ (n : ℕ) (hn : 0 < n) (S : Fin n → MvPolynomial (Fin 2) ℝ), f = ∑ i, S i ^ 2 := by …Mentions: Hilbert17.f
- def
Hilbert17.Hilbert17thProblemHomogenousPolyDocumented declaration: Hilbert17thProblemHomogenousPoly line 85 sourceSource documentation
For the polynomial version, Hilbert showed that every nonnegative homogeneous polynomial in $n$ variables of degree $2d$ can be written as a sum of squares of polynomials if and only if
- $n = 1$
- $n = 2$
- $d = 1$
- $(n, d) = (3, 2)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
MvPolynomial,Fin,Real,MvPolynomial.IsHomogeneous,HMul.hMul,OfNat.ofNat,LE.le,RingHom,Finsupp,MvPolynomial.eval,Exists,Eq,Finset.sum,Finset.univ,HPow.hPow25 instances, coercions and auxiliary constants left out.
def Hilbert17thProblemHomogenousPoly (n d : ℕ) : Prop := …
- theorem
Hilbert17.Hilbert17thProblemHomogenousPoly_zero_leftline 91 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Hilbert17.Hilbert17thProblemHomogenousPoly,OfNat.ofNatProof uses:
MvPolynomial,Fin,Real,MvPolynomial.IsHomogeneous,HMul.hMul,LE.le,RingHom,Finsupp,MvPolynomial.eval,Exists.intro,Exists,Eq,Finset.sum,Finset.univ,HPow.hPow,MvPolynomial.C,Real.sqrt,MvPolynomial.coeff,Ne,MvPolynomial.totalDegreeand 30 more55 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- theorem
Hilbert17.Hilbert17thProblemHomogenousPoly_zero_rightline 100 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Hilbert17.Hilbert17thProblemHomogenousPoly,OfNat.ofNatProof uses:
MvPolynomial,Fin,Real,MvPolynomial.IsHomogeneous,HMul.hMul,LE.le,RingHom,Finsupp,MvPolynomial.eval,Eq,Ne,Or,Exists,Finset.sum,Finset.univ,HPow.hPow,eq_or_ne,Exists.intro,of_eq_true,Eq.transand 41 more69 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- theorem
Hilbert17.hilbert_17th_problem_polyHilbert's 17th problem for homogeneous polynomials: characterization of dimensions and degrees where non-negative polynomials are sums of squares of polynomials sorry line 115 sourceSource documentation
Hilbert's 17th problem for homogeneous polynomials: characterization of dimensions and degrees where non-negative polynomials are sums of squares of polynomials.
depends on sorry what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Iff, Hilbert17.Hilbert17thProblemHomogenousPoly,Or,Eq,AndProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem hilbert_17th_problem_poly {n d : ℕ} (hn : 0 < n) (hd : 0 < d) : Hilbert17thProblemHomogenousPoly n d ↔ n = 1 ∨ n = 2 ∨ d = 1 ∨ n = 3 ∧ d = 2 := by …