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.OpenRecut |
| 3 | |
| 4 | /-! |
| 5 | # The actual boundary sphere of an inner cap recut |
| 6 | |
| 7 | Morgan--Tian Claim 10.3 (pp. 248-249) and Corollary A.8 (p. 501) use |
| 8 | crossings between the core and the central sphere of the end neck. The |
| 9 | earlier open-precompact-recut theorem places the entire closure inside |
| 10 | the actual cap. Its frontier is then exactly the displayed end-coordinate |
| 11 | sphere. No ambient completeness or separating-sphere hypothesis is used. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.CapCertificate |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 26 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 27 | |
| 28 | /-- The actual strict cap recut has the actual coordinate cross-section as |
| 29 | its entire ambient frontier (Claim 10.3 and Corollary A.8). -/ |
| 30 | theorem frontier_innerRecut (N : CapCertificate g) {q : ℝ} |
| 31 | (hq : -N.epsilon⁻¹ < q) (hq' : q < N.epsilon⁻¹) : |
| 32 | frontier (N.closed_core ∪ N.end_neck.region (-N.epsilon⁻¹) q) = |
| 33 | N.end_neck.coordinate_map '' (univ ×ˢ ({q} : Set ℝ)) := by |
| 34 | let W : Set M := N.closed_core ∪ N.end_neck.region (-N.epsilon⁻¹) q |
| 35 | obtain ⟨hWopen, _, hWcap⟩ := N.open_precompact_recut hq hq' |
| 36 | have hqN : q ∈ Ioo (-N.end_neck.epsilon⁻¹) N.end_neck.epsilon⁻¹ := by |
| 37 | rw [N.end_neck_epsilon] |
| 38 | exact ⟨hq, hq'⟩ |
| 39 | ext x |
| 40 | constructor |
| 41 | · intro hx |
| 42 | have hxcl : x ∈ closure W := frontier_subset_closure hx |
| 43 | have hxnot : x ∉ W := (hWopen.frontier_eq ▸ hx).2 |
| 44 | have hxend : x ∈ N.end_neck.carrier := by |
| 45 | by_contra hxend |
| 46 | apply hxnot |
| 47 | apply Or.inl |
| 48 | rw [N.closed_core_eq_complement_end] |
| 49 | exact ⟨hWcap hxcl, hxend⟩ |
| 50 | have hlow : -N.epsilon⁻¹ < (N.end_neck.coordinate_inverse x).2 := by |
| 51 | simpa only [N.end_neck_epsilon] using |
| 52 | (N.end_neck.coordinate_inverse_mem x hxend).2.1 |
| 53 | have hhigh : (N.end_neck.coordinate_inverse x).2 < N.epsilon⁻¹ := by |
| 54 | simpa only [N.end_neck_epsilon] using |
| 55 | (N.end_neck.coordinate_inverse_mem x hxend).2.2 |
| 56 | have heq : (N.end_neck.coordinate_inverse x).2 = q := by |
| 57 | rcases lt_trichotomy (N.end_neck.coordinate_inverse x).2 q with hlt | heq | hgt |
| 58 | · exact False.elim (hxnot (Or.inr ⟨hxend, hlow, hlt⟩)) |
| 59 | · exact heq |
| 60 | · obtain ⟨y, hyouter, hyW⟩ := mem_closure_iff.mp hxcl |
| 61 | (N.end_neck.region q N.epsilon⁻¹) |
| 62 | (N.end_neck.region_open q N.epsilon⁻¹) ⟨hxend, hgt, hhigh⟩ |
| 63 | rcases hyW with hycore | hyinner |
| 64 | · rw [N.closed_core_eq_complement_end] at hycore |
| 65 | exact False.elim (hycore.2 hyouter.1) |
| 66 | · exact False.elim ((not_lt_of_ge hyinner.2.2.le) hyouter.2.1) |
| 67 | exact ⟨N.end_neck.coordinate_inverse x, ⟨mem_univ _, heq⟩, |
| 68 | N.end_neck.coordinate_map_coordinate_inverse hxend⟩ |
| 69 | · rintro ⟨z, hz, rfl⟩ |
| 70 | have hzq : z.2 = q := hz.2 |
| 71 | have hzN : z.2 ∈ Ioo (-N.end_neck.epsilon⁻¹) N.end_neck.epsilon⁻¹ := |
| 72 | hzq.symm ▸ hqN |
| 73 | have hzcl : z ∈ closure (univ ×ˢ Ioo (-N.epsilon⁻¹) q) := by |
| 74 | rw [closure_prod_eq, closure_univ, closure_Ioo hq.ne] |
| 75 | exact ⟨mem_univ _, by rw [hzq]; exact ⟨hq.le, le_rfl⟩⟩ |
| 76 | have hcont : ContinuousAt N.end_neck.coordinate_map z := |
| 77 | N.end_neck.coordinate_map_smooth.continuousOn.continuousAt |
| 78 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ _, hzN⟩) |
| 79 | have himage : N.end_neck.coordinate_map '' |
| 80 | (univ ×ˢ Ioo (-N.epsilon⁻¹) q) ⊆ W := by |
| 81 | rintro y ⟨w, hw, rfl⟩ |
| 82 | have hwN : w.2 ∈ Ioo (-N.end_neck.epsilon⁻¹) N.end_neck.epsilon⁻¹ := by |
| 83 | rw [N.end_neck_epsilon] |
| 84 | exact ⟨hw.2.1, hw.2.2.trans hq'⟩ |
| 85 | refine Or.inr ⟨N.end_neck.coordinate_map_mem_of_axial w hwN, ?_⟩ |
| 86 | rw [N.end_neck.coordinate_inverse_coordinate_map_of_axial w hwN] |
| 87 | exact hw.2 |
| 88 | have hxcl : N.end_neck.coordinate_map z ∈ closure W := |
| 89 | closure_mono himage (hcont.continuousWithinAt.mem_closure_image hzcl) |
| 90 | have hxnot : N.end_neck.coordinate_map z ∉ W := by |
| 91 | rintro (hxcore | hxinner) |
| 92 | · rw [N.closed_core_eq_complement_end] at hxcore |
| 93 | exact hxcore.2 (N.end_neck.coordinate_map_mem_of_axial z hzN) |
| 94 | · have hlt := hxinner.2.2 |
| 95 | rw [N.end_neck.coordinate_inverse_coordinate_map_of_axial z hzN, hzq] at hlt |
| 96 | exact (lt_irrefl q) hlt |
| 97 | exact hWopen.frontier_eq.symm ▸ And.intro hxcl hxnot |
| 98 | |
| 99 | /-- Every continuous path from the closed core to outside a strict inner |
| 100 | recut crosses its actual neck cross-section. This is the topological barrier |
| 101 | in the relative form of Corollary A.8, p. 501. -/ |
| 102 | theorem path_from_core_crosses_recut_sphere (N : CapCertificate g) {q : ℝ} |
| 103 | (hq : -N.epsilon⁻¹ < q) (hq' : q < N.epsilon⁻¹) |
| 104 | {γ : ℝ → M} {a b : ℝ} (hab : a ≤ b) |
| 105 | (hγ : ContinuousOn γ (Icc a b)) (ha : γ a ∈ N.closed_core) |
| 106 | (hb : γ b ∉ N.closed_core ∪ N.end_neck.region (-N.epsilon⁻¹) q) : |
| 107 | ∃ t ∈ Icc a b, |
| 108 | γ t ∈ N.end_neck.coordinate_map '' (univ ×ˢ ({q} : Set ℝ)) := by |
| 109 | let W : Set M := N.closed_core ∪ N.end_neck.region (-N.epsilon⁻¹) q |
| 110 | have hW : IsOpen W := N.isOpen_recut hq hq' |
| 111 | have hconn : IsPreconnected (γ '' Icc a b) := |
| 112 | isPreconnected_Icc.image γ hγ |
| 113 | by_contra hcross |
| 114 | push Not at hcross |
| 115 | have hsubset : γ '' Icc a b ⊆ W := by |
| 116 | apply hconn.subset_of_closure_inter_subset hW |
| 117 | ⟨γ a, ⟨a, left_mem_Icc.mpr hab, rfl⟩, Or.inl ha⟩ |
| 118 | rintro x ⟨hxcl, t, ht, rfl⟩ |
| 119 | by_contra hxnot |
| 120 | have hfront : γ t ∈ frontier W := hW.frontier_eq.symm ▸ And.intro hxcl hxnot |
| 121 | have hsphere : γ t ∈ N.end_neck.coordinate_map '' |
| 122 | (univ ×ˢ ({q} : Set ℝ)) := N.frontier_innerRecut hq hq' ▸ hfront |
| 123 | exact hcross t ht hsphere |
| 124 | exact hb (hsubset ⟨b, right_mem_Icc.mpr hab, rfl⟩) |
| 125 | |
| 126 | end PoincareMT.CapCertificate |