{
  "id": "8297",
  "ident": "NS.08297",
  "slug": "wikipedia-piercebirkhoff",
  "title": "Pierce–Birkhoff conjecture",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "The Pierce-Birkhoff conjecture states that for every real piecewise-polynomial function\n`f : ℝⁿ → ℝ`, there exists a finite set of polynomials `gᵢⱼ ∈ ℝ[x₁, ..., xₙ]` such that\n`f = supᵢ infⱼ(gᵢⱼ)`.",
  "subjects": [
    "math.AC",
    "msc:13"
  ],
  "tags": [],
  "collection": "wikipedia",
  "source_url": "https://en.wikipedia.org/wiki/Pierce%E2%80%93Birkhoff_conjecture",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "PierceBirkhoff.pierce_birkhoff_conjecture",
  "statement_lean": "theorem pierce_birkhoff_conjecture {n : ℕ} (f : (Fin n → ℝ) → ℝ)\n    (hf : IsPiecewiseMvPolynomial f) :\n    ∃ (ι κ : Type) (g : ι → κ → MvPolynomial (Fin n) ℝ), Finite ι ∧ Finite κ ∧\n      ∀ x, f x = ⨆ i, ⨅ j, MvPolynomial.eval x (g i j)",
  "challenge_source": "/-\nCopyright 2025 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# Pierce–Birkhoff conjecture\n\n*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Pierce%E2%80%93Birkhoff_conjecture)\n\nThe Pierce-Birkhoff conjecture asserts that any piecewise-polynomial function can be expressed\nas a maximum of finite minima of finite collections of polynomials. It was first stated in 1956\nby Garrett Birkhoff and Richard S. Pierce, though the modern rigorous formulation is due to\nMelvin Henriksen and John R. Isbell.\n\nThe conjecture has been proved for `n = 1` and `n = 2` by Louis Mahé.\n-/\n\n@[expose] public section\n\nnamespace PierceBirkhoff\n\n/--\nA set is semi-algebraic in `ℝⁿ` if it can be described by a finite union of sets, each defined by\nfinitely many simultaneous multivariate polynomial equations and strict inequalities.\n-/\ndef IsSemiAlgebraic {n : ℕ} (S : Set (Fin n → ℝ)) : Prop :=\n  ∃ (ι : Type) (p₀ p₁ : ι → Finset (MvPolynomial (Fin n) ℝ)), Finite ι ∧\n    S = ⋃ i, {x | (∀ p ∈ p₀ i, MvPolynomial.eval x p = 0) ∧\n      ∀ p ∈ p₁ i, MvPolynomial.eval x p > 0}\n\n/--\nA set is semi-algebraic in `ℝ` if it can be described by a finite boolean combination\nof polynomial equations and inequalities.\n-/\ndef IsSemiAlgebraic₁ (S : Set ℝ) : Prop :=\n  ∃ (ι₀ ι₁ : Type) (p₀ : ι₀ → Polynomial ℝ) (p₁ : ι₁ → Polynomial ℝ), Finite ι₀ ∧ Finite ι₁ ∧\n    S = (⋃ i, {x | Polynomial.eval x (p₀ i) = 0}) ∪ ⋃ i, {x | Polynomial.eval x (p₁ i) > 0}\n\nopen scoped Polynomial\n\n/--\nA function `f : ℝⁿ → ℝ` is piecewise polynomial if there exists a finite covering of `ℝⁿ` by\nclosed semi-algebraic sets such that the restriction of `f` to each set in the covering is\npolynomial.\n-/\ndef IsPiecewiseMvPolynomial {n : ℕ} (f : (Fin n → ℝ) → ℝ) : Prop :=\n  ∃ (ι : Type) (P : ι → Set (Fin n → ℝ))\n    (g : ι → MvPolynomial (Fin n) ℝ),\n    Finite ι ∧\n    (∀ i, IsClosed (P i)) ∧\n    (∀ i, IsSemiAlgebraic (P i)) ∧\n    (⋃ i, P i) = Set.univ ∧\n    ∀ᵉ (i : ι) (x ∈ P i), f x = MvPolynomial.eval x (g i)\n\n/--\nA function `f : ℝ → ℝ` is piecewise polynomial if there exists a finite covering of `ℝ` by\nclosed semi-algebraic sets such that the restriction of `f` to each set in the covering is\npolynomial.\n-/\ndef IsPiecewisePolynomial (f : ℝ → ℝ) : Prop :=\n  ∃ (ι : Type) (P : ι → Set ℝ)\n    (g : ι → Polynomial ℝ),\n    Finite ι ∧\n    (∀ (i : ι), IsClosed (P i)) ∧\n    (∀ (i : ι), IsSemiAlgebraic₁ (P i)) ∧\n    (⋃ (i : ι), P i) = Set.univ ∧\n    ∀ᵉ (i : ι) (x ∈ P i), f x = Polynomial.eval x (g i)\n\n/--\nThe Pierce-Birkhoff conjecture states that for every real piecewise-polynomial function\n`f : ℝⁿ → ℝ`, there exists a finite set of polynomials `gᵢⱼ ∈ ℝ[x₁, ..., xₙ]` such that\n`f = supᵢ infⱼ(gᵢⱼ)`.\n-/\n@[category research open, AMS 13]\ntheorem pierce_birkhoff_conjecture {n : ℕ} (f : (Fin n → ℝ) → ℝ)\n    (hf : IsPiecewiseMvPolynomial f) :\n    ∃ (ι κ : Type) (g : ι → κ → MvPolynomial (Fin n) ℝ), Finite ι ∧ Finite κ ∧\n      ∀ x, f x = ⨆ i, ⨅ j, MvPolynomial.eval x (g i j) := by\n  sorry\n\n/--\nThe Pierce-Birkhoff conjecture holds for `n = 1`.\nThis was proved by Louis Mahé.\n-/\n@[category research solved, AMS 13]\ntheorem pierce_birkhoff_conjecture_dim_one (f : ℝ → ℝ)\n    (hf : IsPiecewisePolynomial f) :\n    ∃ (ι κ : Type) (g : ι → κ → Polynomial ℝ), Finite ι ∧ Finite κ ∧\n      ∀ x, f x = ⨆ i, ⨅ j, Polynomial.eval x (g i j) := by\n  sorry\n\n/--\nThe Pierce-Birkhoff conjecture holds for `n = 2`.\nThis was proved by Louis Mahé.\n-/\n@[category research solved, AMS 13]\ntheorem pierce_birkhoff_conjecture_dim_two\n    (f : (Fin 2 → ℝ) → ℝ) (hf : IsPiecewiseMvPolynomial f) :\n    ∃ (ι κ : Type) (g : ι → κ → MvPolynomial (Fin 2) ℝ), Finite ι ∧ Finite κ ∧\n      ∀ x, f x = ⨆ i, ⨅ j, MvPolynomial.eval x (g i j) := by\n  sorry\n\nend PierceBirkhoff\n",
  "statement_hash": "75aee14fb3b81cdc1b807ef931476e888208623d4a8f16dd62e4fce978985eb5",
  "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."
}