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.Analysis.Normed.Module.Connected |
| 4 | |
| 5 | /-! |
| 6 | # Connected neck collars around the central sphere |
| 7 | |
| 8 | Morgan--Tian Definition 9.72, pp. 230-231, and the cap recut in |
| 9 | Proposition 9.79, pp. 232-234. The collar is constructed in the actual |
| 10 | neck coordinates, with all inverse evaluations on the actual carrier. |
| 11 | See task record `cap-topology/2026-09-22-recut-plan.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | open Set |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.EpsilonNeck |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} |
| 26 | |
| 27 | /-- Every interval region inside an actual neck is preconnected, including |
| 28 | the empty interval case (Proposition 9.79, pp. 232-234). -/ |
| 29 | theorem isPreconnected_region (N : EpsilonNeck g) {a b : ℝ} |
| 30 | (ha : -N.epsilon⁻¹ ≤ a) (hb : b ≤ N.epsilon⁻¹) : |
| 31 | IsPreconnected (N.region a b) := by |
| 32 | have hs : IsConnected (Metric.sphere (0 : EuclideanSpace ℝ (Fin 3)) 1) := |
| 33 | isConnected_sphere (by rw [← Module.finrank_eq_rank]; norm_num) _ (by norm_num) |
| 34 | let : ConnectedSpace UnitTwoSphere := Subtype.connectedSpace hs |
| 35 | rw [N.region_eq_image_m28 ha hb] |
| 36 | apply (isPreconnected_univ.prod isPreconnected_Ioo).image |
| 37 | apply N.coordinate_map_smooth.continuousOn.mono |
| 38 | intro z hz |
| 39 | exact ⟨mem_univ _, ha.trans_lt hz.2.1, hz.2.2.trans_le hb⟩ |
| 40 | |
| 41 | /-- A point of the actual neck carrier lies on the central sphere exactly |
| 42 | when its inverse axial coordinate is zero (Definition 2.18, p. 31). -/ |
| 43 | theorem mem_central_sphere_iff_of_mem_carrier (N : EpsilonNeck g) {x : M} (hx : x ∈ N.carrier) : |
| 44 | x ∈ N.central_sphere ↔ (N.coordinate_inverse x).2 = 0 := by |
| 45 | rw [N.central_sphere_eq] |
| 46 | constructor |
| 47 | · rintro ⟨⟨q, s⟩, ⟨_, hs⟩, rfl⟩ |
| 48 | have hs0 : s = 0 := hs |
| 49 | subst s |
| 50 | have hpos : 0 < N.epsilon⁻¹ := inv_pos.mpr N.epsilon_pos |
| 51 | exact congrArg Prod.snd |
| 52 | (N.coordinate_inverse_coordinate_map_of_axial (q, 0) ⟨neg_neg_of_pos hpos, hpos⟩) |
| 53 | · intro hzero |
| 54 | exact ⟨N.coordinate_inverse x, ⟨mem_univ _, hzero⟩, |
| 55 | N.coordinate_map_coordinate_inverse hx⟩ |
| 56 | |
| 57 | /-- Every neck region containing axial height zero contains the entire |
| 58 | actual central sphere (Definition 2.18, p. 31). -/ |
| 59 | theorem central_sphere_subset_region (N : EpsilonNeck g) {a b : ℝ} |
| 60 | (ha : a < 0) (hb : 0 < b) : N.central_sphere ⊆ N.region a b := by |
| 61 | intro x hx |
| 62 | have hxC := N.central_sphere_subset hx |
| 63 | have hzero := (N.mem_central_sphere_iff_of_mem_carrier hxC).mp hx |
| 64 | exact ⟨hxC, by simpa only [hzero] using And.intro ha hb⟩ |
| 65 | |
| 66 | /-- A neck collar crossing its central sphere consists exactly of its two |
| 67 | open halves and the sphere (Proposition 9.79, pp. 232-234). -/ |
| 68 | theorem region_split_zero (N : EpsilonNeck g) {a b : ℝ} |
| 69 | (ha : a < 0) (hb : 0 < b) : |
| 70 | N.region a b = N.region a 0 ∪ N.central_sphere ∪ N.region 0 b := by |
| 71 | ext x |
| 72 | constructor |
| 73 | · intro hx |
| 74 | rcases lt_trichotomy (N.coordinate_inverse x).2 0 with hneg | hzero | hpos |
| 75 | · exact Or.inl (Or.inl ⟨hx.1, hx.2.1, hneg⟩) |
| 76 | · exact Or.inl (Or.inr ((N.mem_central_sphere_iff_of_mem_carrier hx.1).mpr hzero)) |
| 77 | · exact Or.inr ⟨hx.1, hpos, hx.2.2⟩ |
| 78 | · rintro ((hx | hx) | hx) |
| 79 | · exact ⟨hx.1, hx.2.1, hx.2.2.trans hb⟩ |
| 80 | · exact N.central_sphere_subset_region ha hb hx |
| 81 | · exact ⟨hx.1, ha.trans hx.2.1, hx.2.2⟩ |
| 82 | |
| 83 | /-- Any open neighborhood of the entire central sphere contains one |
| 84 | actual smaller neck collar. Its two cutoffs are strictly inside the old |
| 85 | strip (Proposition 9.79, pp. 232-234; cap recut topology). -/ |
| 86 | theorem exists_region_zero_subset (N : EpsilonNeck g) {U : Set M} |
| 87 | (hU : IsOpen U) (hS : N.central_sphere ⊆ U) : |
| 88 | ∃ a b : ℝ, -N.epsilon⁻¹ < a ∧ a < 0 ∧ 0 < b ∧ b < N.epsilon⁻¹ ∧ |
| 89 | N.region a b ⊆ U := by |
| 90 | have hpos : 0 < N.epsilon⁻¹ := inv_pos.mpr N.epsilon_pos |
| 91 | let O : Set (UnitTwoSphere × ℝ) := |
| 92 | (univ ×ˢ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) ∩ N.coordinate_map ⁻¹' U |
| 93 | have hO : IsOpen O := N.coordinate_map_smooth.continuousOn.isOpen_inter_preimage |
| 94 | (isOpen_univ.prod isOpen_Ioo) hU |
| 95 | have hSO : (univ : Set UnitTwoSphere) ×ˢ ({0} : Set ℝ) ⊆ O := by |
| 96 | intro z hz |
| 97 | have hz0 : z.2 = 0 := hz.2 |
| 98 | refine ⟨⟨mem_univ _, ?_⟩, hS ?_⟩ |
| 99 | · rw [hz0] |
| 100 | exact ⟨neg_neg_of_pos hpos, hpos⟩ |
| 101 | · rw [N.central_sphere_eq] |
| 102 | exact mem_image_of_mem _ hz |
| 103 | obtain ⟨s, t, _, ht, hst, hzt, hprod⟩ := |
| 104 | generalized_tube_lemma isCompact_univ isCompact_singleton hO hSO |
| 105 | have hneigh : t ∩ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ ∈ 𝓝 (0 : ℝ) := |
| 106 | Filter.inter_mem (ht.mem_nhds (hzt rfl)) |
| 107 | (Ioo_mem_nhds (neg_neg_of_pos hpos) hpos) |
| 108 | obtain ⟨a, b, hab, hsub⟩ := mem_nhds_iff_exists_Ioo_subset.mp hneigh |
| 109 | have ha : a / 2 ∈ Ioo a b := ⟨by linarith [hab.1], by linarith [hab.1, hab.2]⟩ |
| 110 | have hb : b / 2 ∈ Ioo a b := ⟨by linarith [hab.1, hab.2], by linarith [hab.2]⟩ |
| 111 | refine ⟨a / 2, b / 2, (hsub ha).2.1, by linarith [hab.1], |
| 112 | by linarith [hab.2], (hsub hb).2.2, ?_⟩ |
| 113 | intro x hx |
| 114 | have hz : N.coordinate_inverse x ∈ O := hprod |
| 115 | ⟨hst (mem_univ _), (hsub ⟨ha.1.trans hx.2.1, hx.2.2.trans hb.2⟩).1⟩ |
| 116 | simpa only [mem_preimage, N.coordinate_map_coordinate_inverse hx.1] using hz.2 |
| 117 | |
| 118 | end PoincareMT.EpsilonNeck |