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.MeasureTheory.Integral.GaussianMoment.Bounds |
| 2 | import PoincareLib.MeasureTheory.Integral.GaussianMoment.Series |
| 3 | |
| 4 | /-! |
| 5 | # Uniform Gaussian first moments |
| 6 | |
| 7 | The constant is quantified before the space and measure. No moment integrability |
| 8 | or bound is assumed. See Chow et al., Part III, Proposition 26.49, Step 1, |
| 9 | equations (26.134)--(26.141), pp. 379--381, and Remark 26.52, p. 381. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set MeasureTheory Filter |
| 15 | open scoped ENNReal Topology |
| 16 | |
| 17 | namespace Poincare.MeasureTheory.GaussianMoment |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | /-- Gaussian domination and volume growth imply integrability and a first |
| 22 | moment bound, with a constant uniform over metric spaces and measures. -/ |
| 23 | theorem exists_gaussian_first_moment_bound |
| 24 | (n : ℕ) (A B c : ℝ) (hn : 0 < n) (hA : 1 ≤ A) (hB : 0 ≤ B) (hc : 0 < c) : |
| 25 | ∃ C : ℝ, 0 < C ∧ |
| 26 | ∀ (X : Type u) [MetricSpace X] [MeasurableSpace X] [BorelSpace X] |
| 27 | (μ : Measure X), |
| 28 | (∀ x : X, ∀ r > 0, 0 < μ (Metric.ball x r) ∧ μ (Metric.ball x r) < ⊤) → |
| 29 | (∀ x : X, ∀ r R : ℝ, 0 < r → r ≤ R → |
| 30 | μ.real (Metric.ball x R) ≤ |
| 31 | A * (R / r) ^ n * Real.exp (B * R) * μ.real (Metric.ball x r)) → |
| 32 | ∀ (x : X) (t : ℝ), 0 < t → t ≤ 1 → |
| 33 | ∀ h : X → ℝ, Measurable h → (∀ y, 0 ≤ h y) → |
| 34 | (∀ y, h y ≤ A / μ.real (Metric.ball x (Real.sqrt t)) * |
| 35 | Real.exp (-dist x y ^ 2 / (c * t))) → |
| 36 | Integrable h μ ∧ Integrable (fun y ↦ dist x y * h y) μ ∧ |
| 37 | (∫ y, dist x y * h y ∂μ) ≤ C * Real.sqrt t := by |
| 38 | let C := A ^ 2 * ∑' j : ℕ, ((j : ℝ) + 1) ^ (n + 1) * |
| 39 | Real.exp (B * ((j : ℝ) + 1) - (j : ℝ) ^ 2 / c) |
| 40 | have hA0 : 0 < A := lt_of_lt_of_le zero_lt_one hA |
| 41 | have hC : 0 < C := mul_pos (sq_pos_of_pos hA0) (tsum_weight_pos (n + 1) B hc) |
| 42 | refine ⟨C, hC, ?_⟩ |
| 43 | intro X _ _ _ μ hballs hgrowth x t ht ht1 h hm hnonneg hgauss |
| 44 | let r := Real.sqrt t |
| 45 | have hr : 0 < r := Real.sqrt_pos.2 ht |
| 46 | have hr1 : r ≤ 1 := Real.sqrt_le_one.mpr ht1 |
| 47 | have hr2 : r ^ 2 = t := Real.sq_sqrt ht.le |
| 48 | have hball : 0 < μ.real (Metric.ball x r) := |
| 49 | ENNReal.toReal_pos (hballs x r hr).1.ne' (hballs x r hr).2.ne |
| 50 | have hfin : ∀ R > 0, μ (Metric.ball x R) < ⊤ := fun R hR ↦ (hballs x R hR).2 |
| 51 | have hg0 := gaussian_weighted_integrable μ x n 0 hA0.le hB hc hr hr1 hball hfin |
| 52 | (fun R hR ↦ hgrowth x r R hr hR) (summable_weight (n + 0) B hc) |
| 53 | hm.aestronglyMeasurable (fun y ↦ by |
| 54 | simpa only [pow_zero, one_mul, hr2, Real.norm_of_nonneg (hnonneg y)] using hgauss y) |
| 55 | have hdist : Measurable (fun y : X ↦ dist x y) := |
| 56 | (continuous_const.dist continuous_id).measurable |
| 57 | have hprod : ∀ y, 0 ≤ dist x y * h y := fun y ↦ mul_nonneg dist_nonneg (hnonneg y) |
| 58 | have hg1 := gaussian_weighted_integrable μ x n 1 hA0.le hB hc hr hr1 hball hfin |
| 59 | (fun R hR ↦ hgrowth x r R hr hR) (summable_weight (n + 1) B hc) |
| 60 | (hdist.mul hm).aestronglyMeasurable (fun y ↦ by |
| 61 | simp only [Pi.mul_apply] |
| 62 | rw [Real.norm_of_nonneg (hprod y), pow_one, hr2, mul_assoc] |
| 63 | exact mul_le_mul_of_nonneg_left (hgauss y) dist_nonneg) |
| 64 | refine ⟨hg0.1, hg1.1, ?_⟩ |
| 65 | simpa only [Pi.mul_apply, Real.norm_of_nonneg (hprod _), pow_one] using hg1.2 |
| 66 | |
| 67 | /-- The first moments of every uniformly Gaussian-dominated family converge |
| 68 | uniformly in the base point to zero as positive time tends to zero. -/ |
| 69 | theorem tendstoUniformly_gaussian_first_moment |
| 70 | (n : ℕ) (A B c : ℝ) (hn : 0 < n) (hA : 1 ≤ A) (hB : 0 ≤ B) (hc : 0 < c) |
| 71 | {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] |
| 72 | (μ : Measure X) |
| 73 | (hballs : ∀ x : X, ∀ r > 0, |
| 74 | 0 < μ (Metric.ball x r) ∧ μ (Metric.ball x r) < ⊤) |
| 75 | (hgrowth : ∀ x : X, ∀ r R : ℝ, 0 < r → r ≤ R → |
| 76 | μ.real (Metric.ball x R) ≤ |
| 77 | A * (R / r) ^ n * Real.exp (B * R) * μ.real (Metric.ball x r)) |
| 78 | (H : ℝ → X → X → ℝ) |
| 79 | (hH : ∀ t : ℝ, 0 < t → t ≤ 1 → ∀ x : X, |
| 80 | Measurable (H t x) ∧ (∀ y, 0 ≤ H t x y) ∧ |
| 81 | (∀ y, H t x y ≤ A / μ.real (Metric.ball x (Real.sqrt t)) * |
| 82 | Real.exp (-dist x y ^ 2 / (c * t)))) : |
| 83 | TendstoUniformly (fun t x ↦ ∫ y, dist x y * H t x y ∂μ) |
| 84 | (fun _ ↦ 0) (𝓝[>] 0) := by |
| 85 | obtain ⟨C, hC, hbound⟩ := exists_gaussian_first_moment_bound.{u} n A B c hn hA hB hc |
| 86 | have hlim : Tendsto (fun t : ℝ ↦ C * Real.sqrt t) (𝓝[>] 0) (𝓝 0) := by |
| 87 | simpa using (tendsto_const_nhds.mul |
| 88 | (Real.continuous_sqrt.continuousAt.tendsto.mono_left nhdsWithin_le_nhds) : |
| 89 | Tendsto (fun t : ℝ ↦ C * Real.sqrt t) (𝓝[>] 0) (𝓝 (C * Real.sqrt 0))) |
| 90 | apply Metric.tendstoUniformly_iff.mpr |
| 91 | intro ε hε |
| 92 | filter_upwards [hlim.eventually (Iio_mem_nhds hε), |
| 93 | (show ∀ᶠ t : ℝ in 𝓝[>] 0, 0 < t from self_mem_nhdsWithin), |
| 94 | (show ∀ᶠ t : ℝ in 𝓝[>] 0, t < 1 from |
| 95 | nhdsWithin_le_nhds (Iio_mem_nhds zero_lt_one))] with t ht ht0 ht1 |
| 96 | intro x |
| 97 | obtain ⟨hm, hn0, hg⟩ := hH t ht0 ht1.le x |
| 98 | have hi := (hbound X μ hballs hgrowth x t ht0 ht1.le (H t x) hm hn0 hg).2.2 |
| 99 | have hi0 : 0 ≤ ∫ y, dist x y * H t x y ∂μ := |
| 100 | integral_nonneg (fun y ↦ mul_nonneg dist_nonneg (hn0 y)) |
| 101 | simpa only [dist_zero_left, Real.norm_of_nonneg hi0] using hi.trans_lt ht |
| 102 | |
| 103 | end Poincare.MeasureTheory.GaussianMoment |