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.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapseFiniteDistanceDyadic |
| 2 | import PoincareLib.Geometry.Riemannian.Distance.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Compact diameters on a finite backward horizon |
| 6 | |
| 7 | The terminal compact-set bound and the finite dyadic distance budget give |
| 8 | one diameter bound before the tested time is chosen. No metric at the |
| 9 | excluded left endpoint is used. Source: MT Proposition 17.1; reviewed |
| 10 | limit-tail-compact-transfer, F2a. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 23 | TopologicalSpace L.carrier.carrier := L.carrier.topologicalSpace |
| 24 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 25 | ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.carrier.carrier := L.carrier.chartedSpace |
| 26 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 27 | IsManifold (𝓡 3) ∞ L.carrier.carrier := L.carrier.isManifold |
| 28 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 29 | T3Space L.carrier.carrier := L.carrier.t3Space |
| 30 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 31 | ConnectedSpace L.carrier.carrier := L.connectedSpace |
| 32 | |
| 33 | /-- A fixed compact subset has uniformly bounded actual diameter at every |
| 34 | included time of the same finite horizon. -/ |
| 35 | theorem limitFinite_compact_diameter (h04 : RicciFlowCurvatureTheory.{u}) |
| 36 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 37 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) {B0 : ℝ} |
| 38 | (hterminal : ∀ x : L.carrier.carrier, |
| 39 | (L.flow.connection 0).curvatureTensorNorm x ≤ B0) |
| 40 | {X : Set L.carrier.carrier} (hX : IsCompact X) : |
| 41 | ∃ DX : ℝ, 1 ≤ DX ∧ ∀ t ∈ blowupBackwardInterval H, |
| 42 | ∀ x ∈ X, ∀ y ∈ X, ((L.flow.metric t).edist x y).toReal ≤ DX := by |
| 43 | let g := L.flow.metric 0 |
| 44 | obtain ⟨b, hb⟩ := (hX.image (g.continuous_toReal_edist L.base)).bddAbove |
| 45 | let DX := max 1 (2 * max b 0 + 80 * H.toReal * Real.sqrt (max 1 (3 * B0))) |
| 46 | refine ⟨DX, le_max_left _ _, ?_⟩ |
| 47 | intro t ht x hx y hy |
| 48 | have hx0 : (g.edist L.base x).toReal ≤ max b 0 := |
| 49 | (hb ⟨x, hx, rfl⟩).trans (le_max_left _ _) |
| 50 | have hy0 : (g.edist L.base y).toReal ≤ max b 0 := |
| 51 | (hb ⟨y, hy, rfl⟩).trans (le_max_left _ _) |
| 52 | have hcomm : g.edist x L.base = g.edist L.base x := by |
| 53 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : L.carrier.carrier → Type _) := |
| 54 | ⟨g.toRiemannianMetric⟩ |
| 55 | exact Manifold.riemannianEDist_comm |
| 56 | have hxy := g.toReal_edist_triangle x L.base y |
| 57 | rw [hcomm] at hxy |
| 58 | have hdist := (limitFinite_additive_distance h04 hH hfinite L hterminal t ht x y).2 |
| 59 | apply hdist.trans |
| 60 | apply le_trans _ (le_max_right _ _) |
| 61 | change (g.edist x y).toReal + _ ≤ _ |
| 62 | linarith |
| 63 | |
| 64 | end PoincareMT.M47 |