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.ParentMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.Event.Precomposition |
| 3 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.Rebasing.Represents |
| 4 | |
| 5 | /-! |
| 6 | # Surgery transport from the M57 approximants |
| 7 | |
| 8 | The geometric event producer retains the supplied coherent class slices |
| 9 | exactly. M57 supplies the smooth approximants; actual slab compatibility |
| 10 | calibrates their precomposition; explicit disk postcomposition gives the |
| 11 | quadratic area loss. This is the transport in Morgan--Tian Claim 18.21, |
| 12 | pp. 431--432, used in Proposition 18.18, pp. 431--432. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 25 | {W : RepairedEventChildWitness D.flow} {T : ℝ} |
| 26 | {P : RepairedComponentPath D.flow T W} |
| 27 | {K : RepairedComparisonMapData D} {C : RepairedComparisonHomotopyData D K} |
| 28 | {H : RepairedAncestryTransportInput D W P K C} |
| 29 | (B : M59HigherBasepointTransportService) |
| 30 | (A : RepairedAncestryTransportData D W P K C H B) |
| 31 | (Syst : M59IdentificationSystem.{u}) |
| 32 | (S : Set.Icc (0 : ℝ) T) (hS : S.1 ∈ D.flow.surgery_times) |
| 33 | (hpost : Nonempty (D.flow.slice S.1).carrier) |
| 34 | (hdelta : D.flow.parameters.delta S.1 < repairedComparisonDeltaBound D.flow.local_constants) |
| 35 | (hh : D.flow.parameters.h S.1 < repairedComparisonHeightBound D.flow.local_constants) |
| 36 | (eta : ℝ) (heta : 0 < eta) |
| 37 | |
| 38 | theorem m67_event_transport_of_approximant |
| 39 | (s : Set.Icc (0 : ℝ) T) |
| 40 | (hs : (D.flow.event S.1 hS).tMinus < s.1) (hsS : s.1 < S.1) |
| 41 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event S.1 hS).tMinus s.1)) |
| 42 | (pre : M67WidthSlice Syst.quotient (P.component s)) |
| 43 | (hambient : pre.ambient_metric = D.flow.metric s.1) |
| 44 | (post : M67WidthSlice Syst.quotient (H.event_input S hS hpost).child) |
| 45 | (hpostmetric : post.metric = (H.event_input S hS hpost).child_metric) |
| 46 | (f : ContinuousMap (H.event_input S hS hpost).parent.carrier.carrier |
| 47 | (H.event_input S hS hpost).child.carrier.carrier) |
| 48 | (hf : ContMDiff (𝓡 3) (𝓡 3) ∞ f) |
| 49 | (hhom : f.Homotopic (A.event_output S hS hpost hdelta hh).comparison.map) |
| 50 | (hbound : ∀ x y, (H.event_input S hS hpost).child_metric.edist (f x) (f y) ≤ |
| 51 | ENNReal.ofReal (1 + eta) * ((H.event_input S hS hpost).parent_metric s.1).edist x y) |
| 52 | (hclass : M67AlphaTransport B (P.component s).basepoint |
| 53 | (H.event_input S hS hpost).child.basepoint |
| 54 | (f.comp (repairedDiffeomorphContinuousMap (m67EventPreToParent H S hS hpost s hs hJ))) |
| 55 | pre.alpha post.alpha) : |
| 56 | Nonempty {E : M67EventTransport B A Syst.quotient S s hS hpost hdelta hh eta heta // |
| 57 | E.pre = pre ∧ E.post = post} := by |
| 58 | let e := m67EventPreToParent H S hS hpost s hs hJ |
| 59 | let F := f.comp (repairedDiffeomorphContinuousMap e) |
| 60 | have hF : ContMDiff (𝓡 3) (𝓡 3) ∞ F := hf.comp e.contMDiff |
| 61 | obtain ⟨L, p, lp, htransport⟩ := hclass |
| 62 | have hmetric := m67EventPreToParent_metric H S hS hpost s hs hsS hJ pre hambient |
| 63 | have hdist : ∀ x y, post.metric.edist (F x) (F y) ≤ |
| 64 | ENNReal.ofReal (1 + eta) * pre.metric.edist x y := by |
| 65 | intro x y |
| 66 | rw [hpostmetric] |
| 67 | exact m67_distance_bound_comp_of_pullback pre.metric |
| 68 | ((H.event_input S hS hpost).parent_metric s.1) |
| 69 | (H.event_input S hS hpost).child_metric |
| 70 | (repairedDiffeomorphContinuousMap e) e.contMDiff hmetric f hbound x y |
| 71 | refine ⟨⟨{ |
| 72 | pre := pre |
| 73 | post := post |
| 74 | pretime_lt := hs |
| 75 | pre_no_surgery := hJ |
| 76 | parent_identification := m67EventParentIdentification H S hS hpost |
| 77 | parent_identification_eq := m67EventParentIdentification_inclusion H S hS hpost |
| 78 | parent_identification_based := |
| 79 | (Path.refl (H.event_input S hS hpost).parent.basepoint).cast |
| 80 | (m67EventParentIdentification_basepoint H S hS hpost) rfl |
| 81 | pre_to_parent := e |
| 82 | pre_to_parent_eq_regular := fun _ => rfl |
| 83 | pre_metric_eq_parent := hmetric |
| 84 | f := F |
| 85 | smooth := hF |
| 86 | based_path := p |
| 87 | loop_basepoint_path := lp |
| 88 | loop := L |
| 89 | class_transport := htransport |
| 90 | null_transport := m67_null_transport_of_postcomposition F L |
| 91 | comparison_homotopy := hhom.comp (ContinuousMap.Homotopic.refl _) |
| 92 | child_metric_eq := hpostmetric |
| 93 | distance_bound := hdist |
| 94 | filling_transport := m67_filling_transport_of_distance_bound pre.metric post.metric |
| 95 | F hF L heta hdist |
| 96 | represents_transport := ?_ }, rfl, rfl⟩⟩ |
| 97 | intro family _hnull hrep |
| 98 | have h := m67_represents_postcomposition_rebase Syst B F hF L |
| 99 | (P.component s).basepoint (H.event_input S hS hpost).child.basepoint |
| 100 | (Syst.core (H.event_input S hS hpost).child.compact |
| 101 | (H.event_input S hS hpost).child.connected |
| 102 | (H.event_input S hS hpost).child.basepoint post.pi_two_trivial) |
| 103 | pre.alpha lp.loop family hrep |
| 104 | rw [htransport] at h |
| 105 | exact h |
| 106 | |
| 107 | /-- M57 produces an event family with exactly the prescribed pre/post slices, |
| 108 | provided their classes follow its approximants. -/ |
| 109 | theorem m67_event_transport_family_exists |
| 110 | (pre : ∀ s : Set.Icc (0 : ℝ) T, M67WidthSlice Syst.quotient (P.component s)) |
| 111 | (hambient : ∀ s, (pre s).ambient_metric = D.flow.metric s.1) |
| 112 | (post : M67WidthSlice Syst.quotient (H.event_input S hS hpost).child) |
| 113 | (hpostmetric : post.metric = (H.event_input S hS hpost).child_metric) |
| 114 | (hclasses : ∀ (s : Set.Icc (0 : ℝ) T) |
| 115 | (hs : (D.flow.event S.1 hS).tMinus < s.1) (_hsS : s.1 < S.1) |
| 116 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event S.1 hS).tMinus s.1)) |
| 117 | (f : ContinuousMap (H.event_input S hS hpost).parent.carrier.carrier |
| 118 | (H.event_input S hS hpost).child.carrier.carrier) |
| 119 | (_hf : ContMDiff (𝓡 3) (𝓡 3) ∞ f) |
| 120 | (hbase : f (H.event_input S hS hpost).parent.basepoint = |
| 121 | (A.event_output S hS hpost hdelta hh).comparison.target_basepoint), |
| 122 | (∀ alpha, surgeryHomotopyMap (n := 3) f hbase alpha = |
| 123 | surgeryHomotopyMap (A.event_output S hS hpost hdelta hh).comparison.map |
| 124 | (A.event_output S hS hpost hdelta hh).comparison.based alpha) → |
| 125 | M67AlphaTransport B (P.component s).basepoint |
| 126 | (H.event_input S hS hpost).child.basepoint |
| 127 | (f.comp (repairedDiffeomorphContinuousMap (m67EventPreToParent H S hS hpost s hs hJ))) |
| 128 | (pre s).alpha post.alpha) : |
| 129 | Nonempty {F : M67EventTransportFamily B A Syst.quotient S hS hpost hdelta hh eta heta // |
| 130 | ∀ s hnear hbefore hafter hJ, |
| 131 | (F.transport s hnear hbefore hafter hJ).pre = pre s ∧ |
| 132 | (F.transport s hnear hbefore hafter hJ).post = post} := by |
| 133 | classical |
| 134 | obtain ⟨delta, hd, happ⟩ := |
| 135 | (A.event_output S hS hpost hdelta hh).smooth_approximants eta heta |
| 136 | have each (s : Set.Icc (0 : ℝ) T) (hnear : S.1 - delta < s.1) |
| 137 | (hbefore : s.1 < S.1) (hafter : (D.flow.event S.1 hS).tMinus < s.1) |
| 138 | (hJ : Disjoint D.flow.surgery_times (Set.Ioc (D.flow.event S.1 hS).tMinus s.1)) : |
| 139 | Nonempty {E : M67EventTransport B A Syst.quotient S s hS hpost hdelta hh eta heta // |
| 140 | E.pre = pre s ∧ E.post = post} := by |
| 141 | obtain ⟨f, hf, ⟨hbase, hpi⟩, hhom, hbound, _hdegree⟩ := happ s.1 hnear hbefore |
| 142 | exact m67_event_transport_of_approximant B A Syst S hS hpost hdelta hh eta heta |
| 143 | s hafter hbefore hJ (pre s) (hambient s) post hpostmetric f hf hhom hbound |
| 144 | (hclasses s hafter hbefore hJ f hf hbase hpi) |
| 145 | refine ⟨⟨{ |
| 146 | delta := delta |
| 147 | delta_pos := hd |
| 148 | transport := fun s hnear hbefore hafter hJ => |
| 149 | (Classical.choice (each s hnear hbefore hafter hJ)).val }, ?_⟩⟩ |
| 150 | intro s hnear hbefore hafter hJ |
| 151 | exact (Classical.choice (each s hnear hbefore hafter hJ)).property |
| 152 | |
| 153 | end PoincareMT |