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.Analysis.Sobolev.Euclidean.FrechetKolmogorov |
| 2 | import PoincareLib.Analysis.Sobolev.Euclidean.L2 |
| 3 | import PoincareLib.Analysis.Sobolev.Euclidean.Translation |
| 4 | |
| 5 | /-! |
| 6 | # Quantitative Euclidean mollification estimates |
| 7 | |
| 8 | The approximation error is linear in the radius, while the square integral of |
| 9 | the mollifier grows as the inverse dimension power of the radius. These are |
| 10 | the two Euclidean estimates used for polynomial spectral counting. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open MeasureTheory Metric Set |
| 16 | open scoped ENNReal NNReal Convolution |
| 17 | |
| 18 | namespace Poincare.Analysis.Spectral.Counting |
| 19 | |
| 20 | open Poincare.Analysis.Sobolev |
| 21 | |
| 22 | variable {d : ℕ} |
| 23 | |
| 24 | local notation "E" => EuclideanSpace ℝ (Fin d) |
| 25 | |
| 26 | /-- A normalized mollifier of radius `ε` approximates a smooth function with |
| 27 | `Lᵖ` error at most `ε` times the `Lᵖ` norm of its derivative. -/ |
| 28 | theorem eLpNorm_mollifierEps_convolution_sub_le |
| 29 | {p : ℝ≥0∞} (hp_one : 1 ≤ p) (hp_top : p ≠ ∞) |
| 30 | {ε : ℝ} (hε : 0 < ε) {u : E → ℝ} |
| 31 | (hu : ContDiff ℝ (⊤ : ℕ∞) u) : |
| 32 | eLpNorm (fun x => |
| 33 | (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) x - u x) |
| 34 | p volume ≤ |
| 35 | ENNReal.ofReal ε * eLpNorm (fun x => ‖fderiv ℝ u x‖) p volume := by |
| 36 | apply eLpNorm_convolution_sub_le_of_ae_translation_bound hp_one hp_top |
| 37 | (mollifierEps_continuous hε) (mollifierEps_compactSupport hε) |
| 38 | (mollifierEps_nonneg hε) (mollifierEps_integral_eq_one hε) |
| 39 | hu.continuous.measurable hu.continuous.locallyIntegrable |
| 40 | filter_upwards with s hs |
| 41 | have hsε : ‖s‖ ≤ ε := by |
| 42 | have hs_mem : s ∈ Function.support (mollifierEps (d := d) hε) := hs |
| 43 | simpa using mollifierEps_support_subset_closedBall_eps hε hs_mem |
| 44 | calc |
| 45 | eLpNorm (fun x => u (x - s) - u x) p volume |
| 46 | = eLpNorm (fun x => u x - u (x - s)) p volume := by |
| 47 | apply eLpNorm_congr_norm_ae |
| 48 | filter_upwards with x |
| 49 | exact norm_sub_rev _ _ |
| 50 | _ ≤ ENNReal.ofReal ‖s‖ * eLpNorm (fun x => ‖fderiv ℝ u x‖) p volume := |
| 51 | eLpNorm_translate_sub_le_smul_eLpNorm_fderiv hp_one hp_top hu s |
| 52 | _ ≤ ENNReal.ofReal ε * eLpNorm (fun x => ‖fderiv ℝ u x‖) p volume := by |
| 53 | gcongr |
| 54 | |
| 55 | /-- The squared approximation error is controlled by the derivative energy. -/ |
| 56 | theorem integral_mollifierEps_convolution_sub_sq_le |
| 57 | {ε : ℝ} (hε : 0 < ε) {u : E → ℝ} |
| 58 | (hu : ContDiff ℝ (⊤ : ℕ∞) u) (hu_compact : HasCompactSupport u) : |
| 59 | (∫ x : E, |
| 60 | ((mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) x - u x) ^ 2) ≤ |
| 61 | ε ^ 2 * ∫ x : E, ‖fderiv ℝ u x‖ ^ 2 := by |
| 62 | have hd : MemLp (fun x : E => ‖fderiv ℝ u x‖) 2 volume := |
| 63 | (hu.continuous_fderiv (by simp)).norm.memLp_of_hasCompactSupport |
| 64 | (hu_compact.fderiv ℝ).norm |
| 65 | have he : MemLp (fun x : E => |
| 66 | (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) x - u x) |
| 67 | 2 volume := by |
| 68 | apply Continuous.memLp_of_hasCompactSupport |
| 69 | · exact ((mollifierEps_compactSupport hε).continuous_convolution_left |
| 70 | (ContinuousLinearMap.lsmul ℝ ℝ) (mollifierEps_continuous hε) |
| 71 | hu.continuous.locallyIntegrable).sub hu.continuous |
| 72 | · exact ((mollifierEps_compactSupport hε).convolution |
| 73 | (ContinuousLinearMap.lsmul ℝ ℝ) hu_compact).sub hu_compact |
| 74 | have h := eLpNorm_mollifierEps_convolution_sub_le |
| 75 | (by norm_num : (1 : ℝ≥0∞) ≤ 2) (by norm_num) hε hu |
| 76 | have hr := ENNReal.toReal_mono (ENNReal.mul_ne_top ENNReal.ofReal_ne_top |
| 77 | hd.eLpNorm_lt_top.ne) h |
| 78 | rw [ENNReal.toReal_mul, ENNReal.toReal_ofReal hε.le] at hr |
| 79 | have hs := pow_le_pow_left₀ ENNReal.toReal_nonneg hr 2 |
| 80 | rwa [mul_pow, eLpNorm_toReal_sq_eq_integral he, |
| 81 | eLpNorm_toReal_sq_eq_integral hd] at hs |
| 82 | |
| 83 | /-- The pointwise mollifier bound uses the volume of its inner ball. -/ |
| 84 | theorem mollifierEps_le_inv_volume_innerBall {ε : ℝ} (hε : 0 < ε) (x : E) : |
| 85 | mollifierEps hε x ≤ |
| 86 | 1 / (volume : Measure E).real (closedBall (0 : E) (ε / 2)) := by |
| 87 | exact (mollifierBumpEps (d := d) hε).normed_le_div_measure_closedBall_rIn volume x |
| 88 | |
| 89 | /-- Normalization improves the square integral bound to a single inverse |
| 90 | volume factor. -/ |
| 91 | theorem integral_mollifierEps_sq_le_inv_volume_innerBall |
| 92 | {ε : ℝ} (hε : 0 < ε) : |
| 93 | (∫ x : E, (mollifierEps hε x) ^ 2) ≤ |
| 94 | 1 / (volume : Measure E).real (closedBall (0 : E) (ε / 2)) := by |
| 95 | have h_compact : HasCompactSupport (fun x : E => (mollifierEps hε x) ^ 2) := by |
| 96 | apply (mollifierEps_compactSupport (d := d) hε).mono |
| 97 | intro x hx |
| 98 | change mollifierEps hε x ≠ 0 |
| 99 | intro hx0 |
| 100 | exact hx (by simp [hx0]) |
| 101 | have h_int : Integrable (fun x : E => (mollifierEps hε x) ^ 2) volume := |
| 102 | ((mollifierEps_continuous hε).pow 2).integrable_of_hasCompactSupport h_compact |
| 103 | calc |
| 104 | (∫ x : E, (mollifierEps hε x) ^ 2) ≤ |
| 105 | ∫ x : E, mollifierEps hε x * |
| 106 | (1 / (volume : Measure E).real (closedBall (0 : E) (ε / 2))) := by |
| 107 | apply integral_mono h_int ((mollifierEps_integrable hε).mul_const _) |
| 108 | intro x |
| 109 | dsimp only |
| 110 | rw [pow_two] |
| 111 | exact mul_le_mul_of_nonneg_left (mollifierEps_le_inv_volume_innerBall hε x) |
| 112 | (mollifierEps_nonneg hε x) |
| 113 | _ = 1 / (volume : Measure E).real (closedBall (0 : E) (ε / 2)) := by |
| 114 | rw [integral_mul_const, mollifierEps_integral_eq_one hε, one_mul] |
| 115 | |
| 116 | /-- The square integral of the mollifier has the sharp dimensional scaling. -/ |
| 117 | theorem integral_mollifierEps_sq_le |
| 118 | {ε : ℝ} (hε : 0 < ε) : |
| 119 | (∫ x : E, (mollifierEps hε x) ^ 2) ≤ |
| 120 | ((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / |
| 121 | ε ^ d := by |
| 122 | convert integral_mollifierEps_sq_le_inv_volume_innerBall (d := d) hε using 1 |
| 123 | rw [Measure.addHaar_real_closedBall' volume (0 : E) (r := ε / 2) (by positivity)] |
| 124 | simp only [finrank_euclideanSpace, Fintype.card_fin, div_pow] |
| 125 | field_simp |
| 126 | |
| 127 | /-- The dimensional constant in the mollifier bound is strictly positive. -/ |
| 128 | theorem mollifierEps_sq_bound_constant_pos : |
| 129 | 0 < (2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1) := by |
| 130 | apply div_pos (by positivity) |
| 131 | exact ENNReal.toReal_pos (measure_closedBall_pos volume (0 : E) zero_lt_one).ne' |
| 132 | measure_closedBall_lt_top.ne |
| 133 | |
| 134 | /-- Translating the kernel does not change its square integral bound. -/ |
| 135 | theorem integral_mollifierEps_sub_sq_le |
| 136 | {ε : ℝ} (hε : 0 < ε) (y : E) : |
| 137 | (∫ x : E, (mollifierEps hε (y - x)) ^ 2) ≤ |
| 138 | ((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / |
| 139 | ε ^ d := by |
| 140 | rw [integral_sub_left_eq_self (fun x : E => (mollifierEps hε x) ^ 2) volume y] |
| 141 | exact integral_mollifierEps_sq_le hε |
| 142 | |
| 143 | /-- Mollification enlarges support by at most the mollifier radius. -/ |
| 144 | theorem tsupport_mollifierEps_convolution_subset_cthickening |
| 145 | {ε R : ℝ} (hε : 0 < ε) (hεR : ε ≤ R) {u : E → ℝ} {K : Set E} |
| 146 | (hu : tsupport u ⊆ K) : |
| 147 | tsupport (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) ⊆ |
| 148 | cthickening R K := by |
| 149 | apply closure_minimal _ isClosed_cthickening |
| 150 | intro x hx |
| 151 | obtain ⟨y, hy, z, hz, rfl⟩ := |
| 152 | Set.mem_add.mp (support_convolution_subset_swap (ContinuousLinearMap.lsmul ℝ ℝ) hx) |
| 153 | have hzε : ‖z‖ ≤ ε := by |
| 154 | simpa using mollifierEps_support_subset_closedBall_eps hε hz |
| 155 | apply mem_cthickening_of_dist_le (y + z) y R K (hu (subset_tsupport u hy)) |
| 156 | simpa [dist_eq_norm] using hzε.trans hεR |
| 157 | |
| 158 | /-- Truncating mollification to a thickening of its original support has no effect. -/ |
| 159 | theorem indicator_cthickening_mollifierEps_convolution |
| 160 | {ε R : ℝ} (hε : 0 < ε) (hεR : ε ≤ R) {u : E → ℝ} {K : Set E} |
| 161 | (hu : tsupport u ⊆ K) : |
| 162 | (cthickening R K).indicator |
| 163 | (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) = |
| 164 | (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) := by |
| 165 | apply Set.indicator_eq_self.2 |
| 166 | exact (subset_tsupport _).trans |
| 167 | (tsupport_mollifierEps_convolution_subset_cthickening hε hεR hu) |
| 168 | |
| 169 | end Poincare.Analysis.Spectral.Counting |