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.Tube.SourceGeometry.CriticalBall.SourceCriticalBallFreshCore |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallStrongRadius |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.CompactStageRegularity |
| 5 | |
| 6 | /-! |
| 7 | # Capture the whole actual fresh source core in one fixed limit stage |
| 8 | |
| 9 | Compact-stage regularity joins the actual fresh center to the source |
| 10 | base. The buffered core is regular in that same component, so the |
| 11 | original convergence record supplies one stage before every core point. |
| 12 | The final producer retains the original strong necks and their scales. |
| 13 | Source: Morgan--Tian Theorem 5.6 and Claim 10.8, pp. 85-87 and 254; |
| 14 | M28 derivation 116, using the actual radial estimate of derivation 124. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 26 | |
| 27 | set_option maxHeartbeats 3200000 in |
| 28 | -- Both source inclusions and the retained index maps remain literal. |
| 29 | /-- A captured three-quarter slab with a positive normalized scale floor |
| 30 | puts the whole closed two-thirds slab in one fixed stage of the SAME |
| 31 | convergence record. Source: Theorem 5.6 and Claim 10.8; derivation 116. -/ |
| 32 | theorem exists_retained_fresh_core_capture |
| 33 | {epsilon C A : ℝ} |
| 34 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 35 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 36 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H) |
| 37 | (G : RegularPointedMetricConvergence |
| 38 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 39 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 40 | letI := G.limitCarrier.topologicalSpace |
| 41 | ∀ (q : G.limitCarrier.carrier) (sigma : ℕ → ℕ), StrictMono sigma → |
| 42 | ∀ (N : ∀ k, EpsilonNeck |
| 43 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.metric |
| 44 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).time)), |
| 45 | (∀ k, (N k).epsilon = epsilon) → |
| 46 | (∀ k, (N k).center = (G.embedding (sigma k) q).val.val) → |
| 47 | ∀ rmin : ℝ, 0 < rmin → |
| 48 | (∀ᶠ k in atTop, rmin ≤ Real.sqrt |
| 49 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.scalar |
| 50 | ⟨(E (W.high_index (G.subsequence (sigma k)) + H.shift)).time, |
| 51 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).basepoint⟩) * |
| 52 | (N k).scale) → |
| 53 | (∀ᶠ k in atTop, {x | x ∈ (N k).carrier ∧ |
| 54 | |((N k).coordinate_inverse x).2| ≤ 3 * epsilon⁻¹ / 4} ⊆ |
| 55 | (Subtype.val : (W.tube (W.high_index (G.subsequence (sigma k)))).carrierOpen → |
| 56 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.slice |
| 57 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).time).carrier) '' |
| 58 | (H.tubeCriticalRegion W.tube W.radius (W.high_index (G.subsequence (sigma k))) : |
| 59 | Set (W.tube (W.high_index (G.subsequence (sigma k)))).carrierOpen)) → |
| 60 | ∃ j : ℕ, ∀ᶠ k in atTop, j ≤ sigma k ∧ ∀ x ∈ (N k).carrier, |
| 61 | |((N k).coordinate_inverse x).2| ≤ 2 * epsilon⁻¹ / 3 → |
| 62 | x ∈ (fun y => (G.embedding (sigma k) y).val.val) '' G.exhaustion j := by |
| 63 | let := G.limitCarrier.topologicalSpace |
| 64 | intro q sigma hsigma N heps hcenter rmin hrmin hfloor hslab |
| 65 | obtain ⟨j, hjq⟩ : ∃ j, q ∈ G.exhaustion j := by |
| 66 | have hq : q ∈ ⋃ j, G.exhaustion j := by rw [G.exhaustion_covers]; exact mem_univ _ |
| 67 | exact mem_iUnion.mp hq |
| 68 | obtain ⟨rho, hrho, hstage⟩ := G.exists_eventual_compact_stage_regularComponent j |
| 69 | have hepspos : 0 < epsilon := heps 0 ▸ (N 0).epsilon_pos |
| 70 | let delta := min rho (rmin * epsilon⁻¹ / 200) |
| 71 | have hdelta : 0 < delta := lt_min hrho (by positivity) |
| 72 | obtain ⟨ell, hcoverage⟩ := G.regular_component_coverage delta hdelta |
| 73 | refine ⟨ell, ?_⟩ |
| 74 | filter_upwards [hsigma.tendsto_atTop.eventually hstage, |
| 75 | hsigma.tendsto_atTop.eventually hcoverage, hfloor, hslab] with k hkstage hkcover hkfloor hkslab |
| 76 | let nu := W.high_index (G.subsequence (sigma k)) |
| 77 | have hslabN : {x | x ∈ (N k).carrier ∧ |
| 78 | |((N k).coordinate_inverse x).2| ≤ 3 * (N k).epsilon⁻¹ / 4} ⊆ |
| 79 | (Subtype.val : (W.tube nu).carrierOpen → |
| 80 | ((E (nu + H.shift)).flow.slice (E (nu + H.shift)).time).carrier) '' |
| 81 | (H.tubeCriticalRegion W.tube W.radius nu : Set (W.tube nu).carrierOpen) := by |
| 82 | simpa only [heps k] using hkslab |
| 83 | have hqreg : G.embedding (sigma k) q ∈ regularComponent |
| 84 | (H.tubeCriticalMetric W.tube W.radius nu) |
| 85 | (H.tubeCriticalBase W.tube W.radius W.radius_pos nu) delta := |
| 86 | regularComponent_antitone _ _ (min_le_left _ _) |
| 87 | (hkstage ⟨q, subset_closure hjq, rfl⟩) |
| 88 | refine ⟨hkcover.1, ?_⟩ |
| 89 | intro x hx hheight |
| 90 | have hthree : |((N k).coordinate_inverse x).2| ≤ 3 * epsilon⁻¹ / 4 := by |
| 91 | nlinarith only [hheight, inv_pos.mpr hepspos] |
| 92 | obtain ⟨y, hy, hxy⟩ := hkslab ⟨hx, hthree⟩ |
| 93 | have hregular := H.tubeCritical_fresh_core_component W.tube W.radius W.radius_pos nu |
| 94 | (N k) rmin hrmin hkfloor hslabN (G.embedding (sigma k) q) (hcenter k) |
| 95 | (by simpa only [heps k] using min_le_right rho (rmin * epsilon⁻¹ / 200)) hqreg |
| 96 | ⟨y, hy⟩ (by simpa only [hxy] using hx) |
| 97 | (by simpa only [hxy, heps k] using hheight) |
| 98 | obtain ⟨z, hz, hzy⟩ := hkcover.2 hregular |
| 99 | refine ⟨z, hz, ?_⟩ |
| 100 | exact (congrArg (fun v : H.tubeCriticalRegion W.tube W.radius nu => v.val.val) |
| 101 | hzy).trans hxy |
| 102 | |
| 103 | set_option maxHeartbeats 3200000 in |
| 104 | -- The same original strong-neck family supplies both the margin and the capture. |
| 105 | /-- Actual original centered strong necks have positive convergent scales |
| 106 | and one fixed-stage capture of their entire closed two-thirds cores. |
| 107 | The scale floor and critical membership are produced internally. |
| 108 | Source: Claim 10.8 and Claims 10.10-10.11; M28 derivations 116 and 124. -/ |
| 109 | theorem exists_retained_strong_neck_core_capture_accuracy |
| 110 | (P : RicciFlowCurvatureTheory.{u}) : |
| 111 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ (1 / 10000 : ℝ) ∧ |
| 112 | ∀ {epsilon C A : ℝ} |
| 113 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 114 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 115 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H), |
| 116 | epsilon ≤ epsilon0 → |
| 117 | ∀ (G : RegularPointedMetricConvergence |
| 118 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 119 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))), |
| 120 | letI := G.limitCarrier.topologicalSpace |
| 121 | letI := G.limitCarrier.chartedSpace |
| 122 | letI := G.limitCarrier.isManifold |
| 123 | ∀ (D0 : LeviCivitaData G.limitMetric) (q : G.limitCarrier.carrier) |
| 124 | (L : EpsilonNeck G.limitMetric), L.center = G.base → |
| 125 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 126 | ∀ (f : ℕ → UnitTwoSphere → ℝ), |
| 127 | (∀ k, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (f k)) → |
| 128 | (∀ k z, |f k z| < epsilon⁻¹ / 32) → |
| 129 | (∀ k, (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 130 | W.high_index G (sigma k)) '' L.central_sphere = |
| 131 | range (fun z => |
| 132 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 133 | (z, f k z))) → |
| 134 | (∀ᶠ k in atTop, (G.embedding (sigma k) q).val.val ∉ |
| 135 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 136 | (f k)) → |
| 137 | ∃ J : ∀ k, GeneralizedStrongNeck |
| 138 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow |
| 139 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).time epsilon, |
| 140 | (∀ k, (J k).center = (G.embedding (sigma k) q).val.val) ∧ |
| 141 | 0 < (D0.scalarCurvature q)⁻¹ ∧ |
| 142 | Tendsto (fun k => |
| 143 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.scalar |
| 144 | ⟨(E (W.high_index (G.subsequence (sigma k)) + H.shift)).time, |
| 145 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).basepoint⟩ * |
| 146 | (J k).scale ^ 2) atTop (𝓝 (D0.scalarCurvature q)⁻¹) ∧ |
| 147 | ∃ j : ℕ, ∀ᶠ k in atTop, j ≤ sigma k ∧ ∀ x ∈ (J k).carrier, |
| 148 | |((J k).coordinate_inverse x).2| ≤ 2 * epsilon⁻¹ / 3 → |
| 149 | x ∈ (fun y => (G.embedding (sigma k) y).val.val) '' G.exhaustion j := by |
| 150 | obtain ⟨epsilon0, hpos, hsmall, hradial⟩ := |
| 151 | exists_retained_strong_neck_radial_margin_accuracy P |
| 152 | refine ⟨epsilon0, hpos, hsmall, ?_⟩ |
| 153 | intro epsilon C A E H W hepsilon G |
| 154 | let := G.limitCarrier.topologicalSpace |
| 155 | let := G.limitCarrier.chartedSpace |
| 156 | let := G.limitCarrier.isManifold |
| 157 | intro D0 q L hL sigma hsigma f hf hbound hgraphs hside |
| 158 | obtain ⟨J, hcenter, ha, hconv, eta, heta, _hetaR, hmargin⟩ := |
| 159 | hradial H W hepsilon G D0 q L hL sigma hsigma f hf hbound hgraphs hside |
| 160 | have hhalf : epsilon < 1 / 2 := (hepsilon.trans hsmall).trans_lt (by norm_num) |
| 161 | let N := fun k => strongNeck_top (J k) hhalf |
| 162 | let a := (D0.scalarCurvature q)⁻¹ |
| 163 | let rmin := Real.sqrt (a / 2) |
| 164 | have hrmin : 0 < rmin := Real.sqrt_pos.mpr (half_pos ha) |
| 165 | have hfloor : ∀ᶠ k in atTop, rmin ≤ Real.sqrt |
| 166 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.scalar |
| 167 | ⟨(E (W.high_index (G.subsequence (sigma k)) + H.shift)).time, |
| 168 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).basepoint⟩) * |
| 169 | (N k).scale := by |
| 170 | filter_upwards [hconv.eventually |
| 171 | (eventually_ge_nhds (show a / 2 < a from half_lt_self ha))] with k hk |
| 172 | apply Real.sqrt_le_iff.mpr |
| 173 | refine ⟨mul_nonneg (Real.sqrt_nonneg _) (J k).scale_pos.le, ?_⟩ |
| 174 | rw [mul_pow, Real.sq_sqrt (H.base_scalar_pos _).le] |
| 175 | exact hk |
| 176 | have hslab : ∀ᶠ k in atTop, {x | x ∈ (N k).carrier ∧ |
| 177 | |((N k).coordinate_inverse x).2| ≤ 3 * epsilon⁻¹ / 4} ⊆ |
| 178 | (Subtype.val : (W.tube (W.high_index (G.subsequence (sigma k)))).carrierOpen → |
| 179 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.slice |
| 180 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).time).carrier) '' |
| 181 | (H.tubeCriticalRegion W.tube W.radius (W.high_index (G.subsequence (sigma k))) : |
| 182 | Set (W.tube (W.high_index (G.subsequence (sigma k)))).carrierOpen) := by |
| 183 | filter_upwards [hmargin] with k hk |
| 184 | intro x hx |
| 185 | obtain ⟨hxT, hdist⟩ := hk x hx.1 hx.2 |
| 186 | refine ⟨⟨x, hxT⟩, ?_, rfl⟩ |
| 187 | change (H.tubeMetric W.tube _).edist (H.tubeBase W.tube _) ⟨x, hxT⟩ < |
| 188 | ENNReal.ofReal W.radius |
| 189 | have hfinite := H.tube_edist_ne_top W.tube |
| 190 | (W.high_index (G.subsequence (sigma k))) (H.tubeBase W.tube _) ⟨x, hxT⟩ |
| 191 | rw [← ENNReal.ofReal_toReal hfinite] |
| 192 | exact (ENNReal.ofReal_lt_ofReal_iff W.radius_pos).mpr (by linarith) |
| 193 | obtain ⟨j, hcapture⟩ := H.exists_retained_fresh_core_capture W G q sigma hsigma N |
| 194 | (fun _ => rfl) hcenter rmin hrmin hfloor hslab |
| 195 | exact ⟨J, hcenter, ha, hconv, j, hcapture⟩ |
| 196 | |
| 197 | end PoincareMT.M28.CounterexampleNeckFamily |