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.Singular.RegularLimit.Ends.Cylinder.Separation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.DeepHorn.Limit.Round.HornTopology |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.DeepHorn.Limit.Separation.Boundary |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.DeepHorn.Geometry.EndCut.PrefixInterior |
| 5 | |
| 6 | /-! |
| 7 | # Ambient separation of a neck contained in a proper horn |
| 8 | |
| 9 | The compact central sphere lies above a positive horn-coordinate level. |
| 10 | The closed tail above that level lies inside the simply connected horn |
| 11 | interior, and its omitted initial strip is connected. Ambient separation |
| 12 | therefore follows from the actual product geometry, without an additional |
| 13 | neck-accuracy threshold. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Topology |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.StrongHorn |
| 25 | |
| 26 | variable {F : GeneralizedRicciFlowData.{u}} {T epsilon : ℝ} |
| 27 | {E : GeneralizedFlowExtension F T} (horn : StrongHorn E epsilon) |
| 28 | |
| 29 | /-- The closed coordinate tail is closed in the ambient terminal slice. -/ |
| 30 | theorem isClosed_coordinateClosedTail (a : ℝ) : |
| 31 | IsClosed (Subtype.val '' {x : horn.carrier | a ≤ horn.coordinateHeight x}) := by |
| 32 | exact horn.isClosed_carrier.isClosedEmbedding_subtypeVal.isClosedMap _ |
| 33 | (isClosed_le continuous_const horn.continuous_coordinateHeight) |
| 34 | |
| 35 | /-- A compact subset of the horn interior lies above a positive coordinate level. -/ |
| 36 | theorem exists_positive_coordinate_lower_bound |
| 37 | {K : Set (E.extended.slice T).carrier} (hK : IsCompact K) (hne : K.Nonempty) |
| 38 | (hKH : K ⊆ horn.carrier \ horn.boundary_sphere) : |
| 39 | ∃ a : ℝ, 0 < a ∧ a < 1 ∧ |
| 40 | K ⊆ Subtype.val '' {x : horn.carrier | a ≤ horn.coordinateHeight x} := by |
| 41 | let L : Set horn.carrier := Subtype.val ⁻¹' K |
| 42 | have hL : IsCompact L := horn.isClosed_carrier.isClosedEmbedding_subtypeVal.isCompact_preimage hK |
| 43 | have hLne : L.Nonempty := by |
| 44 | obtain ⟨x, hx⟩ := hne |
| 45 | exact ⟨⟨x, (hKH hx).1⟩, hx⟩ |
| 46 | obtain ⟨x, hx, hmin⟩ := hL.exists_isMinOn hLne horn.continuous_coordinateHeight.continuousOn |
| 47 | have hxpos : 0 < horn.coordinateHeight x := by |
| 48 | apply lt_of_le_of_ne (horn.coordinate.symm x).2.property.1 |
| 49 | intro heq |
| 50 | apply (hKH hx).2 |
| 51 | rw [horn.boundary_sphere_eq] |
| 52 | refine ⟨((horn.coordinate.symm x).1, 0), ⟨mem_univ _, rfl⟩, ?_⟩ |
| 53 | have hp := horn.parameterization_coordinate_symm x |
| 54 | change horn.parameterization ((horn.coordinate.symm x).1, |
| 55 | horn.coordinateHeight x) = x.val at hp |
| 56 | change 0 = horn.coordinateHeight x at heq |
| 57 | rwa [← heq] at hp |
| 58 | refine ⟨horn.coordinateHeight x, hxpos, (horn.coordinate.symm x).2.property.2, ?_⟩ |
| 59 | intro y hy |
| 60 | exact ⟨⟨y, (hKH hy).1⟩, hmin hy, rfl⟩ |
| 61 | |
| 62 | /-- The initial open strip omitted by a positive closed tail is connected. -/ |
| 63 | theorem isPreconnected_interior_diff_coordinateClosedTail {a : ℝ} |
| 64 | (ha1 : a < 1) : |
| 65 | IsPreconnected ((horn.carrier \ horn.boundary_sphere) \ |
| 66 | Subtype.val '' {x : horn.carrier | a ≤ horn.coordinateHeight x}) := by |
| 67 | have heq : (horn.carrier \ horn.boundary_sphere) \ |
| 68 | Subtype.val '' {x : horn.carrier | a ≤ horn.coordinateHeight x} = |
| 69 | horn.parameterization '' (univ ×ˢ Ioo (0 : ℝ) a) := by |
| 70 | ext x |
| 71 | constructor |
| 72 | · rintro ⟨hxH, hxY⟩ |
| 73 | obtain ⟨⟨q, t⟩, ⟨_, ht0, ht1⟩, rfl⟩ := |
| 74 | horn.carrier_diff_boundary_eq_image ▸ hxH |
| 75 | have hta : t < a := by |
| 76 | by_contra h |
| 77 | apply hxY |
| 78 | refine ⟨horn.coordinate (q, ⟨t, ht0.le, ht1⟩), ?_, horn.coordinate_eq _⟩ |
| 79 | change a ≤ horn.coordinateHeight (horn.coordinate (q, ⟨t, ht0.le, ht1⟩)) |
| 80 | simpa only [coordinateHeight, Homeomorph.symm_apply_apply] using le_of_not_gt h |
| 81 | exact ⟨(q, t), ⟨mem_univ _, ht0, hta⟩, rfl⟩ |
| 82 | · rintro ⟨⟨q, t⟩, ⟨_, ht0, hta⟩, rfl⟩ |
| 83 | refine ⟨horn.carrier_diff_boundary_eq_image.symm ▸ |
| 84 | (show horn.parameterization (q, t) ∈ |
| 85 | horn.parameterization '' (univ ×ˢ Ioo (0 : ℝ) 1) from |
| 86 | ⟨(q, t), ⟨mem_univ _, ht0, hta.trans ha1⟩, rfl⟩), ?_⟩ |
| 87 | rintro ⟨x, hx, heq⟩ |
| 88 | have hcoord : x = horn.coordinate (q, ⟨t, ht0.le, hta.trans ha1⟩) := |
| 89 | Subtype.ext (heq.trans (horn.coordinate_eq (q, ⟨t, ht0.le, hta.trans ha1⟩)).symm) |
| 90 | rw [hcoord] at hx |
| 91 | have hle : a ≤ t := by simpa [coordinateHeight] using hx |
| 92 | exact (not_le_of_gt hta) hle |
| 93 | rw [heq] |
| 94 | let : ConnectedSpace UnitTwoSphere := by |
| 95 | apply isConnected_iff_connectedSpace.mp |
| 96 | exact isConnected_sphere |
| 97 | (by rw [← Module.finrank_eq_rank]; norm_num) 0 (by norm_num) |
| 98 | apply (isPreconnected_univ.prod isPreconnected_Ioo).image |
| 99 | apply horn.parameterization_smooth.continuousOn.mono |
| 100 | exact fun _ hz => ⟨mem_univ _, (neg_lt_zero.mpr horn.collar_pos).trans hz.2.1, |
| 101 | hz.2.2.trans ha1⟩ |
| 102 | |
| 103 | /-- Every neck contained in a proper horn separates its ambient component. |
| 104 | Only the existing spatial-neck bound is needed. -/ |
| 105 | theorem contained_neck_isSeparating {delta : ℝ} (N : TerminalStrongNeck E delta) |
| 106 | (hdelta : delta < 1 / 2) (hN : N.carrier ⊆ horn.carrier) : |
| 107 | (N.spatialNeck hdelta).IsSeparating := by |
| 108 | have hNi : N.carrier ⊆ horn.carrier \ horn.boundary_sphere := by |
| 109 | intro x hx |
| 110 | refine ⟨hN hx, ?_⟩ |
| 111 | exact fun hb => horn.boundary_sphere_not_mem_interior hb |
| 112 | (N.carrier_open.subset_interior_iff.mpr hN hx) |
| 113 | obtain ⟨a, ha0, ha1, hSa⟩ := horn.exists_positive_coordinate_lower_bound |
| 114 | N.isCompact_central_sphere ⟨N.center, N.center_on_central_sphere⟩ |
| 115 | (N.central_sphere_subset.trans hNi) |
| 116 | let Y := Subtype.val '' {x : horn.carrier | a ≤ horn.coordinateHeight x} |
| 117 | have hYU : Y ⊆ horn.interiorOpens := by |
| 118 | rintro x ⟨y, hy, rfl⟩ |
| 119 | rw [show (horn.interiorOpens : Set _) = horn.carrier \ horn.boundary_sphere from rfl, |
| 120 | horn.carrier_diff_boundary_eq_image] |
| 121 | exact ⟨((horn.coordinate.symm y).1, (horn.coordinate.symm y).2), |
| 122 | ⟨mem_univ _, ha0.trans_le hy, (horn.coordinate.symm y).2.property.2⟩, |
| 123 | horn.parameterization_coordinate_symm y⟩ |
| 124 | let : SimplyConnectedSpace horn.interiorOpens := horn.simplyConnectedSpace_interior |
| 125 | exact (N.spatialNeck hdelta).isSeparating_of_closed_subset_of_simplyConnected_open |
| 126 | horn.interiorOpens (horn.isClosed_coordinateClosedTail a) hYU |
| 127 | (horn.isPreconnected_interior_diff_coordinateClosedTail ha1) hNi hSa |
| 128 | |
| 129 | end PoincareMT.StrongHorn |