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.Singular.RegularLimit.Canonical.ComponentTopology |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Canonical.StaticComponents |
| 3 | import PoincareLib.Geometry.Riemannian.Homothety.Assembly |
| 4 | |
| 5 | /-! # Exact transport of canonical components to the fixed reference -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | open Set |
| 10 | open scoped Manifold ContDiff Bundle |
| 11 | |
| 12 | universe u |
| 13 | |
| 14 | namespace PoincareMT.SingularTimeReference |
| 15 | |
| 16 | variable {M : Type u} [TopologicalSpace M] |
| 17 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 18 | [IsManifold (𝓡 3) ∞ M] |
| 19 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 20 | |
| 21 | /-- The supplied reference maps constitute an actual smooth slice equivalence. -/ |
| 22 | noncomputable def sliceDiffeomorph (R : SingularTimeReference F T M) |
| 23 | (t : ℝ) (ht : t ∈ Ico R.tMinus T) : |
| 24 | Diffeomorph (𝓡 3) (𝓡 3) M (F.slice t).carrier ∞ where |
| 25 | toFun := R.forward t ht |
| 26 | invFun := R.inverse t ht |
| 27 | left_inv := R.left_inverse t ht |
| 28 | right_inv := R.right_inverse t ht |
| 29 | contMDiff_toFun := R.forward_smooth t ht |
| 30 | contMDiff_invFun := R.inverse_smooth t ht |
| 31 | |
| 32 | theorem slice_metric_homothety (R : SingularTimeReference F T M) |
| 33 | (t : ℝ) (ht : t ∈ Ico R.tMinus T) : |
| 34 | MetricHomothety (R.flow.metric t) (F.metric t) (R.sliceDiffeomorph t ht) 1 := by |
| 35 | intro x v w |
| 36 | change (F.metric t).inner (R.forward t ht x) |
| 37 | (mfderiv (𝓡 3) (𝓡 3) (R.forward t ht) x v) |
| 38 | (mfderiv (𝓡 3) (𝓡 3) (R.forward t ht) x w) = 1 * (R.flow.metric t).inner x v w |
| 39 | simpa only [one_mul] using R.metric_pullback t ht x v w |
| 40 | |
| 41 | variable [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 42 | |
| 43 | /-- Pull back the full controlled component, including intrinsic diameters |
| 44 | and the standard smooth model, with no change in its constant. -/ |
| 45 | noncomputable def referenceCComponent (R : SingularTimeReference F T M) |
| 46 | (t : ℝ) (ht : t ∈ Ico R.tMinus T) {C : ℝ} |
| 47 | (N : SingularCComponent (F.metric t) (F.connection t) C) : |
| 48 | SingularCComponent (R.flow.metric t) (R.flow.connection t) C := |
| 49 | N.m48_pullback (R.slice_metric_homothety t ht) |
| 50 | (Homothety.metricHomothetyCalculus _ _ _ 1 (by norm_num) |
| 51 | (R.slice_metric_homothety t ht)) (R.flow.connection t) |
| 52 | |
| 53 | theorem referenceCComponent_carrier (R : SingularTimeReference F T M) |
| 54 | (t : ℝ) (ht : t ∈ Ico R.tMinus T) {C : ℝ} |
| 55 | (N : SingularCComponent (F.metric t) (F.connection t) C) {x : M} |
| 56 | (hx : R.forward t ht x ∈ N.carrier) : |
| 57 | (R.referenceCComponent t ht N).carrier = connectedComponent x := by |
| 58 | change R.sliceDiffeomorph t ht ⁻¹' N.carrier = connectedComponent x |
| 59 | have hc := connectedComponent_eq (N.component_eq ▸ hx) |
| 60 | rw [N.component_eq, hc] |
| 61 | exact (M48.preimage_connectedComponent (R.sliceDiffeomorph t ht).toHomeomorph |
| 62 | (R.forward t ht x)).trans (congrArg connectedComponent (R.left_inverse t ht x)) |
| 63 | |
| 64 | end PoincareMT.SingularTimeReference |