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.Induction.ScaleScalarAnnuli |
| 2 | import PoincareLib.Geometry.Curvature.Integral.Induction.ScaleAnnularParameters |
| 3 | /-! |
| 4 | # Scalar estimates for a specified annular function |
| 5 | |
| 6 | The annular scalar argument applies to the same actual function used by |
| 7 | geometric producers, with its original dimensional scalar coefficient. |
| 8 | -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | open Set Filter MeasureTheory |
| 14 | open Poincare.Geometry.Manifold.RegularLevel |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | universe u |
| 17 | namespace PoincareMT.RiemannianMetric |
| 18 | private theorem modelVolume_two_mul_le_scalar_power (m : ℕ) {r : ℝ} |
| 19 | (hr : 0 < r) (hr1 : r ≤ 1) : |
| 20 | modelVolume (m + 2) 1 (2 * r) ≤ |
| 21 | (euclideanUnitBallVolume (m + 2) * 2 ^ (m + 2) * |
| 22 | Real.exp (2 * ((m + 1 : ℕ) : ℝ))) * r ^ m := by |
| 23 | have h := modelVolume_le_exp_mul_zero (n := m + 2) (κ := 1) |
| 24 | zero_le_one (by positivity : 0 ≤ 2 * r) |
| 25 | rw [modelVolume_zero_curvature (by omega : 1 ≤ m + 2)] at h |
| 26 | simp only [show m + 2 - 1 = m + 1 by omega, Real.sqrt_one, one_mul] at h |
| 27 | calc |
| 28 | _ ≤ euclideanUnitBallVolume (m + 2) * (2 * r) ^ (m + 2) * |
| 29 | Real.exp (((m + 1 : ℕ) : ℝ) * (2 * r)) := h |
| 30 | _ ≤ euclideanUnitBallVolume (m + 2) * (2 * r) ^ (m + 2) * |
| 31 | Real.exp (2 * ((m + 1 : ℕ) : ℝ)) := by |
| 32 | apply mul_le_mul_of_nonneg_left |
| 33 | (Real.exp_le_exp.mpr (by nlinarith [Nat.cast_nonneg (α := ℝ) (m + 1)])) |
| 34 | exact mul_nonneg (euclideanUnitBallVolume_nonneg _) (pow_nonneg (by positivity) _) |
| 35 | _ = (euclideanUnitBallVolume (m + 2) * 2 ^ (m + 2) * |
| 36 | Real.exp (2 * ((m + 1 : ℕ) : ℝ))) * r ^ (m + 2) := by |
| 37 | rw [mul_pow] |
| 38 | ring |
| 39 | _ ≤ _ := by |
| 40 | apply mul_le_mul_of_nonneg_left |
| 41 | (pow_le_pow_of_le_one hr.le hr1 (by omega : m ≤ m + 2)) |
| 42 | positivity [euclideanUnitBallVolume_pos (m + 2)] |
| 43 | |
| 44 | /-- Apply scaled level induction to this actual function without choosing |
| 45 | a replacement slab. -/ |
| 46 | theorem radial_annulus_scalar_bound_of_quarter_gradient |
| 47 | {m : ℕ} (hm : 1 ≤ m) {M : Type u} [TopologicalSpace M] |
| 48 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [PreconnectedSpace M] |
| 49 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 2))) M] |
| 50 | [IsManifold (𝓡 (m + 2)) ∞ M] |
| 51 | (g : RiemannianMetric (m + 2) M) (D : LeviCivitaData g) (hc : MetricComplete g) |
| 52 | (hsec : ∀ x : M, ∀ v w : TangentSpace (𝓡 (m + 2)) x, |
| 53 | -1 ≤ D.sectionalCurvature x v w) |
| 54 | (p : M) {r : ℝ} (hr : 0 < r) (hr1 : r ≤ 1) |
| 55 | {f : M → ℝ} (hf : ContMDiff (𝓡 (m + 2)) 𝓘(ℝ, ℝ) ∞ f) |
| 56 | (hproper : IsProperMap ((Ioo (9 * r / 16) (15 * r / 16)).restrictPreimage f)) |
| 57 | (hreg : ∀ x, f x ∈ Ioo (9 * r / 16) (15 * r / 16) → |
| 58 | mfderiv (𝓡 (m + 2)) 𝓘(ℝ, ℝ) f x ≠ 0) |
| 59 | (hspeed : ∀ x, f x ∈ Ioo (9 * r / 16) (15 * r / 16) → |
| 60 | (1 / 4 : ℝ) ≤ g.tangentNorm x (D.gradient f x) ∧ |
| 61 | g.tangentNorm x (D.gradient f x) ≤ 1) |
| 62 | (hhess : ∀ x, f x ∈ Ioo (9 * r / 16) (15 * r / 16) → |
| 63 | ∀ v : TangentSpace (𝓡 (m + 2)) x, |
| 64 | D.hessian f x v v ≤ (5 / r) * g.inner x v v) |
| 65 | (hballwide : f ⁻¹' Icc (55 * r / 96) (9 * r / 10) ⊆ g.ball p (2 * r)) |
| 66 | (hradial : {x : M | (g.edist p x).toReal ∈ Icc (113 * r / 96) (19 * r / 16)} ⊆ |
| 67 | f ⁻¹' Icc (7 * r / 12) (3 * r / 5)) : |
| 68 | let U := g.regularDomain hf |
| 69 | letI : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin (m + 2))) = m + 2) := |
| 70 | ⟨finrank_euclideanSpace_fin⟩ |
| 71 | letI (t : ℝ) := openLevelSetChartedSpace hf U (g.regularDomain_regular hf) (m + 1) t |
| 72 | letI (t : ℝ) := isManifold_openLevelSet hf U (g.regularDomain_regular hf) (m + 1) t |
| 73 | let DL := fun t => (RiemannianMetric.regularLevelMetric |
| 74 | hf U (g.regularDomain_regular hf) t g).leviCivitaData |
| 75 | ∀ C : ℝ, 0 ≤ C → |
| 76 | (∀ t ∈ Icc (7 * r / 12) (9 * r / 10), |
| 77 | (∫ z, max 0 ((DL t).scalarCurvature z) |
| 78 | ∂g.regularLevelVolume hf U (g.regularDomain_regular hf) t) ≤ |
| 79 | C * (r ^ (m - 1) + ∫ z, |
| 80 | D.levelSectionalError f (fun _ => 1) (scaleAnnularInductionConstant m / t) |
| 81 | (openLevelIncl f U t z) |
| 82 | ∂g.regularLevelVolume hf U (g.regularDomain_regular hf) t)) → |
| 83 | (∫ x in {x : M | (g.edist p x).toReal ∈ Icc (113 * r / 96) (19 * r / 16)}, |
| 84 | max 0 (D.scalarCurvature x) ∂g.volumeMeasure) ≤ |
| 85 | scaleScalarAnnulusConstant m C * r ^ m := by |
| 86 | let a := 7 * r / 12 |
| 87 | let b := 3 * r / 5 |
| 88 | let α := scaleAnnularInductionConstant m |
| 89 | have ha : 0 < a := by dsimp [a]; positivity |
| 90 | have hab : a < b := by dsimp [a, b]; linarith |
| 91 | have hα : 0 < α := scaleAnnularInductionConstant_pos m |
| 92 | have heq : 3 * b / 2 = 9 * r / 10 := by dsimp [b]; ring |
| 93 | have hslab : Icc a (3 * b / 2) ⊆ Ioo (9 * r / 16) (15 * r / 16) := by |
| 94 | intro t ht |
| 95 | dsimp [a, b] at ht |
| 96 | constructor <;> linarith [ht.1, ht.2] |
| 97 | have hball : f ⁻¹' Icc a (3 * b / 2) ⊆ g.ball p (2 * r) := by |
| 98 | intro x hx |
| 99 | apply hballwide |
| 100 | rw [← heq] |
| 101 | exact ⟨by dsimp [a] at hx; linarith [hx.1], hx.2⟩ |
| 102 | obtain ⟨harea, hhess', hspeed'⟩ := |
| 103 | D.regularLevel_annular_bounds_with_dimensional_constant_of_quarter_gradient |
| 104 | hc hsec hf p hr hr1 hproper hspeed hhess hballwide |
| 105 | rw [← heq] at harea hhess' hspeed' |
| 106 | dsimp only |
| 107 | intro C hC hind |
| 108 | let Q := α * C + ((m + 2 : ℕ) : ℝ) ^ 2 |
| 109 | let P := α * C * (((m + 1 : ℕ) : ℝ) * (1 + α) * α ^ 3 + α ^ 2) + |
| 110 | ((m + 1 : ℕ) : ℝ) * (α ^ 2 + α ^ 3) |
| 111 | let V := euclideanUnitBallVolume (m + 2) * |
| 112 | 2 ^ (m + 2) * Real.exp (2 * ((m + 1 : ℕ) : ℝ)) |
| 113 | have hQ : 0 ≤ Q := add_nonneg (mul_nonneg hα.le hC) (sq_nonneg _) |
| 114 | have hP : 0 ≤ P := by dsimp only [P]; positivity |
| 115 | have hannulus := D.integral_scalarCurvature_posPart_inner_slab_le_of_scaled_level_induction |
| 116 | hf isOpen_Ioo hproper hreg ha hab (by omega : 2 ≤ m + 1) hα hC |
| 117 | (κ := r ^ (m - 1)) (pow_nonneg hr.le _) hslab |
| 118 | (K := fun _ => 1) continuousOn_const (fun _ _ => zero_le_one) |
| 119 | (fun x _ v w => hsec x v w) harea hhess' hspeed' (by simpa only [heq] using hind) |
| 120 | change (∫ x in f ⁻¹' Icc a b, max 0 (D.scalarCurvature x) ∂g.volumeMeasure) ≤ |
| 121 | 2 * Q * (∫ _ in f ⁻¹' Icc a (3 * b / 2), (1 : ℝ) ∂g.volumeMeasure) + |
| 122 | 3 * α * C * r ^ (m - 1) * b + 2 * P * (3 * b / 2) ^ m + 4 * α * b ^ m at hannulus |
| 123 | have hcompact := Poincare.Coarea.isCompact_slab_of_isProperMap hproper hslab |
| 124 | have hintegrable := ((continuous_const (y := (0 : ℝ))).max |
| 125 | D.continuous_scalarCurvature).continuousOn.integrableOn_compact hcompact |
| 126 | (μ := g.volumeMeasure) |
| 127 | have hbpos : 0 < b := ha.trans hab |
| 128 | have hbb : b ≤ 3 * b / 2 := by linarith only [hbpos] |
| 129 | have hinner : f ⁻¹' Icc a b ⊆ f ⁻¹' Icc a (3 * b / 2) := |
| 130 | preimage_mono (fun _ hx => ⟨hx.1, hx.2.trans hbb⟩) |
| 131 | have hradialIntegral : |
| 132 | (∫ x in {x : M | (g.edist p x).toReal ∈ Icc (113 * r / 96) (19 * r / 16)}, |
| 133 | max 0 (D.scalarCurvature x) ∂g.volumeMeasure) ≤ |
| 134 | ∫ x in f ⁻¹' Icc a b, max 0 (D.scalarCurvature x) ∂g.volumeMeasure := |
| 135 | setIntegral_mono_set (hintegrable.mono_set hinner) |
| 136 | (Eventually.of_forall (fun _ => le_max_left _ _)) (Eventually.of_forall hradial) |
| 137 | have hvolume := measureReal_mono hball (g.volumeMeasure_ball_lt_top hc p (2 * r)).ne |
| 138 | have hballVolume := g.volumeMeasure_real_ball_le_modelVolume_of_sectional_lower_bound |
| 139 | p (by omega : 1 ≤ m + 2) hc D hsec (by positivity : 0 < 2 * r) |
| 140 | have hmass : (∫ _ in f ⁻¹' Icc a (3 * b / 2), (1 : ℝ) ∂g.volumeMeasure) ≤ |
| 141 | V * r ^ m := by |
| 142 | have hmodel := hvolume.trans hballVolume |>.trans (modelVolume_two_mul_le_scalar_power m hr hr1) |
| 143 | simpa only [setIntegral_const, smul_eq_mul, mul_one] using hmodel |
| 144 | have hbr : b ≤ r := by dsimp only [b]; linarith only [hr] |
| 145 | have houterr : 3 * b / 2 ≤ r := by dsimp only [b]; linarith only [hr] |
| 146 | have hκb : r ^ (m - 1) * b ≤ r ^ m := by |
| 147 | calc |
| 148 | r ^ (m - 1) * b ≤ r ^ (m - 1) * r := |
| 149 | mul_le_mul_of_nonneg_left hbr (pow_nonneg hr.le _) |
| 150 | _ = r ^ m := by rw [← pow_succ]; congr 1; omega |
| 151 | have hκterm := mul_le_mul_of_nonneg_left hκb |
| 152 | (show 0 ≤ 3 * α * C by positivity) |
| 153 | have houterterm := mul_le_mul_of_nonneg_left |
| 154 | (pow_le_pow_left₀ (show 0 ≤ 3 * b / 2 by positivity) houterr m) |
| 155 | (show 0 ≤ 2 * P by positivity) |
| 156 | have hinnerterm := mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hbpos.le hbr m) |
| 157 | (show 0 ≤ 4 * α by positivity) |
| 158 | have hmassterm := mul_le_mul_of_nonneg_left hmass (show 0 ≤ 2 * Q by positivity) |
| 159 | apply hradialIntegral.trans (hannulus.trans ?_) |
| 160 | change _ ≤ (2 * Q * V + 3 * α * C + 2 * P + 4 * α) * r ^ m |
| 161 | nlinarith only [hκterm, houterterm, hinnerterm, hmassterm] |
| 162 | |
| 163 | end PoincareMT.RiemannianMetric |
| 164 |