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.Extinction.Width.Transport.Event.Parent |
| 2 | |
| 3 | set_option autoImplicit false |
| 4 | |
| 5 | open scoped Manifold ContDiff Bundle Topology |
| 6 | |
| 7 | universe u |
| 8 | |
| 9 | namespace PoincareMT |
| 10 | |
| 11 | noncomputable def m67WidthSliceCast {q : M59SphereQuotient} |
| 12 | {U : GeneralizedSliceCarrier.{u}} {C C' : SurgerySelectedComponent U} |
| 13 | (h : C' = C) (slice : M67WidthSlice q C) : M67WidthSlice q C' := |
| 14 | h.symm ▸ slice |
| 15 | |
| 16 | theorem m67WidthSliceCast_heq {q : M59SphereQuotient} |
| 17 | {U : GeneralizedSliceCarrier.{u}} {C C' : SurgerySelectedComponent U} |
| 18 | (h : C' = C) (slice : M67WidthSlice q C) : |
| 19 | HEq (m67WidthSliceCast h slice) slice := by |
| 20 | subst C' |
| 21 | rfl |
| 22 | |
| 23 | theorem m67WidthSliceCast_alpha_heq {q : M59SphereQuotient} |
| 24 | {U : GeneralizedSliceCarrier.{u}} {C C' : SurgerySelectedComponent U} |
| 25 | (h : C' = C) (slice : M67WidthSlice q C) : |
| 26 | HEq (m67WidthSliceCast h slice).alpha slice.alpha := by |
| 27 | subst C' |
| 28 | rfl |
| 29 | |
| 30 | theorem m67WidthSliceCast_metric_heq {q : M59SphereQuotient} |
| 31 | {U : GeneralizedSliceCarrier.{u}} {C C' : SurgerySelectedComponent U} |
| 32 | (h : C' = C) (slice : M67WidthSlice q C) : |
| 33 | HEq (m67WidthSliceCast h slice).metric slice.metric := by |
| 34 | subst C' |
| 35 | rfl |
| 36 | |
| 37 | theorem m67WidthSliceCast_ambient_metric {q : M59SphereQuotient} |
| 38 | {U : GeneralizedSliceCarrier.{u}} {C C' : SurgerySelectedComponent U} |
| 39 | (h : C' = C) (slice : M67WidthSlice q C) : |
| 40 | (m67WidthSliceCast h slice).ambient_metric = slice.ambient_metric := by |
| 41 | subst C' |
| 42 | rfl |
| 43 | |
| 44 | theorem m67WidthSliceCast_basedWidth_eq {q : M59SphereQuotient} |
| 45 | {U : GeneralizedSliceCarrier.{u}} {C C' : SurgerySelectedComponent U} |
| 46 | (h : C' = C) (slice : M67WidthSlice q C) : |
| 47 | m61BasedClassWidth q (m67WidthSliceCast h slice).metric C'.basepoint |
| 48 | (m67WidthSliceCast h slice).alpha = |
| 49 | m61BasedClassWidth q slice.metric C.basepoint slice.alpha := by |
| 50 | subst C' |
| 51 | rfl |
| 52 | |
| 53 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 54 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 55 | {P : RepairedComponentPath D.flow T W} |
| 56 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 57 | (H : RepairedAncestryTransportInput D W P K C) |
| 58 | (S : Set.Icc (0 : ℝ) T) (hS : S.1 ∈ D.flow.surgery_times) |
| 59 | (hpost : Nonempty (D.flow.slice S.1).carrier) |
| 60 | {q : M59SphereQuotient} (slice : M67WidthSlice q (P.component S)) |
| 61 | |
| 62 | /-- The event post-slice is the actual selected slice, through the ancestry |
| 63 | identification of the surviving child. -/ |
| 64 | noncomputable def m67EventPostSlice : M67WidthSlice q (H.event_input S hS hpost).child := |
| 65 | m67WidthSliceCast (eq_of_heq (H.event_child_path S hS hpost)) slice |
| 66 | |
| 67 | theorem m67EventPostSlice_heq : |
| 68 | HEq (m67EventPostSlice H S hS hpost slice) slice := |
| 69 | m67WidthSliceCast_heq _ _ |
| 70 | |
| 71 | theorem m67EventPostSlice_alpha_heq : |
| 72 | HEq (m67EventPostSlice H S hS hpost slice).alpha slice.alpha := |
| 73 | m67WidthSliceCast_alpha_heq _ _ |
| 74 | |
| 75 | theorem m67EventPostSlice_metric_heq : |
| 76 | HEq (m67EventPostSlice H S hS hpost slice).metric slice.metric := |
| 77 | m67WidthSliceCast_metric_heq _ _ |
| 78 | |
| 79 | theorem m67EventPostSlice_ambient_metric : |
| 80 | (m67EventPostSlice H S hS hpost slice).ambient_metric = slice.ambient_metric := |
| 81 | m67WidthSliceCast_ambient_metric _ _ |
| 82 | |
| 83 | theorem m67EventPostSlice_based_width : |
| 84 | m61BasedClassWidth q (m67EventPostSlice H S hS hpost slice).metric |
| 85 | (H.event_input S hS hpost).child.basepoint |
| 86 | (m67EventPostSlice H S hS hpost slice).alpha = |
| 87 | m61BasedClassWidth q slice.metric (P.component S).basepoint slice.alpha := |
| 88 | m67WidthSliceCast_basedWidth_eq _ _ |
| 89 | |
| 90 | theorem m67EventPostSlice_metric |
| 91 | (hambient : slice.ambient_metric = D.flow.metric S.1) : |
| 92 | (m67EventPostSlice H S hS hpost slice).metric = |
| 93 | (H.event_input S hS hpost).child_metric := by |
| 94 | let post := m67EventPostSlice H S hS hpost slice |
| 95 | have ha : post.ambient_metric = D.flow.metric S.1 := |
| 96 | (m67EventPostSlice_ambient_metric H S hS hpost slice).trans hambient |
| 97 | have hi : post.metric.inner = (H.event_input S hS hpost).child_metric.inner := by |
| 98 | funext x |
| 99 | apply ContinuousLinearMap.ext |
| 100 | intro v |
| 101 | apply ContinuousLinearMap.ext |
| 102 | intro w |
| 103 | rw [← post.metric_pullback, ha] |
| 104 | exact (H.event_input S hS hpost).child_pullback x v w |
| 105 | generalize post.metric = g at hi ⊢ |
| 106 | generalize (H.event_input S hS hpost).child_metric = g' at hi ⊢ |
| 107 | cases g |
| 108 | cases g' |
| 109 | cases hi |
| 110 | rfl |
| 111 | |
| 112 | end PoincareMT |