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.Geometry.SourceFinalChartReadouts |
| 3 | |
| 4 | /-! |
| 5 | # The actual original-source diagonal at prescribed limit points |
| 6 | |
| 7 | A constructed record retains the literal source columns and all proved |
| 8 | guarded metric and scalar readouts. The incoming row of limit points |
| 9 | is unchanged. Source: Morgan--Tian pp. 263-265; derivations 136 and 161a. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 22 | |
| 23 | variable {epsilon C A : ℝ} |
| 24 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 25 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 26 | |
| 27 | set_option maxHeartbeats 3200000 in |
| 28 | -- The source necks and comparisons retain the same dependent original index. |
| 29 | set_option backward.isDefEq.respectTransparency true in |
| 30 | /-- Only outputs of the actual source-row and diagonal producers are |
| 31 | stored. The connection, row points and source orientation are fixed |
| 32 | parameters. Source: MT pp. 263-265; derivations 136 and 161a. -/ |
| 33 | structure RetainedFinalSourceData |
| 34 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H) |
| 35 | (G : RegularPointedMetricConvergence |
| 36 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 37 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) |
| 38 | (D0 : letI := G.limitCarrier.topologicalSpace |
| 39 | letI := G.limitCarrier.chartedSpace |
| 40 | letI := G.limitCarrier.isManifold |
| 41 | LeviCivitaData G.limitMetric) |
| 42 | (q : ℕ → G.limitCarrier.carrier) (sigma : ℕ → ℕ) where |
| 43 | /-- Source columns selected without changing the prescribed row points. -/ |
| 44 | column : ℕ → ℕ |
| 45 | /-- The source-column selection remains cofinal. -/ |
| 46 | column_strictMono : StrictMono column |
| 47 | /-- A single guarded limit stage for each selected original neck. -/ |
| 48 | stage : ℕ → ℕ |
| 49 | /-- The actual strong neck on the original retained counterexample. -/ |
| 50 | neck : ∀ i : ℕ, GeneralizedStrongNeck |
| 51 | (E (W.high_index (G.subsequence (sigma (column i))) + H.shift)).flow |
| 52 | (E (W.high_index (G.subsequence (sigma (column i))) + H.shift)).time epsilon |
| 53 | /-- Its center is the literal source image of the same prescribed point. -/ |
| 54 | center_eq : letI := G.limitCarrier.topologicalSpace |
| 55 | letI := G.limitCarrier.chartedSpace |
| 56 | letI := G.limitCarrier.isManifold |
| 57 | ∀ i : ℕ, (neck i).center = (G.embedding (sigma (column i)) (q i)).val.val |
| 58 | /-- Positivity follows from the constructed row's normalized neck scale. -/ |
| 59 | scalar_pos : letI := G.limitCarrier.topologicalSpace |
| 60 | letI := G.limitCarrier.chartedSpace |
| 61 | letI := G.limitCarrier.isManifold |
| 62 | ∀ i : ℕ, 0 < D0.scalarCurvature (q i) |
| 63 | /-- The exact nine checked diagonal readouts share one proposition. -/ |
| 64 | readouts : FinalSourceDiagonalReadouts H W G D0 q sigma column stage neck |
| 65 | |
| 66 | namespace RetainedFinalSourceData |
| 67 | |
| 68 | variable {H : CounterexampleNeckFamily E} {W : CriticalBallSourcePacket H} |
| 69 | {G : RegularPointedMetricConvergence |
| 70 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 71 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))} |
| 72 | {D0 : letI := G.limitCarrier.topologicalSpace |
| 73 | letI := G.limitCarrier.chartedSpace |
| 74 | letI := G.limitCarrier.isManifold |
| 75 | LeviCivitaData G.limitMetric} |
| 76 | {q : ℕ → G.limitCarrier.carrier} {sigma : ℕ → ℕ} |
| 77 | |
| 78 | /-- The retained row point and one extra exhaustion stage are captured. |
| 79 | Source: the first two readouts of the actual diagonal, derivation 136. -/ |
| 80 | theorem stage_guard (D : RetainedFinalSourceData H W G D0 q sigma) (i : ℕ) : |
| 81 | q i ∈ G.exhaustion (D.stage i) ∧ D.stage i + 1 ≤ sigma (D.column i) := by |
| 82 | exact ⟨(D.readouts i).1, (D.readouts i).2.1⟩ |
| 83 | |
| 84 | /-- The original neck normalization has the checked vanishing error. |
| 85 | Source: the third readout of the actual diagonal, derivation 136. -/ |
| 86 | theorem scale_error (D : RetainedFinalSourceData H W G D0 q sigma) : |
| 87 | letI := G.limitCarrier.topologicalSpace |
| 88 | letI := G.limitCarrier.chartedSpace |
| 89 | letI := G.limitCarrier.isManifold |
| 90 | ∀ i : ℕ, let e := E (W.high_index (G.subsequence (sigma (D.column i))) + H.shift) |
| 91 | |D0.scalarCurvature (q i) * |
| 92 | (e.flow.scalar ⟨e.time, e.basepoint⟩ * (D.neck i).scale ^ 2) - 1| ≤ |
| 93 | (1 : ℝ) / ((i : ℝ) + 2) := by |
| 94 | let := G.limitCarrier.topologicalSpace |
| 95 | let := G.limitCarrier.chartedSpace |
| 96 | let := G.limitCarrier.isManifold |
| 97 | intro i e |
| 98 | exact (D.readouts i).2.2.1 |
| 99 | |
| 100 | /-- The original base scalar dominates the prescribed row threshold. |
| 101 | Source: the fourth readout of the actual diagonal, derivation 136. -/ |
| 102 | theorem base_lower (D : RetainedFinalSourceData H W G D0 q sigma) : |
| 103 | letI := G.limitCarrier.topologicalSpace |
| 104 | letI := G.limitCarrier.chartedSpace |
| 105 | letI := G.limitCarrier.isManifold |
| 106 | ∀ i : ℕ, let e := E (W.high_index (G.subsequence (sigma (D.column i))) + H.shift) |
| 107 | 2 * ((i : ℝ) + 1) / D0.scalarCurvature (q i) ≤ |
| 108 | e.flow.scalar ⟨e.time, e.basepoint⟩ := by |
| 109 | let := G.limitCarrier.topologicalSpace |
| 110 | let := G.limitCarrier.chartedSpace |
| 111 | let := G.limitCarrier.isManifold |
| 112 | intro i e |
| 113 | exact (D.readouts i).2.2.2.1 |
| 114 | |
| 115 | /-- The original source curvature normalization diverges along the row. |
| 116 | Source: the fifth readout of the actual diagonal, derivation 136. -/ |
| 117 | theorem normalization_lower (D : RetainedFinalSourceData H W G D0 q sigma) |
| 118 | (i : ℕ) : ((i : ℝ) + 1) ≤ ((D.neck i).scale⁻¹) ^ 2 := by |
| 119 | exact (D.readouts i).2.2.2.2.1 |
| 120 | |
| 121 | set_option maxHeartbeats 3200000 in |
| 122 | -- This one accessor keeps the same dependent source metric and derivative. |
| 123 | /-- Both quadratic bounds hold on the original captured compact stage. |
| 124 | Source: the sixth readout of the actual diagonal, derivation 136. -/ |
| 125 | theorem metric_bounds (D : RetainedFinalSourceData H W G D0 q sigma) : |
| 126 | letI := G.limitCarrier.topologicalSpace |
| 127 | letI := G.limitCarrier.chartedSpace |
| 128 | letI := G.limitCarrier.isManifold |
| 129 | ∀ i : ℕ, let delta := (1 : ℝ) / ((i : ℝ) + 2) |
| 130 | let nu := W.high_index (G.subsequence (sigma (D.column i))) |
| 131 | ∀ x ∈ closure (G.exhaustion (D.stage i)), ∀ v : TangentSpace (𝓡 3) x, |
| 132 | (1 + delta)⁻¹ * G.limitMetric.inner x v v ≤ |
| 133 | (H.tubeCriticalMetric W.tube W.radius nu).inner |
| 134 | (G.embedding (sigma (D.column i)) x) |
| 135 | (mfderiv (𝓡 3) (𝓡 3) (G.embedding (sigma (D.column i))) x v) |
| 136 | (mfderiv (𝓡 3) (𝓡 3) (G.embedding (sigma (D.column i))) x v) ∧ |
| 137 | (H.tubeCriticalMetric W.tube W.radius nu).inner |
| 138 | (G.embedding (sigma (D.column i)) x) |
| 139 | (mfderiv (𝓡 3) (𝓡 3) (G.embedding (sigma (D.column i))) x v) |
| 140 | (mfderiv (𝓡 3) (𝓡 3) (G.embedding (sigma (D.column i))) x v) ≤ |
| 141 | (1 + delta) * G.limitMetric.inner x v v := by |
| 142 | let := G.limitCarrier.topologicalSpace |
| 143 | let := G.limitCarrier.chartedSpace |
| 144 | let := G.limitCarrier.isManifold |
| 145 | intro i delta nu |
| 146 | exact (D.readouts i).2.2.2.2.2.1 |
| 147 | |
| 148 | /-- The normalized original scalar has absolute error at most one. |
| 149 | Source: the seventh readout of the actual diagonal, derivation 136. -/ |
| 150 | theorem scalar_error (D : RetainedFinalSourceData H W G D0 q sigma) : |
| 151 | letI := G.limitCarrier.topologicalSpace |
| 152 | letI := G.limitCarrier.chartedSpace |
| 153 | letI := G.limitCarrier.isManifold |
| 154 | ∀ i : ℕ, let e := E (W.high_index (G.subsequence (sigma (D.column i))) + H.shift) |
| 155 | ∀ x ∈ closure (G.exhaustion (D.stage i)), |
| 156 | |e.flow.scalar ⟨e.time, (G.embedding (sigma (D.column i)) x).val.val⟩ / |
| 157 | e.flow.scalar ⟨e.time, e.basepoint⟩ - D0.scalarCurvature x| ≤ 1 := by |
| 158 | let := G.limitCarrier.topologicalSpace |
| 159 | let := G.limitCarrier.chartedSpace |
| 160 | let := G.limitCarrier.isManifold |
| 161 | intro i e |
| 162 | exact (D.readouts i).2.2.2.2.2.2.1 |
| 163 | |
| 164 | set_option maxHeartbeats 3200000 in |
| 165 | -- The raw map retains both actual open inclusions and its original slice. |
| 166 | /-- The actual raw inverse sends the original neck center to the row point. |
| 167 | Source: the eighth readout of the actual diagonal, derivation 136. -/ |
| 168 | theorem inverse_center (D : RetainedFinalSourceData H W G D0 q sigma) : |
| 169 | letI := G.limitCarrier.topologicalSpace |
| 170 | letI := G.limitCarrier.chartedSpace |
| 171 | letI := G.limitCarrier.isManifold |
| 172 | ∀ i : ℕ, (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 173 | W.high_index G (sigma (D.column i))).symm (D.neck i).center = q i := by |
| 174 | let := G.limitCarrier.topologicalSpace |
| 175 | let := G.limitCarrier.chartedSpace |
| 176 | let := G.limitCarrier.isManifold |
| 177 | intro i |
| 178 | exact (D.readouts i).2.2.2.2.2.2.2.1 |
| 179 | |
| 180 | set_option maxHeartbeats 3200000 in |
| 181 | -- The guarded inverse and its target use one literal original source map. |
| 182 | /-- The entire buffered original neck core has an inverse in the same stage. |
| 183 | Source: the ninth readout of the actual diagonal, derivation 136. -/ |
| 184 | theorem core_capture (D : RetainedFinalSourceData H W G D0 q sigma) : |
| 185 | letI := G.limitCarrier.topologicalSpace |
| 186 | letI := G.limitCarrier.chartedSpace |
| 187 | letI := G.limitCarrier.isManifold |
| 188 | ∀ i : ℕ, |
| 189 | let e := H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 190 | W.high_index G (sigma (D.column i)) |
| 191 | ∀ x ∈ (D.neck i).carrier, |
| 192 | |((D.neck i).coordinate_inverse x).2| ≤ 2 * epsilon⁻¹ / 3 → |
| 193 | x ∈ e.target ∧ e.symm x ∈ G.exhaustion (D.stage i) ∧ e (e.symm x) = x := by |
| 194 | let := G.limitCarrier.topologicalSpace |
| 195 | let := G.limitCarrier.chartedSpace |
| 196 | let := G.limitCarrier.isManifold |
| 197 | intro i e |
| 198 | exact (D.readouts i).2.2.2.2.2.2.2.2 |
| 199 | |
| 200 | end RetainedFinalSourceData |
| 201 | |
| 202 | set_option maxHeartbeats 3200000 in |
| 203 | -- Keep fixed point rows separate from the selected source columns. |
| 204 | /-- Actual positive-side original strong necks construct the retained |
| 205 | diagonal record at every prescribed row of limit points. No normal |
| 206 | chart or limit flow is an input. Source: derivations 116, 136 and 161a. -/ |
| 207 | theorem exists_retained_final_source_data_accuracy (P : RicciFlowCurvatureTheory.{u}) : |
| 208 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ (1 / 10000 : ℝ) ∧ |
| 209 | ∀ {epsilon C A : ℝ} |
| 210 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 211 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 212 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H), |
| 213 | epsilon ≤ epsilon0 → |
| 214 | ∀ (G : RegularPointedMetricConvergence |
| 215 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 216 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))), |
| 217 | letI := G.limitCarrier.topologicalSpace |
| 218 | letI := G.limitCarrier.chartedSpace |
| 219 | letI := G.limitCarrier.isManifold |
| 220 | ∀ (D0 : LeviCivitaData G.limitMetric) (q : ℕ → G.limitCarrier.carrier) |
| 221 | (L : EpsilonNeck G.limitMetric), L.center = G.base → |
| 222 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 223 | ∀ (f : ℕ → UnitTwoSphere → ℝ), |
| 224 | (∀ k, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (f k)) → |
| 225 | (∀ k z, |f k z| < epsilon⁻¹ / 32) → |
| 226 | (∀ k, (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 227 | W.high_index G (sigma k)) '' L.central_sphere = |
| 228 | range (fun z => |
| 229 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 230 | (z, f k z))) → |
| 231 | (∀ i, ∀ᶠ k in atTop, (G.embedding (sigma k) (q i)).val.val ∉ |
| 232 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 233 | (f k)) → |
| 234 | Nonempty (RetainedFinalSourceData H W G D0 q sigma) := by |
| 235 | classical |
| 236 | obtain ⟨epsilon0, hpos, hsmall, hrow⟩ := |
| 237 | exists_retained_strong_neck_core_capture_accuracy P |
| 238 | refine ⟨epsilon0, hpos, hsmall, ?_⟩ |
| 239 | intro epsilon C A E H W hepsilon G |
| 240 | let := G.limitCarrier.topologicalSpace |
| 241 | let := G.limitCarrier.chartedSpace |
| 242 | let := G.limitCarrier.isManifold |
| 243 | intro D0 q L hL sigma hsigma f hf hbound hgraphs hside |
| 244 | let nu := fun k => W.high_index (G.subsequence (sigma k)) |
| 245 | let Q := fun k => (E (nu k + H.shift)).flow.scalar |
| 246 | ⟨(E (nu k + H.shift)).time, (E (nu k + H.shift)).basepoint⟩ |
| 247 | let R := fun i => D0.scalarCurvature (q i) |
| 248 | have hrows (i : ℕ) : |
| 249 | ∃ J : ∀ k, GeneralizedStrongNeck |
| 250 | (E (nu k + H.shift)).flow (E (nu k + H.shift)).time epsilon, |
| 251 | (∀ k, (J k).center = (G.embedding (sigma k) (q i)).val.val) ∧ |
| 252 | 0 < (R i)⁻¹ ∧ |
| 253 | Tendsto (fun k => Q k * (J k).scale ^ 2) atTop (𝓝 (R i)⁻¹) ∧ |
| 254 | ∃ j : ℕ, ∀ᶠ k in atTop, j ≤ sigma k ∧ ∀ x ∈ (J k).carrier, |
| 255 | |((J k).coordinate_inverse x).2| ≤ 2 * epsilon⁻¹ / 3 → |
| 256 | x ∈ (fun y => (G.embedding (sigma k) y).val.val) '' G.exhaustion j := |
| 257 | hrow H W hepsilon G D0 (q i) L hL sigma hsigma f hf hbound hgraphs (hside i) |
| 258 | choose J hcenter hpositive hscale hcapture using hrows |
| 259 | have hRpos (i : ℕ) : 0 < R i := inv_pos.mp (hpositive i) |
| 260 | obtain ⟨j, kappa, hkappa, hdata⟩ := H.exists_source_final_chart_diagonal |
| 261 | W G D0 q sigma hsigma J hcenter hRpos hscale hcapture |
| 262 | refine ⟨{ |
| 263 | column := kappa |
| 264 | column_strictMono := hkappa |
| 265 | stage := j |
| 266 | neck := fun i => J i (kappa i) |
| 267 | center_eq := fun i => hcenter i (kappa i) |
| 268 | scalar_pos := hRpos |
| 269 | readouts := hdata }⟩ |
| 270 | |
| 271 | end PoincareMT.M28.CounterexampleNeckFamily |