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 | import Mathlib.Topology.MetricSpace.Lipschitz |
| 3 | |
| 4 | /-! |
| 5 | # Euclidean convolution smoothing with a quantitative metric estimate |
| 6 | |
| 7 | This file records the local analytic stage used by the SurgeryComparison.Transport smoothing plan. |
| 8 | For a finite-dimensional real normed space, convolution with a normalized |
| 9 | compactly supported smooth bump is smooth and does not increase a global |
| 10 | Lipschitz constant. The estimate is the integral form of the elementary |
| 11 | fact that a convex average of translates of a Lipschitz map has the same |
| 12 | Lipschitz constant. It is the chart-level estimate underlying the |
| 13 | quantitative approximation discussion after Claim 18.22 (Morgan--Tian, |
| 14 | printed p. 433); manifold chart patching is deliberately left to the |
| 15 | caller. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Function Set Filter Metric MeasureTheory ContinuousLinearMap |
| 21 | open scoped Convolution Topology ContDiff NNReal |
| 22 | |
| 23 | namespace PoincareMT.SurgeryComparison.Transport |
| 24 | |
| 25 | variable {E F : Type*} |
| 26 | [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 27 | [MeasurableSpace E] [BorelSpace E] |
| 28 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 29 | {μ : Measure E} [μ.IsAddHaarMeasure] |
| 30 | |
| 31 | /-- Convolution by a normalized bump, written in the orientation used by |
| 32 | `MeasureTheory.convolution`. The bump is centred at zero. SurgeryComparison.Transport quantitative |
| 33 | smoothing, Morgan--Tian Claim 18.22, p. 433. -/ |
| 34 | noncomputable def normalizedConvolution (μ : Measure E) |
| 35 | (φ : ContDiffBump (0 : E)) (f : E → F) : E → F := |
| 36 | fun x => (φ.normed μ ⋆[lsmul ℝ ℝ, μ] f : E → F) x |
| 37 | |
| 38 | omit [CompleteSpace F] in |
| 39 | /-- The normalized convolution is smooth whenever the input is locally |
| 40 | integrable. This is the standard compact-support convolution theorem from |
| 41 | Mathlib, used for SurgeryComparison.Transport quantitative smoothing, Morgan--Tian Claim 18.22, |
| 42 | p. 433. -/ |
| 43 | theorem normalizedConvolution_contDiff (φ : ContDiffBump (0 : E)) |
| 44 | {f : E → F} (hf : LocallyIntegrable f μ) : |
| 45 | ContDiff ℝ ∞ (normalizedConvolution μ φ f) := by |
| 46 | exact φ.hasCompactSupport_normed.contDiff_convolution_left _ φ.contDiff_normed hf |
| 47 | |
| 48 | omit [CompleteSpace F] in |
| 49 | /-- The compactly supported kernel is integrable against each translate |
| 50 | of a locally integrable map. SurgeryComparison.Transport quantitative smoothing, Morgan--Tian |
| 51 | Claim 18.22, p. 433. -/ |
| 52 | private theorem normalizedConvolution_integrable (φ : ContDiffBump (0 : E)) |
| 53 | {f : E → F} (hf : LocallyIntegrable f μ) (x : E) : |
| 54 | Integrable (fun t => φ.normed μ t • f (x - t)) μ := by |
| 55 | exact ((φ.hasCompactSupport_normed.convolutionExists_left |
| 56 | (lsmul ℝ ℝ) φ.continuous_normed hf) x).integrable |
| 57 | |
| 58 | /-- Localized Lipschitz preservation for convolution. The smaller set `s` |
| 59 | must remain in `U` after subtraction of the bump support. This is the |
| 60 | finite-dimensional local estimate used for chart smoothing in the SurgeryComparison.Transport |
| 61 | contract, independently of the extension of `f` outside `U`. |
| 62 | Morgan--Tian Claim 18.22, p. 433. -/ |
| 63 | theorem normalizedConvolution_lipschitzOn (φ : ContDiffBump (0 : E)) |
| 64 | {f : E → F} {U s : Set E} {L : ℝ≥0} |
| 65 | (hf : LocallyIntegrable f μ) (hlip : LipschitzOnWith L f U) |
| 66 | (hsub : ∀ x ∈ s, ∀ t ∈ ball (0 : E) φ.rOut, x - t ∈ U) : |
| 67 | LipschitzOnWith L (normalizedConvolution μ φ f) s := by |
| 68 | apply LipschitzOnWith.of_dist_le_mul |
| 69 | intro x hx y hy |
| 70 | have hxi := normalizedConvolution_integrable (μ := μ) φ hf x |
| 71 | have hyi := normalizedConvolution_integrable (μ := μ) φ hf y |
| 72 | change dist |
| 73 | (∫ t, φ.normed μ t • f (x - t) ∂μ) |
| 74 | (∫ t, φ.normed μ t • f (y - t) ∂μ) ≤ _ |
| 75 | rw [dist_eq_norm, ← integral_sub hxi hyi] |
| 76 | calc |
| 77 | ‖∫ t, φ.normed μ t • f (x - t) - φ.normed μ t • f (y - t) ∂μ‖ |
| 78 | ≤ ∫ t, φ.normed μ t * ((L : ℝ) * dist x y) ∂μ := by |
| 79 | apply norm_integral_le_of_norm_le (φ.integrable_normed.mul_const _) |
| 80 | apply Eventually.of_forall |
| 81 | intro t |
| 82 | rw [← smul_sub, norm_smul, Real.norm_of_nonneg (φ.nonneg_normed t)] |
| 83 | by_cases ht : t ∈ support (φ.normed μ) |
| 84 | · apply mul_le_mul_of_nonneg_left _ (φ.nonneg_normed t) |
| 85 | rw [φ.support_normed_eq] at ht |
| 86 | simpa only [← dist_eq_norm, dist_sub_right] using |
| 87 | hlip.dist_le_mul (x - t) (hsub x hx t ht) (y - t) (hsub y hy t ht) |
| 88 | · rw [notMem_support.mp ht, zero_mul, zero_mul] |
| 89 | _ = (L : ℝ) * dist x y := by |
| 90 | rw [integral_mul_const, φ.integral_normed, one_mul] |
| 91 | |
| 92 | /-- A normalized bump convolution preserves a global Lipschitz constant. |
| 93 | The proof bounds translated finite differences and uses the normalization |
| 94 | `∫ φ.normed = 1`, as in Azagra--Ferrera--Lopez-Mesas--Rangel, p. 1. |
| 95 | SurgeryComparison.Transport quantitative smoothing, Morgan--Tian Claim 18.22, p. 433. -/ |
| 96 | theorem normalizedConvolution_lipschitz (φ : ContDiffBump (0 : E)) |
| 97 | {f : E → F} {L : ℝ≥0} (hf : LipschitzWith L f) : |
| 98 | LipschitzWith L (normalizedConvolution μ φ f) := by |
| 99 | rw [← lipschitzOnWith_univ] |
| 100 | exact normalizedConvolution_lipschitzOn (U := univ) φ hf.continuous.locallyIntegrable |
| 101 | hf.lipschitzOnWith (by simp) |
| 102 | |
| 103 | /-- A bump of outer radius `r` changes an `L`-Lipschitz map by at most |
| 104 | `L * r`. This is the local uniform error estimate paired with exact |
| 105 | Lipschitz preservation in the convolution method described by |
| 106 | Azagra--Ferrera--Lopez-Mesas--Rangel, p. 1. SurgeryComparison.Transport quantitative smoothing, |
| 107 | Morgan--Tian Claim 18.22, p. 433. -/ |
| 108 | theorem normalizedConvolution_dist_le (φ : ContDiffBump (0 : E)) |
| 109 | {f : E → F} {L : ℝ≥0} (hf : LipschitzWith L f) (x : E) : |
| 110 | dist (normalizedConvolution μ φ f x) (f x) ≤ (L : ℝ) * φ.rOut := by |
| 111 | apply φ.dist_normed_convolution_le hf.continuous.aestronglyMeasurable |
| 112 | intro y hy |
| 113 | exact (hf.dist_le_mul y x).trans |
| 114 | (mul_le_mul_of_nonneg_left hy.le L.coe_nonneg) |
| 115 | |
| 116 | /-- Smooth convolution has differential norm at most the original |
| 117 | Lipschitz constant. This uses a finite-difference estimate, so the |
| 118 | Euclidean stage needs no appeal to almost-everywhere differentiability. |
| 119 | SurgeryComparison.Transport quantitative smoothing, Morgan--Tian Claim 18.22, p. 433. -/ |
| 120 | theorem normalizedConvolution_norm_fderiv_le (φ : ContDiffBump (0 : E)) |
| 121 | {f : E → F} {L : ℝ≥0} (hf : LipschitzWith L f) (x : E) : |
| 122 | ‖fderiv ℝ (normalizedConvolution μ φ f) x‖ ≤ L := |
| 123 | norm_fderiv_le_of_lipschitz ℝ (normalizedConvolution_lipschitz φ hf) |
| 124 | |
| 125 | /-- Euclidean Lipschitz maps admit uniformly close smooth approximants with |
| 126 | the exact same Lipschitz constant. This is the finite-dimensional convolution |
| 127 | statement in Azagra--Ferrera--Lopez-Mesas--Rangel, p. 1, used for SurgeryComparison.Transport |
| 128 | quantitative smoothing, Morgan--Tian Claim 18.22, p. 433. -/ |
| 129 | theorem exists_contDiff_lipschitz_approx (μ : Measure E) [μ.IsAddHaarMeasure] |
| 130 | {f : E → F} {L : ℝ≥0} (hf : LipschitzWith L f) {ε : ℝ} (hε : 0 < ε) : |
| 131 | ∃ g : E → F, ContDiff ℝ ∞ g ∧ LipschitzWith L g ∧ |
| 132 | ∀ x, dist (g x) (f x) < ε := by |
| 133 | let r : ℝ := ε / (2 * ((L : ℝ) + 1)) |
| 134 | have hr : 0 < r := by dsimp [r]; positivity |
| 135 | let φ : ContDiffBump (0 : E) := ⟨r / 2, r, half_pos hr, half_lt_self hr⟩ |
| 136 | refine ⟨normalizedConvolution μ φ f, |
| 137 | normalizedConvolution_contDiff φ hf.continuous.locallyIntegrable, |
| 138 | normalizedConvolution_lipschitz φ hf, ?_⟩ |
| 139 | intro x |
| 140 | apply (normalizedConvolution_dist_le (μ := μ) φ hf x).trans_lt |
| 141 | change (L : ℝ) * r < ε |
| 142 | have hden : 0 < 2 * ((L : ℝ) + 1) := by positivity |
| 143 | have heq : r * (2 * ((L : ℝ) + 1)) = ε := by |
| 144 | dsimp [r] |
| 145 | exact div_mul_cancel₀ ε hden.ne' |
| 146 | nlinarith [L.coe_nonneg] |
| 147 | |
| 148 | end PoincareMT.SurgeryComparison.Transport |