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 Mathlib.Analysis.Calculus.BumpFunction.Convolution |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.Convolution |
| 3 | |
| 4 | /-! |
| 5 | # Smooth normalized convolutions of Lipschitz functions |
| 6 | |
| 7 | Morgan-Tian Claim 7.20, pp. 160-161. A normalized nonnegative bump |
| 8 | preserves a global Lipschitz constant and approximates the original |
| 9 | function with an explicit uniform error equal to radius times constant. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open MeasureTheory Metric Set Filter ContinuousLinearMap |
| 15 | open scoped ContDiff Convolution Topology NNReal |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] |
| 21 | {μ : Measure E} [Measure.IsAddHaarMeasure μ] |
| 22 | |
| 23 | /-- Convolution by a normalized smooth bump smooths any continuous scalar function. -/ |
| 24 | theorem normed_convolution_contDiff (κ : ContDiffBump (0 : E)) |
| 25 | {f : E → ℝ} (hf : Continuous f) : |
| 26 | ContDiff ℝ ∞ (κ.normed μ ⋆[lsmul ℝ ℝ, μ] f) := |
| 27 | κ.hasCompactSupport_normed.contDiff_convolution_left (lsmul ℝ ℝ) |
| 28 | κ.contDiff_normed hf.locallyIntegrable |
| 29 | |
| 30 | /-- A Lipschitz function has an explicit uniform normalized-convolution error. -/ |
| 31 | theorem dist_normed_convolution_le_lipschitz (κ : ContDiffBump (0 : E)) |
| 32 | {f : E → ℝ} {L : ℝ≥0} (hf : LipschitzWith L f) (x : E) : |
| 33 | dist ((κ.normed μ ⋆[lsmul ℝ ℝ, μ] f) x) (f x) ≤ L * κ.rOut := by |
| 34 | apply κ.dist_normed_convolution_le hf.continuous.aestronglyMeasurable |
| 35 | intro y hy |
| 36 | exact (hf.dist_le_mul y x).trans |
| 37 | (mul_le_mul_of_nonneg_left hy.le L.coe_nonneg) |
| 38 | |
| 39 | /-- Averaging by a nonnegative normalized kernel preserves the Lipschitz constant. -/ |
| 40 | theorem lipschitzWith_normed_convolution (κ : ContDiffBump (0 : E)) |
| 41 | {f : E → ℝ} {L : ℝ≥0} (hf : LipschitzWith L f) : |
| 42 | LipschitzWith L (κ.normed μ ⋆[lsmul ℝ ℝ, μ] f) := by |
| 43 | have hex := (κ.hasCompactSupport_normed (μ := μ)).convolutionExists_left |
| 44 | (μ := μ) (lsmul ℝ ℝ) |
| 45 | κ.continuous_normed hf.continuous.locallyIntegrable |
| 46 | apply LipschitzWith.of_dist_le_mul |
| 47 | intro x y |
| 48 | rw [dist_eq_norm, convolution, convolution, ← integral_sub (hex x) (hex y)] |
| 49 | calc |
| 50 | _ ≤ ∫ z, κ.normed μ z * (L * dist x y) ∂μ := by |
| 51 | apply norm_integral_le_of_norm_le (κ.integrable_normed.mul_const _) |
| 52 | exact Eventually.of_forall (fun z ↦ by |
| 53 | simp only [lsmul_apply, smul_eq_mul, ← mul_sub, norm_mul, |
| 54 | Real.norm_of_nonneg (κ.nonneg_normed z)] |
| 55 | apply mul_le_mul_of_nonneg_left _ (κ.nonneg_normed z) |
| 56 | simpa only [← dist_eq_norm, dist_sub_right] using hf.dist_le_mul (x - z) (y - z)) |
| 57 | _ = L * dist x y := by rw [integral_mul_const, κ.integral_normed, one_mul] |
| 58 | |
| 59 | end PoincareMT.ReducedVolume |