{
  "id": "7483",
  "ident": "NS.07483",
  "slug": "papers-pfisterpythagorasnumber",
  "title": "Pfister's problem on the Pythagoras number of $\\mathbb{R}(X_1, \\dots, X_n)$",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "**Pfister's problem** (Problem 1 of [Pfister1971, §4]): what is the true value of\n$p(\\mathbb{R}(X_1, \\dots, X_n))$, as a function of $n$? It is $1$, $2$, $4$ for $n = 0, 1, 2$\n(`pfister_problem.variants.zero`, `pfister_problem.variants.one`, `pfister_problem.variants.two`)\nand open for every $n \\ge 3$, where only the bounds\n$n + 2 \\le p(\\mathbb{R}(X_1, \\dots, X_n)) \\le 2^n$ are known.",
  "subjects": [
    "math.NT",
    "math.AC",
    "math.AG",
    "msc:11",
    "msc:12",
    "msc:14"
  ],
  "tags": [
    "question"
  ],
  "collection": "papers",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "PfisterPythagorasNumber.pfister_problem",
  "statement_lean": "theorem pfister_problem :\n    ∀ n, IsLeast (pythagorasBounds (MvRatFunc (Fin n) ℝ)) (pfister_problem.answer n)",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Pfister's problem on the Pythagoras number of $\\mathbb{R}(X_1, \\dots, X_n)$\n\nThe Pythagoras number $p(K)$ of a field $K$ is the least $p$ such that every sum of squares in\n$K$ is a sum of $p$ squares, i.e. the least element of `pythagorasBounds K`.\n\nArtin's solution of Hilbert's 17th problem shows that a positive semidefinite rational function\nin $\\mathbb{R}(X_1, \\dots, X_n)$ is a sum of squares, and Pfister showed that $2^n$ squares\nsuffice ([Pfister1967, Theorem 1]; for the field, Corollary 1 of Theorem 2 in [Pfister1971]).\nSince sums of squares are positive semidefinite, $p(\\mathbb{R}(X_1, \\dots, X_n)) \\le 2^n$\n[Pfister1995, p. 95].\n\nProblem 1 of [Pfister1971, §4] asks for the true value of $p(\\mathbb{R}(X_1, \\dots, X_n))$.\nThe question is often posed as: is $p(\\mathbb{R}(X_1, \\dots, X_n)) = 2^n$, i.e. is Pfister's\nbound optimal? See e.g. [Benoist2017, Question 0.2].\n\nProblem 1 itself quotes the lower bound $n + 1 \\le p(\\mathbb{R}(X_1, \\dots, X_n))$ from Cassels'\ntheorem [Cassels1964]. For $n \\ge 2$ the best known bounds are\n$n + 2 \\le p(\\mathbb{R}(X_1, \\dots, X_n)) \\le 2^n$ [Pfister1995, p. 97], where the lower bound\nfollows from the Cassels–Ellison–Pfister theorem [CEP1971]. The bounds agree for $n = 2$, so the\nvalue is known for $n \\le 2$ and open for every $n \\ge 3$. The survey\n[MerkurjevParimala2025, §5.2] records the question as open even for $\\mathbb{R}(X_1, X_2, X_3)$\n(Question 5.7).\n\n*References:*\n- [Pfister1971] A. Pfister, *Sums of squares in real function fields*, pp. 297–300 in Actes du\n  Congrès International des Mathématiciens, Tome 1 (Nice, 1970), Gauthier-Villars, 1971,\n  [IMU scan](https://www.mathunion.org/fileadmin/ICM/Proceedings/ICM1970.1/ICM1970.1.ocr.pdf).\n- [Pfister1967] A. Pfister, *Zur Darstellung definiter Funktionen als Summe von Quadraten*,\n  Invent. Math. 4 (1967), 229–237, [doi:10.1007/BF01425382](https://doi.org/10.1007/BF01425382).\n- [Cassels1964] J. W. S. Cassels, *On the representation of rational functions as sums of squares*,\n  Acta Arith. 9 (1964), 79–82, [doi:10.4064/aa-9-1-79-82](https://doi.org/10.4064/aa-9-1-79-82).\n- [Pfister1995] A. Pfister, *Quadratic forms with applications to algebraic geometry and\n  topology*, London Math. Soc. Lecture Note Ser. 217, Cambridge University Press, 1995.\n- [CEP1971] J. W. S. Cassels, W. J. Ellison, A. Pfister, *On sums of squares and on elliptic\n  curves over function fields*, J. Number Theory 3 (1971), 125–149,\n  [doi:10.1016/0022-314X(71)90030-8](https://doi.org/10.1016/0022-314X(71)90030-8).\n- [Benoist2017] O. Benoist, *On Hilbert's 17th problem in low degree*, Algebra Number Theory 11\n  (2017), 929–959, [doi:10.2140/ant.2017.11.929](https://doi.org/10.2140/ant.2017.11.929),\n  [arXiv:1602.07330](https://arxiv.org/abs/1602.07330).\n- [MerkurjevParimala2025] A. Merkurjev, R. Parimala, *Quadratic forms beyond arithmetic*, Notices\n  Amer. Math. Soc. 72 (2025), no. 7, 711–718,\n  [doi:10.1090/noti3192](https://doi.org/10.1090/noti3192).\n-/\n\n@[expose] public section\n\nnamespace PfisterPythagorasNumber\n\n/-- Every sum of squares in $\\mathbb{R}$ is a square and $1$ is not a sum of zero squares, so\n$p(\\mathbb{R}) = 1$. -/\n@[category test, AMS 11]\ntheorem isLeast_pythagorasBounds_real : IsLeast (pythagorasBounds ℝ) 1 := by\n  refine ⟨fun a ha ↦ ⟨fun _ ↦ √a, ?_⟩, fun p hp ↦ ?_⟩\n  · simp [Real.mul_self_sqrt ha.nonneg]\n  · rcases Nat.eq_zero_or_pos p with rfl | h\n    · obtain ⟨f, hf⟩ := hp 1 IsSumSq.one\n      simp at hf\n    · exact h\n\ndef pfister_problem.answer : ℕ → ℕ := sorry\n\n/--\n**Pfister's problem** (Problem 1 of [Pfister1971, §4]): what is the true value of\n$p(\\mathbb{R}(X_1, \\dots, X_n))$, as a function of $n$? It is $1$, $2$, $4$ for $n = 0, 1, 2$\n(`pfister_problem.variants.zero`, `pfister_problem.variants.one`, `pfister_problem.variants.two`)\nand open for every $n \\ge 3$, where only the bounds\n$n + 2 \\le p(\\mathbb{R}(X_1, \\dots, X_n)) \\le 2^n$ are known.\n-/\n@[category research open, question value, AMS 11 12 14]\ntheorem pfister_problem :\n    ∀ n, IsLeast (pythagorasBounds (MvRatFunc (Fin n) ℝ)) (pfister_problem.answer n) := by\n  sorry\n\n/--\nPfister's problem in its common yes/no form (e.g. Question 0.2 of [Benoist2017]): is\n$p(\\mathbb{R}(X_1, \\dots, X_n)) = 2^n$ for every $n$, i.e. is Pfister's bound optimal? This\nholds for $n \\le 2$ and is open for every $n \\ge 3$.\n-/\n@[category research open, question, AMS 11 12 14]\ntheorem pfister_problem.variants.eq_two_pow :\n    ∀ n : ℕ, IsLeast (pythagorasBounds (MvRatFunc (Fin n) ℝ)) (2 ^ n) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Pfister's theorem**: every sum of squares in $\\mathbb{R}(X_1, \\dots, X_n)$ is a sum of $2^n$\nsquares [Pfister1995, p. 95]; this is Corollary 1 of Theorem 2 in [Pfister1971]. For positive\nsemidefinite polynomials it is [Pfister1967, Theorem 1], the quantitative refinement of Artin's\ntheorem `Hilbert17.hilbert_17th_problem` in `FormalConjectures/HilbertProblems/17.lean`.\n-/\n@[category research solved, AMS 11 12 14, formal_proof using lean4 at \"https://github.com/anatoliiohorodnyk/lean-fc-proofs/blob/a25a41b3e51f6987edeafcc1602e80e6d30e6f05/Proofs/T_PfisterPythagorasNumber_pfister_problem_variants_upper_bound.lean#L1006\"]\ntheorem pfister_problem.variants.upper_bound (n : ℕ) :\n    2 ^ n ∈ pythagorasBounds (MvRatFunc (Fin n) ℝ) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Cassels' theorem** [Cassels1964], as quoted in Problem 1 of [Pfister1971, §4]:\n$1 + X_1^2 + \\dots + X_n^2$ is not a sum of $n$ squares in $\\mathbb{R}(X_1, \\dots, X_n)$.\n-/\n@[category research solved, AMS 11 12 14, formal_proof using lean4 at \"https://github.com/anatoliiohorodnyk/lean-fc-proofs/blob/a25a41b3e51f6987edeafcc1602e80e6d30e6f05/Proofs/T_PfisterPythagorasNumber_pfister_problem_variants_cassels.lean#L434\"]\ntheorem pfister_problem.variants.cassels (n : ℕ) :\n    ¬IsSumSqOfLength n (algebraMap (MvPolynomial (Fin n) ℝ) (MvRatFunc (Fin n) ℝ)\n      (1 + ∑ i, MvPolynomial.X i * MvPolynomial.X i)) := by\n  sorry\n\n/--\nThe lower bound $n + 1 \\le p(\\mathbb{R}(X_1, \\dots, X_n))$ quoted in Problem 1 of\n[Pfister1971, §4]: $1 + X_1^2 + \\dots + X_n^2$ is a sum of $n + 1$ squares but, by Cassels'\ntheorem `pfister_problem.variants.cassels`, not of $n$ squares. It is superseded by\n`pfister_problem.variants.lower_bound` for $n \\ge 2$.\n-/\n@[category research solved, AMS 11 12 14]\ntheorem pfister_problem.variants.add_one_le (n : ℕ) {p : ℕ}\n    (hp : p ∈ pythagorasBounds (MvRatFunc (Fin n) ℝ)) : n + 1 ≤ p := by\n  by_contra h\n  have hsq : IsSumSqOfLength (n + 1) (algebraMap (MvPolynomial (Fin n) ℝ) (MvRatFunc (Fin n) ℝ)\n      (1 + ∑ i, MvPolynomial.X i * MvPolynomial.X i)) :=\n    ⟨Fin.cons 1 fun i ↦ algebraMap (MvPolynomial (Fin n) ℝ) (MvRatFunc (Fin n) ℝ)\n      (MvPolynomial.X i), by simp [Fin.sum_univ_succ, map_sum]⟩\n  exact pfister_problem.variants.cassels n ((hp _ hsq.isSumSq).of_le (by omega))\n\n/--\nThe lower bound $n + 2 \\le p(\\mathbb{R}(X_1, \\dots, X_n))$ for $n \\ge 2$ [Pfister1995, p. 97],\na consequence of the Cassels–Ellison–Pfister theorem [CEP1971]. The hypothesis $n \\ge 2$ is\nneeded: $p(\\mathbb{R}(X)) = 2 < 3$.\n-/\n@[category research solved, AMS 11 12 14]\ntheorem pfister_problem.variants.lower_bound (n : ℕ) (hn : 2 ≤ n) {p : ℕ}\n    (hp : p ∈ pythagorasBounds (MvRatFunc (Fin n) ℝ)) : n + 2 ≤ p := by\n  sorry\n\n/--\n$p(\\mathbb{R}(X_1, \\dots, X_n)) = 1$ for $n = 0$, i.e. $p(\\mathbb{R}) = 1$: here the bounds $n + 1$\nand $2^n$ of `pfister_problem.variants.add_one_le` and `pfister_problem.variants.upper_bound`\nagree. Compare `isLeast_pythagorasBounds_real`, the same value for `ℝ` itself.\n-/\n@[category textbook, AMS 11 12 14]\ntheorem pfister_problem.variants.zero : IsLeast (pythagorasBounds (MvRatFunc (Fin 0) ℝ)) 1 :=\n  ⟨pfister_problem.variants.upper_bound 0,\n    fun _ hp ↦ pfister_problem.variants.add_one_le 0 hp⟩\n\n/--\n$p(\\mathbb{R}(X)) = 2$ [Pfister1995, p. 96]: Pfister's bound gives $p \\le 2$, and Cassels'\ntheorem `pfister_problem.variants.cassels` gives $p \\ge 2$ through\n`pfister_problem.variants.add_one_le`, since $1 + X^2$ is a sum of two squares that is not a\nsquare in $\\mathbb{R}(X)$.\n-/\n@[category textbook, AMS 11 12 14]\ntheorem pfister_problem.variants.one : IsLeast (pythagorasBounds (MvRatFunc (Fin 1) ℝ)) 2 :=\n  ⟨pfister_problem.variants.upper_bound 1,\n    fun _ hp ↦ pfister_problem.variants.add_one_le 1 hp⟩\n\n/--\n$p(\\mathbb{R}(X_1, X_2)) = 4$ [CEP1971], as recorded in [Pfister1971, §4] and [Pfister1995, p. 96]:\nthe bounds $n + 2$ and $2^n$ agree when $n = 2$.\n-/\n@[category research solved, AMS 11 12 14]\ntheorem pfister_problem.variants.two : IsLeast (pythagorasBounds (MvRatFunc (Fin 2) ℝ)) 4 :=\n  ⟨pfister_problem.variants.upper_bound 2,\n    fun _ hp ↦ pfister_problem.variants.lower_bound 2 le_rfl hp⟩\n\nend PfisterPythagorasNumber\n",
  "statement_hash": "91b3a69680689843878e584c690e78de3d65dac85075e4d7e56ed2b3b6c387e7",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}