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.Continuation.Construction.Splice.Family |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometry |
| 3 | |
| 4 | /-! |
| 5 | # Geometry on the attached slice family |
| 6 | |
| 7 | The literal old and new slice identifications preserve the metric and full |
| 8 | curvature. Source: Morgan--Tian, Definition 15.8, p. 362. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT |
| 20 | |
| 21 | theorem SurgeryEventRebuild.identify_metric |
| 22 | {A B : SurgeryEventRebuild.SliceMetric.{u}} (h : A = B) |
| 23 | (x : A.1.carrier) (v w : TangentSpace (𝓡 3) x) : |
| 24 | B.2.inner (SurgeryEventRebuild.identify A B h x) |
| 25 | (mfderiv (𝓡 3) (𝓡 3) (SurgeryEventRebuild.identify A B h) x v) |
| 26 | (mfderiv (𝓡 3) (𝓡 3) (SurgeryEventRebuild.identify A B h) x w) = |
| 27 | A.2.inner x v w := by |
| 28 | subst B |
| 29 | simp [SurgeryEventRebuild.identify] |
| 30 | |
| 31 | namespace Surgery.Splice |
| 32 | |
| 33 | variable (F : SurgeryFlowData.{u}) (T : ℝ) (C : GeneralizedSliceCarrier.{u}) |
| 34 | {B : ℝ≥0∞} (R : RicciFlow 3 C.carrier {t : ℝ | T ≤ t ∧ ENNReal.ofReal t < B}) |
| 35 | |
| 36 | def connection (t : ℝ) : LeviCivitaData (metric F T C R t) := by |
| 37 | classical |
| 38 | by_cases ht : t < T |
| 39 | · exact SurgeryEventRebuild.relabel (C := fun p => LeviCivitaData p.2) |
| 40 | (family_before F T C R ht).symm (F.connection t) |
| 41 | · exact SurgeryEventRebuild.relabel (C := fun p => LeviCivitaData p.2) |
| 42 | (family_after F T C R (le_of_not_gt ht)).symm (R.connection t) |
| 43 | |
| 44 | theorem identifyBefore_metric (t : ℝ) (ht : t < T) |
| 45 | (x : (F.slice t).carrier) (v w : TangentSpace (𝓡 3) x) : |
| 46 | (metric F T C R t).inner (identifyBefore F T C R t ht x) |
| 47 | (mfderiv (𝓡 3) (𝓡 3) (identifyBefore F T C R t ht) x v) |
| 48 | (mfderiv (𝓡 3) (𝓡 3) (identifyBefore F T C R t ht) x w) = |
| 49 | (F.metric t).inner x v w := |
| 50 | SurgeryEventRebuild.identify_metric (family_before F T C R ht).symm x v w |
| 51 | |
| 52 | theorem identifyAfter_metric (t : ℝ) (ht : T ≤ t) |
| 53 | (x : C.carrier) (v w : TangentSpace (𝓡 3) x) : |
| 54 | (metric F T C R t).inner (identifyAfter F T C R t ht x) |
| 55 | (mfderiv (𝓡 3) (𝓡 3) (identifyAfter F T C R t ht) x v) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) (identifyAfter F T C R t ht) x w) = |
| 57 | (R.metric t).inner x v w := |
| 58 | SurgeryEventRebuild.identify_metric (family_after F T C R ht).symm x v w |
| 59 | |
| 60 | theorem curvature_before (t : ℝ) (ht : t < T) (x : (F.slice t).carrier) : |
| 61 | (connection F T C R t).curvatureTensorNorm (identifyBefore F T C R t ht x) = |
| 62 | (F.connection t).curvatureTensorNorm x := |
| 63 | ((F.connection t).curvatureTensorNorm_eq_of_local_isometry |
| 64 | (connection F T C R t) isOpen_univ |
| 65 | (identifyBefore F T C R t ht).contMDiff.contMDiffOn |
| 66 | (fun y _ v w => (identifyBefore_metric F T C R t ht y v w).symm) |
| 67 | (Set.mem_univ x)).symm |
| 68 | |
| 69 | theorem curvature_after (t : ℝ) (ht : T ≤ t) (x : C.carrier) : |
| 70 | (connection F T C R t).curvatureTensorNorm (identifyAfter F T C R t ht x) = |
| 71 | (R.connection t).curvatureTensorNorm x := |
| 72 | ((R.connection t).curvatureTensorNorm_eq_of_local_isometry |
| 73 | (connection F T C R t) isOpen_univ |
| 74 | (identifyAfter F T C R t ht).contMDiff.contMDiffOn |
| 75 | (fun y _ v w => (identifyAfter_metric F T C R t ht y v w).symm) |
| 76 | (Set.mem_univ x)).symm |
| 77 | |
| 78 | end Surgery.Splice |
| 79 | |
| 80 | end PoincareMT |