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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.CapTopology.NeckRegions |
| 3 | import Mathlib.Topology.Compactness.LocallyCompact |
| 4 | |
| 5 | /-! |
| 6 | # Compact neighborhoods of the cap core and a fixed end slab |
| 7 | |
| 8 | Morgan--Tian Proposition 9.79, pp. 232-234, and task derivation 10, |
| 9 | section 6. These neighborhoods are obtained by local compactness, without |
| 10 | assuming that the ambient Riemannian distance is complete. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | open Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.CapCertificate |
| 21 | |
| 22 | variable {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 24 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 25 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 26 | |
| 27 | /-- The closed core and any fixed compact end slab admit one open |
| 28 | neighborhood whose compact closure lies in the actual cap carrier |
| 29 | (Proposition 9.79, pp. 232-234). -/ |
| 30 | theorem exists_compact_collar_neighborhood (N : CapCertificate g) {a b : ℝ} |
| 31 | (ha : -N.epsilon⁻¹ < a) (hb : b < N.epsilon⁻¹) : |
| 32 | ∃ W : Set M, IsOpen W ∧ N.closed_core ⊆ W ∧ |
| 33 | N.end_neck.coordinate_map '' (univ ×ˢ Icc a b) ⊆ W ∧ |
| 34 | IsCompact (closure W) ∧ closure W ⊆ N.carrier := by |
| 35 | let : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin 3)) M |
| 36 | have hc := N.end_neck.isCompact_coordinate_slab_intrinsic |
| 37 | (by simpa only [N.end_neck_epsilon] using ha) |
| 38 | (by simpa only [N.end_neck_epsilon] using hb) |
| 39 | have hslab := N.end_neck.coordinate_slab_subset_carrier_m28 |
| 40 | (by simpa only [N.end_neck_epsilon] using ha) |
| 41 | (by simpa only [N.end_neck_epsilon] using hb) |
| 42 | have hcore : N.closed_core ⊆ N.carrier := by |
| 43 | rw [N.closed_core_eq_complement_end] |
| 44 | exact sdiff_subset |
| 45 | obtain ⟨L, hL, hKL, hLV⟩ := exists_compact_between |
| 46 | (N.closed_core_compact.union hc) N.carrier_open |
| 47 | (union_subset hcore (hslab.trans N.end_neck_subset)) |
| 48 | have hcl : closure (interior L) ⊆ L := hL.isClosed.closure_interior_subset |
| 49 | exact ⟨interior L, isOpen_interior, |
| 50 | (subset_union_left.trans hKL), (subset_union_right.trans hKL), |
| 51 | hL.of_isClosed_subset isClosed_closure hcl, hcl.trans hLV⟩ |
| 52 | |
| 53 | end PoincareMT.CapCertificate |