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.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.AlmostEverywhere.Countability |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.Lipschitz.ChartFunctionLipschitz |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.AlmostEverywhere.Rademacher |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.Lipschitz.SliceLipschitz |
| 5 | |
| 6 | /-! |
| 7 | # Every-slice almost-everywhere differentiability of reduced length |
| 8 | |
| 9 | Morgan-Tian Corollary 6.67 uses Rademacher separately on each positive |
| 10 | interior time slice. The selected measure here is the actual backward |
| 11 | slice metric, while the local Lipschitz producer uses the terminal metric. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.ReducedVolume |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | [ConnectedSpace M] [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 26 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} |
| 27 | |
| 28 | /-- Nondifferentiability is null for the actual measure at every interior backward time. -/ |
| 29 | theorem reducedLength_slice_nondifferentiability_eq_zero |
| 30 | (hL : LGeodesicTheory F T τmax) |
| 31 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 32 | (hwindow : Icc (T - τmax) T ⊆ J) (p : M) |
| 33 | {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 34 | calibratedMetricVolume (F.metric (T - τ)) |
| 35 | {q | ¬ MDifferentiableAt (𝓡 n) (𝓘(ℝ, ℝ)) |
| 36 | (fun x ↦ reducedLength F T p x τ) q} = 0 := by |
| 37 | obtain ⟨G⟩ := hDifferential.exponential_geometry p |
| 38 | let : SecondCountableTopology M := secondCountableTopology_of_exponential hL G hτ hmax |
| 39 | apply calibratedMetricVolume_nondifferentiability_eq_zero (F.metric (T - τ)) |
| 40 | exact locallyLipschitz_in_coordinates (F.metric T) |
| 41 | (reducedLength_slice_locallyLipschitz hL hDifferential hwindow p hτ hmax) |
| 42 | |
| 43 | end PoincareMT.ReducedVolume |