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.StandardCap.Existence.Lifetime.CanonicalGeometry.CapPersistenceCollarSides |
| 2 | |
| 3 | /-! |
| 4 | # The actual same-core recut carrier is open |
| 5 | |
| 6 | A compact interior end section separates a small centered boundary |
| 7 | collar from the far end. Connectedness of the actual outside half puts |
| 8 | that entire half below the selected section. This proves openness and |
| 9 | the exact retained core, without assuming a smooth compression. |
| 10 | Source: Morgan-Tian Proposition 9.79(3), p. 234, and Theorem 12.28, |
| 11 | pp. 323-324; cap-persistence-implementation.md, section 2. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.CapCertificate |
| 20 | |
| 21 | variable {M : Type*} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 23 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 24 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 25 | |
| 26 | /-- The old closed core together with the left-anchored shorter end. -/ |
| 27 | def recutCarrier (b : ℝ) : Set M := |
| 28 | N.closed_core ∪ N.end_neck.region (-N.epsilon⁻¹) b |
| 29 | |
| 30 | /-- The recut carrier remains in the original actual cap. -/ |
| 31 | theorem recutCarrier_subset_carrier (b : ℝ) : N.recutCarrier b ⊆ N.carrier := by |
| 32 | intro x hx |
| 33 | exact hx.elim (fun hy => N.closed_core_subset_carrier hy) (fun he => N.end_neck_subset he.1) |
| 34 | |
| 35 | /-- Removing the new shorter end retains exactly the original compact |
| 36 | closed core (Proposition 9.79(3)). -/ |
| 37 | theorem recutCarrier_sdiff_end (b : ℝ) : |
| 38 | N.recutCarrier b \ N.end_neck.region (-N.epsilon⁻¹) b = N.closed_core := by |
| 39 | ext x |
| 40 | constructor |
| 41 | · rintro ⟨hx, hxend⟩ |
| 42 | exact hx.elim id (fun h => False.elim (hxend h)) |
| 43 | · intro hx |
| 44 | refine ⟨Or.inl hx, ?_⟩ |
| 45 | intro he |
| 46 | rw [N.closed_core_eq_complement_end] at hx |
| 47 | exact hx.2 he.1 |
| 48 | |
| 49 | /-- The genuine left-anchored recut is open. The proof uses the actual |
| 50 | regular core, its boundary neck, and compact interior end sections; |
| 51 | openness is not supplied as an extra cap datum (Proposition 9.79(3)). -/ |
| 52 | theorem recutCarrier_isOpen {b : ℝ} |
| 53 | (hb : -N.epsilon⁻¹ < b) (hb' : b < N.epsilon⁻¹) : IsOpen (N.recutCarrier b) := by |
| 54 | have hbN : -N.end_neck.epsilon⁻¹ < b := by rwa [N.end_neck_epsilon] |
| 55 | have hbN' : b < N.end_neck.epsilon⁻¹ := by rwa [N.end_neck_epsilon] |
| 56 | let K := N.end_neck.coordinate_map '' (univ ×ˢ Icc b b) |
| 57 | have hK : IsCompact K := N.end_neck.isCompact_image_closed_axial_interval hbN hbN' |
| 58 | have hKend : K ⊆ N.end_neck.carrier := |
| 59 | N.end_neck.image_closed_axial_interval_subset_carrier hbN hbN' |
| 60 | have hSK : N.boundary_neck.central_sphere ⊆ Kᶜ := by |
| 61 | intro x hx hxK |
| 62 | have hy := N.boundary_subset_closed_core (N.boundary_eq_neck_sphere.symm ▸ hx) |
| 63 | rw [N.closed_core_eq_complement_end] at hy |
| 64 | exact hy.2 (hKend hxK) |
| 65 | obtain ⟨r, hr, hrN, hstripK⟩ := |
| 66 | N.boundary_neck.exists_centered_region_subset_open hK.isClosed.isOpen_compl hSK |
| 67 | have he : 0 < N.boundary_neck.epsilon⁻¹ := inv_pos.mpr N.boundary_neck.epsilon_pos |
| 68 | have hcentral {x : M} (hx : x ∈ N.boundary_neck.carrier) |
| 69 | (hz : (N.boundary_neck.coordinate_inverse x).2 = 0) : x ∈ N.closed_core := by |
| 70 | apply N.boundary_subset_closed_core |
| 71 | rw [N.boundary_eq_neck_sphere] |
| 72 | exact (N.boundary_neck.mem_central_sphere_iff_of_mem hx).mpr hz |
| 73 | have hhalves {x : M} (hx : x ∈ N.boundary_neck.region (-r) r) |
| 74 | (hxe : x ∈ N.end_neck.carrier) : |
| 75 | x ∈ N.boundary_neck.region (-r) 0 ∪ N.boundary_neck.region 0 r := by |
| 76 | have hn : (N.boundary_neck.coordinate_inverse x).2 ≠ 0 := by |
| 77 | intro hzero |
| 78 | have hy := hcentral hx.1 hzero |
| 79 | rw [N.closed_core_eq_complement_end] at hy |
| 80 | exact hy.2 hxe |
| 81 | exact (lt_or_gt_of_ne hn).elim |
| 82 | (fun hs => Or.inl ⟨hx.1, hx.2.1, hs⟩) |
| 83 | (fun hs => Or.inr ⟨hx.1, hs, hx.2.2⟩) |
| 84 | have hcB : N.boundary_neck.center ∈ N.boundary_sphere := |
| 85 | N.boundary_eq_neck_sphere.symm ▸ N.boundary_neck.center_on_central_sphere |
| 86 | have hcN := N.boundary_neck.central_sphere_subset N.boundary_neck.center_on_central_sphere |
| 87 | have hc0 := (N.boundary_neck.mem_central_sphere_iff_of_mem hcN).mp |
| 88 | N.boundary_neck.center_on_central_sphere |
| 89 | have hc : N.boundary_neck.center ∈ N.boundary_neck.region (-r) r := by |
| 90 | exact ⟨hcN, by rw [hc0]; exact neg_neg_of_pos hr, by rw [hc0]; exact hr⟩ |
| 91 | obtain ⟨y, hystrip, hyinner⟩ := mem_closure_iff.mp |
| 92 | (N.boundary_subset_inner_end_closure hb hcB) |
| 93 | _ (N.boundary_neck.region_isOpen (-r) r) hc |
| 94 | have hinner {S : Set M} (hS : IsPreconnected S) |
| 95 | (hSS : S ⊆ N.boundary_neck.region (-r) r) (hSE : S ⊆ N.end_neck.carrier) |
| 96 | (hbelow : ∃ x ∈ S, (N.end_neck.coordinate_inverse x).2 < b) : |
| 97 | S ⊆ N.end_neck.region (-N.epsilon⁻¹) b := by |
| 98 | have hheight := N.end_neck.coordinate_inverse_smooth.continuousOn.snd.mono hSE |
| 99 | have hne : ∀ x ∈ S, (N.end_neck.coordinate_inverse x).2 ≠ b := by |
| 100 | intro x hx hxb |
| 101 | apply hstripK (hSS hx) |
| 102 | refine ⟨N.end_neck.coordinate_inverse x, ⟨mem_univ _, ?_, ?_⟩, |
| 103 | N.end_neck.coordinate_map_coordinate_inverse (hSE hx)⟩ <;> rw [hxb] |
| 104 | intro x hx |
| 105 | have hlow := (N.end_neck.coordinate_inverse_mem x (hSE hx)).2.1 |
| 106 | rw [N.end_neck_epsilon] at hlow |
| 107 | exact ⟨hSE hx, hlow, hS.gt_of_ne hheight hne hbelow hx⟩ |
| 108 | have hstrip : N.boundary_neck.region (-r) r ⊆ N.recutCarrier b := by |
| 109 | rcases N.boundary_neck_opposite_sides hr hrN with ⟨hAc, hBe⟩ | ⟨hBc, hAe⟩ |
| 110 | · have hyB := (hhalves hystrip hyinner.1).resolve_left |
| 111 | (fun hyA => Set.disjoint_left.mp N.core_disjoint_end_neck (hAc hyA) hyinner.1) |
| 112 | have hBi := hinner (N.boundary_neck.region_isPreconnected |
| 113 | (neg_nonpos.mpr he.le) hrN) |
| 114 | (fun _ hx => ⟨hx.1, (neg_neg_of_pos hr).trans hx.2.1, hx.2.2⟩) |
| 115 | hBe ⟨y, hyB, hyinner.2.2⟩ |
| 116 | intro x hx |
| 117 | rcases lt_trichotomy (N.boundary_neck.coordinate_inverse x).2 0 with hneg | hz | hpos |
| 118 | · exact Or.inl (interior_subset (N.core_eq_interior_closed_core ▸ |
| 119 | hAc ⟨hx.1, hx.2.1, hneg⟩)) |
| 120 | · exact Or.inl (hcentral hx.1 hz) |
| 121 | · exact Or.inr (hBi ⟨hx.1, hpos, hx.2.2⟩) |
| 122 | · have hyA := (hhalves hystrip hyinner.1).resolve_right |
| 123 | (fun hyB => Set.disjoint_left.mp N.core_disjoint_end_neck (hBc hyB) hyinner.1) |
| 124 | have hAi := hinner (N.boundary_neck.region_isPreconnected (neg_le_neg hrN) he.le) |
| 125 | (fun _ hx => ⟨hx.1, hx.2.1, hx.2.2.trans hr⟩) hAe ⟨y, hyA, hyinner.2.2⟩ |
| 126 | intro x hx |
| 127 | rcases lt_trichotomy (N.boundary_neck.coordinate_inverse x).2 0 with hneg | hz | hpos |
| 128 | · exact Or.inr (hAi ⟨hx.1, hx.2.1, hneg⟩) |
| 129 | · exact Or.inl (hcentral hx.1 hz) |
| 130 | · exact Or.inl (interior_subset (N.core_eq_interior_closed_core ▸ |
| 131 | hBc ⟨hx.1, hpos, hx.2.2⟩)) |
| 132 | apply isOpen_iff_mem_nhds.mpr |
| 133 | intro x hx |
| 134 | rcases hx with hxY | hxE |
| 135 | · by_cases hi : x ∈ interior N.closed_core |
| 136 | · exact mem_of_superset (isOpen_interior.mem_nhds hi) |
| 137 | (fun _ h => Or.inl (interior_subset h)) |
| 138 | · have hxB : x ∈ N.boundary_sphere := |
| 139 | N.core_frontier_eq_boundary ▸ |
| 140 | (show x ∈ frontier N.closed_core from ⟨subset_closure hxY, hi⟩) |
| 141 | have hxS : x ∈ N.boundary_neck.central_sphere := N.boundary_eq_neck_sphere ▸ hxB |
| 142 | have hxN := N.boundary_neck.central_sphere_subset hxS |
| 143 | have hx0 := (N.boundary_neck.mem_central_sphere_iff_of_mem hxN).mp hxS |
| 144 | have hxstrip : x ∈ N.boundary_neck.region (-r) r := by |
| 145 | exact ⟨hxN, by rw [hx0]; exact neg_neg_of_pos hr, by rw [hx0]; exact hr⟩ |
| 146 | exact mem_of_superset ((N.boundary_neck.region_isOpen (-r) r).mem_nhds hxstrip) hstrip |
| 147 | · exact mem_of_superset ((N.end_neck.region_isOpen (-N.epsilon⁻¹) b).mem_nhds hxE) |
| 148 | (fun _ h => Or.inr h) |
| 149 | |
| 150 | end PoincareMT.CapCertificate |