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.Curvature.Integral.Concentration.PairedQuarterSpireScalar |
| 2 | import PoincareLib.Geometry.Curvature.Integral.Induction.Corners.AnnularComponents |
| 3 | |
| 4 | /-! |
| 5 | # Scalar concentration with geometry of the same chosen levels |
| 6 | |
| 7 | The quarter-spire scalar family retains its exact functions and induction |
| 8 | premise. Their constructed opposite partners give completeness, a uniform |
| 9 | component count, and intrinsic component diameters at every required scale. |
| 10 | |
| 11 | Reference: Petrunin (2009), Sections 4.5--4.6, manuscript pp. 9--14. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | open Set Filter MeasureTheory |
| 18 | open Poincare.CurvatureIntegral Poincare.Geometry.Manifold.RegularLevel |
| 19 | open Poincare.GromovHausdorff |
| 20 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 21 | namespace PoincareMT.RiemannianMetric |
| 22 | |
| 23 | /-- The actual paired scalar family has controlled induced levels before |
| 24 | the scalar induction coefficient is supplied. -/ |
| 25 | theorem exists_quarter_spire_scalar_concentration_with_controlled_levels |
| 26 | {m : ℕ} (hm : 1 ≤ m) {M : ℕ → Type} |
| 27 | [∀ j, TopologicalSpace (M j)] [∀ j, T3Space (M j)] |
| 28 | [∀ j, MeasurableSpace (M j)] [∀ j, BorelSpace (M j)] |
| 29 | [∀ j, ChartedSpace (EuclideanSpace ℝ (Fin (m + 2))) (M j)] |
| 30 | [∀ j, IsManifold (𝓡 (m + 2)) ∞ (M j)] [∀ j, PreconnectedSpace (M j)] |
| 31 | (g : ∀ j, RiemannianMetric (m + 2) (M j)) (D : ∀ j, LeviCivitaData (g j)) |
| 32 | (hcomplete : ∀ j, MetricComplete (g j)) |
| 33 | (hsec : ∀ j x (v w : TangentSpace (𝓡 (m + 2)) x), |
| 34 | -1 ≤ (D j).sectionalCurvature x v w) |
| 35 | (p : ∀ j, M j) |
| 36 | {Y : BasedMetricSpaceBundle.{0}} [ProperSpace Y.carrier] |
| 37 | (hconv : PointedGHConvergesUnbounded (fun j => (g j).toBasedMetricSpace (p j)) Y) |
| 38 | (hYgeo : ∀ x y : Y.carrier, ∃ γ : ℝ → Y.carrier, |
| 39 | γ 0 = x ∧ γ 1 = y ∧ |
| 40 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 41 | dist (γ s) (γ t) = |s - t| * dist x y) |
| 42 | {δ cminus c cplus cap : ℝ} |
| 43 | (hδ : 0 < δ) (hδsmall : δ ≤ 1 / 256) |
| 44 | (hnear : 1 - δ ^ 2 / 8 < cminus) (hminus : cminus < c) |
| 45 | (hplus : c < cplus) (hplus1 : cplus < 1) (hcap : 0 < cap) (hcap1 : cap ≤ 1) |
| 46 | {R : ℝ} (hR : 1 < R) |
| 47 | (hlarge : ∀ K : ℝ, ∃ j, |
| 48 | K < ∫ x in (g j).ball (p j) 1, (D j).scalarCurvature x ∂(g j).volumeMeasure) : |
| 49 | ∃ (B : Y.carrier → ℝ) (S : Finset Y.carrier) (b ρ : ℝ) |
| 50 | (φ : ℕ → ℕ) (ref : ∀ j, Y.carrier → M (φ j)) |
| 51 | (q : ∀ j, S → M (φ j)) (A : Finset (Y.carrier × ℝ)), |
| 52 | (∀ x, 0 < B x ∧ 2 * B x ≤ cap) ∧ |
| 53 | (∀ x y : Y.carrier, 0 < dist x y → dist x y < 2 * B x → |
| 54 | HasLocalDistanceAscent cminus x y) ∧ |
| 55 | (∀ x : Y.carrier, ∀ a : ℝ, 0 ≤ a → 2 * a ≤ cap → |
| 56 | (∀ y : Y.carrier, 0 < dist x y → dist x y < 2 * a → |
| 57 | HasLocalDistanceAscent cminus x y) → a ≤ B x) ∧ |
| 58 | (S : Set Y.carrier) = |
| 59 | {x | x ∈ Metric.closedBall Y.base R ∧ ∀ y : Y.carrier, y ≠ x → B y / 4 ≤ dist y x} ∧ |
| 60 | 0 < b ∧ b ≤ cap ∧ 0 < ρ ∧ ρ < b / 8 ∧ |
| 61 | (∀ i : S, ∀ y : Y.carrier, 0 < dist i.val y → dist i.val y ≤ b → |
| 62 | HasLocalDistanceAscent cplus i.val y) ∧ |
| 63 | StrictMono φ ∧ |
| 64 | (∀ y : Y.carrier, |
| 65 | Tendsto (fun j => ((g (φ j)).edist (p (φ j)) (ref j y)).toReal) |
| 66 | atTop (𝓝 (dist Y.base y))) ∧ |
| 67 | (∀ y : Y.carrier, |
| 68 | PointedGHConvergesUnbounded |
| 69 | (fun j => (g (φ j)).toBasedMetricSpace (ref j y)) (Y.rebase y)) ∧ |
| 70 | (∀ j, ∀ i : S, letI := (g (φ j)).toMetricSpace |
| 71 | dist (ref j i.val) (q j i) ≤ ρ ∧ |
| 72 | badAscentRadius c b (q j i) ≤ badAscentRadius c b (ref j i.val) ∧ |
| 73 | ∀ z : M (φ j), dist (ref j i.val) z ≤ ρ → |
| 74 | badAscentRadius c b (q j i) ≤ 2 * badAscentRadius c b z) ∧ |
| 75 | (∀ i : S, |
| 76 | Tendsto (fun j => letI := (g (φ j)).toMetricSpace |
| 77 | badAscentRadius c b (ref j i.val)) atTop (𝓝 0) ∧ |
| 78 | Tendsto (fun j => letI := (g (φ j)).toMetricSpace |
| 79 | badAscentRadius c b (q j i)) atTop (𝓝 0) ∧ |
| 80 | Tendsto (fun j => ((g (φ j)).edist (ref j i.val) (q j i)).toReal) |
| 81 | atTop (𝓝 0)) ∧ |
| 82 | (∀ z ∈ A, 0 < z.2 ∧ z.2 ≤ 1 / 2 ∧ 3 * z.2 < 2 * B z.1) ∧ |
| 83 | (∀ j, (g (φ j)).ball (p (φ j)) 1 ⊆ |
| 84 | (⋃ z : A, {x : M (φ j) | ((g (φ j)).edist (ref j z.val.1) x).toReal ∈ |
| 85 | Icc (113 * z.val.2 / 96) (19 * z.val.2 / 16)}) ∪ |
| 86 | ⋃ i : S, (g (φ j)).ball (q j i) (b / 12)) ∧ |
| 87 | Tendsto (fun j => ∫ x in (g (φ j)).ball (p (φ j)) 1, |
| 88 | (D (φ j)).scalarCurvature x ∂(g (φ j)).volumeMeasure) atTop atTop ∧ |
| 89 | letI (j : ℕ) := (g (φ j)).toMetricSpace |
| 90 | let τ := 1 / (1 + δ ^ 2 / 8) |
| 91 | let a := fun j i => badAscentRadius c b (q j i) |
| 92 | let T := fun j => A ⊕ {ir : S × ℝ // 0 < ir.2 ∧ ir.2 ≤ b / 6 ∧ 2 * a j ir.1 ≤ ir.2} |
| 93 | let center := fun j => Sum.elim (fun z : A => ref j z.val.1) (fun ir : {ir : S × ℝ // |
| 94 | 0 < ir.2 ∧ ir.2 ≤ b / 6 ∧ 2 * a j ir.1 ≤ ir.2} => q j ir.val.1) |
| 95 | let radius := fun j => Sum.elim (fun z : A => z.val.2) (fun ir : {ir : S × ℝ // |
| 96 | 0 < ir.2 ∧ ir.2 ≤ b / 6 ∧ 2 * a j ir.1 ≤ ir.2} => ir.val.2) |
| 97 | ∃ (f u : ∀ j, T j → M (φ j) → ℝ) |
| 98 | (hf : ∀ j w, ContMDiff (𝓡 (m + 2)) 𝓘(ℝ, ℝ) ∞ (f j w)) |
| 99 | (_hu : ∀ j w, ContMDiff (𝓡 (m + 2)) 𝓘(ℝ, ℝ) ∞ (u j w)), |
| 100 | (∀ j w, let r := radius j w |
| 101 | let ε := δ ^ 4 * r / 1048576 |
| 102 | let s := τ * r / 1024 |
| 103 | let I := Ioo (9 * r / 16) (15 * r / 16) |
| 104 | (∀ x, (f j w) x = (u j w) x / (2 * τ)) ∧ |
| 105 | IsProperMap (I.restrictPreimage (f j w)) ∧ |
| 106 | (∀ x : (M (φ j)), (f j w) x ∈ I → mfderiv (𝓡 (m + 2)) 𝓘(ℝ, ℝ) (f j w) x ≠ 0) ∧ |
| 107 | (∀ x : (M (φ j)), (f j w) x ∈ I → |
| 108 | r < ((g (φ j)).edist (center j w) x).toReal ∧ ((g (φ j)).edist (center j w) x).toReal < 2 * r) ∧ |
| 109 | (∀ x : (M (φ j)), r < ((g (φ j)).edist (center j w) x).toReal → ((g (φ j)).edist (center j w) x).toReal < 2 * r → |
| 110 | |(f j w) x - ((g (φ j)).edist (center j w) x).toReal / 2| ≤ ε / 2 ∧ |
| 111 | (1 / 4 : ℝ) ≤ (g (φ j)).tangentNorm x ((D (φ j)).gradient (f j w) x) ∧ |
| 112 | (g (φ j)).tangentNorm x ((D (φ j)).gradient (f j w) x) ≤ 1 ∧ |
| 113 | (∀ v : TangentSpace (𝓡 (m + 2)) x, |
| 114 | (D (φ j)).hessian (f j w) x v v ≤ (5 / r) * (g (φ j)).inner x v v) ∧ |
| 115 | 1 - δ ^ 2 ≤ (g (φ j)).tangentNorm x ((D (φ j)).gradient (u j w) x) ∧ |
| 116 | (g (φ j)).tangentNorm x ((D (φ j)).gradient (u j w) x) ≤ 1 ∧ |
| 117 | ∀ v : TangentSpace (𝓡 (m + 2)) x, |
| 118 | (D (φ j)).hessian (u j w) x v v ≤ (5 / r) * (g (φ j)).inner x v v) ∧ |
| 119 | (f j w) ⁻¹' Icc (55 * r / 96) (9 * r / 10) ⊆ (g (φ j)).ball (center j w) (2 * r) ∧ |
| 120 | {x : (M (φ j)) | ((g (φ j)).edist (center j w) x).toReal ∈ Icc (113 * r / 96) (19 * r / 16)} ⊆ |
| 121 | (f j w) ⁻¹' Icc (7 * r / 12) (3 * r / 5) ∧ |
| 122 | ∀ t ∈ Icc (7 * r / 12) (9 * r / 10), |
| 123 | IsCompact ((f j w) ⁻¹' {t}) ∧ |
| 124 | ∃ h : (M (φ j)) → ℝ, ContMDiff (𝓡 (m + 2)) 𝓘(ℝ, ℝ) ∞ h ∧ |
| 125 | let U := (u j w) ⁻¹' Ioo (2 * τ * t - s / 4) (2 * τ * t + s / 4) |
| 126 | (∀ x : (M (φ j)), (f j w) x = t → Metric.closedBall x (s / 16) ⊆ U) ∧ |
| 127 | ∀ x ∈ U, |
| 128 | (1 / 2 : ℝ) ≤ (g (φ j)).tangentNorm x ((D (φ j)).gradient (u j w) x) ∧ |
| 129 | (g (φ j)).tangentNorm x ((D (φ j)).gradient (u j w) x) ≤ 1 ∧ |
| 130 | (1 / 2 : ℝ) ≤ (g (φ j)).tangentNorm x ((D (φ j)).gradient h x) ∧ |
| 131 | (g (φ j)).tangentNorm x ((D (φ j)).gradient h x) ≤ 1 ∧ |
| 132 | (g (φ j)).inner x ((D (φ j)).gradient (u j w) x) ((D (φ j)).gradient h x) ≤ -1 + 128 * δ ∧ |
| 133 | ∀ v : TangentSpace (𝓡 (m + 2)) x, |
| 134 | (D (φ j)).hessian (u j w) x v v ≤ (3 / s) * (g (φ j)).inner x v v ∧ |
| 135 | (D (φ j)).hessian h x v v ≤ (3 / s) * (g (φ j)).inner x v v) ∧ |
| 136 | (∀ j w, let r := radius j w |
| 137 | ∀ t ∈ Icc (7 * r / 12) (9 * r / 10), |
| 138 | let U := (g (φ j)).regularDomain (hf j w) |
| 139 | let hreg := (g (φ j)).regularDomain_regular (hf j w) |
| 140 | letI : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin (m + 2))) = m + 2) := |
| 141 | ⟨finrank_euclideanSpace_fin⟩ |
| 142 | letI := openLevelSetChartedSpace (hf j w) U hreg (m + 1) t |
| 143 | letI := isManifold_openLevelSet (hf j w) U hreg (m + 1) t |
| 144 | let L := openLevelSet (f j w) U t |
| 145 | let gL := (g (φ j)).regularLevelMetric (hf j w) U hreg t |
| 146 | let N := ⌈modelVolume (m + 2) 1 3 / modelVolume (m + 2) 1 (1 / 10485760)⌉₊ |
| 147 | MetricComplete gL ∧ Finite (ConnectedComponents L) ∧ |
| 148 | Nat.card (ConnectedComponents L) ≤ N ∧ |
| 149 | ∀ x y : L, y ∈ connectedComponent x → |
| 150 | gL.edist x y ≤ ENNReal.ofReal ((N : ℝ) * 36 * Real.exp (3 / 10) * r)) ∧ |
| 151 | ∀ C : ℝ, 0 ≤ C → |
| 152 | (∀ᶠ j in atTop, ∀ w : T j, |
| 153 | let r := radius j w |
| 154 | let U := (g (φ j)).regularDomain (hf j w) |
| 155 | letI : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin (m + 2))) = m + 2) := |
| 156 | ⟨finrank_euclideanSpace_fin⟩ |
| 157 | letI (t : ℝ) := openLevelSetChartedSpace (hf j w) U |
| 158 | ((g (φ j)).regularDomain_regular (hf j w)) (m + 1) t |
| 159 | letI (t : ℝ) := isManifold_openLevelSet (hf j w) U |
| 160 | ((g (φ j)).regularDomain_regular (hf j w)) (m + 1) t |
| 161 | let DL := fun t => (RiemannianMetric.regularLevelMetric |
| 162 | (hf j w) U ((g (φ j)).regularDomain_regular (hf j w)) t (g (φ j))).leviCivitaData |
| 163 | ∀ t ∈ Icc (7 * r / 12) (9 * r / 10), |
| 164 | (∫ z, max 0 ((DL t).scalarCurvature z) |
| 165 | ∂(g (φ j)).regularLevelVolume (hf j w) U ((g (φ j)).regularDomain_regular (hf j w)) t) ≤ |
| 166 | C * (r ^ (m - 1) + ∫ z, |
| 167 | (D (φ j)).levelSectionalError (f j w) (fun _ => 1) |
| 168 | (scaleAnnularInductionConstant m / t) (openLevelIncl (f j w) U t z) |
| 169 | ∂(g (φ j)).regularLevelVolume (hf j w) U ((g (φ j)).regularDomain_regular (hf j w)) t)) → |
| 170 | ∃ i : S, ∃ ψ : ℕ → ℕ, StrictMono ψ ∧ |
| 171 | (∀ j, 0 < a (ψ j) i) ∧ |
| 172 | Tendsto (fun j => ∫ x in (g (φ (ψ j))).ball (q (ψ j) i) (4 * a (ψ j) i), |
| 173 | (D (φ (ψ j))).scalarCurvature x ∂(g (φ (ψ j))).volumeMeasure) atTop atTop := by |
| 174 | classical |
| 175 | obtain ⟨B,S,b,ρ,φ,ref,q,A,hB,hBasc,hBmax,hS,hb,hbcap,hρ,hρb, |
| 176 | hstrong,hφ,href,hconvref,hq,hzero,hA,hcover,hmass,rest⟩ := |
| 177 | exists_quarter_spire_scalar_concentration_with_level_opposite_partners hm |
| 178 | g D hcomplete hsec p hconv hYgeo hδ hδsmall hnear hminus hplus hplus1 |
| 179 | hcap hcap1 hR hlarge |
| 180 | let (j:ℕ) := (g (φ j)).toMetricSpace |
| 181 | obtain ⟨f,u,hf,hu,hgeometry,hconcentration⟩ := rest |
| 182 | refine ⟨B,S,b,ρ,φ,ref,q,A,hB,hBasc,hBmax,hS,hb,hbcap,hρ,hρb,hstrong,hφ, |
| 183 | href,hconvref,hq,hzero,hA,hcover,hmass,f,u,hf,hu,hgeometry,?_,hconcentration⟩ |
| 184 | intro j w |
| 185 | dsimp only |
| 186 | intro t ht |
| 187 | let r := Sum.elim (fun z:A => z.val.2) (fun ir => ir.val.2) w |
| 188 | have hr : 0<r ∧ r≤1/2 := by |
| 189 | cases w with |
| 190 | | inl z => exact ⟨(hA z.val z.property).1,(hA z.val z.property).2.1⟩ |
| 191 | | inr ir => |
| 192 | exact ⟨ir.property.1,ir.property.2.1.trans (by linarith)⟩ |
| 193 | let τ : ℝ := 1/(1+δ^2/8) |
| 194 | have hτ : 0<τ := by dsimp [τ]; positivity |
| 195 | have hτ1 : τ≤1 := by |
| 196 | dsimp [τ] |
| 197 | apply (div_le_one (by positivity)).mpr |
| 198 | nlinarith [sq_nonneg δ] |
| 199 | have hτhalf : (1/2:ℝ)≤τ := by |
| 200 | dsimp [τ] |
| 201 | apply (le_div_iff₀ (by positivity)).mpr |
| 202 | nlinarith |
| 203 | obtain ⟨hFu,hproper,hreg,hband,hcore,hball,hrad,hpartners⟩ := hgeometry j w |
| 204 | obtain ⟨hcompact,h,hh,hbuffer,hgrad⟩ := hpartners t ht |
| 205 | let U : TopologicalSpace.Opens (M (φ j)) := |
| 206 | ⟨u j w ⁻¹' Ioo (2*τ*t-(τ*r/1024)/4) (2*τ*t+(τ*r/1024)/4), |
| 207 | isOpen_Ioo.preimage (hu j w).continuous⟩ |
| 208 | apply (g (φ j)).regularLevel_geometry_of_annular_opposite_partner (D (φ j)) |
| 209 | (hcomplete (φ j)) (hsec (φ j)) (hf j w) (hu j w) hh U |
| 210 | hr.1 hr.2 hτhalf hτ1 hFu (Sum.elim (fun z:A => ref j z.val.1) |
| 211 | (fun ir => q j ir.val.1) w) t |
| 212 | · intro x hx |
| 213 | apply hreg |
| 214 | rw [hx] |
| 215 | exact ⟨by linarith [ht.1],by linarith [ht.2]⟩ |
| 216 | · intro x hx |
| 217 | apply hball |
| 218 | change f j w x∈Icc (55*r/96) (9*r/10) |
| 219 | rw [hx] |
| 220 | exact ⟨by linarith [ht.1],ht.2⟩ |
| 221 | · intro x hx y hy |
| 222 | apply hbuffer x hx |
| 223 | change dist y x≤(τ*r/1024)/16 |
| 224 | rw [dist_comm] |
| 225 | change (g (φ j)).edist x y≤ENNReal.ofReal ((τ*r/1024)/16) at hy |
| 226 | change ((g (φ j)).edist x y).toReal≤_ |
| 227 | exact (ENNReal.toReal_le_toReal ((g (φ j)).edist_ne_top x y) |
| 228 | ENNReal.ofReal_ne_top).mpr hy |>.trans_eq (ENNReal.toReal_ofReal (by have hrpos := hr.1; positivity)) |
| 229 | · intro x hx |
| 230 | obtain ⟨h1,h2,h3,h4,h5,h6⟩ := hgrad x hx |
| 231 | exact ⟨h1,h2,h3,h4,by linarith,h6⟩ |
| 232 | |
| 233 | end PoincareMT.RiemannianMetric |
| 234 |