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.Generalized.ReducedGeometry.Theory |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.RCLike |
| 3 | import Mathlib.Geometry.Manifold.ContMDiff.Atlas |
| 4 | |
| 5 | /-! |
| 6 | # Smooth actual functions satisfy the frozen chart Lipschitz estimate |
| 7 | |
| 8 | The convex model range allows a chart estimate at physical boundary |
| 9 | points without extending the actual function beyond spacetime. |
| 10 | Morgan-Tian Proposition 6.56, p. 133. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | |
| 25 | /-- Actual smoothness at one spacetime point gives the exact frozen |
| 26 | chart-product Lipschitz estimate on a smaller prescribed neighborhood, |
| 27 | including physical time endpoints, Proposition 6.56, p. 133. -/ |
| 28 | theorem exists_chartProductLipschitzOn_of_contMDiffAt {f : G.Point → ℝ} |
| 29 | {q : G.Point} (hf : ContMDiffAt (spacetimeModel n) 𝓘(ℝ) 1 f q) |
| 30 | {N : Set G.Point} (hN : N ∈ 𝓝 q) : |
| 31 | ∃ U : Set G.Point, IsOpen U ∧ q ∈ U ∧ U ⊆ N ∧ |
| 32 | M14ChartProductLipschitzOn G f q U := by |
| 33 | let e := extChartAt (spacetimeModel n) q |
| 34 | have hc : ContDiffWithinAt ℝ 1 (fun z => f (e.symm z)) (range (spacetimeModel n)) (e q) := by |
| 35 | simpa only [writtenInExtChartAt, extChartAt_model_space_eq_id, Function.comp_def, |
| 36 | PartialEquiv.refl_coe, id_eq] using (contMDiffAt_iff.mp hf).2 |
| 37 | obtain ⟨K, V, hV, hLip⟩ := hc.exists_lipschitzOnWith (spacetimeModel n).convex_range |
| 38 | obtain ⟨B, hB, hqB, hBsub⟩ := mem_nhdsWithin.mp hV |
| 39 | have hpre : e ⁻¹' B ∈ 𝓝 q := |
| 40 | (continuousAt_extChartAt q).preimage_mem_nhds (hB.mem_nhds hqB) |
| 41 | obtain ⟨U, hUsub, hU, hqU⟩ := mem_nhds_iff.mp |
| 42 | (inter_mem hN (inter_mem (extChartAt_source_mem_nhds (I := spacetimeModel n) q) hpre)) |
| 43 | refine ⟨U, hU, hqU, fun z hz => (hUsub hz).1, |
| 44 | hU, hqU, fun z hz => (hUsub hz).2.1, K, K.coe_nonneg, ?_⟩ |
| 45 | intro z hz w hw |
| 46 | have hzV : e z ∈ V := hBsub ⟨(hUsub hz).2.2, ⟨(chartAt _ q) z, rfl⟩⟩ |
| 47 | have hwV : e w ∈ V := hBsub ⟨(hUsub hw).2.2, ⟨(chartAt _ q) w, rfl⟩⟩ |
| 48 | have h := hLip.dist_le_mul (e z) hzV (e w) hwV |
| 49 | simpa only [e.left_inv (hUsub hz).2.1, e.left_inv (hUsub hw).2.1, |
| 50 | dist_eq_norm, Real.norm_eq_abs] using h |
| 51 | |
| 52 | end PoincareMT.M14 |