{
  "id": "8239",
  "ident": "NS.08239",
  "slug": "wikipedia-movingsofa--sofaconstant-eq",
  "title": "Moving Sofa Problem · sofaConstant_eq",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "What is the sofa constant?",
  "subjects": [
    "math.OC",
    "msc:49"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "MovingSofa.sofaConstant_eq",
  "statement_lean": "theorem sofaConstant_eq : sofaConstant = sofaConstant_eq.answer",
  "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# Moving Sofa Problem\n\n*References:*\n- [Wikipedia](https://en.wikipedia.org/wiki/Moving_sofa_problem)\n- [Ge92] Gerver, J. L., _On moving a sofa around a corner_. Geometriae Dedicata 42.3 (1992): 267-283.\n- [Ro18] Romik, D. _Differential equations and exact solutions in the moving sofa problem_. Experimental mathematics 27.3 (2018): 316-330.\n- [Ba24] Baek, J. _Optimality of Gerver's Sofa_. arXiv preprint arXiv:2411.19826 (2024).\n-/\n\n@[expose] public section\n\nnoncomputable section\n\nnamespace MovingSofa\n\nopen Topology\nopen scoped Real unitInterval EuclideanGeometry\n\n/-- The **horizontal side** of the hallway is $(-\\infty, 1] \\times [0, 1]$. -/\ndef horizontalHallway : Set ℝ² := {!₂[x, y] | (x) (y) (_ : x ≤ 1 ∧ 0 ≤ y ∧ y ≤ 1)}\n\n/-- The **vertical side** of the hallway is $[0, 1] \\times (-\\infty, 1]$. -/\ndef verticalHallway : Set ℝ² := {!₂[x, y] | (x) (y) (_ : 0 ≤ x ∧ x ≤ 1 ∧ y ≤ 1)}\n\n/-- The **hallway** is the union of its horizontal and vertical sides. -/\ndef hallway : Set ℝ² := horizontalHallway ∪ verticalHallway\n\nscoped notation \"E(2)\" => ℝ² ≃ᵃⁱ[ℝ] ℝ²\n\ninstance : TopologicalSpace E(2) :=\n  .induced (·.toAffineIsometry.toContinuousAffineMap) inferInstance\n\n/--\nA connected closed set $s$ is a **moving sofa** according to a rigid motion $m:I\\to\\mathrm{SE}(2)$,\nif the sofa is initially in the horizontal side of the hallway and ends up in the vertical side.\nHere, since $\\mathrm{SE}(2)$ is not in Mathlib yet, we use $\\mathrm{E}(2)$ and rely on continuity\nand $m(0) = \\mathrm{id}$ to ensure $m$ is in $\\mathrm{SE}(2)$.\n-/\nstructure IsMovingSofa (s : Set ℝ²) (m : I → E(2)) : Prop where\n  isConnected : IsConnected s\n  isClosed : IsClosed s\n  continuous : Continuous m\n  zero : m 0 = .refl ℝ ℝ²\n  initial : s ⊆ horizontalHallway\n  subset_hallway : ∀ t, m t '' s ⊆ hallway\n  final : m 1 '' s ⊆ verticalHallway\n\n/-- The unit square. -/\ndef unitSquare : Set ℝ² := parallelepiped (EuclideanSpace.basisFun (Fin 2) ℝ)\n\n/-- Coordinates of points in the unit square lie in `[0,1]`. -/\n@[category API, AMS 49]\nprivate lemma mem_Icc_of_mem_unitSquare {p : ℝ²} (hp : p ∈ unitSquare) (i : Fin 2) :\n    p i ∈ Set.Icc (0:ℝ) 1 := by\n  have h := parallelepiped_basis_eq (EuclideanSpace.basisFun (Fin 2) ℝ).toBasis\n  rw [unitSquare, show parallelepiped ⇑(EuclideanSpace.basisFun (Fin 2) ℝ) =\n    parallelepiped (EuclideanSpace.basisFun (Fin 2) ℝ).toBasis by\n      rw [OrthonormalBasis.coe_toBasis], h] at hp\n  simpa using hp i\n\n/--\nThe unit square $[0,1]^2$ is a valid moving sofa (with the identity motion).\nIt sits in the corner where both hallways overlap, so the stationary motion works.\nThis is a sanity check that the `IsMovingSofa` definition is not vacuous.\n-/\n@[category test, AMS 49]\ntheorem isMovingSofa_unitSquare : ∃ m, IsMovingSofa unitSquare m := by\n  refine ⟨fun _ => .refl ℝ ℝ², ?_, ?_, continuous_const, rfl, ?_, ?_, ?_⟩\n  · unfold unitSquare parallelepiped\n    refine ⟨⟨0, 0, by simp, by simp⟩, (convex_Icc _ _).isPreconnected.image _ ?_⟩\n    exact (continuous_finsetSum _ fun i _ =>\n      (continuous_apply i).smul continuous_const).continuousOn\n  · unfold unitSquare parallelepiped\n    exact (isCompact_Icc.image\n      (continuous_finsetSum _ fun i _ =>\n        (continuous_apply i).smul continuous_const)).isClosed\n  · intro p hp\n    have h0 := mem_Icc_of_mem_unitSquare hp 0\n    have h1 := mem_Icc_of_mem_unitSquare hp 1\n    exact ⟨p 0, p 1, ⟨h0.2.trans (by norm_num), h1.1, h1.2⟩,\n      by ext i; fin_cases i <;> rfl⟩\n  · rintro t q ⟨p, hp, rfl⟩\n    rw [show (AffineIsometryEquiv.refl ℝ ℝ²) p = p from rfl]\n    refine .inl ?_\n    have h0 := mem_Icc_of_mem_unitSquare hp 0\n    have h1 := mem_Icc_of_mem_unitSquare hp 1\n    exact ⟨p 0, p 1, ⟨h0.2.trans (by norm_num), h1.1, h1.2⟩,\n      by ext i; fin_cases i <;> rfl⟩\n  · rintro q ⟨p, hp, rfl⟩\n    rw [show (AffineIsometryEquiv.refl ℝ ℝ²) p = p from rfl]\n    have h0 := mem_Icc_of_mem_unitSquare hp 0\n    have h1 := mem_Icc_of_mem_unitSquare hp 1\n    exact ⟨p 0, p 1, ⟨h0.1, h0.2, h1.2.trans (by norm_num)⟩,\n      by ext i; fin_cases i <;> rfl⟩\n\n/--\nThe rigid motion that translates by $p$ and then rotates counterclockwise by $\\alpha$.\nNote that [Ge92] used this definition while [Ro18] used rotation first and then translation.\n-/\ndef rotateTranslate (α : Real.Angle) (p : ℝ²) : E(2) :=\n  (AffineIsometryEquiv.vaddConst ℝ p).trans\n    (EuclideanGeometry.o.rotation α).toAffineIsometryEquiv\n\n/-- `rotateTranslate α p` sends $q$ to $R_\\alpha(q + p)$: the translation is applied first. -/\n@[category test, AMS 49]\ntheorem rotateTranslate_apply (α : Real.Angle) (p q : ℝ²) :\n    rotateTranslate α p q = EuclideanGeometry.o.rotation α (q + p) := rfl\n\n/--\nThe sofa according to a rotation path $p : [0, \\pi/2] \\to \\mathbb{R}^2$ as in [Ge92] is the\nintersection over $\\alpha \\in [0, \\pi/2]$ of hallways each translated by $p(\\alpha)$ and then\nrotated by $\\alpha$, with the special cases that the hallway at $0$ is the horizontal side\nand the hallway at $\\pi/2$ is the vertical side.\n-/\ndef sofaOfRotateTranslatePath (p : ℝ → ℝ²) : Set ℝ² :=\n  rotateTranslate 0 (p 0) '' horizontalHallway ∩\n  rotateTranslate ↑(π / 2) (p (π / 2)) '' verticalHallway ∩\n  ⋂ α ∈ Set.Icc 0 (π / 2), rotateTranslate α (p α) '' hallway\n\nnamespace GerversSofa\n\n/-\nGerver's constants defining the sofa.\n\nThis section follows Theorem 2 of Gerver's paper [Ge92].\n-/\n\n/--\nEq. 1-4 of [Ro18], which specifies the constants $A$, $B$, $\\varphi$, and $\\theta$ of [Ge92].\n-/\ndef ABφθSpec (A B φ θ : ℝ) : Prop :=\n  0 ≤ φ ∧ φ ≤ θ ∧ θ ≤ π / 4 ∧ 0 ≤ A ∧ 0 ≤ B ∧\n  A * (θ.cos - φ.cos) - 2 * B * φ.sin\n    + (θ - φ - 1) * θ.cos - θ.sin + φ.cos + φ.sin = 0 ∧\n  A * (3 * θ.sin + φ.sin) - 2 * B * φ.cos\n    + 3 * (θ - φ - 1) * θ.sin + 3 * θ.cos - φ.sin + φ.cos = 0 ∧\n  A * φ.cos - (φ.sin + 1 / 2 - φ.cos / 2 + B * φ.sin) = 0 ∧\n  (A + π / 2 - φ - θ) - (B - (θ - φ) * (1 + A) / 2 - (θ - φ)^2 / 4) = 0\n\n/-- There exist unique constants $A$, $B$, $\\varphi$, and $\\theta$ satisfying the spec. -/\n@[category textbook, AMS 49,\n  formal_proof using lean4 at \"https://github.com/RuifengCao/sofa-formal/blob/838baca722560f30ea8e60b8c711b20147626175/SofaSubmission/Defs.lean#L173\",\n  formal_proof using lean4 at \"https://github.com/dawidmtrela-dotcom/GerverSofaLean/blob/v1.0.0/GerverSofa/KernelOnly/PartE/E24KC6KernelFinalClosure.lean\"]\ntheorem ABφθSpec.existsUnique : ∃! ABφθ : ℝ × ℝ × ℝ × ℝ,\n    ABφθSpec ABφθ.1 ABφθ.2.1 ABφθ.2.2.1 ABφθ.2.2.2 :=\n  sorry\n\ndef A : ℝ := ABφθSpec.existsUnique.choose.1\ndef B : ℝ := ABφθSpec.existsUnique.choose.2.1\ndef φ : ℝ := ABφθSpec.existsUnique.choose.2.2.1\ndef θ : ℝ := ABφθSpec.existsUnique.choose.2.2.2\n\ndef r (α : ℝ) : ℝ :=\n  if α ≤ φ then\n    1 / 2\n  else if α ≤ θ then\n    (1 + A + α - φ) / 2\n  else if α ≤ π / 2 - θ then\n    A + α - φ\n  else if α ≤ π / 2 - φ then\n    B - (π / 2 - α - φ) * (1 + A) / 2 - (π / 2 - α - φ) ^ 2 / 4\n  else\n    0\n\ndef y (α : ℝ) : ℝ :=\n  ∫ t in α..π / 2 - φ, r t * t.sin\n\ndef x (α : ℝ) : ℝ :=\n  1 - ∫ t in α..π / 2 - φ, r t * t.cos\n\ndef p (α : ℝ) : ℝ² :=\n  !₂[if α ≤ φ\n      then α.cos - 1\n      else x (π / 2 - α) * α.cos + y (π / 2 - α) * α.sin - 1,\n    if α ≤ π / 2 - φ\n      then y α * α.cos - (4 * x 0 - 2 - x α) * α.sin - 1\n      else -(4 * x 0 - 3) * α.sin - 1]\n\nend GerversSofa\n\n/-- Gerver's sofa is the sofa according to the rotation path `GerversSofa.p`. -/\ndef gerversSofa : Set ℝ² :=\n  sofaOfRotateTranslatePath GerversSofa.p\n\nset_option linter.style.formal_proof_palomar false in\n/-- Gerver's concrete sofa admits a valid hallway motion. -/\n@[category research solved, AMS 49,\n  formal_proof using lean4 at \"https://github.com/dawidmtrela-dotcom/GerverSofaLean/releases/tag/v1.1.0\",\n  formal_proof using lean4 at \"https://github.com/RuifengCao/sofa-formal/blob/838baca722560f30ea8e60b8c711b20147626175/SofaSubmission/Solution.lean#L20\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/16653ae81e0e4f52a362bafae2ad3440100ad065/Solution.lean#L161-L168\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/0addd87e5a0a4550ab8a60019180f012167fa24f/Solution.lean#L120-L121\"]\ntheorem isMovingSofa_gerversSofa : ∃ m, IsMovingSofa gerversSofa m := by\n  sorry\n\nopen MeasureTheory\nopen scoped ENNReal\n\n/-- The **sofa constant** is the maximal area of a moving sofa. -/\n@[optimization_constant \"41a\"]\ndef sofaConstant : ℝ≥0∞ := ⨆ (s : Set ℝ²) (_ : ∃ m, IsMovingSofa s m), volume s\n\n/-- The sofa constant is at least 1, as witnessed by the unit square. -/\n@[category test, AMS 49]\ntheorem one_le_sofaConstant : 1 ≤ sofaConstant := by\n  calc\n    _ = volume unitSquare := (OrthonormalBasis.volume_parallelepiped _).symm\n    _ ≤ sofaConstant := le_iSup₂ (α := ℝ≥0∞) unitSquare isMovingSofa_unitSquare\n\ndef sofaConstant_eq.answer : ℝ≥0∞ := volume gerversSofa\n\nset_option linter.style.formal_proof_palomar false in\n/-- What is the sofa constant? -/\n@[category research solved, question value, AMS 49,\n  formal_proof using lean4 at \"https://github.com/deancureton/MovingSofa/blob/a0753860f1d2b4424e059c35e64ad611be71a415/MovingSofaSubmission/Solution.lean#L20\",\n  formal_proof using lean4 at \"https://github.com/RuifengCao/sofa-formal/blob/838baca722560f30ea8e60b8c711b20147626175/SofaSubmission/Solution.lean#L26\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/16653ae81e0e4f52a362bafae2ad3440100ad065/Solution.lean#L171-L173\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/0addd87e5a0a4550ab8a60019180f012167fa24f/Solution.lean#L124-L125\"]\ntheorem sofaConstant_eq : sofaConstant = sofaConstant_eq.answer := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- Gerver's sofa attains the sofa constant, conjectured by [Ge92] and claimed by [Ba24]. -/\n@[category research solved, AMS 49,\n  formal_proof using lean4 at \"https://github.com/deancureton/MovingSofa/blob/a0753860f1d2b4424e059c35e64ad611be71a415/MovingSofaSubmission/Solution.lean#L20\",\n  formal_proof using lean4 at \"https://github.com/RuifengCao/sofa-formal/blob/838baca722560f30ea8e60b8c711b20147626175/SofaSubmission/Solution.lean#L30\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/16653ae81e0e4f52a362bafae2ad3440100ad065/Solution.lean#L171-L173\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/0addd87e5a0a4550ab8a60019180f012167fa24f/Solution.lean#L124-L125\"]\ntheorem sofaConstant_eq_volume_gerversSofa : sofaConstant = volume gerversSofa := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nGerver's sofa is the unique sofa that attains the sofa constant, up to a rigid motion.\n\nThe motion is needed: `horizontalHallway` is $(-\\infty, 1] \\times [0, 1]$, so a leftward\ntranslate of any moving sofa is again one, obtained by sliding right and then following the\noriginal motion. It has the same area, so uniqueness cannot hold on the nose.\n-/\n@[category research solved, AMS 49,\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/16653ae81e0e4f52a362bafae2ad3440100ad065/Solution.lean#L176-L190\",\n  formal_proof using lean4 at \"https://github.com/vltanh/lean4-moving-sofa/blob/0addd87e5a0a4550ab8a60019180f012167fa24f/Solution.lean#L128-L131\"]\ntheorem volume_eq_sofaConstant_iff_congruent_gerversSofa (s : Set ℝ²)\n    (hs : ∃ m, IsMovingSofa s m) :\n    volume s = sofaConstant ↔ ∃ g : E(2), s = g '' gerversSofa := by\n  sorry\n\n/-!\n## The ambidextrous sofa\n\nRomik [Ro18, §1.2] asks for the largest shape that can turn both right and left around the\ncorner. `hallway` turns right and its reflection in `midline`, $(x, y) \\mapsto (x, 1 - y)$,\nturns left; the two share `horizontalHallway`.\n-/\n\n/-- The horizontal line $y = 1/2$, the axis of symmetry of the horizontal side of the hallway. -/\ndef midline : AffineSubspace ℝ ℝ² :=\n  AffineSubspace.mk' !₂[0, 1 / 2] (ℝ ∙ (EuclideanSpace.basisFun (Fin 2) ℝ 0))\n\ninstance : Nonempty midline := ⟨⟨_, AffineSubspace.self_mem_mk' _ _⟩⟩\n\n/-- Sanity check: reflection in `midline` acts as $(x, y) \\mapsto (x, 1 - y)$. -/\n@[category test, AMS 49]\ntheorem reflection_midline_apply (q : ℝ²) :\n    EuclideanGeometry.reflection midline q = !₂[q 0, 1 - q 1] := by\n  rw [EuclideanGeometry.reflection_apply_of_mem midline q (AffineSubspace.self_mem_mk' _ _),\n    midline, AffineSubspace.direction_mk', Submodule.reflection_apply,\n    Submodule.starProjection_singleton]\n  ext i\n  fin_cases i <;> simp [EuclideanSpace.inner_eq_star_dotProduct, Matrix.vecHead] <;> ring\n\n/-- A set closed under reflection in `midline` is its own image. -/\n@[category API, AMS 49]\nprivate lemma reflection_midline_image_eq_self {S : Set ℝ²}\n    (h : ∀ p ∈ S, EuclideanGeometry.reflection midline p ∈ S) :\n    EuclideanGeometry.reflection midline '' S = S :=\n  Set.Subset.antisymm (Set.image_subset_iff.2 h) fun p hp =>\n    ⟨_, h p hp, EuclideanGeometry.reflection_reflection midline p⟩\n\n/-- Sanity check: reflection in `midline` fixes the horizontal side of the hallway. -/\n@[category test, AMS 49]\ntheorem reflection_midline_image_horizontalHallway :\n    EuclideanGeometry.reflection midline '' horizontalHallway = horizontalHallway := by\n  refine reflection_midline_image_eq_self ?_\n  rintro _ ⟨x, y, ⟨hx, hy0, hy1⟩, rfl⟩\n  rw [reflection_midline_apply]\n  exact ⟨x, 1 - y, ⟨by simpa using hx, by simp; linarith, by simp; linarith⟩, by simp⟩\n\n/-- A point lies in the unit square iff both coordinates lie in `[0,1]`. -/\n@[category API, AMS 49]\nprivate lemma mem_unitSquare_iff {p : ℝ²} : p ∈ unitSquare ↔ ∀ i, p i ∈ Set.Icc (0:ℝ) 1 := by\n  rw [unitSquare, ← OrthonormalBasis.coe_toBasis, parallelepiped_basis_eq]\n  simp\n\n/-- A closed connected set is an **ambidextrous sofa** if both it and its reflection in `midline`\nare moving sofas [Ro18, Thm. 5]. -/\ndef IsAmbidextrousSofa (s : Set ℝ²) : Prop :=\n  (∃ m, IsMovingSofa s m) ∧ (∃ m, IsMovingSofa (EuclideanGeometry.reflection midline '' s) m)\n\n/-- Sanity check: the unit square is ambidextrous, since it is symmetric under reflection in\n`midline`. -/\n@[category test, AMS 49]\ntheorem isAmbidextrousSofa_unitSquare : IsAmbidextrousSofa unitSquare := by\n  have h : EuclideanGeometry.reflection midline '' unitSquare = unitSquare := by\n    refine reflection_midline_image_eq_self fun p hp => ?_\n    rw [mem_unitSquare_iff] at hp ⊢\n    intro i\n    rw [reflection_midline_apply]\n    fin_cases i\n    · simpa using hp 0\n    · have := hp 1\n      simp only [Set.mem_Icc] at this ⊢\n      constructor <;> simp <;> linarith [this.1, this.2]\n  exact ⟨isMovingSofa_unitSquare, by rw [h]; exact isMovingSofa_unitSquare⟩\n\n/-- The **ambidextrous sofa constant** is the maximal area of an ambidextrous sofa. -/\ndef ambidextrousSofaConstant : ℝ≥0∞ :=\n  ⨆ (s : Set ℝ²) (_ : IsAmbidextrousSofa s), volume s\n\n/-- The ambidextrous sofa constant is at least 1, as witnessed by the unit square. -/\n@[category test, AMS 49]\ntheorem one_le_ambidextrousSofaConstant : 1 ≤ ambidextrousSofaConstant := by\n  calc\n    _ = volume unitSquare := (OrthonormalBasis.volume_parallelepiped _).symm\n    _ ≤ ambidextrousSofaConstant :=\n      le_iSup₂ (α := ℝ≥0∞) unitSquare isAmbidextrousSofa_unitSquare\n\n/-- Every ambidextrous sofa is a moving sofa. -/\n@[category API, AMS 49]\ntheorem ambidextrousSofaConstant_le_sofaConstant :\n    ambidextrousSofaConstant ≤ sofaConstant :=\n  iSup₂_le fun s hs => le_iSup₂ (α := ℝ≥0∞) s hs.1\n\nnamespace RomiksSofa\n\n/-- The cubic $x^2 (x + 3) = 8$ has exactly one real root. -/\n@[category textbook, AMS 49]\ntheorem existsUnique_X : ∃! x : ℝ, x ^ 2 * (x + 3) = 8 := by\n  have hc : Continuous (fun x : ℝ => x ^ 2 * (x + 3)) := by fun_prop\n  obtain ⟨x, -, hx⟩ := intermediate_value_Icc (a := (0:ℝ)) (b := 2) (by norm_num)\n    hc.continuousOn (show (8:ℝ) ∈ Set.Icc _ _ by norm_num)\n  refine ⟨x, hx, fun y hy => ?_⟩\n  have hx0 : 0 < x := by nlinarith [sq_nonneg (x + 2), sq_nonneg x]\n  have hy0 : 0 < y := by nlinarith [sq_nonneg (y + 2), sq_nonneg y]\n  nlinarith [sq_nonneg (x - y), sq_nonneg (x + y), mul_pos hx0 hy0]\n\n/-- The cubic $x (4 x^2 + 3) = 1$ has exactly one real root. -/\n@[category textbook, AMS 49]\ntheorem existsUnique_Y : ∃! x : ℝ, x * (4 * x ^ 2 + 3) = 1 := by\n  have hc : Continuous (fun x : ℝ => x * (4 * x ^ 2 + 3)) := by fun_prop\n  obtain ⟨x, -, hx⟩ := intermediate_value_Icc (a := (0:ℝ)) (b := 1) (by norm_num)\n    hc.continuousOn (show (1:ℝ) ∈ Set.Icc _ _ by norm_num)\n  refine ⟨x, hx, fun y hy => ?_⟩\n  nlinarith [sq_nonneg (x - y), sq_nonneg (x + y), sq_nonneg x, sq_nonneg y]\n\n/-- $X = \\sqrt[3]{3 + 2\\sqrt2} + \\sqrt[3]{3 - 2\\sqrt2} - 1 ≈ 1.3553$, the real root of\n$x^2 (x + 3) = 8$. -/\ndef X : ℝ := existsUnique_X.exists.choose\n\n/-- $Y = \\tfrac12\\bigl(\\sqrt[3]{\\sqrt2 + 1} - \\sqrt[3]{\\sqrt2 - 1}\\bigr) ≈ 0.2980$, the real root of\n$x (4 x^2 + 3) = 1$. -/\ndef Y : ℝ := existsUnique_Y.exists.choose\n\n/--\nThe area of Romik's ambidextrous sofa is $X + \\arctan Y ≈ 1.644955218425440$ [Ro18, eq. (5)].\nThe shape itself, bounded by 18 arcs of circles and sextic curves [Ro18, §5–6], is not defined here.\n-/\ndef area : ℝ := X + Real.arctan Y\n\nend RomiksSofa\n\n/--\nRomik's ambidextrous sofa has area `RomiksSofa.area` [Ro18, Thm. 5], so the ambidextrous sofa\nconstant is at least that.\n-/\n@[category research solved, AMS 49]\ntheorem romiksSofa_area_le_ambidextrousSofaConstant :\n    ENNReal.ofReal RomiksSofa.area ≤ ambidextrousSofaConstant := by\n  sorry\n\n/--\nRomik's ambidextrous sofa is optimal. Romik derived it from local-optimality considerations and\nproposed it as the solution [Ro18, §1.2, §5]; [Wikipedia] records it as the conjectured optimum.\nEven its local optimality is open [Ro18, §7, Problem 1].\n-/\n@[category research open, AMS 49]\ntheorem ambidextrousSofaConstant_eq_romiksSofa_area :\n    ambidextrousSofaConstant = ENNReal.ofReal RomiksSofa.area := by\n  sorry\n\nend MovingSofa\n",
  "statement_hash": "52c31e729e7675a6e5de231d725e0176c278af7323f708d5e1793037f8feeaba",
  "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."
}