Mathematics / Formalization Note / Algebra, Logic & Quantum
The Motzkin Polynomial Is Not a Sum of Three Squares: Cassels-Ellison-Pfister in Lean 4 via Picard-Fuchs (Step R1.H1 of Pfister's n + 2 Bound)
Proof of step R1.H1 (PR #42928), accepted by the Left to Solve Lean checker, in mvanhorn's reduction R1 of Pfister's n + 2 lower bound. The other step, R1.H2 (Cassels' variable-adjunction step), was proved by luciusacarr (PR #10556), and the root was closed by Genbox's direct proof (PR #48193), which contains the reduction and both steps inline, most of the R1.H1 part verbatim from PR #42928. The initial denominator descent adapts luciusacarr's R1.H2 proof, as the file header states; the Gram-determinant passage to an elliptic curve, the descent to a quadratic twist and the Picard-Fuchs, Manin-constant and Wronskian argument are the author's.
- Author
- Ali Uyar
- Scope
- Modular suite
- Status
- Merged on Left to Solve
- Original theorem
- Cassels, Ellison and Pfister (J. Number Theory 3, 1971) proved that the Motzkin polynomial 1 + x^2 y^4 + x^4 y^2 - 3 x^2 y^2 is not a sum of three squares in R(x, y), so p(R(x, y)) = 4. Combined with Cassels' theorem (Acta Arith. 9, 1964) this gives p(R(X_1, ..., X_n)) >= n + 2 for n >= 2 (Pfister 1995). Pfister (Invent. Math. 4, 1967) proved the upper bound p(R(X_1, ..., X_n)) <= 2^n.
- Statement source
- Left to Solve (FormalConjectures / OMA statements)
Machine-checked in Lean 4 ✓ Accepted and merged on Left to Solve.
Summary
The Pythagoras number p(K) of a field K is the least m such that every sum of squares in K is a sum of m squares. Pfister (1967) proved p(R(X_1, ..., X_n)) <= 2^n, and Cassels, Ellison and Pfister (1971) proved p(R(x, y)) = 4 by showing that the Motzkin polynomial is not a sum of three squares in R(x, y); with Cassels' 1964 theorem this gives p(R(X_1, ..., X_n)) >= n + 2 for n >= 2. PR #42928 proves the Cassels-Ellison-Pfister theorem in 3,889 lines of Lean 4, accepted by the Left to Solve Lean checker as step R1.H1 of mvanhorn's reduction of that lower bound (luciusacarr proved step R1.H2; Genbox closed the root). A denominator descent (adapted from luciusacarr's R1.H2 proof) and a Gram determinant produce a point on an elliptic curve over R(x); even/odd descent and doubling give a section on a quadratic twist over R(s); a Picard-Fuchs operator applied along the section yields a nonzero constant (Manin's construction); and a Wronskian argument on the compactified negative real axis gives a contradiction.
Context
The original proof of Cassels, Ellison and Pfister goes through the group of rational points of an elliptic curve over R(x), for which Mathlib has no function-field Mordell-Weil theory. This file reaches the same theorem with a Picard-Fuchs equation checked by formal differentiation and a real-analytic Wronskian estimate, using only existing Mathlib calculus and polynomial algebra.
Root problems on Left to Solve
- LTS PfisterPythagorasNumber.pfister_problem.variants.lower_bound closed by @Genbox
Credits
Mathematics: J. W. S. Cassels, W. J. Ellison and A. Pfister (1971); Cassels (1964); Pfister (1967, 1995). Reduction R1 of the root on Left to Solve: mvanhorn ('Credit: @mvanhorn' in the reduction file). Step R1.H2: luciusacarr (PR #10556). Root closed by Genbox (PR #48193), a single file containing the reduction and both steps; most of the R1.H1 proof from PR #42928 appears in it verbatim. Adapted Lean code, per the file header: 'The denominator descent and common denominator construction adapt the R1.H2 proof by @luciusacarr.' Lean proof produced with AI coding agents operated by the author (t3-code, model gpt-6.2-astra, as recorded in the PR body); the PR body lists no other contributors.
Pull request ledger (1)
- #42928 PfisterPythagorasNumber.pfister_problem.variants.lower_bound.R1.H1 merged
Cite
@misc{uyar2026_pfister_pythagoras_number_lean4,
author = {Uyar, Ali},
title = {The Motzkin Polynomial Is Not a Sum of Three Squares: Cassels-Ellison-Pfister in Lean 4 via Picard-Fuchs (Step R1.H1 of Pfister's n + 2 Bound)},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.24765166},
url = {https://doi.org/10.5281/zenodo.24765166},
note = {Lean 4 formalization technical note (Cassels, Ellison and Pfister (J. Number Theory 3, 1971) proved that the Motzkin polynomial 1 + x^2 y^4 + x^4 y^2 - 3 x^2 y^2 is not a sum of three squares in R(x, y), so p(R(x, y)) = 4. Combined with Cassels' theorem (Acta Arith. 9, 1964) this gives p(R(X_1, ..., X_n)) >= n + 2 for n >= 2 (Pfister 1995). Pfister (Invent. Math. 4, 1967) proved the upper bound p(R(X_1, ..., X_n)) <= 2^n.). Code: https://github.com/aliuyar1234/lean4-landmark-formalizations/tree/main/27-pfister-pythagoras-number}
}