FormalConjectures/Wikipedia/MovingSofa.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
28 declarations, 5 contain sorry, 0 declared as axioms
Moving Sofa Problem
References:
- Wikipedia
- [Ge92] Gerver, J. L., On moving a sofa around a corner. Geometriae Dedicata 42.3 (1992): 267-283.
- [Ro18] Romik, D. Differential equations and exact solutions in the moving sofa problem. Experimental mathematics 27.3 (2018): 316-330.
- [Ba24] Baek, J. Optimality of Gerver's Sofa. arXiv preprint arXiv:2411.19826 (2024).
Imports (1)
- def
MovingSofa.horizontalHallwayThe horizontal side of the hallway is $(-\infty, 1] \times [0, 1]$ line 40 sourceSource documentation
The horizontal side of the hallway is $(-\infty, 1] \times [0, 1]$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
Set.ofPred,Exists,And,LE.le,Eq,WithLp,ENNReal,WithLp.toLp,Matrix.vecCons,Matrix.vecEmpty12 instances, coercions and auxiliary constants left out.
def horizontalHallway : Set ℝ² := {!₂[x, y] | (x) (y) (_ : x ≤ 1 ∧ 0 ≤ y ∧ y ≤ 1)} - def
MovingSofa.verticalHallwayThe vertical side of the hallway is $[0, 1] \times (-\infty, 1]$ line 43 sourceSource documentation
The vertical side of the hallway is $[0, 1] \times (-\infty, 1]$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
Set.ofPred,Exists,And,LE.le,Eq,WithLp,ENNReal,WithLp.toLp,Matrix.vecCons,Matrix.vecEmpty12 instances, coercions and auxiliary constants left out.
def verticalHallway : Set ℝ² := {!₂[x, y] | (x) (y) (_ : 0 ≤ x ∧ x ≤ 1 ∧ y ≤ 1)} - def
MovingSofa.hallwayThe hallway is the union of its horizontal and vertical sides line 46 sourceSource documentation
The hallway is the union of its horizontal and vertical sides.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
Union.union, MovingSofa.horizontalHallway, MovingSofa.verticalHallway3 instances, coercions and auxiliary constants left out.
def hallway : Set ℝ² := horizontalHallway ∪ verticalHallway …
Mentions: MovingSofa.horizontalHallway, MovingSofa.verticalHallway
- instance
MovingSofa.(instance at line 50)line 50 source - structure
MovingSofa.IsMovingSofaA connected closed set line 59 sourceSource documentation
A connected closed set $s$ is a moving sofa according to a rigid motion $m:I\to\mathrm{SE}(2)$, if the sofa is initially in the horizontal side of the hallway and ends up in the vertical side. Here, since $\mathrm{SE}(2)$ is not in Mathlib yet, we use $\mathrm{E}(2)$ and rely on continuity and $m(0) = \mathrm{id}$ to ensure $m$ is in $\mathrm{SE}(2)$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,unitInterval,AffineIsometryEquiv,ENNReal23 instances, coercions and auxiliary constants left out.
structure IsMovingSofa (s : Set ℝ²) (m : I → E(2)) : Prop where …
- def
MovingSofa.unitSquareThe unit square line 69 sourceSource documentation
The unit square.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses:
parallelepiped,ENNReal,OrthonormalBasis,EuclideanSpace.basisFun31 instances, coercions and auxiliary constants left out.
def unitSquare : Set ℝ² := parallelepiped (EuclideanSpace.basisFun (Fin 2) ℝ) …
- lemma
MovingSofa.mem_Icc_of_mem_unitSquareCoordinates of points in the unit square lie in[0,1]line 73 sourceSource documentation
Coordinates of points in the unit square lie in
[0,1].private lemma mem_Icc_of_mem_unitSquare {p : ℝ²} (hp : p ∈ unitSquare) (i : Fin 2) : p i ∈ Set.Icc (0:ℝ) 1 := by …Mentions: MovingSofa.unitSquare
- theorem
MovingSofa.isMovingSofa_unitSquareThe unit square $[0,1]^2$ is a valid moving sofa (with the identity motion) line 87 sourceSource documentation
The unit square $[0,1]^2$ is a valid moving sofa (with the identity motion). It sits in the corner where both hallways overlap, so the stationary motion works. This is a sanity check that the
IsMovingSofadefinition is not vacuous.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Exists,Real,unitInterval,AffineIsometryEquiv,EuclideanSpace,Fin,OfNat.ofNat,Nat,ENNReal, MovingSofa.IsMovingSofa, MovingSofa.unitSquareProof uses:
Exists.intro,AffineIsometryEquiv.refl,MovingSofa.IsMovingSofa.mk,id,IsConnected,parallelepiped,OrthonormalBasis,EuclideanSpace.basisFun,And.intro,Set.Nonempty,Set.image,Finset.sum,Finset.univ,HSMul.hSMul,Set.Icc,IsPreconnected,Membership.mem,Set,And,Eqand 66 more196 instances, coercions and auxiliary constants left out.
Tactic trace: 40 steps
Open to load the checked before-and-after goal states.
theorem isMovingSofa_unitSquare : ∃ m, IsMovingSofa unitSquare m := by …
Mentions: MovingSofa.IsMovingSofa, MovingSofa.unitSquare
- def
MovingSofa.rotateTranslateThe rigid motion that translates by $p$ and then rotates counterclockwise by $\alpha$ line 120 sourceSource documentation
The rigid motion that translates by $p$ and then rotates counterclockwise by $\alpha$. Note that [Ge92] used this definition while [Ro18] used rotation first and then translation.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real.Angle,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,AffineIsometryEquiv,ENNRealProof uses:
AffineIsometryEquiv.trans,AffineIsometryEquiv.vaddConst,LinearIsometryEquiv.toAffineIsometryEquiv,Orientation.rotation,EuclideanGeometry.o57 instances, coercions and auxiliary constants left out.
def rotateTranslate (α : Real.Angle) (p : ℝ²) : E(2) := …
- theorem
MovingSofa.rotateTranslate_applyrotateTranslate α psends $q$ to $R_\alpha(q + p)$: the translation is applied first line 126 sourceSource documentation
rotateTranslate α psends $q$ to $R_\alpha(q + p)$: the translation is applied first.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real.Angle,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,Eq,AffineIsometryEquiv,ENNReal, MovingSofa.rotateTranslate,LinearIsometryEquiv,RingHom.id,Orientation.rotation,EuclideanGeometry.o,HAdd.hAddProof uses:
rfl73 instances, coercions and auxiliary constants left out.
theorem rotateTranslate_apply (α : Real.Angle) (p q : ℝ²) : rotateTranslate α p q = EuclideanGeometry.o.rotation α (q + p) := rflMentions: MovingSofa.rotateTranslate
- def
MovingSofa.sofaOfRotateTranslatePathThe sofa according to a rotation path line 135 sourceSource documentation
The sofa according to a rotation path $p : [0, \pi/2] \to \mathbb{R}^2$ as in [Ge92] is the intersection over $\alpha \in [0, \pi/2]$ of hallways each translated by $p(\alpha)$ and then rotated by $\alpha$, with the special cases that the hallway at $0$ is the horizontal side and the hallway at $\pi/2$ is the vertical side.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,EuclideanSpace,Fin,OfNat.ofNat,Nat,SetProof uses:
Inter.inter,Set.image,AffineIsometryEquiv,ENNReal, MovingSofa.rotateTranslate,Real.Angle, MovingSofa.horizontalHallway,HDiv.hDiv,Real.pi, MovingSofa.verticalHallway,Set.iInter,Membership.mem,Set.Icc, MovingSofa.hallway44 instances, coercions and auxiliary constants left out.
def sofaOfRotateTranslatePath (p : ℝ → ℝ²) : Set ℝ² := …
- def
MovingSofa.GerversSofa.ABφθSpecEq. 1-4 of [Ro18], which specifies the constants $A$, $B$, $\varphi$, and $\theta$ of [Ge92] line 151 sourceSource documentation
Eq. 1-4 of [Ro18], which specifies the constants $A$, $B$, $\varphi$, and $\theta$ of [Ge92].
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
RealProof uses:
And,LE.le,OfNat.ofNat,HDiv.hDiv,Real.pi,Eq,HAdd.hAdd,HSub.hSub,HMul.hMul,Real.cos,Real.sin,HPow.hPow,Nat24 instances, coercions and auxiliary constants left out.
def ABφθSpec (A B φ θ : ℝ) : Prop := …
Mentions: MovingSofa.GerversSofa.A, MovingSofa.GerversSofa.B, MovingSofa.GerversSofa.φ, MovingSofa.GerversSofa.θ
- theorem
MovingSofa.GerversSofa.ABφθSpec.existsUniquesorry line 163 sourcedepends on sorry what this means
Statement uses:
ExistsUnique,Prod,Real, MovingSofa.GerversSofa.ABφθSpec,Prod.fst,Prod.sndProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat,Nat1 instances, coercions and auxiliary constants left out.
- def
MovingSofa.GerversSofa.Aline 167 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
Prod.fst,Prod,Exists.choose,And, MovingSofa.GerversSofa.ABφθSpec,Prod.snd,Eq, MovingSofa.GerversSofa.ABφθSpec.existsUnique - def
MovingSofa.GerversSofa.Bline 168 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
Prod.fst,Prod,Prod.snd,Exists.choose,And, MovingSofa.GerversSofa.ABφθSpec,Eq, MovingSofa.GerversSofa.ABφθSpec.existsUnique - def
MovingSofa.GerversSofa.φline 169 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
Prod.fst,Prod.snd,Prod,Exists.choose,And, MovingSofa.GerversSofa.ABφθSpec,Eq, MovingSofa.GerversSofa.ABφθSpec.existsUnique - def
MovingSofa.GerversSofa.θline 170 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
Prod.snd,Prod,Exists.choose,And, MovingSofa.GerversSofa.ABφθSpec,Prod.fst,Eq, MovingSofa.GerversSofa.ABφθSpec.existsUnique - def
MovingSofa.GerversSofa.rline 172 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
ite,LE.le, MovingSofa.GerversSofa.φ,HDiv.hDiv,OfNat.ofNat, MovingSofa.GerversSofa.θ,HSub.hSub,HAdd.hAdd, MovingSofa.GerversSofa.A,Real.pi, MovingSofa.GerversSofa.B,HMul.hMul,HPow.hPow,Nat24 instances, coercions and auxiliary constants left out.
- def
MovingSofa.GerversSofa.yline 184 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
intervalIntegral,HMul.hMul, MovingSofa.GerversSofa.r,Real.sin,HSub.hSub,HDiv.hDiv,Real.pi,OfNat.ofNat, MovingSofa.GerversSofa.φ,MeasureTheory.MeasureSpace.volume16 instances, coercions and auxiliary constants left out.
- def
MovingSofa.GerversSofa.xline 187 sourcedepends on sorry what this means
Statement uses:
RealProof uses:
HSub.hSub,OfNat.ofNat,intervalIntegral,HMul.hMul, MovingSofa.GerversSofa.r,Real.cos,HDiv.hDiv,Real.pi, MovingSofa.GerversSofa.φ,MeasureTheory.MeasureSpace.volume18 instances, coercions and auxiliary constants left out.
- def
MovingSofa.GerversSofa.pline 190 sourcedepends on sorry what this means
Statement uses:
Real,EuclideanSpace,Fin,OfNat.ofNat,NatProof uses:
WithLp.toLp,ENNReal,Matrix.vecCons,ite,LE.le, MovingSofa.GerversSofa.φ,HSub.hSub,Real.cos,HAdd.hAdd,HMul.hMul, MovingSofa.GerversSofa.x,HDiv.hDiv,Real.pi, MovingSofa.GerversSofa.y,Real.sin,Neg.neg,Matrix.vecEmpty26 instances, coercions and auxiliary constants left out.
- def
MovingSofa.gerversSofaGerver's sofa is the sofa according to the rotation pathGerversSofa.pline 201 sourceSource documentation
Gerver's sofa is the sofa according to the rotation path
GerversSofa.p.depends on sorry what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,NatProof uses: MovingSofa.sofaOfRotateTranslatePath, MovingSofa.GerversSofa.p
1 instances, coercions and auxiliary constants left out.
def gerversSofa : Set ℝ² := …
- theorem
MovingSofa.isMovingSofa_gerversSofasorry line 208 sourcedepends on sorry what this means
Statement uses:
Exists,Real,unitInterval,AffineIsometryEquiv,EuclideanSpace,Fin,OfNat.ofNat,Nat,ENNReal, MovingSofa.IsMovingSofa, MovingSofa.gerversSofaProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous46 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- def
MovingSofa.sofaConstantThe sofa constant is the maximal area of a moving sofa line 215 sourceSource documentation
The sofa constant is the maximal area of a moving sofa.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ENNRealProof uses:
iSup,Set,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,Exists,unitInterval,AffineIsometryEquiv, MovingSofa.IsMovingSofa,MeasureTheory.Measure,MeasureTheory.MeasureSpace.volume40 instances, coercions and auxiliary constants left out.
def sofaConstant : ℝ≥0∞ := ⨆ (s : Set ℝ²) (_ : ∃ m, IsMovingSofa s m), volume s …
Mentions: MovingSofa.IsMovingSofa
- theorem
MovingSofa.one_le_sofaConstantThe sofa constant is at least 1, as witnessed by the unit square line 219 sourceSource documentation
The sofa constant is at least 1, as witnessed by the unit square.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
LE.le,ENNReal,OfNat.ofNat, MovingSofa.sofaConstantProof uses:
Trans.trans,Eq,MeasureTheory.Measure,EuclideanSpace,Real,Fin,Nat,Set,MeasureTheory.MeasureSpace.volume, MovingSofa.unitSquare,Eq.symm,parallelepiped,OrthonormalBasis,EuclideanSpace.basisFun,OrthonormalBasis.volume_parallelepiped,le_iSup₂,Exists,unitInterval,AffineIsometryEquiv, MovingSofa.IsMovingSofa and 1 more73 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem one_le_sofaConstant : 1 ≤ sofaConstant := by …
Mentions: MovingSofa.sofaConstant
- theorem
MovingSofa.sofaConstant_eqsorry line 228 sourcedepends on sorry what this means
Statement uses:
Eq,ENNReal, MovingSofa.sofaConstant,MeasureTheory.Measure,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,Set,MeasureTheory.MeasureSpace.volume, MovingSofa.gerversSofaProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous94 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
MovingSofa.sofaConstant_eq_volume_gerversSofasorry line 235 sourcedepends on sorry what this means
Statement uses:
Eq,ENNReal, MovingSofa.sofaConstant,MeasureTheory.Measure,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,Set,MeasureTheory.MeasureSpace.volume, MovingSofa.gerversSofaProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous94 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
MovingSofa.volume_eq_sofaConstant_iff_congruent_gerversSofaGerver's sofa is the unique sofa that attains the sofa constant, up to a rigid motion sorry line 246 sourceSource documentation
Gerver's sofa is the unique sofa that attains the sofa constant, up to a rigid motion.
The motion is needed:
horizontalHallwayis $(-\infty, 1] \times [0, 1]$, so a leftward translate of any moving sofa is again one, obtained by sliding right and then following the original motion. It has the same area, so uniqueness cannot hold on the nose.depends on sorry what this means
Statement uses:
Set,EuclideanSpace,Real,Fin,OfNat.ofNat,Nat,Exists,unitInterval,AffineIsometryEquiv,ENNReal, MovingSofa.IsMovingSofa,Iff,Eq,MeasureTheory.Measure,MeasureTheory.MeasureSpace.volume, MovingSofa.sofaConstant,Set.image, MovingSofa.gerversSofaProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous122 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem volume_eq_sofaConstant_iff_congruent_gerversSofa (s : Set ℝ²) (hs : ∃ m, IsMovingSofa s m) : volume s = sofaConstant ↔ ∃ g : E(2), s = g '' gerversSofa := by …Mentions: MovingSofa.IsMovingSofa, MovingSofa.sofaConstant, MovingSofa.gerversSofa