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.SmoothApprox |
| 2 | |
| 3 | /-! |
| 4 | # Lipschitz estimates for normalized convolution |
| 5 | |
| 6 | These estimates are the local analytic input for smooth approximation with |
| 7 | gradient control, as used in Chow et al., Part III, Proposition 26.49, |
| 8 | equation (26.131), printed p. 378 (PDF p. 399). |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open ContinuousLinearMap MeasureTheory |
| 14 | open scoped Convolution NNReal ContDiff |
| 15 | |
| 16 | namespace Poincare |
| 17 | |
| 18 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 19 | [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] |
| 20 | (μ : Measure E) [μ.IsAddHaarMeasure] |
| 21 | |
| 22 | /-- A positive normalized bump convolution preserves the Lipschitz constant. -/ |
| 23 | theorem lipschitzWith_normed_convolution {f : E → ℝ} {K : ℝ≥0} |
| 24 | (hf : LipschitzWith K f) (φ : ContDiffBump (0 : E)) : |
| 25 | LipschitzWith K (φ.normed μ ⋆[lsmul ℝ ℝ, μ] f) := by |
| 26 | have hi : ConvolutionExists (φ.normed μ) f (lsmul ℝ ℝ) μ := |
| 27 | φ.hasCompactSupport_normed.convolutionExists_left_of_continuous_right |
| 28 | (lsmul ℝ ℝ) (φ.contDiff_normed (n := 0)).continuous.locallyIntegrable hf.continuous |
| 29 | simp only [ConvolutionExists, ConvolutionExistsAt, lsmul_apply, smul_eq_mul] at hi |
| 30 | apply LipschitzWith.of_dist_le_mul |
| 31 | intro x y |
| 32 | simp only [Real.dist_eq, convolution_def, lsmul_apply, smul_eq_mul] |
| 33 | rw [← integral_sub (hi x) (hi y)] |
| 34 | calc |
| 35 | |∫ t, φ.normed μ t * f (x - t) - φ.normed μ t * f (y - t) ∂μ| |
| 36 | ≤ ∫ t, |φ.normed μ t * f (x - t) - φ.normed μ t * f (y - t)| ∂μ := |
| 37 | abs_integral_le_integral_abs |
| 38 | _ ≤ ∫ t, φ.normed μ t * (K * dist x y) ∂μ := by |
| 39 | apply integral_mono_of_nonneg |
| 40 | · exact Filter.Eventually.of_forall fun _ ↦ abs_nonneg _ |
| 41 | · exact φ.integrable_normed.mul_const _ |
| 42 | · apply Filter.Eventually.of_forall |
| 43 | intro t |
| 44 | dsimp only |
| 45 | rw [← mul_sub, abs_mul, abs_of_nonneg (φ.nonneg_normed t)] |
| 46 | apply mul_le_mul_of_nonneg_left _ (φ.nonneg_normed t) |
| 47 | simpa only [Real.dist_eq, dist_sub_right] using hf.dist_le_mul (x - t) (y - t) |
| 48 | _ = K * dist x y := by rw [integral_mul_const, φ.integral_normed, one_mul] |
| 49 | |
| 50 | /-- The convolution error is at most the Lipschitz constant times its radius. -/ |
| 51 | theorem dist_normed_convolution_le_radius {f : E → ℝ} {K : ℝ≥0} |
| 52 | (hf : LipschitzWith K f) (φ : ContDiffBump (0 : E)) (x : E) : |
| 53 | dist ((φ.normed μ ⋆[lsmul ℝ ℝ, μ] f) x) (f x) ≤ K * φ.rOut := by |
| 54 | apply φ.dist_normed_convolution_le hf.continuous.aestronglyMeasurable |
| 55 | intro y hy |
| 56 | exact (hf.dist_le_mul y x).trans |
| 57 | (mul_le_mul_of_nonneg_left (Metric.mem_ball.mp hy).le K.coe_nonneg) |
| 58 | |
| 59 | /-- The derivative bound follows from the preserved Lipschitz constant. -/ |
| 60 | theorem norm_fderiv_normed_convolution_le {f : E → ℝ} {K : ℝ≥0} |
| 61 | (hf : LipschitzWith K f) (φ : ContDiffBump (0 : E)) (x : E) : |
| 62 | ‖fderiv ℝ (φ.normed μ ⋆[lsmul ℝ ℝ, μ] f) x‖ ≤ K := |
| 63 | norm_fderiv_le_of_lipschitz ℝ (lipschitzWith_normed_convolution μ hf φ) |
| 64 | |
| 65 | end Poincare |
| 66 | |
| 67 | namespace Poincare |
| 68 | |
| 69 | /-- Uniform smooth approximation of a Lipschitz function without increasing its |
| 70 | Lipschitz constant. The normalized convolution constructs the approximation. -/ |
| 71 | theorem exists_contDiff_lipschitz_approx |
| 72 | {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 73 | [FiniteDimensional ℝ E] {f : E → ℝ} {K : ℝ≥0} |
| 74 | (hf : LipschitzWith K f) {ε : ℝ} (hε : 0 < ε) : |
| 75 | ∃ u : E → ℝ, ContDiff ℝ ∞ u ∧ LipschitzWith K u ∧ |
| 76 | (∀ x, dist (u x) (f x) ≤ ε) ∧ (∀ x, ‖fderiv ℝ u x‖ ≤ K) := by |
| 77 | borelize E |
| 78 | let μ : Measure E := Measure.addHaar |
| 79 | let r : ℝ := ε / (K + 1) |
| 80 | have hr : 0 < r := div_pos hε (by positivity) |
| 81 | let φ : ContDiffBump (0 : E) := ⟨r / 2, r, half_pos hr, half_lt_self hr⟩ |
| 82 | refine ⟨φ.normed μ ⋆[lsmul ℝ ℝ, μ] f, ?_, |
| 83 | lipschitzWith_normed_convolution μ hf φ, ?_, |
| 84 | norm_fderiv_normed_convolution_le μ hf φ⟩ |
| 85 | · exact φ.hasCompactSupport_normed.contDiff_convolution_left _ |
| 86 | φ.contDiff_normed hf.continuous.locallyIntegrable |
| 87 | · intro x |
| 88 | apply (dist_normed_convolution_le_radius μ hf φ x).trans |
| 89 | change (K : ℝ) * r ≤ ε |
| 90 | have heq : r * (K + 1) = ε := div_mul_cancel₀ _ (by positivity) |
| 91 | nlinarith |
| 92 | |
| 93 | end Poincare |