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.SourceNames |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallFreshMetricError |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckGeometry.VaryingScaleReadout |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckAnalysis.RawError |
| 6 | |
| 7 | /-! |
| 8 | # Actual necks at positive-side points of the retained spatial limit |
| 9 | |
| 10 | Whole-core capture gives the literal geometry. Finite metric convergence |
| 11 | and the vanishing normalized scale error give the cylinder comparison. |
| 12 | The final adapter supplies all geometric and analytic inputs from the |
| 13 | original centered strong necks. Source: Morgan--Tian Proposition 9.79 and |
| 14 | Claim 10.8, pp. 232-234 and 254; M28 derivations 116-117 and 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 |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 26 | |
| 27 | open tube PoincareMT.Proofs.M28.NeckTransfer PoincareMT.Proofs.M28.NeckAnalysis |
| 28 | open PoincareMT.Proofs.M28.FiniteHessian |
| 29 | |
| 30 | set_option maxHeartbeats 3200000 in |
| 31 | -- The two error tails retain the actual source normalization and the fixed target scale. |
| 32 | /-- Captured source necks with the actual scalar-defined scale limit give |
| 33 | genuine target necks on the three-halves strip, with unchanged center, |
| 34 | connection and inverse coordinate map. Source: Claim 10.8; derivation 117. -/ |
| 35 | theorem exists_retained_fresh_neck |
| 36 | {epsilon C A : ℝ} |
| 37 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 38 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 39 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H) |
| 40 | (G : RegularPointedMetricConvergence |
| 41 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 42 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 43 | letI := G.limitCarrier.topologicalSpace |
| 44 | letI := G.limitCarrier.chartedSpace |
| 45 | letI := G.limitCarrier.isManifold |
| 46 | ∀ (D0 : LeviCivitaData G.limitMetric) (q : G.limitCarrier.carrier), |
| 47 | 0 < D0.scalarCurvature q → epsilon < 1 / 3 → |
| 48 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 49 | ∀ (N : ∀ k, EpsilonNeck |
| 50 | ((E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.metric |
| 51 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).time)), |
| 52 | (∀ k, (N k).epsilon = epsilon) → |
| 53 | (∀ k, (N k).center = (G.embedding (sigma k) q).val.val) → |
| 54 | Tendsto (fun k => |
| 55 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).flow.scalar |
| 56 | ⟨(E (W.high_index (G.subsequence (sigma k)) + H.shift)).time, |
| 57 | (E (W.high_index (G.subsequence (sigma k)) + H.shift)).basepoint⟩ * |
| 58 | (N k).scale ^ 2) atTop (𝓝 (D0.scalarCurvature q)⁻¹) → |
| 59 | ∀ j : ℕ, (∀ᶠ k in atTop, j ≤ sigma k ∧ ∀ x ∈ (N k).carrier, |
| 60 | |((N k).coordinate_inverse x).2| ≤ 2 * epsilon⁻¹ / 3 → |
| 61 | x ∈ (fun y => (G.embedding (sigma k) y).val.val) '' G.exhaustion j) → |
| 62 | ∀ᶠ k in atTop, j ≤ sigma k ∧ ∃ V : EpsilonNeck G.limitMetric, |
| 63 | V.epsilon = 3 * epsilon / 2 ∧ V.center = q ∧ |
| 64 | V.scale = (D0.scalarCurvature q) ^ (-1 / 2 : ℝ) ∧ V.connection = D0 ∧ |
| 65 | V.carrier ⊆ G.exhaustion j ∧ ∀ z : RoundCylinderSpace, |
| 66 | V.coordinate_map z = |
| 67 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 68 | W.high_index G (sigma k)).symm ((N k).coordinate_map z) := by |
| 69 | let := G.limitCarrier.topologicalSpace |
| 70 | let := G.limitCarrier.chartedSpace |
| 71 | let := G.limitCarrier.isManifold |
| 72 | intro D0 q hscalar hsmall sigma hsigma N heps hcenter hconv j hcapture |
| 73 | have hepspos : 0 < epsilon := heps 0 ▸ (N 0).epsilon_pos |
| 74 | let eta := 3 * epsilon / 2 |
| 75 | let m := ⌊eta⁻¹⌋₊ |
| 76 | let a := (D0.scalarCurvature q)⁻¹ |
| 77 | let rstar := (D0.scalarCurvature q) ^ (-1 / 2 : ℝ) |
| 78 | have ha : 0 < a := inv_pos.mpr hscalar |
| 79 | have hrstar : 0 < rstar := Real.rpow_pos_of_pos hscalar _ |
| 80 | have hrstarSq : rstar ^ 2 = a := by |
| 81 | dsimp only [rstar, a] |
| 82 | rw [← Real.rpow_mul_natCast hscalar.le (-1 / 2) 2] |
| 83 | norm_num [Real.rpow_neg_one] |
| 84 | have hepseta : epsilon < eta := by dsimp only [eta]; linarith |
| 85 | have heta : 0 < eta := hepspos.trans hepseta |
| 86 | have hetahalf : eta < 1 / 2 := by dsimp only [eta]; linarith |
| 87 | have hmpos : 1 ≤ m := (Nat.one_le_floor_iff _).mpr |
| 88 | ((one_le_inv₀ heta).mpr (by linarith)) |
| 89 | obtain ⟨n, hnm⟩ := Nat.exists_eq_succ_of_ne_zero (by omega : m ≠ 0) |
| 90 | have horder : m ≤ ⌊epsilon⁻¹⌋₊ := cylinderOrder_mono hepspos hepseta.le |
| 91 | have hn : n + 1 ≤ ⌊epsilon⁻¹⌋₊ := by omega |
| 92 | have hscales := (hconv.eventually |
| 93 | (eventually_ge_nhds (show a / 2 < a from half_lt_self ha))).and |
| 94 | (hconv.eventually (eventually_le_nhds (show a < 2 * a by linarith))) |
| 95 | have hgeometry := H.exists_retained_fresh_geometry W G D0 q hscalar hsmall sigma |
| 96 | hsigma N heps hcenter j hcapture |
| 97 | obtain ⟨delta, hdelta, hperturb⟩ := |
| 98 | exists_roundCylinderClose_perturbation_tolerance hepspos hepseta |
| 99 | obtain ⟨rho, hrho, hraw⟩ := exists_cylinder_raw_error_tolerance m hdelta |
| 100 | let L := cylinderScalarCoordinateEquiv.symm.toContinuousLinearMap |
| 101 | let F := rstar⁻¹ ^ 2 * (max 1 ‖L‖) ^ m |
| 102 | have hF : 0 < F := mul_pos (pow_pos (inv_pos.mpr hrstar) 2) |
| 103 | (pow_pos (lt_of_lt_of_le zero_lt_one (le_max_left _ _)) m) |
| 104 | have hbudget : 0 < rho / (2 * F) := div_pos hrho (mul_pos (by norm_num) hF) |
| 105 | obtain ⟨Kmetric, hKmetric⟩ := H.exists_retained_fresh_metric_error W G sigma hsigma N |
| 106 | heps hsmall (a / 2) (2 * a) (half_pos ha) hscales j hcapture n hn |
| 107 | (rho / (2 * F)) hbudget |
| 108 | let I := {z : ℕ × RoundCylinderSpace // z.2.2 ∈ Ioo (-eta⁻¹) eta⁻¹} |
| 109 | have hs (i : I) : i.1.2.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ := |
| 110 | cylinderStrip_mono hepspos hepseta.le i.2 |
| 111 | have hjets := hasUniformJetBoundsAt_cylinderNeckCoefficients (fun i : I => N i.1.1) |
| 112 | hepspos (by linarith) (fun i => heps i.1.1) m horder |
| 113 | (fun i => i.1.2.1) (fun i => i.1.2.2) hs |
| 114 | have hc (i : I) : ContDiffAt ℝ ∞ |
| 115 | (cylinderNeckCoefficients (N i.1.1) i.1.2.1 i.1.2.2) 0 := by |
| 116 | apply (contDiffOn_cylinderNeckCoefficients (N i.1.1) i.1.2.1 i.1.2.2).contDiffAt |
| 117 | apply (isOpen_cylinderNeckChartDomain (N i.1.1) i.1.2.1 i.1.2.2).mem_nhds |
| 118 | apply zero_mem_cylinderNeckChartDomain |
| 119 | simpa only [heps] using hs i |
| 120 | obtain ⟨Kscale, hKscale⟩ := hjets.exists_scalar_error_tail hc hconv (fun i => i.1.1) |
| 121 | (rho / (2 * F)) hbudget |
| 122 | filter_upwards [hgeometry, eventually_ge_atTop (max Kmetric Kscale)] with k hk hkK |
| 123 | obtain ⟨hjk, V, hcenterV, hscaleV, hconnection, hcarrier, hmap⟩ := hk |
| 124 | let idx := W.high_index (G.subsequence (sigma k)) |
| 125 | let Q := (E (idx + H.shift)).flow.scalar |
| 126 | ⟨(E (idx + H.shift)).time, (E (idx + H.shift)).basepoint⟩ |
| 127 | have hQ : 0 < Q := H.base_scalar_pos idx |
| 128 | let S : RoundCylinderTwoTensor := fun z v w => (N k).scale⁻¹ ^ 2 * |
| 129 | roundCylinderPullback ((E (idx + H.shift)).flow.metric |
| 130 | (E (idx + H.shift)).time) (N k).coordinate_map z v w |
| 131 | have hsource : RoundCylinderClose epsilon 0 S := by |
| 132 | have hh := (N k).metric_comparison.close |
| 133 | rw [heps] at hh |
| 134 | exact hh |
| 135 | have hclose : RoundCylinderClose eta 0 V.tensor := by |
| 136 | apply hperturb 0 (by norm_num) V.tensor S hsource V.tensor_smooth |
| 137 | intro z hz |
| 138 | apply hraw eta V.tensor S V.tensor_smooth |
| 139 | (hsource.1.mono_epsilon_m28 hepspos hepseta.le) z hz |
| 140 | intro r hr a0 b0 |
| 141 | have hsN : z.2 ∈ Ioo (-(N k).epsilon⁻¹) (N k).epsilon⁻¹ := by |
| 142 | rw [heps] |
| 143 | exact cylinderStrip_mono hepspos hepseta.le hz |
| 144 | have h := V.norm_frozen_difference_jet_le_of_scale_error (N k) Q hQ z.1 hz hsN a0 b0 r |
| 145 | have hlocal : V.coordinate_map ∘ |
| 146 | (cylinderSphereParametrization z.1 ∘ cylinderScalarCoordinates z.2) = |
| 147 | capturedCylinderMap |
| 148 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 149 | W.high_index G (sigma k)) (N k) z.1 z.2 := by |
| 150 | funext x |
| 151 | exact hmap _ |
| 152 | rw [hlocal, hscaleV, hrstarSq] at h |
| 153 | have hmetric : ‖iteratedFDeriv ℝ r (fun x => G.limitMetric.pullbackCoefficients |
| 154 | (capturedCylinderMap |
| 155 | (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 156 | W.high_index G (sigma k)) (N k) z.1 z.2) x - |
| 157 | RiemannianMetric.pullbackCoefficients (M13.scaleSmoothMetric _ Q hQ) |
| 158 | (cylinderNeckChart (N k) z.1 z.2) x) 0‖ ≤ rho / (2 * F) := |
| 159 | hKmetric k ((le_max_left _ _).trans hkK) z hz r (by omega) |
| 160 | have hscaleError : ‖iteratedFDeriv ℝ r (fun x => |
| 161 | (Q * (N k).scale ^ 2 - a) • cylinderNeckCoefficients (N k) z.1 z.2 x) 0‖ ≤ |
| 162 | rho / (2 * F) := |
| 163 | hKscale ⟨(k, z), hz⟩ ((le_max_right _ _).trans hkK) r hr |
| 164 | have hsum := add_le_add hmetric hscaleError |
| 165 | have hbudget_eq : rho / (2 * F) + rho / (2 * F) = rho / F := by ring |
| 166 | rw [hbudget_eq] at hsum |
| 167 | have hpower : ‖L‖ ^ r ≤ (max 1 ‖L‖) ^ m := |
| 168 | (pow_le_pow_left₀ (norm_nonneg L) (le_max_right _ _) r).trans |
| 169 | (pow_le_pow_right₀ (le_max_left _ _) hr) |
| 170 | have hfactor : rstar⁻¹ ^ 2 * ‖L‖ ^ r ≤ F := |
| 171 | mul_le_mul_of_nonneg_left hpower (sq_nonneg _) |
| 172 | exact h.trans ((mul_le_mul_of_nonneg_left hsum |
| 173 | (mul_nonneg (sq_nonneg _) (pow_nonneg (norm_nonneg _) _))).trans |
| 174 | ((mul_le_mul_of_nonneg_right hfactor (div_pos hrho hF).le).trans_eq |
| 175 | (mul_div_cancel₀ rho hF.ne'))) |
| 176 | exact ⟨hjk, V.toEpsilonNeck hclose, rfl, hcenterV, hscaleV, hconnection, hcarrier, hmap⟩ |
| 177 | |
| 178 | set_option maxHeartbeats 3200000 in |
| 179 | -- The actual source producer discharges capture, scalar positivity and all scale errors. |
| 180 | /-- Every point with the retained positive-side label has an actual neck |
| 181 | in the SAME spatial limit, with the prescribed limit connection. All |
| 182 | capture and comparison inputs come from original strong necks. Source: |
| 183 | Claim 10.8, p. 254; M28 derivations 116-117 and 124. -/ |
| 184 | theorem exists_retained_positive_limit_neck_accuracy |
| 185 | (P : RicciFlowCurvatureTheory.{u}) : |
| 186 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ (1 / 10000 : ℝ) ∧ |
| 187 | ∀ {epsilon C A : ℝ} |
| 188 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 189 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 190 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H), |
| 191 | epsilon ≤ epsilon0 → |
| 192 | ∀ (G : RegularPointedMetricConvergence |
| 193 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 194 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))), |
| 195 | letI := G.limitCarrier.topologicalSpace |
| 196 | letI := G.limitCarrier.chartedSpace |
| 197 | letI := G.limitCarrier.isManifold |
| 198 | ∀ (D0 : LeviCivitaData G.limitMetric) (q : G.limitCarrier.carrier) |
| 199 | (L : EpsilonNeck G.limitMetric), L.center = G.base → |
| 200 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 201 | ∀ (f : ℕ → UnitTwoSphere → ℝ), |
| 202 | (∀ k, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (f k)) → |
| 203 | (∀ k z, |f k z| < epsilon⁻¹ / 32) → |
| 204 | (∀ k, (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 205 | W.high_index G (sigma k)) '' L.central_sphere = |
| 206 | range (fun z => |
| 207 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 208 | (z, f k z))) → |
| 209 | (∀ᶠ k in atTop, (G.embedding (sigma k) q).val.val ∉ |
| 210 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.belowGraph_m28 |
| 211 | (f k)) → |
| 212 | ∃ N : EpsilonNeck G.limitMetric, N.epsilon = 3 * epsilon / 2 ∧ |
| 213 | N.center = q ∧ N.connection = D0 ∧ |
| 214 | ∃ j : ℕ, N.carrier ⊆ G.exhaustion j := by |
| 215 | obtain ⟨epsilon0, hpos, hsmall, hcore⟩ := |
| 216 | exists_retained_strong_neck_core_capture_accuracy P |
| 217 | refine ⟨epsilon0, hpos, hsmall, ?_⟩ |
| 218 | intro epsilon C A E H W hepsilon G |
| 219 | let := G.limitCarrier.topologicalSpace |
| 220 | let := G.limitCarrier.chartedSpace |
| 221 | let := G.limitCarrier.isManifold |
| 222 | intro D0 q L hL sigma hsigma f hf hbound hgraphs hside |
| 223 | obtain ⟨J, hcenter, ha, hconv, j, hcapture⟩ := |
| 224 | hcore H W hepsilon G D0 q L hL sigma hsigma f hf hbound hgraphs hside |
| 225 | have hthird : epsilon < 1 / 3 := (hepsilon.trans hsmall).trans_lt (by norm_num) |
| 226 | have hhalf : epsilon < 1 / 2 := hthird.trans (by norm_num) |
| 227 | let N := fun k => strongNeck_top (J k) hhalf |
| 228 | obtain ⟨k, hk⟩ := (H.exists_retained_fresh_neck W G D0 q (inv_pos.mp ha) hthird |
| 229 | sigma hsigma N (fun _ => rfl) hcenter hconv j hcapture).exists |
| 230 | obtain ⟨_, V, hepsV, hcenterV, _hscaleV, hconnectionV, hcarrierV, _hmapV⟩ := hk |
| 231 | exact ⟨V, hepsV, hcenterV, hconnectionV, j, hcarrierV⟩ |
| 232 | |
| 233 | end PoincareMT.M28.CounterexampleNeckFamily |