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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Geometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Local.Connection.CurvatureIndependence |
| 4 | |
| 5 | /-! |
| 6 | # Extension with the exact old connection data |
| 7 | |
| 8 | Morgan-Tian, Theorem 12.5, printed pp. 322-323, passes from metric uniqueness |
| 9 | to maximal lifetime equality. The frozen extension record also asks for |
| 10 | literal connection agreement. Retain the old records on the old interval, |
| 11 | as explained in `reviews/errata/2026-09-17-m35-radial-gauge.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | namespace PoincareMT.PartialStandardCapFlow |
| 19 | |
| 20 | /-- Theorem 12.5, pp. 322-323: an agreeing longer metric flow extends the |
| 21 | shorter flow while preserving its actual connection records. -/ |
| 22 | noncomputable def extensionOfMetricAgreement |
| 23 | {g₀ : StandardInitialMetric} (F G : PartialStandardCapFlow g₀) |
| 24 | (hlt : F.lifetime < G.lifetime) |
| 25 | (hmetric : Set.EqOn F.flow.metric G.flow.metric (Set.Ico 0 F.lifetime)) : |
| 26 | PartialStandardCapFlowExtension F G.lifetime := by |
| 27 | classical |
| 28 | let D (t : ℝ) : LeviCivitaData (G.flow.metric t) := |
| 29 | if ht : t ∈ Set.Ico 0 F.lifetime then |
| 30 | cast (congrArg (fun g : RiemannianMetric 3 StandardCapSpace => LeviCivitaData g) |
| 31 | (hmetric ht)) (F.flow.connection t) |
| 32 | else G.flow.connection t |
| 33 | have hD (t : ℝ) (ht : t ∈ Set.Ico 0 F.lifetime) : |
| 34 | HEq (D t) (F.flow.connection t) := by |
| 35 | dsimp only [D] |
| 36 | rw [dif_pos ht] |
| 37 | exact cast_heq _ _ |
| 38 | refine { |
| 39 | lifetime_gt := hlt |
| 40 | flow := { G.flow with |
| 41 | connection := D |
| 42 | equation := ?_ } |
| 43 | initial_metric := G.initial_metric |
| 44 | initial_connection := (hD 0 ⟨le_rfl, F.lifetime_pos⟩).trans F.initial_connection |
| 45 | agrees_on_old_domain := fun t ht => (hmetric ht).symm |
| 46 | agrees_on_connection := hD |
| 47 | curvature_locally_bounded := ?_ |
| 48 | } |
| 49 | · intro t ht x u v |
| 50 | rw [(D t).ricci_eq (G.flow.connection t)] |
| 51 | exact G.flow.equation t ht x u v |
| 52 | · intro T hT hTlt |
| 53 | obtain ⟨K, hK, hbound⟩ := G.curvature_locally_bounded T hT hTlt |
| 54 | refine ⟨K, hK, ?_⟩ |
| 55 | intro t ht x |
| 56 | change |(D t).curvatureTensorNorm x| ≤ K |
| 57 | rw [(D t).curvatureTensorNorm_eq (G.flow.connection t)] |
| 58 | exact hbound t ht x |
| 59 | |
| 60 | end PoincareMT.PartialStandardCapFlow |