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.ScaleAnnuli |
| 2 | |
| 3 | /-! |
| 4 | # Dimensional bounds for normalized annular functions |
| 5 | |
| 6 | The quarter-gradient lower bound and scale Hessian estimate recover the same |
| 7 | dimensional constants used by the annular scalar integral argument. |
| 8 | |
| 9 | Reference: Petrunin (2009), Section 4.5, author manuscript pp. 9--12. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | set_option autoImplicit false |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | namespace PoincareMT.RiemannianMetric |
| 17 | |
| 18 | private theorem quarter_gradient_scale_area_seed_le (n : ℕ) {r : ℝ} |
| 19 | (hr : 0 < r) (hr1 : r ≤ 1) : |
| 20 | modelVolume (n + 1) 1 (2 * r) / (7 * r / 12 - 55 * r / 96) * |
| 21 | Real.exp (((n : ℝ) * (5 / r) / ((1 : ℝ) / 4) ^ 2) * |
| 22 | (3 * (3 * r / 5) / 2 - 55 * r / 96)) ≤ |
| 23 | scaleSlabAreaConstant n * r ^ n := by |
| 24 | have hexp : ((n : ℝ) * (5 / r) / ((1 : ℝ) / 4) ^ 2) * |
| 25 | (3 * (3 * r / 5) / 2 - 55 * r / 96) ≤ 55 * n := by |
| 26 | calc |
| 27 | _ = (157 / 6 : ℝ) * n := by field_simp; ring |
| 28 | _ ≤ _ := by nlinarith [Nat.cast_nonneg (α := ℝ) n] |
| 29 | have hexp' : ((n : ℝ) * (5 / r) / ((1 : ℝ) / 4) ^ 2) * |
| 30 | (11 * r / 6 - 55 * r / 48) = 55 * n := by field_simp; ring |
| 31 | have hseed : modelVolume (n + 1) 1 (2 * r) / (7 * r / 12 - 55 * r / 96) = |
| 32 | 2 * modelVolume (n + 1) 1 (2 * r) / (7 * r / 6 - 55 * r / 48) := by |
| 33 | field_simp |
| 34 | ring |
| 35 | calc |
| 36 | _ ≤ modelVolume (n + 1) 1 (2 * r) / (7 * r / 12 - 55 * r / 96) * |
| 37 | Real.exp (55 * n) := by |
| 38 | apply mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hexp) |
| 39 | exact div_nonneg (modelVolume_nonneg _ zero_le_one (by positivity)) (by linarith) |
| 40 | _ ≤ _ := by |
| 41 | rw [hseed, ← hexp'] |
| 42 | exact scaleSlabArea_seed_le n hr hr1 |
| 43 | |
| 44 | end PoincareMT.RiemannianMetric |
| 45 | |
| 46 | namespace PoincareMT.LeviCivitaData |
| 47 | |
| 48 | /-- The actual normalized function has the existing dimensional area, |
| 49 | tangential Hessian and reciprocal-gradient bounds. -/ |
| 50 | theorem regularLevel_annular_bounds_with_dimensional_constant_of_quarter_gradient |
| 51 | {m : ℕ} {M : Type*} [TopologicalSpace M] |
| 52 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [PreconnectedSpace M] |
| 53 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 2))) M] |
| 54 | [IsManifold (𝓡 (m + 2)) ∞ M] |
| 55 | {g : RiemannianMetric (m + 2) M} (D : LeviCivitaData g) (hc : MetricComplete g) |
| 56 | (hsec : ∀ x (v w : TangentSpace (𝓡 (m + 2)) x), |
| 57 | -1 ≤ D.sectionalCurvature x v w) |
| 58 | {f : M → ℝ} (hf : ContMDiff (𝓡 (m + 2)) 𝓘(ℝ, ℝ) ∞ f) |
| 59 | (p : M) {r : ℝ} (hr : 0 < r) (hr1 : r ≤ 1) |
| 60 | (hproper : IsProperMap ((Ioo (9 * r / 16) (15 * r / 16)).restrictPreimage f)) |
| 61 | (hspeed : ∀ x : M, f x ∈ Ioo (9 * r / 16) (15 * r / 16) → |
| 62 | (1 / 4 : ℝ) ≤ g.tangentNorm x (D.gradient f x) ∧ |
| 63 | g.tangentNorm x (D.gradient f x) ≤ 1) |
| 64 | (hhess : ∀ x : M, f x ∈ Ioo (9 * r / 16) (15 * r / 16) → |
| 65 | ∀ v : TangentSpace (𝓡 (m + 2)) x, |
| 66 | D.hessian f x v v ≤ (5 / r) * g.inner x v v) |
| 67 | (hball : f ⁻¹' Icc (55 * r / 96) (9 * r / 10) ⊆ g.ball p (2 * r)) : |
| 68 | let α := RiemannianMetric.scaleAnnularInductionConstant m |
| 69 | (∀ t ∈ Icc (7 * r / 12) (9 * r / 10), |
| 70 | g.regularLevelArea hf t ≤ α * t ^ (m + 1)) ∧ |
| 71 | (∀ t ∈ Icc (7 * r / 12) (9 * r / 10), ∀ x, f x = t → |
| 72 | ∀ v : TangentSpace (𝓡 (m + 2)) x, |
| 73 | g.inner x (D.gradient f x) v = 0 → |
| 74 | D.hessian f x v v / Real.sqrt (D.levelQ f x) ≤ (α / t) * g.inner x v v) ∧ |
| 75 | ∀ x ∈ f ⁻¹' Icc (7 * r / 12) (9 * r / 10), |
| 76 | 1 / α ≤ g.tangentNorm x (g.gradient f x) ∧ |
| 77 | g.tangentNorm x (g.gradient f x) ≤ 1 := by |
| 78 | let a₀ := 55 * r / 96 |
| 79 | let a := 7 * r / 12 |
| 80 | let b := 3 * r / 5 |
| 81 | let I := Ioo (9 * r / 16) (15 * r / 16) |
| 82 | let C := RiemannianMetric.modelVolume (m + 2) 1 (2 * r) / (a - a₀) * |
| 83 | Real.exp ((((m + 1 : ℕ) : ℝ) * (5 / r) / ((1 : ℝ) / 4) ^ 2) * (3 * b / 2 - a₀)) |
| 84 | let α₀ := max 1 (max (1 / ((1 : ℝ) / 4)) |
| 85 | (max (((5 / r) / ((1 : ℝ) / 4)) * (3 * b / 2)) (C / a ^ (m + 1)))) |
| 86 | let α := RiemannianMetric.scaleAnnularInductionConstant m |
| 87 | have ha : 0 < a := by dsimp [a]; positivity |
| 88 | have ha₀a : a₀ < a := by dsimp [a₀, a]; linarith |
| 89 | have hab : a < b := by dsimp [a, b]; linarith |
| 90 | have hα : 0 < α := RiemannianMetric.scaleAnnularInductionConstant_pos m |
| 91 | have hforty : (40 : ℝ) ≤ α := le_max_left _ _ |
| 92 | have hdim : 2 ^ (m + 1) * RiemannianMetric.scaleSlabAreaConstant (m + 1) ≤ α := |
| 93 | le_max_right _ _ |
| 94 | have hC : C ≤ RiemannianMetric.scaleSlabAreaConstant (m + 1) * r ^ (m + 1) := |
| 95 | RiemannianMetric.quarter_gradient_scale_area_seed_le (m + 1) hr hr1 |
| 96 | have hCα : C / a ^ (m + 1) ≤ α := by |
| 97 | apply (div_le_iff₀ (pow_pos ha _)).mpr |
| 98 | calc |
| 99 | C ≤ RiemannianMetric.scaleSlabAreaConstant (m + 1) * r ^ (m + 1) := hC |
| 100 | _ ≤ RiemannianMetric.scaleSlabAreaConstant (m + 1) * (2 * a) ^ (m + 1) := by |
| 101 | apply mul_le_mul_of_nonneg_left _ (RiemannianMetric.scaleSlabAreaConstant_pos _).le |
| 102 | apply pow_le_pow_left₀ hr.le |
| 103 | dsimp [a] |
| 104 | linarith |
| 105 | _ = (2 ^ (m + 1) * RiemannianMetric.scaleSlabAreaConstant (m + 1)) * a ^ (m + 1) := by |
| 106 | rw [mul_pow] |
| 107 | ring |
| 108 | _ ≤ α * a ^ (m + 1) := mul_le_mul_of_nonneg_right hdim (pow_nonneg ha.le _) |
| 109 | have hH : ((5 / r) / ((1 : ℝ) / 4)) * (3 * b / 2) = 18 := by |
| 110 | dsimp [b] |
| 111 | field_simp |
| 112 | ring |
| 113 | have hα₀α : α₀ ≤ α := by |
| 114 | dsimp [α₀] |
| 115 | rw [hH] |
| 116 | exact max_le (by linarith) (max_le (by norm_num; linarith) |
| 117 | (max_le (by linarith) hCα)) |
| 118 | have hinside : Icc a₀ (3 * b / 2) ⊆ I := by |
| 119 | intro t ht |
| 120 | change 9 * r / 16 < t ∧ t < 15 * r / 16 |
| 121 | dsimp [a₀, b] at ht |
| 122 | constructor <;> linarith [ht.1, ht.2] |
| 123 | have heq : 3 * b / 2 = 9 * r / 10 := by dsimp [b]; ring |
| 124 | have hparams := D.regularLevel_annular_bounds_of_gradient_hessian_bounds |
| 125 | hc hsec hf isOpen_Ioo hproper (l := (1 : ℝ) / 4) (H := 5 / r) |
| 126 | (by norm_num) (by positivity) ha ha₀a hab hinside |
| 127 | (by positivity : 0 < 2 * r) p |
| 128 | (fun x hx => by simpa only [D.gradient_eq_metric_gradient] using hspeed x hx) |
| 129 | hhess (by simpa only [heq] using hball) |
| 130 | change 0 < α₀ ∧ _ at hparams |
| 131 | obtain ⟨hα₀, harea, hhess', hspeed'⟩ := hparams |
| 132 | dsimp only |
| 133 | rw [← heq] |
| 134 | refine ⟨?_, ?_, ?_⟩ |
| 135 | · intro t ht |
| 136 | exact (harea t ht).trans |
| 137 | (mul_le_mul_of_nonneg_right hα₀α (pow_nonneg (ha.le.trans ht.1) _)) |
| 138 | · intro t ht x hx v hv |
| 139 | apply (hhess' t ht x hx v hv).trans |
| 140 | apply mul_le_mul_of_nonneg_right |
| 141 | (div_le_div_of_nonneg_right hα₀α (ha.le.trans ht.1)) |
| 142 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 2)) : M → Type _) := |
| 143 | ⟨g.toRiemannianMetric⟩ |
| 144 | change 0 ≤ inner ℝ v v |
| 145 | exact real_inner_self_nonneg |
| 146 | · intro x hx |
| 147 | exact ⟨(one_div_le_one_div_of_le hα₀ hα₀α).trans (hspeed' x hx).1, |
| 148 | (hspeed' x hx).2⟩ |
| 149 | |
| 150 | end PoincareMT.LeviCivitaData |
| 151 |