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 PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Domain.Boundary |
| 2 | |
| 3 | /-! |
| 4 | # Nullity of polygon cut lines |
| 5 | |
| 6 | The vertical derivative of the interpolator is transported cellwise. The |
| 7 | cell interfaces form finitely many coordinate lines, so they may be removed |
| 8 | when the resulting bound is stated almost everywhere. |
| 9 | |
| 10 | Morgan--Tian context: Section 19.4, Definition 19.18 and Claims 19.19-19.22, printed pp. |
| 11 | 450-453. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open MeasureTheory Set |
| 17 | open scoped ENNReal |
| 18 | |
| 19 | namespace PoincareMT |
| 20 | |
| 21 | /-- A vertical coordinate line has zero planar volume. Source: Auxiliary step for MT |
| 22 | Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 23 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 24 | theorem m64_cut_line_null (c : ℝ) : |
| 25 | volume {p : LoopPlane | p 0 = c} = 0 := by |
| 26 | let e : LoopPlane → (Fin 2 → ℝ) := @WithLp.ofLp 2 (Fin 2 → ℝ) |
| 27 | let q : (Fin 2 → ℝ) → ℝ × ℝ := MeasurableEquiv.finTwoArrow |
| 28 | have he : MeasurePreserving e volume volume := PiLp.volume_preserving_ofLp _ |
| 29 | have hq : MeasurePreserving q volume volume := |
| 30 | MeasureTheory.volume_preserving_finTwoArrow ℝ |
| 31 | have hcomp : MeasurePreserving (q ∘ e) volume volume := hq.comp he |
| 32 | let S : Set (ℝ × ℝ) := {c} ×ˢ (Set.univ : Set ℝ) |
| 33 | have hS : NullMeasurableSet S volume := by measurability |
| 34 | have hzero : volume S = 0 := by |
| 35 | rw [MeasureTheory.Measure.volume_eq_prod, MeasureTheory.Measure.prod_prod] |
| 36 | simp |
| 37 | have hpre := hcomp.measure_preimage hS |
| 38 | have heq : (q ∘ e) ⁻¹' S = {p : LoopPlane | p 0 = c} := by |
| 39 | ext p |
| 40 | simp [q, e, S, MeasurableEquiv.finTwoArrow_apply] |
| 41 | rw [← heq, hpre, hzero] |
| 42 | |
| 43 | /-- The finite union of polygon cut lines has zero planar volume. Source: Auxiliary step for |
| 44 | MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in |
| 45 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 46 | theorem m64_cut_lines_null |
| 47 | {k : ℕ} (cut : Fin (k + 1) → ℝ) : |
| 48 | volume {p : LoopPlane | ∃ j : Fin (k + 1), p 0 = cut j} = 0 := by |
| 49 | let line : Fin (k + 1) → Set LoopPlane := |
| 50 | fun j => {p : LoopPlane | p 0 = cut j} |
| 51 | have hline : ∀ j, volume (line j) = 0 := by |
| 52 | intro j |
| 53 | exact m64_cut_line_null (cut j) |
| 54 | have hu : (⋃ j, line j) = {p : LoopPlane | |
| 55 | ∃ j : Fin (k + 1), p 0 = cut j} := by |
| 56 | ext p |
| 57 | simp [line] |
| 58 | rw [← hu] |
| 59 | exact measure_iUnion_null hline |
| 60 | |
| 61 | end PoincareMT |