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.Assembly.ClassPath.SelectedEvent |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.Assembly.ClassPath.Regular |
| 3 | |
| 4 | /-! |
| 5 | # One specified class along a finite surgery chronology |
| 6 | |
| 7 | The finite recursion retains the initial class, transports it along actual |
| 8 | ordinary slabs, and uses the comparison-induced pi3 map at each event. |
| 9 | Morgan--Tian, Proposition 18.18 and Claim 18.21, pp. 431--432. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT |
| 19 | |
| 20 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 21 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 22 | {P : RepairedComponentPath D.flow T W} |
| 23 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 24 | |
| 25 | structure M67ClassPath |
| 26 | (H : RepairedAncestryTransportInput D W P K C) |
| 27 | (B : M59HigherBasepointTransportService.{u}) |
| 28 | (A : RepairedAncestryTransportData D W P K C H B) |
| 29 | (S : M59IdentificationSystem.{u}) |
| 30 | (initial : M67InitialClassData S (P.component (m67InitialTime P)) (D.flow.metric 0)) where |
| 31 | datum : ∀ t : Set.Icc (0 : ℝ) T, M67ClassDatum S (P.component t) |
| 32 | initial_eq : datum (m67InitialTime P) = initial.toClassDatum |
| 33 | regular_transport : ∀ (a b : Set.Icc (0 : ℝ) T) (hab : a.1 < b.1) |
| 34 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc a.1 b.1)), |
| 35 | M67AlphaTransport B (P.component a).basepoint (P.component b).basepoint |
| 36 | (repairedDiffeomorphContinuousMap (P.regular_transport a b hab hJ)) |
| 37 | (datum a).alpha (datum b).alpha |
| 38 | event_eq : ∀ (t : Set.Icc (0 : ℝ) T) (ht : t.1 ∈ D.flow.surgery_times) |
| 39 | (hpost : Nonempty (D.flow.slice t.1).carrier) |
| 40 | (hdelta : D.flow.parameters.delta t.1 < repairedComparisonDeltaBound D.flow.local_constants) |
| 41 | (hh : D.flow.parameters.h t.1 < repairedComparisonHeightBound D.flow.local_constants), |
| 42 | datum t = m67SelectedEventClassDatum H B A S t ht hpost hdelta hh |
| 43 | (datum (m67EventPreTime t ht hpost)) |
| 44 | |
| 45 | theorem m67_class_path_exists |
| 46 | (H : RepairedAncestryTransportInput D W P K C) |
| 47 | (B : M59HigherBasepointTransportService.{u}) |
| 48 | (A : RepairedAncestryTransportData D W P K C H B) |
| 49 | (S : M59IdentificationSystem.{u}) |
| 50 | (initial : M67InitialClassData S (P.component (m67InitialTime P)) (D.flow.metric 0)) |
| 51 | (hcomparison : M67EventComparisonBounds D.flow (Set.Icc 0 T)) : |
| 52 | Nonempty (M67ClassPath H B A S initial) := by |
| 53 | classical |
| 54 | let events : Finset (Set.Icc (0 : ℝ) T) := P.surgery_times.subtype (· ∈ Set.Icc 0 T) |
| 55 | have hevents (t : Set.Icc (0 : ℝ) T) : t ∈ events ↔ t.1 ∈ D.flow.surgery_times := by |
| 56 | change t ∈ P.surgery_times.subtype (· ∈ Set.Icc 0 T) ↔ _ |
| 57 | rw [Finset.mem_subtype] |
| 58 | change t.1 ∈ (↑P.surgery_times : Set ℝ) ↔ _ |
| 59 | rw [P.surgery_times_eq] |
| 60 | exact and_iff_left t.property |
| 61 | have hpost (t : Set.Icc (0 : ℝ) T) : Nonempty (D.flow.slice t.1).carrier := |
| 62 | ⟨(P.component t).inclusion (P.component t).basepoint⟩ |
| 63 | let before (t : Set.Icc (0 : ℝ) T) (ht : t ∈ events) := |
| 64 | m67EventPreTime t ((hevents t).mp ht) (hpost t) |
| 65 | have hbefore (t : Set.Icc (0 : ℝ) T) (ht : t ∈ events) : before t ht < t := |
| 66 | (D.flow.event t.1 ((hevents t).mp ht)).tMinus_lt |
| 67 | have hzero : m67InitialTime P ∉ events := |
| 68 | fun h => D.flow.zero_not_surgery ((hevents (m67InitialTime P)).mp h) |
| 69 | let event (t : Set.Icc (0 : ℝ) T) (ht : t ∈ events) : |
| 70 | M67ClassDatum S (P.component (before t ht)) → M67ClassDatum S (P.component t) := |
| 71 | m67SelectedEventClassDatum H B A S t ((hevents t).mp ht) (hpost t) |
| 72 | (hcomparison t.1 t.property ((hevents t).mp ht)).1 |
| 73 | (hcomparison t.1 t.property ((hevents t).mp ht)).2 |
| 74 | obtain ⟨sol, hinitial, hregular, hevent⟩ := m67_finite_transport_section |
| 75 | (m67InitialTime P) (fun t => t.property.1) events hzero before hbefore |
| 76 | (fun t => M67ClassDatum S (P.component t)) initial.toClassDatum |
| 77 | (m67OrdinaryClassDatum H S B hevents) |
| 78 | (m67OrdinaryClassDatum_refl H S B hevents) |
| 79 | (m67OrdinaryClassDatum_trans H S B hevents) event |
| 80 | refine ⟨{ datum := sol |
| 81 | initial_eq := hinitial |
| 82 | regular_transport := ?_ |
| 83 | event_eq := ?_ }⟩ |
| 84 | · intro a b hab hJ |
| 85 | have hordinary : M67OrdinaryBetween events a b := by |
| 86 | refine ⟨hab.le, Set.disjoint_left.mpr ?_⟩ |
| 87 | intro t ht htab |
| 88 | exact Set.disjoint_left.mp hJ ((hevents t).mp ht) htab |
| 89 | have hdatum : m67RegularClassDatum H S B a b hab hJ (sol a) = sol b := by |
| 90 | have hh := hregular a b hordinary |
| 91 | change m67RegularClassDatumLE H S B a b hab.le _ (sol a) = sol b at hh |
| 92 | rw [m67RegularClassDatumLE_of_lt H S B a b hab] at hh |
| 93 | exact hh |
| 94 | exact hdatum ▸ m67RegularClassDatum_transport H S B a b hab hJ (sol a) |
| 95 | · intro t ht hp hd hh |
| 96 | exact hevent t ((hevents t).mpr ht) |
| 97 | |
| 98 | variable {H : RepairedAncestryTransportInput D W P K C} |
| 99 | {B : M59HigherBasepointTransportService.{u}} |
| 100 | {A : RepairedAncestryTransportData D W P K C H B} |
| 101 | {S : M59IdentificationSystem.{u}} |
| 102 | {initial : M67InitialClassData S (P.component (m67InitialTime P)) (D.flow.metric 0)} |
| 103 | |
| 104 | theorem M67ClassPath.event_post_alpha_heq |
| 105 | (X : M67ClassPath H B A S initial) |
| 106 | (t : Set.Icc (0 : ℝ) T) (ht : t.1 ∈ D.flow.surgery_times) |
| 107 | (hpost : Nonempty (D.flow.slice t.1).carrier) |
| 108 | (hdelta : D.flow.parameters.delta t.1 < repairedComparisonDeltaBound D.flow.local_constants) |
| 109 | (hh : D.flow.parameters.h t.1 < repairedComparisonHeightBound D.flow.local_constants) : |
| 110 | HEq (m67EventPostClassDatum H B A S t ht hpost hdelta hh |
| 111 | (X.datum (m67EventPreTime t ht hpost))).alpha (X.datum t).alpha := by |
| 112 | rw [X.event_eq t ht hpost hdelta hh] |
| 113 | exact (M67ClassDatum.cast_alpha_heq _ _).symm |
| 114 | |
| 115 | theorem M67ClassPath.event_approximant_transport |
| 116 | (X : M67ClassPath H B A S initial) |
| 117 | (t : Set.Icc (0 : ℝ) T) (ht : t.1 ∈ D.flow.surgery_times) |
| 118 | (hpost : Nonempty (D.flow.slice t.1).carrier) |
| 119 | (hdelta : D.flow.parameters.delta t.1 < repairedComparisonDeltaBound D.flow.local_constants) |
| 120 | (hh : D.flow.parameters.h t.1 < repairedComparisonHeightBound D.flow.local_constants) |
| 121 | (s : Set.Icc (0 : ℝ) T) |
| 122 | (hs : (D.flow.event t.1 ht).tMinus < s.1) |
| 123 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event t.1 ht).tMinus s.1)) |
| 124 | (f : C((H.event_input t ht hpost).parent.carrier.carrier, |
| 125 | (H.event_input t ht hpost).child.carrier.carrier)) |
| 126 | (hsmooth : ContMDiff (𝓡 3) (𝓡 3) ∞ f) |
| 127 | (hbase : f (H.event_input t ht hpost).parent.basepoint = |
| 128 | (A.event_output t ht hpost hdelta hh).comparison.target_basepoint) |
| 129 | (hmap : ∀ alpha, surgeryHomotopyMap (n := 3) f hbase alpha = |
| 130 | surgeryHomotopyMap (A.event_output t ht hpost hdelta hh).comparison.map |
| 131 | (A.event_output t ht hpost hdelta hh).comparison.based alpha) : |
| 132 | M67AlphaTransport B (P.component s).basepoint |
| 133 | (H.event_input t ht hpost).child.basepoint |
| 134 | (f.comp (repairedDiffeomorphContinuousMap |
| 135 | (m67EventPreToParent H t ht hpost s hs hJ))) |
| 136 | (X.datum s).alpha |
| 137 | (m67EventPostClassDatum H B A S t ht hpost hdelta hh |
| 138 | (X.datum (m67EventPreTime t ht hpost))).alpha := |
| 139 | m67_event_class_transport_of_regular H B A S t ht hpost hdelta hh |
| 140 | (X.datum (m67EventPreTime t ht hpost)) s hs hJ (X.datum s) |
| 141 | (X.regular_transport _ _ hs hJ) f hsmooth hbase hmap |
| 142 | |
| 143 | end PoincareMT |