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.Ancestry.Path |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Transport.Comparison.ComponentGeometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Transport.Comparison.NeckSphereEmbedding |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Transport.Comparison.RetainedRegion |
| 5 | |
| 6 | /-! |
| 7 | # Comparison input on a literal ancestry event |
| 8 | |
| 9 | Assemble the geometric and topological inputs of Morgan--Tian Proposition |
| 10 | 15.12 (p. 365) on the actual components in Definition 18.2 (pp. 419-420). |
| 11 | These are the local comparison inputs used before Proposition 18.18, |
| 12 | pp. 430-431; no provider or component is replaced by a fresh choice. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- The actual event input on the specified component path, with the full |
| 24 | retained region and guarded separating neck spheres (Proposition 15.12, |
| 25 | p. 365, and the class transport on pp. 430-431). -/ |
| 26 | noncomputable def m57EventInput |
| 27 | (P02 : RepairedClosedTopologyProvider.{u}) (G53 : RepairedSphereSeparationTheory.{u}) |
| 28 | {g₀ : StandardInitialMetric} (D : RepairedSurgeryFlowData.{u} g₀) |
| 29 | (L : RawLocalSurgeryTopologyData D.flow) (P : M56PoincareAncestryData D.flow L) |
| 30 | {T : ℝ} (A : RepairedComponentPath D.flow T P.witness) |
| 31 | (S : Set.Icc (0 : ℝ) T) (hS : S.1 ∈ D.flow.surgery_times) |
| 32 | [Nonempty (D.flow.slice S.1).carrier] : RepairedComparisonHomotopyInput D S.1 hS := by |
| 33 | let sMinus : Set.Icc (0 : ℝ) T := |
| 34 | ⟨(D.flow.event S.1 hS).tMinus, |
| 35 | (D.flow.event S.1 hS).tMinus_nonnegative, |
| 36 | (D.flow.event S.1 hS).tMinus_lt.le.trans S.2.2⟩ |
| 37 | let parent := A.component sMinus |
| 38 | let child := A.component S |
| 39 | letI : SimplyConnectedSpace parent.carrier.carrier := |
| 40 | P.component_simply_connected sMinus.1 (A.time_subset sMinus.2) parent |
| 41 | letI : SimplyConnectedSpace child.carrier.carrier := |
| 42 | P.component_simply_connected S.1 (A.time_subset S.2) child |
| 43 | exact |
| 44 | { topology := Classical.choice (L.nonempty_reconstruction S.1 hS) |
| 45 | parent := parent |
| 46 | child := child |
| 47 | topology_child := by |
| 48 | rw [← P.topology_source S.1 hS (inferInstance : Nonempty (D.flow.slice S.1).carrier)] |
| 49 | exact ⟨A.event_survivor_index S hS inferInstance, |
| 50 | A.event_survivor_index_kind S hS inferInstance, |
| 51 | (A.event_survivor S hS inferInstance).1.symm⟩ |
| 52 | admissible := L.admissible |
| 53 | parent_metric := fun t => m57ComponentMetric parent ((D.flow.event S.1 hS).pre_flow.metric t) |
| 54 | child_metric := m57ComponentMetric child (D.flow.metric S.1) |
| 55 | parent_pullback := fun t => m57ComponentMetric_pullback parent |
| 56 | ((D.flow.event S.1 hS).pre_flow.metric t.1) |
| 57 | child_pullback := m57ComponentMetric_pullback child (D.flow.metric S.1) |
| 58 | separating := m57NeckSphere_separating P02 G53 D S.1 hS parent |
| 59 | retained := {x | parent.inclusion x ∈ interior (D.flow.event S.1 hS).retained_pre ∧ |
| 60 | (D.flow.event S.1 hS).retention.map (parent.inclusion x) ∈ Set.range child.inclusion} |
| 61 | retained_eq := rfl |
| 62 | retained_open := m57RetainedRegion_isOpen D S.1 hS parent child |
| 63 | retained_subset := fun _ hx => hx.1 |
| 64 | retained_to_child := fun _ hx => hx.2 |
| 65 | inherited := A.surgery_transition_inherited S hS inferInstance |
| 66 | parent_simply_connected := inferInstance |
| 67 | child_simply_connected := inferInstance |
| 68 | parent_orientation := Classical.choice (m57ComponentOrientation parent) } |
| 69 | |
| 70 | end PoincareMT |