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.Spectral.Counting.KernelTrace |
| 2 | import PoincareLib.Analysis.Spectral.Counting.Mollification |
| 3 | |
| 4 | /-! |
| 5 | # Trace estimates for truncated Euclidean mollification |
| 6 | |
| 7 | Mollification restricted to a finite-volume set defines a bounded operator on |
| 8 | `L²`. Bessel's inequality controls the sum of the squared norms of its values |
| 9 | on a localized orthonormal family by the inverse dimension power of the radius. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | open MeasureTheory Metric |
| 15 | open scoped ENNReal Convolution |
| 16 | |
| 17 | namespace Poincare.Analysis.Spectral.Counting |
| 18 | |
| 19 | open Poincare.Analysis.Sobolev |
| 20 | |
| 21 | variable {d : ℕ} |
| 22 | local notation "E" => EuclideanSpace ℝ (Fin d) |
| 23 | |
| 24 | theorem mollifierKernel_memLp {ε : ℝ} (hε : 0 < ε) (x : E) : |
| 25 | MemLp (fun y : E => mollifierEps hε (x - y)) 2 volume := by |
| 26 | exact ((mollifierEps_continuous hε).memLp_of_hasCompactSupport |
| 27 | (mollifierEps_compactSupport hε)).comp_measurePreserving |
| 28 | (Measure.measurePreserving_sub_left volume x) |
| 29 | |
| 30 | /-- A translated mollifier considered as an `L²` kernel. -/ |
| 31 | def mollifierKernel {ε : ℝ} (hε : 0 < ε) (x : E) : Lp ℝ 2 (volume : Measure E) := |
| 32 | (mollifierKernel_memLp hε x).toLp _ |
| 33 | |
| 34 | theorem inner_mollifierKernel_eq_convolution {ε : ℝ} (hε : 0 < ε) |
| 35 | (u : Lp ℝ 2 (volume : Measure E)) (x : E) : |
| 36 | inner ℝ (mollifierKernel hε x) u = |
| 37 | (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] (u : E → ℝ)) x := by |
| 38 | rw [L2.inner_def, convolution_lsmul_swap] |
| 39 | apply integral_congr_ae |
| 40 | filter_upwards [(mollifierKernel_memLp hε x).coeFn_toLp] with y hy |
| 41 | simp [mollifierKernel, hy, mul_comm] |
| 42 | |
| 43 | theorem aestronglyMeasurable_inner_mollifierKernel {ε : ℝ} (hε : 0 < ε) |
| 44 | (u : Lp ℝ 2 (volume : Measure E)) : |
| 45 | AEStronglyMeasurable (fun x => inner ℝ (mollifierKernel hε x) u) volume := by |
| 46 | simp_rw [inner_mollifierKernel_eq_convolution] |
| 47 | exact ((mollifierEps_compactSupport hε).continuous_convolution_left |
| 48 | (ContinuousLinearMap.lsmul ℝ ℝ) (mollifierEps_continuous hε) |
| 49 | ((Lp.memLp u).locallyIntegrable (by norm_num))).aestronglyMeasurable |
| 50 | |
| 51 | theorem norm_mollifierKernel_sq_le {ε : ℝ} (hε : 0 < ε) (x : E) : |
| 52 | ‖mollifierKernel hε x‖ ^ 2 ≤ |
| 53 | ((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / ε ^ d := by |
| 54 | rw [mollifierKernel, norm_toLp_sq_eq_integral] |
| 55 | exact integral_mollifierEps_sub_sq_le hε x |
| 56 | |
| 57 | theorem norm_mollifierKernel_le {ε : ℝ} (hε : 0 < ε) (x : E) : |
| 58 | ‖mollifierKernel hε x‖ ≤ |
| 59 | Real.sqrt (((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / |
| 60 | ε ^ d) := by |
| 61 | apply (Real.le_sqrt (norm_nonneg _) |
| 62 | (div_nonneg (le_of_lt mollifierEps_sq_bound_constant_pos) (by positivity))).mpr |
| 63 | exact norm_mollifierKernel_sq_le hε x |
| 64 | |
| 65 | /-- Mollification followed by restriction to a finite-volume region. -/ |
| 66 | def mollifyOn (S : Set E) (hS : MeasurableSet S) (hvol : volume S ≠ ∞) |
| 67 | {ε : ℝ} (hε : 0 < ε) : |
| 68 | Lp ℝ 2 (volume : Measure E) →L[ℝ] Lp ℝ 2 (volume : Measure E) := |
| 69 | kernelOn S hS hvol (mollifierKernel hε) |
| 70 | (aestronglyMeasurable_inner_mollifierKernel hε) |
| 71 | (Real.sqrt (((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / ε ^ d)) |
| 72 | (Real.sqrt_nonneg _) (norm_mollifierKernel_le hε) |
| 73 | |
| 74 | theorem mollifyOn_coeFn (S : Set E) (hS : MeasurableSet S) (hvol : volume S ≠ ∞) |
| 75 | {ε : ℝ} (hε : 0 < ε) (u : Lp ℝ 2 (volume : Measure E)) : |
| 76 | ⇑(mollifyOn S hS hvol hε u) =ᵐ[volume] |
| 77 | S.indicator (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] (u : E → ℝ)) := by |
| 78 | have h := kernelOn_coeFn S hS hvol (mollifierKernel hε) |
| 79 | (aestronglyMeasurable_inner_mollifierKernel hε) |
| 80 | (Real.sqrt (((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / ε ^ d)) |
| 81 | (Real.sqrt_nonneg _) (norm_mollifierKernel_le hε) u |
| 82 | simpa only [mollifyOn, inner_mollifierKernel_eq_convolution] using h |
| 83 | |
| 84 | theorem mollifyOn_toLp_coeFn (S : Set E) (hS : MeasurableSet S) (hvol : volume S ≠ ∞) |
| 85 | {ε : ℝ} (hε : 0 < ε) {u : E → ℝ} (hu : MemLp u 2 volume) : |
| 86 | ⇑(mollifyOn S hS hvol hε (hu.toLp u)) =ᵐ[volume] |
| 87 | S.indicator (mollifierEps hε ⋆[ContinuousLinearMap.lsmul ℝ ℝ, volume] u) := by |
| 88 | have h := mollifyOn_coeFn S hS hvol hε (hu.toLp u) |
| 89 | rwa [convolution_congr (ContinuousLinearMap.lsmul ℝ ℝ) |
| 90 | Filter.EventuallyEq.rfl hu.coeFn_toLp] at h |
| 91 | |
| 92 | /-- The squared mollification norms of a localized orthonormal family have |
| 93 | the dimensional trace bound. -/ |
| 94 | theorem sum_norm_mollifyOn_map_sq_le |
| 95 | {H ι : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] |
| 96 | (S : Set E) (hS : MeasurableSet S) (hvol : volume S ≠ ∞) |
| 97 | {ε : ℝ} (hε : 0 < ε) (A : H →L[ℝ] Lp ℝ 2 (volume : Measure E)) |
| 98 | {b : ι → H} (hb : Orthonormal ℝ b) (s : Finset ι) : |
| 99 | ∑ i ∈ s, ‖mollifyOn S hS hvol hε (A (b i))‖ ^ 2 ≤ |
| 100 | (volume : Measure E).real S * (‖A‖ ^ 2 * |
| 101 | (((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / ε ^ d)) := by |
| 102 | exact sum_norm_kernelOn_map_sq_le S hS hvol (mollifierKernel hε) |
| 103 | (aestronglyMeasurable_inner_mollifierKernel hε) |
| 104 | (Real.sqrt (((2 : ℝ) ^ d / (volume : Measure E).real (closedBall (0 : E) 1)) / ε ^ d)) |
| 105 | (Real.sqrt_nonneg _) (norm_mollifierKernel_le hε) A hb s |
| 106 | (norm_mollifierKernel_sq_le hε) |
| 107 | |
| 108 | end Poincare.Analysis.Spectral.Counting |