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.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.WeakEnergy |
| 2 | import Mathlib.MeasureTheory.Function.Holder |
| 3 | import Mathlib.MeasureTheory.Function.L2Space |
| 4 | import Mathlib.MeasureTheory.Integral.DominatedConvergence |
| 5 | import Mathlib.Analysis.Normed.Group.Bounded |
| 6 | |
| 7 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/IntegratedEnergy.lean` at |
| 8 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 9 | |
| 10 | |
| 11 | /-! |
| 12 | # Integrated chart metric forms |
| 13 | |
| 14 | Bounded measurable metric coefficients act continuously on pairs of L2 |
| 15 | velocities. Coefficient convergence therefore fits the weak-energy lemma. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open MeasureTheory Filter Topology |
| 22 | open scoped ENNReal |
| 23 | |
| 24 | namespace PoincareMT.LGeometry |
| 25 | |
| 26 | variable {A E : Type*} [MeasurableSpace A] [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 27 | |
| 28 | noncomputable def integratedFormMap (μ : Measure A) |
| 29 | (B : Lp (E →L[ℝ] E →L[ℝ] ℝ) ∞ μ) : |
| 30 | Lp E 2 μ →L[ℝ] Lp E 2 μ →L[ℝ] ℝ := |
| 31 | ((ContinuousLinearMap.id ℝ (E →L[ℝ] ℝ)).lpPairing μ 2 2).comp |
| 32 | ((ContinuousLinearMap.id ℝ (E →L[ℝ] E →L[ℝ] ℝ)).holderL μ ∞ 2 2 B) |
| 33 | |
| 34 | set_option maxHeartbeats 800000 in |
| 35 | -- Elaborating the nested coefficient and Lp operator types requires additional reductions. |
| 36 | theorem integratedFormMap_apply {μ : Measure A} |
| 37 | (B : Lp (E →L[ℝ] E →L[ℝ] ℝ) ∞ μ) (v w : Lp E 2 μ) : |
| 38 | integratedFormMap μ B v w = ∫ t, B t (v t) (w t) ∂μ := by |
| 39 | simp only [integratedFormMap, ContinuousLinearMap.comp_apply, |
| 40 | ContinuousLinearMap.holderL_apply_apply] |
| 41 | rw [ContinuousLinearMap.lpPairing_eq_integral] |
| 42 | apply integral_congr_ae |
| 43 | filter_upwards [ContinuousLinearMap.coeFn_holder (𝕜 := ℝ) |
| 44 | (E := E →L[ℝ] E →L[ℝ] ℝ) (F := E) (G := E →L[ℝ] ℝ) (r := 2) |
| 45 | (ContinuousLinearMap.id ℝ (E →L[ℝ] E →L[ℝ] ℝ)) B v] |
| 46 | with t ht |
| 47 | exact congrArg (fun l : E →L[ℝ] ℝ ↦ l (w t)) ht |
| 48 | |
| 49 | set_option maxHeartbeats 800000 in |
| 50 | -- The Holder operators involve three nested continuous-linear-map spaces. |
| 51 | theorem integratedFormMap_norm_le (μ : Measure A) |
| 52 | (B : Lp (E →L[ℝ] E →L[ℝ] ℝ) ∞ μ) : |
| 53 | ‖integratedFormMap (E := E) μ B‖ ≤ ‖B‖ := by |
| 54 | have hI : ‖(L1.integralCLM' ℝ : Lp ℝ 1 μ →L[ℝ] ℝ)‖ ≤ 1 := |
| 55 | L1.norm_Integral_le_one |
| 56 | have hP : ‖(ContinuousLinearMap.id ℝ (E →L[ℝ] ℝ)).lpPairing μ 2 2‖ ≤ 1 := by |
| 57 | unfold ContinuousLinearMap.lpPairing |
| 58 | apply (ContinuousLinearMap.opNorm_comp_le _ _).trans |
| 59 | calc |
| 60 | _ ≤ 1 * 1 := mul_le_mul |
| 61 | ((ContinuousLinearMap.norm_postcomp_le (E := Lp E 2 μ) |
| 62 | (L1.integralCLM' ℝ : Lp ℝ 1 μ →L[ℝ] ℝ)).trans hI) |
| 63 | ((ContinuousLinearMap.norm_holderL_le (μ := μ) (p := 2) (q := 2) (r := 1) |
| 64 | (ContinuousLinearMap.id ℝ (E →L[ℝ] ℝ))).trans ContinuousLinearMap.norm_id_le) |
| 65 | (ContinuousLinearMap.opNorm_nonneg _) zero_le_one |
| 66 | _ = 1 := one_mul 1 |
| 67 | let S := ContinuousLinearMap.holderL (𝕜 := ℝ) |
| 68 | (E := E →L[ℝ] E →L[ℝ] ℝ) (F := E) (G := E →L[ℝ] ℝ) |
| 69 | μ ∞ 2 2 (ContinuousLinearMap.id ℝ (E →L[ℝ] E →L[ℝ] ℝ)) |
| 70 | have hS : ‖S B‖ ≤ ‖B‖ := by |
| 71 | apply (S B).opNorm_le_bound (norm_nonneg B) |
| 72 | intro v |
| 73 | have h := ContinuousLinearMap.norm_holder_apply_apply_le (𝕜 := ℝ) |
| 74 | (E := E →L[ℝ] E →L[ℝ] ℝ) (F := E) (G := E →L[ℝ] ℝ) (r := 2) |
| 75 | (ContinuousLinearMap.id ℝ (E →L[ℝ] E →L[ℝ] ℝ)) B v |
| 76 | have hid := ContinuousLinearMap.norm_id_le (𝕜 := ℝ) (E := E →L[ℝ] E →L[ℝ] ℝ) |
| 77 | have hmul := mul_le_mul_of_nonneg_right |
| 78 | (mul_le_mul_of_nonneg_right hid (norm_nonneg B)) (norm_nonneg v) |
| 79 | exact h.trans (by simpa only [one_mul] using hmul) |
| 80 | change ‖((ContinuousLinearMap.id ℝ (E →L[ℝ] ℝ)).lpPairing μ 2 2).comp |
| 81 | (S B)‖ ≤ _ |
| 82 | apply (ContinuousLinearMap.opNorm_comp_le _ _).trans |
| 83 | calc |
| 84 | _ ≤ 1 * ‖B‖ := mul_le_mul hP hS |
| 85 | (ContinuousLinearMap.opNorm_nonneg _) zero_le_one |
| 86 | _ = ‖B‖ := one_mul _ |
| 87 | |
| 88 | theorem lpTop_norm_le_of_bound {F : Type*} [NormedAddCommGroup F] {μ : Measure A} |
| 89 | {f : A → F} (hf : MemLp f ∞ μ) {C : ℝ} (hC : 0 ≤ C) |
| 90 | (hbound : ∀ᵐ t ∂μ, ‖f t‖ ≤ C) : ‖hf.toLp f‖ ≤ C := by |
| 91 | rw [Lp.norm_toLp, eLpNorm_exponent_top] |
| 92 | exact (ENNReal.toReal_mono ENNReal.ofReal_ne_top |
| 93 | (eLpNormEssSup_le_of_ae_bound hbound)).trans_eq (ENNReal.toReal_ofReal hC) |
| 94 | |
| 95 | theorem integratedForm_nonneg {μ : Measure A} |
| 96 | {B : A → E →L[ℝ] E →L[ℝ] ℝ} (hB : MemLp B ∞ μ) |
| 97 | (hpos : ∀ᵐ t ∂μ, ∀ z, 0 ≤ B t z z) (v : Lp E 2 μ) : |
| 98 | 0 ≤ integratedFormMap μ (hB.toLp B) v v := by |
| 99 | rw [integratedFormMap_apply] |
| 100 | apply integral_nonneg_of_ae |
| 101 | filter_upwards [MemLp.coeFn_toLp (E := E →L[ℝ] E →L[ℝ] ℝ) hB, hpos] with t hrep ht |
| 102 | rw [hrep] |
| 103 | exact ht (v t) |
| 104 | |
| 105 | /-- An almost-everywhere coefficient error controls the operator error on L2. -/ |
| 106 | theorem integratedForm_sub_norm_le {μ : Measure A} |
| 107 | {B D : A → E →L[ℝ] E →L[ℝ] ℝ} (hB : MemLp B ∞ μ) (hD : MemLp D ∞ μ) |
| 108 | {δ : ℝ} (hδ : 0 ≤ δ) (herror : ∀ᵐ t ∂μ, ‖B t - D t‖ ≤ δ) : |
| 109 | ‖integratedFormMap μ (hB.toLp B) - integratedFormMap μ (hD.toLp D)‖ ≤ δ := by |
| 110 | have heq : integratedFormMap μ (hB.toLp B) - integratedFormMap μ (hD.toLp D) = |
| 111 | integratedFormMap μ ((hB.sub hD).toLp (B - D)) := by |
| 112 | rw [MemLp.toLp_sub hB hD] |
| 113 | simp only [integratedFormMap, map_sub, ContinuousLinearMap.comp_sub] |
| 114 | rw [heq] |
| 115 | exact (integratedFormMap_norm_le μ _).trans (lpTop_norm_le_of_bound _ hδ herror) |
| 116 | |
| 117 | theorem continuousOn_memLp_top_Icc {V : Type*} [NormedAddCommGroup V] |
| 118 | {a b : ℝ} {f : ℝ → V} (hf : ContinuousOn f (Set.Icc a b)) : |
| 119 | MemLp f ∞ (volume.restrict (Set.Icc a b)) := by |
| 120 | obtain ⟨C, hC⟩ := isCompact_Icc.exists_bound_of_continuousOn hf |
| 121 | apply memLp_top_of_bound (hf.aestronglyMeasurable measurableSet_Icc) C |
| 122 | filter_upwards [ae_restrict_mem measurableSet_Icc] with s hs |
| 123 | exact hC s hs |
| 124 | |
| 125 | /-- Uniform coordinate-metric convergence induces norm convergence of the L2 forms. -/ |
| 126 | theorem integratedForm_tendsto_of_uniform {a b : ℝ} |
| 127 | (B : ℕ → ℝ → E →L[ℝ] E →L[ℝ] ℝ) (D : ℝ → E →L[ℝ] E →L[ℝ] ℝ) |
| 128 | (hB : ∀ k, MemLp (B k) ∞ (volume.restrict (Set.Icc a b))) |
| 129 | (hD : MemLp D ∞ (volume.restrict (Set.Icc a b))) |
| 130 | (hlim : TendstoUniformlyOn B D atTop (Set.Icc a b)) : |
| 131 | Tendsto (fun k ↦ ‖integratedFormMap _ ((hB k).toLp (B k)) - |
| 132 | integratedFormMap _ (hD.toLp D)‖) atTop (𝓝 (0 : ℝ)) := by |
| 133 | apply Metric.tendsto_nhds.mpr |
| 134 | intro ε hε |
| 135 | have hpair : TendstoUniformlyOn (fun k s ↦ (D s, B k s)) |
| 136 | (fun s ↦ (D s, D s)) atTop (Set.Icc a b) := by |
| 137 | intro U hU |
| 138 | obtain ⟨u, hu, v', hv', huv⟩ := entourageProd_subset hU |
| 139 | filter_upwards [hlim v' hv'] with k hk |
| 140 | intro s hs |
| 141 | apply huv |
| 142 | exact ⟨refl_mem_uniformity hu, hk s hs⟩ |
| 143 | have hdiff : TendstoUniformlyOn (fun k s ↦ B k s - D s) |
| 144 | (fun _ : ℝ ↦ (0 : E →L[ℝ] E →L[ℝ] ℝ)) atTop (Set.Icc a b) := by |
| 145 | simpa only [Function.comp_def, sub_self] using |
| 146 | (uniformContinuous_snd.sub uniformContinuous_fst).comp_tendstoUniformlyOn hpair |
| 147 | have hnormlim : TendstoUniformlyOn (fun k s ↦ ‖B k s - D s‖) |
| 148 | (fun _ : ℝ ↦ (0 : ℝ)) atTop (Set.Icc a b) := by |
| 149 | simpa only [Function.comp_def, ContinuousLinearMap.opNorm_zero] using |
| 150 | (uniformContinuous_norm (E := E →L[ℝ] E →L[ℝ] ℝ)).comp_tendstoUniformlyOn hdiff |
| 151 | have hlim' : ∀ᶠ k in atTop, ∀ s ∈ Set.Icc a b, |
| 152 | ‖B k s - D s‖ < ε / 2 := by |
| 153 | simpa only [Real.dist_eq, zero_sub, abs_neg, |
| 154 | abs_of_nonneg (ContinuousLinearMap.opNorm_nonneg _)] using |
| 155 | (Metric.tendstoUniformlyOn_iff.mp hnormlim) (ε / 2) (half_pos hε) |
| 156 | filter_upwards [hlim'] with k hk |
| 157 | have hnorm : ‖integratedFormMap _ ((hB k).toLp (B k)) - |
| 158 | integratedFormMap _ (hD.toLp D)‖ ≤ ε / 2 := |
| 159 | integratedForm_sub_norm_le (hB k) hD (half_pos hε).le (by |
| 160 | filter_upwards [ae_restrict_mem measurableSet_Icc] with s hs |
| 161 | exact (hk s hs).le) |
| 162 | simpa only [Real.dist_eq, sub_zero, |
| 163 | abs_of_nonneg (ContinuousLinearMap.opNorm_nonneg _)] using |
| 164 | (lt_of_le_of_lt hnorm (half_lt_self hε)) |
| 165 | |
| 166 | end PoincareMT.LGeometry |