Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace |
| 2 | import Mathlib.MeasureTheory.Measure.Lebesgue.Basic |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Proofs/M49/Mathlib/EuclideanNull.lean` at |
| 6 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 7 | |
| 8 | # Null Euclidean coordinate hyperplanes |
| 9 | |
| 10 | The boundary argument in Morgan-Tian Lemma 17.12, p. 410, uses |
| 11 | the zero volume of coordinate hyperplanes. Transport Mathlib's |
| 12 | finite-product measure statement to the actual Euclidean volume. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | |
| 19 | namespace EuclideanSpace |
| 20 | |
| 21 | /-- A coordinate hyperplane has Euclidean volume zero, as used for |
| 22 | the neck boundary in MT Lemma 17.12, p. 410. -/ |
| 23 | theorem volume_coordinate_hyperplane {ι : Type*} [Fintype ι] (i : ι) (a : ℝ) : |
| 24 | volume {x : EuclideanSpace ℝ ι | x i = a} = 0 := by |
| 25 | have hset : {x : EuclideanSpace ℝ ι | x i = a} = |
| 26 | WithLp.ofLp ⁻¹' {x : ι → ℝ | x i = a} := rfl |
| 27 | rw [hset, (PiLp.volume_preserving_ofLp ι).measure_preimage |
| 28 | ((isClosed_eq (continuous_apply i) continuous_const).measurableSet.nullMeasurableSet)] |
| 29 | exact Measure.pi_hyperplane (fun _ : ι => (volume : Measure ℝ)) i a |
| 30 | |
| 31 | end EuclideanSpace |