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.Comparison.Basic |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Global.SelectedCertificate |
| 3 | import PoincareLib.Topology.Manifold.ConnectedSum.Surgery.Local |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Children |
| 5 | |
| 6 | /-! |
| 7 | # M56 finite ancestry and component covers |
| 8 | |
| 9 | The path is indexed by the actual changing-carrier slices. Its surgery set is |
| 10 | required to be the flow surgery set on the same bounded interval, and its |
| 11 | regular transports agree with the flow's slab transports. Nonempty events |
| 12 | use topology conclusions whose post-surgery carrier is the actual flow slice. |
| 13 | At a surgery event, the selected pre-surgery component is related to the |
| 14 | surviving child through an explicit retained-overlap witness rather than a |
| 15 | diffeomorphism of the entire parent component. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | structure RepairedEventChildWitness (F : SurgeryFlowData.{u}) where |
| 27 | topology : ∀ (T : ℝ) (hT : T ∈ F.surgery_times) |
| 28 | (hpost : Nonempty (F.slice T).carrier), |
| 29 | letI := hpost |
| 30 | SurgeryTopologyConclusion |
| 31 | (F.slice (F.event T hT).tMinus) (F.slice T) |
| 32 | effects : ∀ (T : ℝ) (hT : T ∈ F.surgery_times) |
| 33 | (hpost : Nonempty (F.slice T).carrier), |
| 34 | letI := hpost |
| 35 | RepairedSurgeryGroupEffectsData (topology T hT hpost) |
| 36 | children : ∀ (T : ℝ) (hT : T ∈ F.surgery_times) |
| 37 | (hpost : Nonempty (F.slice T).carrier), |
| 38 | letI := hpost |
| 39 | RepairedChildComponentsData (topology T hT hpost) (effects T hT hpost) |
| 40 | parent_groups_subsingleton : ∀ (T : ℝ) (hT : T ∈ F.surgery_times) |
| 41 | (hpost : Nonempty (F.slice T).carrier), |
| 42 | letI := hpost |
| 43 | ∀ i : Fin (topology T hT hpost).piece_count, |
| 44 | ∀ hi : (topology T hT hpost).kind i = .survivor, |
| 45 | ∀ x : ((topology T hT hpost).piece i).carrier, |
| 46 | Subsingleton (FundamentalGroup |
| 47 | (F.slice (F.event T hT).tMinus).carrier |
| 48 | ((effects T hT hpost).parent_basepoint i hi x)) |
| 49 | |
| 50 | structure RepairedComponentPath |
| 51 | (F : SurgeryFlowData.{u}) (T : ℝ) |
| 52 | (W : RepairedEventChildWitness F) where |
| 53 | /-- A changing-carrier certificate for Definition 18.2's open spacetime |
| 54 | path; regular slab transport and the surgery overlap below provide its |
| 55 | temporal coherence at the typed interface. -/ |
| 56 | terminal_mem : T ∈ F.time_domain |
| 57 | component : ∀ s : Set.Icc (0 : ℝ) T, |
| 58 | SurgerySelectedComponent (F.slice s.1) |
| 59 | time_subset : Set.Icc (0 : ℝ) T ⊆ F.time_domain |
| 60 | surgery_times : Finset ℝ |
| 61 | surgery_times_eq : (↑surgery_times : Set ℝ) = |
| 62 | F.surgery_times ∩ Set.Icc 0 T |
| 63 | regular_transport : ∀ (a b : Set.Icc (0 : ℝ) T) (_hab : a.1 < b.1) |
| 64 | (_hdisjoint : Disjoint F.surgery_times (Set.Ioc a.1 b.1)), |
| 65 | Diffeomorph (𝓡 3) (𝓡 3) |
| 66 | (component a).carrier.carrier (component b).carrier.carrier ∞ |
| 67 | regular_transport_ambient : ∀ (a b : Set.Icc (0 : ℝ) T) |
| 68 | (hab : a.1 < b.1) |
| 69 | (hdisjoint : Disjoint F.surgery_times (Set.Ioc a.1 b.1)), |
| 70 | ∀ x, |
| 71 | (component b).inclusion |
| 72 | ((regular_transport a b hab hdisjoint) x) = |
| 73 | (F.regular_slabs a.1 b.1 hab |
| 74 | (fun _u hu => time_subset ⟨a.2.1.trans hu.1, hu.2.trans b.2.2⟩) |
| 75 | hdisjoint).transport |
| 76 | ⟨a.1, ⟨le_rfl, hab.le⟩⟩ |
| 77 | ⟨b.1, ⟨hab.le, le_rfl⟩⟩ |
| 78 | ((component a).inclusion x) |
| 79 | event_survivor_index : ∀ (s : Set.Icc (0 : ℝ) T) |
| 80 | (hs : s.1 ∈ F.surgery_times) |
| 81 | (hpost : Nonempty (F.slice s.1).carrier), |
| 82 | letI := hpost |
| 83 | Fin (W.topology s.1 hs hpost).piece_count |
| 84 | event_survivor_index_kind : ∀ (s : Set.Icc (0 : ℝ) T) |
| 85 | (hs : s.1 ∈ F.surgery_times) |
| 86 | (hpost : Nonempty (F.slice s.1).carrier), |
| 87 | letI := hpost |
| 88 | (W.topology s.1 hs hpost).kind |
| 89 | (event_survivor_index s hs hpost) = .survivor |
| 90 | event_survivor : ∀ (s : Set.Icc (0 : ℝ) T) |
| 91 | (hs : s.1 ∈ F.surgery_times) |
| 92 | (hpost : Nonempty (F.slice s.1).carrier), |
| 93 | letI := hpost |
| 94 | (Set.range (component s).inclusion = |
| 95 | (W.topology s.1 hs hpost).survivor_region |
| 96 | (event_survivor_index s hs hpost)) ∧ |
| 97 | (W.topology s.1 hs hpost).survivor_region |
| 98 | (event_survivor_index s hs hpost) = |
| 99 | connectedComponent |
| 100 | ((W.children s.1 hs hpost).survivor_component_point |
| 101 | (event_survivor_index s hs hpost) |
| 102 | (event_survivor_index_kind s hs hpost)) |
| 103 | event_time_mem : ∀ (s : Set.Icc (0 : ℝ) T) |
| 104 | (hs : s.1 ∈ F.surgery_times) |
| 105 | (hpost : Nonempty (F.slice s.1).carrier), |
| 106 | letI := hpost |
| 107 | (F.event s.1 hs).tMinus ∈ F.time_domain |
| 108 | survivor_piece_equivalence : ∀ (s : Set.Icc (0 : ℝ) T) |
| 109 | (hs : s.1 ∈ F.surgery_times) |
| 110 | (hpost : Nonempty (F.slice s.1).carrier), |
| 111 | letI := hpost |
| 112 | ∃ e : Diffeomorph (𝓡 3) (𝓡 3) |
| 113 | ((W.topology s.1 hs hpost).piece |
| 114 | (event_survivor_index s hs hpost)).carrier |
| 115 | (component s).carrier.carrier ∞, |
| 116 | (∀ y, |
| 117 | (component s).inclusion (e y) = |
| 118 | ((W.topology s.1 hs hpost).survivor |
| 119 | (event_survivor_index s hs hpost) |
| 120 | (event_survivor_index_kind s hs hpost)).map y) |
| 121 | surgery_transition_inherited : ∀ (s : Set.Icc (0 : ℝ) T) |
| 122 | (hs : s.1 ∈ F.surgery_times) |
| 123 | (hpost : Nonempty (F.slice s.1).carrier), |
| 124 | letI := hpost |
| 125 | ∃ x : (component ⟨(F.event s.1 hs).tMinus, |
| 126 | ⟨(F.event s.1 hs).tMinus_nonnegative, |
| 127 | (F.event s.1 hs).tMinus_lt.le.trans s.2.2⟩⟩).carrier.carrier, |
| 128 | (component ⟨(F.event s.1 hs).tMinus, |
| 129 | ⟨(F.event s.1 hs).tMinus_nonnegative, |
| 130 | (F.event s.1 hs).tMinus_lt.le.trans s.2.2⟩⟩).inclusion x ∈ |
| 131 | interior (F.event s.1 hs).retained_pre ∧ |
| 132 | (F.event s.1 hs).retention.map |
| 133 | ((component ⟨(F.event s.1 hs).tMinus, |
| 134 | ⟨(F.event s.1 hs).tMinus_nonnegative, |
| 135 | (F.event s.1 hs).tMinus_lt.le.trans s.2.2⟩⟩).inclusion x) ∈ |
| 136 | Set.range (component s).inclusion |
| 137 | group_persistence_input : |
| 138 | RepairedGroupPersistenceInput F T component |
| 139 | group_persistence : |
| 140 | Nonempty (RepairedGroupPersistenceData F T component group_persistence_input) |
| 141 | structure RepairedFiniteAncestryData (F : SurgeryFlowData.{u}) |
| 142 | (W : RepairedEventChildWitness F) where |
| 143 | /-- The connected initial slice is represented by one fixed selected |
| 144 | component. Every later ancestry path is required to start here, so |
| 145 | basepoint and class data are not re-chosen per target. -/ |
| 146 | initial_component : SurgerySelectedComponent (F.slice 0) |
| 147 | initial_component_cover : Set.range initial_component.inclusion = Set.univ |
| 148 | path_for : ∀ (T : ℝ) (_hT : T ∈ F.time_domain) |
| 149 | (_x : (F.slice T).carrier), |
| 150 | RepairedComponentPath F T W |
| 151 | path_for_initial : ∀ (T : ℝ) (hT : T ∈ F.time_domain) |
| 152 | (x : (F.slice T).carrier), |
| 153 | (path_for T hT x).component |
| 154 | ⟨0, le_rfl, F.time_domain_nonnegative hT⟩ = initial_component |
| 155 | path_for_terminal_cover : ∀ (T : ℝ) (hT : T ∈ F.time_domain) |
| 156 | (x : (F.slice T).carrier), |
| 157 | x ∈ Set.range |
| 158 | ((path_for T hT x).component |
| 159 | ⟨T, ⟨F.time_domain_nonnegative hT, le_rfl⟩⟩).inclusion |
| 160 | finite_path_cover : ∀ (T : ℝ) (hT : T ∈ F.time_domain), |
| 161 | ∃ n : ℕ, ∃ paths : Fin n → RepairedComponentPath F T W, |
| 162 | ∀ x : (F.slice T).carrier, |
| 163 | ∃ i : Fin n, |
| 164 | x ∈ Set.range |
| 165 | ((paths i).component |
| 166 | ⟨T, ⟨F.time_domain_nonnegative hT, le_rfl⟩⟩).inclusion |
| 167 | bounded_event_count : ∀ H : ℝ, 0 ≤ H → |
| 168 | (F.surgery_times ∩ Set.Icc 0 H).Finite |
| 169 | |
| 170 | /-- Poincare-specific ancestry constructed on one actual flow and raw local |
| 171 | topology service. Only individual selected components are simply connected; |
| 172 | the later whole slice can be disconnected or empty. -/ |
| 173 | structure M56PoincareAncestryData (F : SurgeryFlowData.{u}) |
| 174 | (L : RawLocalSurgeryTopologyData F) where |
| 175 | witness : RepairedEventChildWitness F |
| 176 | topology_source : ∀ (T : ℝ) (hT : T ∈ F.surgery_times) |
| 177 | (hpost : Nonempty (F.slice T).carrier), |
| 178 | letI := hpost |
| 179 | witness.topology T hT hpost = |
| 180 | (Classical.choice (L.nonempty_reconstruction T hT)).conclusion |
| 181 | ancestry : RepairedFiniteAncestryData F witness |
| 182 | component_simply_connected : ∀ (t : ℝ), t ∈ F.time_domain → |
| 183 | ∀ C : SurgerySelectedComponent (F.slice t), |
| 184 | SimplyConnectedSpace C.carrier.carrier |
| 185 | |
| 186 | end PoincareMT |