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 | /- |
| 2 | Adapted from AxelWorkspace revision f1cdb30cabdc8781d2d3dec86d3d99ab1820f30e. |
| 3 | Source and SHA-256: references/analysis/axel-workspace/weak-parabolic-regularity-sources.json. |
| 4 | Apache-2.0; see the license in that source directory. |
| 5 | -/ |
| 6 | import PoincareLib.Analysis.Convolution.ConvolutionCommutator |
| 7 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 8 | import Mathlib.Analysis.Calculus.FDeriv.Mul |
| 9 | import Mathlib.MeasureTheory.Measure.Haar.NormedSpace |
| 10 | |
| 11 | open Set Filter MeasureTheory MeasureTheory.Measure ContinuousLinearMap |
| 12 | open scoped Topology Convolution ContDiff NNReal |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | namespace Poincare.Analysis.Convolution |
| 17 | |
| 18 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 19 | [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] |
| 20 | |
| 21 | /-- The mass-preserving dilation of a scalar convolution kernel. -/ |
| 22 | def rescaledKernel (ρ : E → ℝ) (r : ℝ) (x : E) : ℝ := |
| 23 | (r ^ Module.finrank ℝ E)⁻¹ * ρ (r⁻¹ • x) |
| 24 | |
| 25 | /-- **Math.** Positive dilation preserves the integral of a kernel. -/ |
| 26 | theorem integral_rescaledKernel |
| 27 | (mu : Measure E) [mu.IsAddHaarMeasure] (ρ : E → ℝ) |
| 28 | {r : ℝ} (hr : 0 < r) : |
| 29 | (∫ x, rescaledKernel ρ r x ∂mu) = ∫ x, ρ x ∂mu := by |
| 30 | simp only [rescaledKernel, integral_const_mul] |
| 31 | rw [integral_comp_inv_smul_of_nonneg mu ρ hr.le, smul_eq_mul, |
| 32 | ← mul_assoc, inv_mul_cancel₀ (pow_ne_zero _ hr.ne'), one_mul] |
| 33 | |
| 34 | omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] in |
| 35 | /-- **Math.** The derivative of a dilated kernel has the inverse-radius |
| 36 | factor in addition to the mass normalization. -/ |
| 37 | theorem fderiv_rescaledKernel_apply |
| 38 | {ρ : E → ℝ} (hρ : Differentiable ℝ ρ) (r : ℝ) (x v : E) : |
| 39 | fderiv ℝ (rescaledKernel ρ r) x v = |
| 40 | (r ^ (Module.finrank ℝ E + 1))⁻¹ * fderiv ℝ ρ (r⁻¹ • x) v := by |
| 41 | have hd := ((hρ (r⁻¹ • x)).hasFDerivAt.comp x |
| 42 | ((hasFDerivAt_id x).const_smul r⁻¹)).const_mul ((r ^ Module.finrank ℝ E)⁻¹) |
| 43 | dsimp only [Function.comp_def] at hd |
| 44 | change fderiv ℝ (fun y => (r ^ Module.finrank ℝ E)⁻¹ * ρ (r⁻¹ • y)) x v = _ |
| 45 | rw [hd.fderiv] |
| 46 | simp only [_root_.smul_apply, ContinuousLinearMap.comp_apply, |
| 47 | ContinuousLinearMap.id_apply, map_smul, smul_eq_mul, pow_succ, mul_inv_rev] |
| 48 | ring |
| 49 | |
| 50 | /-- **Math.** The first absolute moment of a derivative-scaled kernel is |
| 51 | independent of its positive scale. -/ |
| 52 | theorem integral_firstMoment_derivative_scale |
| 53 | (mu : Measure E) [mu.IsAddHaarMeasure] (κ : E → ℝ) |
| 54 | {r : ℝ} (hr : 0 < r) : |
| 55 | (∫ y, ‖y‖ * |(r ^ (Module.finrank ℝ E + 1))⁻¹ * κ (r⁻¹ • y)| ∂mu) = |
| 56 | ∫ y, ‖y‖ * |κ y| ∂mu := by |
| 57 | have hpoint (y : E) : |
| 58 | ‖y‖ * |(r ^ (Module.finrank ℝ E + 1))⁻¹ * κ (r⁻¹ • y)| = |
| 59 | (r ^ Module.finrank ℝ E)⁻¹ * (‖r⁻¹ • y‖ * |κ (r⁻¹ • y)|) := by |
| 60 | simp only [abs_mul, abs_inv, abs_pow, abs_of_pos hr, norm_smul, |
| 61 | Real.norm_eq_abs, pow_succ, mul_inv_rev] |
| 62 | ring |
| 63 | simp_rw [hpoint] |
| 64 | rw [integral_const_mul, |
| 65 | integral_comp_inv_smul_of_nonneg mu (fun y => ‖y‖ * |κ y|) hr.le, |
| 66 | smul_eq_mul, ← mul_assoc, inv_mul_cancel₀ (pow_ne_zero _ hr.ne'), one_mul] |
| 67 | |
| 68 | /-- **Math.** The derivative of the actual mass-preserving kernel has a |
| 69 | scale-independent first absolute moment. -/ |
| 70 | theorem integral_firstMoment_fderiv_rescaledKernel |
| 71 | (mu : Measure E) [mu.IsAddHaarMeasure] |
| 72 | {ρ : E → ℝ} (hρ : Differentiable ℝ ρ) {r : ℝ} (hr : 0 < r) (v : E) : |
| 73 | (∫ y, ‖y‖ * |fderiv ℝ (rescaledKernel ρ r) y v| ∂mu) = |
| 74 | ∫ y, ‖y‖ * |fderiv ℝ ρ y v| ∂mu := by |
| 75 | simp_rw [fderiv_rescaledKernel_apply hρ] |
| 76 | exact integral_firstMoment_derivative_scale mu (fun y => fderiv ℝ ρ y v) hr |
| 77 | |
| 78 | /-- **Math.** The multiplication-convolution commutator for derivatives of a |
| 79 | fixed dilated kernel is bounded independently of the smoothing radius. -/ |
| 80 | theorem abs_derivative_convolution_commutator_rescaled_le |
| 81 | (mu : Measure E) [mu.IsAddHaarMeasure] |
| 82 | {q f ρ : E → ℝ} {L : ℝ≥0} (hq : LipschitzWith L q) |
| 83 | (hf : Continuous f) {B : ℝ} (hB : ∀ y, |f y| ≤ B) |
| 84 | (hρ : ContDiff ℝ 1 ρ) (hρc : HasCompactSupport ρ) |
| 85 | {r : ℝ} (hr : 0 < r) (v x : E) : |
| 86 | |q x * ((fun y => fderiv ℝ (rescaledKernel ρ r) y v) ⋆[lsmul ℝ ℝ, mu] f) x - |
| 87 | ((fun y => fderiv ℝ (rescaledKernel ρ r) y v) ⋆[lsmul ℝ ℝ, mu] |
| 88 | (fun y => q y * f y)) x| ≤ |
| 89 | (L : ℝ) * B * ∫ y, ‖y‖ * |fderiv ℝ ρ y v| ∂mu := by |
| 90 | have hscale : ContDiff ℝ 1 (rescaledKernel ρ r) := |
| 91 | contDiff_const.mul (hρ.comp (contDiff_id.const_smul r⁻¹)) |
| 92 | have hcompact : HasCompactSupport (rescaledKernel ρ r) := |
| 93 | (hρc.comp_homeomorph (Homeomorph.smul (Units.mk0 r⁻¹ (inv_ne_zero hr.ne')))).mul_left |
| 94 | have hbound := abs_convolution_coefficient_commutator_le mu hq hf hB |
| 95 | ((hscale.continuous_fderiv one_ne_zero).clm_apply continuous_const) |
| 96 | (hcompact.fderiv_apply ℝ v) x |
| 97 | rw [integral_firstMoment_fderiv_rescaledKernel mu (hρ.differentiable one_ne_zero) hr v] |
| 98 | at hbound |
| 99 | exact hbound |
| 100 | |
| 101 | /- The undifferentiated coefficient commutator gains one factor of the |
| 102 | smoothing radius. This is the scale-vanishing term needed when the |
| 103 | variable coefficient is frozen before passing to the mollifier limit. -/ |
| 104 | theorem abs_convolution_coefficient_commutator_rescaled_le |
| 105 | (mu : Measure E) [mu.IsAddHaarMeasure] |
| 106 | {q f ρ : E → ℝ} {L : ℝ≥0} (hq : LipschitzWith L q) |
| 107 | (hf : Continuous f) {B : ℝ} (hB : ∀ y, |f y| ≤ B) |
| 108 | (hρ : ContDiff ℝ 1 ρ) (hρc : HasCompactSupport ρ) |
| 109 | {r : ℝ} (hr : 0 < r) (x : E) : |
| 110 | |q x * (rescaledKernel ρ r ⋆[lsmul ℝ ℝ, mu] f) x - |
| 111 | (rescaledKernel ρ r ⋆[lsmul ℝ ℝ, mu] (fun y => q y * f y)) x| ≤ |
| 112 | (L : ℝ) * B * r * ∫ y, ‖y‖ * |ρ y| ∂mu := by |
| 113 | have hκ : Continuous (rescaledKernel ρ r) := by |
| 114 | exact (contDiff_const.mul (hρ.comp (contDiff_id.const_smul r⁻¹))).continuous |
| 115 | have hκc : HasCompactSupport (rescaledKernel ρ r) := |
| 116 | (hρc.comp_homeomorph (Homeomorph.smul |
| 117 | (Units.mk0 r⁻¹ (inv_ne_zero hr.ne')))).mul_left |
| 118 | have hbase := abs_convolution_coefficient_commutator_le mu hq hf hB hκ hκc x |
| 119 | have hmoment : |
| 120 | (∫ y, ‖y‖ * |rescaledKernel ρ r y| ∂mu) = |
| 121 | r * ∫ y, ‖y‖ * |ρ y| ∂mu := by |
| 122 | have hpoint (y : E) : |
| 123 | ‖y‖ * |rescaledKernel ρ r y| = |
| 124 | (r ^ Module.finrank ℝ E)⁻¹ * r * |
| 125 | (‖r⁻¹ • y‖ * |ρ (r⁻¹ • y)|) := by |
| 126 | simp only [rescaledKernel, abs_mul, abs_inv, abs_pow, abs_of_pos hr, |
| 127 | norm_smul, Real.norm_eq_abs] |
| 128 | field_simp [hr.ne'] |
| 129 | simp_rw [hpoint] |
| 130 | rw [integral_const_mul, |
| 131 | integral_comp_inv_smul_of_nonneg mu |
| 132 | (fun y => ‖y‖ * |ρ y|) hr.le, |
| 133 | smul_eq_mul] |
| 134 | field_simp [hr.ne'] |
| 135 | simpa [hmoment, mul_assoc] using hbase |
| 136 | |
| 137 | theorem convolution_coefficient_commutator_rescaled_tendsto_zero |
| 138 | (mu : Measure E) [mu.IsAddHaarMeasure] |
| 139 | {q f ρ : E → ℝ} {L : ℝ≥0} (hq : LipschitzWith L q) |
| 140 | (hf : Continuous f) {B : ℝ} (hB : ∀ y, |f y| ≤ B) |
| 141 | (hρ : ContDiff ℝ 1 ρ) (hρc : HasCompactSupport ρ) |
| 142 | {r : ℕ → ℝ} (hr : ∀ n, 0 < r n) |
| 143 | (hlim : Tendsto r atTop (𝓝 0)) (x : E) : |
| 144 | Tendsto (fun n ↦ |
| 145 | |q x * (rescaledKernel ρ (r n) ⋆[lsmul ℝ ℝ, mu] f) x - |
| 146 | (rescaledKernel ρ (r n) ⋆[lsmul ℝ ℝ, mu] |
| 147 | (fun y => q y * f y)) x|) atTop (𝓝 0) := by |
| 148 | let M : ℝ := ∫ y, ‖y‖ * |ρ y| ∂mu |
| 149 | have hM : 0 ≤ M := by |
| 150 | dsimp [M] |
| 151 | apply integral_nonneg |
| 152 | intro y |
| 153 | positivity |
| 154 | have hupper : Tendsto (fun n ↦ (L : ℝ) * B * r n * M) |
| 155 | atTop (𝓝 0) := by |
| 156 | have hconst : Tendsto (fun _ : ℕ ↦ (L : ℝ) * B * M) |
| 157 | atTop (𝓝 ((L : ℝ) * B * M)) := tendsto_const_nhds |
| 158 | have hprod := hconst.mul hlim |
| 159 | convert hprod using 1 <;> simp [mul_assoc, mul_left_comm, mul_comm] |
| 160 | apply tendsto_of_tendsto_of_tendsto_of_le_of_le' |
| 161 | tendsto_const_nhds hupper |
| 162 | · filter_upwards [] with n |
| 163 | exact abs_nonneg _ |
| 164 | · filter_upwards [] with n |
| 165 | exact abs_convolution_coefficient_commutator_rescaled_le mu hq hf hB |
| 166 | hρ hρc (hr n) x |
| 167 | |
| 168 | end Poincare.Analysis.Convolution |