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.Extension.Branches.Collars |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Comparison.Map |
| 3 | /-! |
| 4 | # The branch decomposition used to assemble Proposition 15.12 |
| 5 | |
| 6 | The topology of Remark 15.13, Morgan--Tian p. 365, supplies a connected |
| 7 | retained root and disjoint outward open regions at its boundary spheres. |
| 8 | This internal record contains only the resulting sets and collar sides; |
| 9 | the comparison map is subsequently constructed by open-cover gluing. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.SurgeryComparison |
| 19 | |
| 20 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 21 | {T : ℝ} {hT : T ∈ D.flow.surgery_times} |
| 22 | [Nonempty (D.flow.slice T).carrier] |
| 23 | (I : RepairedComparisonMapInput D T hT) |
| 24 | |
| 25 | local notation "E" => D.flow.event T hT |
| 26 | |
| 27 | /-- The actual closed root and its uniquely assigned outward regions. |
| 28 | Every field follows from the separating-sphere argument in Remark 15.13, |
| 29 | p. 365. This record has no comparison map or metric-bound field and is |
| 30 | constructed internally from the unchanged public input. -/ |
| 31 | structure ComparisonBranches where |
| 32 | caps : Set (Fin (E).cap_count) |
| 33 | root : Set I.parent.carrier.carrier |
| 34 | root_closed : IsClosed root |
| 35 | retained_eq : I.retained = interior root |
| 36 | outward : caps → Set I.parent.carrier.carrier |
| 37 | outward_open : ∀ i, IsOpen (outward i) |
| 38 | outward_disjoint_root : ∀ i, Disjoint (outward i) root |
| 39 | outward_disjoint : Pairwise (fun i j => Disjoint (outward i) (outward j)) |
| 40 | cover : root ∪ ⋃ i, outward i = Set.univ |
| 41 | frontier_root : frontier root = ⋃ i : caps, parentNeckSphere E i.1 I.parent |
| 42 | negative_root : ∀ i : caps, |
| 43 | parentNeckRegion E i.1 I.parent (-((E).necks i.1).neck.epsilon⁻¹) 0 ⊆ root |
| 44 | positive_outward : ∀ i : caps, |
| 45 | parentNeckRegion E i.1 I.parent 0 ((E).necks i.1).neck.epsilon⁻¹ ⊆ outward i |
| 46 | local_output_in_child : ∀ i : caps, |
| 47 | Set.range ((E).local_embed i.1) ⊆ Set.range I.child.inclusion |
| 48 | |
| 49 | end PoincareMT.SurgeryComparison |