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.ClosedTube |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Ends.ClosedTails |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Ends.Cylinder.Smooth |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Ends.StrongNeckTails |
| 5 | |
| 6 | /-! |
| 7 | # Proper half-cylinders in arbitrarily late terminal tails |
| 8 | |
| 9 | Prescribe a scalar level above a chosen exhaustion set. A closed tube region |
| 10 | at that level gives a closed half-cylinder avoiding the exhaustion set. |
| 11 | Connectedness places the entire half-cylinder in the prescribed end tail, |
| 12 | where the strong-neck conclusion holds at every point. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.TerminalEnd |
| 23 | |
| 24 | variable {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 25 | {E : GeneralizedFlowExtension F T} {K : TerminalComponentPath E} |
| 26 | |
| 27 | /-- Each prescribed end tail contains a proper smooth half-cylinder that |
| 28 | contains every sufficiently late tail. -/ |
| 29 | theorem exists_closed_half_in_tail (e : TerminalEnd K) |
| 30 | (A : RepairedNeckCapTopologyTheory.{u}) |
| 31 | {epsilon C B : ℝ} (hepsilon : 0 < epsilon) (hC : 0 < C) |
| 32 | (hle : epsilon ≤ A.epsilon₀) |
| 33 | (hlower : ∃ L : ℝ, ∀ x, L ≤ (E.extended.connection T).scalarCurvature x) |
| 34 | (hproper : ∀ D : Set ℝ, IsCompact D → |
| 35 | IsCompact ((E.extended.connection T).scalarCurvature ⁻¹' D)) |
| 36 | (hcanonical : ∀ x : (E.extended.slice T).carrier, |
| 37 | B < (E.extended.connection T).scalarCurvature x → |
| 38 | GeneralizedCanonicalControl (F := E.extended) T x epsilon C) (k : ℕ) : |
| 39 | ∃ U : Set (E.extended.slice T).carrier, ∃ Q : OpenCylinderModel U, |
| 40 | IsOpen U ∧ ∃ side : Bool, ∃ a ∈ Ioo (0 : ℝ) 1, |
| 41 | IsClosed (Q.closedTail side a) ∧ |
| 42 | Q.closedTail side a ⊆ Subtype.val '' e.tail k ∧ |
| 43 | ∃ n : ℕ, k ≤ n ∧ ∀ m : ℕ, n ≤ m → |
| 44 | Subtype.val '' e.tail m ⊆ Q.closedTail side a := by |
| 45 | have hR : Continuous (fun x : K.component => |
| 46 | (E.extended.connection T).scalarCurvature x) := |
| 47 | (E.extended.connection T).continuous_scalarCurvature.comp continuous_subtype_val |
| 48 | obtain ⟨D, hD⟩ := (e.exhaustion.isCompact k).bddAbove_image hR.continuousOn |
| 49 | obtain ⟨n₀, Y, hY, hfront, htail, _, hscalar, tube, _⟩ := |
| 50 | e.exists_closed_tube_region A hepsilon hC hle hlower hproper hcanonical (D + 1) |
| 51 | obtain ⟨side, a, ha, hclosure, hdir⟩ := |
| 52 | e.exists_cylinder_tail_closure_subset n₀ hY hfront htail tube |
| 53 | let Q := tube.cylinder |
| 54 | let b : ℝ := if side then (1 + a) / 2 else a / 2 |
| 55 | have hb : b ∈ Ioo (0 : ℝ) 1 := by |
| 56 | cases side <;> dsimp [b] <;> constructor <;> linarith [ha.1, ha.2] |
| 57 | have hab : if side then a < b else b < a := by |
| 58 | cases side <;> dsimp [b] <;> linarith [ha.1, ha.2] |
| 59 | have hlong : Q.tail side a ⊆ Y := subset_closure.trans hclosure |
| 60 | have hhalfY : Q.closedTail side b ⊆ Y := |
| 61 | (Q.closedTail_subset_tail side ha hb hab).trans hlong |
| 62 | have hclosed : IsClosed (Q.closedTail side b) := |
| 63 | Q.isClosed_closedTail_of_tail_subset side hY tube.contains_X ha hb hab hlong |
| 64 | obtain ⟨n₁, _, hn₁⟩ := hdir b hb |
| 65 | let n := max k n₁ |
| 66 | have hcapture : ∀ m : ℕ, n ≤ m → Subtype.val '' e.tail m ⊆ Q.closedTail side b := by |
| 67 | intro m hm |
| 68 | exact (hn₁ m ((le_max_right _ _).trans hm)).trans (Q.tail_subset_closedTail side hb) |
| 69 | have havoid : Disjoint (Q.closedTail side b) |
| 70 | (Subtype.val '' (e.exhaustion k : Set K.component)) := by |
| 71 | rw [Set.disjoint_left] |
| 72 | rintro x hx ⟨z, hz, rfl⟩ |
| 73 | have hupper := hD ⟨z, hz, rfl⟩ |
| 74 | have hlower := hscalar z (hhalfY hx) |
| 75 | linarith |
| 76 | obtain ⟨x, hx⟩ := (e.tail_connected n).nonempty |
| 77 | have hsub := e.subset_tail_image_of_isPreconnected k |
| 78 | (Q.isConnected_closedTail side hb).isPreconnected havoid |
| 79 | (e.nested (le_max_left k n₁) hx) (hcapture n le_rfl ⟨x, hx, rfl⟩) |
| 80 | exact ⟨tube.carrier, Q, tube.carrier_open, side, b, hb, |
| 81 | hclosed, hsub, n, le_max_left _ _, hcapture⟩ |
| 82 | |
| 83 | /-- Every end has a proper smooth half-cylinder whose every point is an |
| 84 | actual strong-neck center at the unchanged canonical parameter. -/ |
| 85 | theorem exists_closed_strong_neck_half_threshold : |
| 86 | ∃ ε₀ : ℝ, 0 < ε₀ ∧ ε₀ ≤ 1 / 200 ∧ |
| 87 | ∀ {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 88 | (E : GeneralizedFlowExtension F T) (K : TerminalComponentPath E) |
| 89 | (e : TerminalEnd K) (A : RepairedNeckCapTopologyTheory.{u}) |
| 90 | {epsilon C B : ℝ}, |
| 91 | 0 < epsilon → 0 < C → epsilon ≤ ε₀ → epsilon ≤ A.epsilon₀ → |
| 92 | (∃ L : ℝ, ∀ x, L ≤ (E.extended.connection T).scalarCurvature x) → |
| 93 | (∀ D : Set ℝ, IsCompact D → |
| 94 | IsCompact ((E.extended.connection T).scalarCurvature ⁻¹' D)) → |
| 95 | (∀ x : (E.extended.slice T).carrier, |
| 96 | B < (E.extended.connection T).scalarCurvature x → |
| 97 | GeneralizedCanonicalControl (F := E.extended) T x epsilon C) → |
| 98 | ∃ U : Set (E.extended.slice T).carrier, ∃ Q : OpenCylinderModel U, |
| 99 | IsOpen U ∧ ∃ side : Bool, ∃ a ∈ Ioo (0 : ℝ) 1, |
| 100 | IsClosed (Q.closedTail side a) ∧ Q.closedTail side a ⊆ K.component ∧ |
| 101 | (∀ x ∈ Q.closedTail side a, ∃ N : TerminalStrongNeck E epsilon, N.center = x) ∧ |
| 102 | ∃ n : ℕ, Subtype.val '' e.tail n ⊆ Q.closedTail side a := by |
| 103 | obtain ⟨ε₀, hε₀, hsmall, hneck⟩ := exists_strong_neck_tail_threshold.{u} |
| 104 | refine ⟨ε₀, hε₀, hsmall, ?_⟩ |
| 105 | intro F T E K e A epsilon C B hepsilon hC hε hA hlower hproper hcanonical |
| 106 | obtain ⟨k, hk⟩ := hneck E K e A hepsilon hC hε hA hlower hproper hcanonical |
| 107 | obtain ⟨U, Q, hU, side, a, ha, hclosed, hsub, n, _, hn⟩ := |
| 108 | e.exists_closed_half_in_tail A hepsilon hC hA hlower hproper hcanonical k |
| 109 | refine ⟨U, Q, hU, side, a, ha, hclosed, ?_, ?_, n, hn n le_rfl⟩ |
| 110 | · intro x hx |
| 111 | obtain ⟨y, _, rfl⟩ := hsub hx |
| 112 | exact y.property |
| 113 | · intro x hx |
| 114 | obtain ⟨y, hy, rfl⟩ := hsub hx |
| 115 | exact hk k le_rfl y hy |
| 116 | |
| 117 | end PoincareMT.TerminalEnd |