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.MeasureTheory.Integral.Prod |
| 2 | import Mathlib.Tactic.Linarith |
| 3 | |
| 4 | /-! |
| 5 | # First moments of subprobability kernel semigroups |
| 6 | |
| 7 | The triangle inequality and Tonelli's theorem bound a convolution's first |
| 8 | moment by the sum of the two row bounds. Iteration extends a uniform moment |
| 9 | bound on the unit time interval to every positive time, without conservation. |
| 10 | |
| 11 | This supplies the all-time integrability step in Chow et al., Part III, |
| 12 | Proposition 26.49, Step 1, printed pp. 378-381, from the small-time Gaussian |
| 13 | moment estimate and the heat-kernel semigroup law. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open MeasureTheory Set |
| 20 | open scoped ENNReal |
| 21 | |
| 22 | namespace Poincare.MeasureTheory |
| 23 | |
| 24 | variable {X : Type*} [MeasurableSpace X] {μ : Measure X} [SFinite μ] |
| 25 | |
| 26 | /-- Subprobability convolution adds uniform first-moment bounds. The cost |
| 27 | may be an extended distance, so no finiteness of the cost is required. -/ |
| 28 | theorem lintegral_cost_convolution_le |
| 29 | {d K L : X → X → ℝ≥0∞} |
| 30 | (hd : Measurable (Function.uncurry d)) |
| 31 | (hL : Measurable (Function.uncurry L)) |
| 32 | (htri : ∀ x z y, d x y ≤ d x z + d z y) |
| 33 | (hK : ∀ x, Measurable (K x)) |
| 34 | (hmK : ∀ x, ∫⁻ y, K x y ∂μ ≤ 1) |
| 35 | (hmL : ∀ x, ∫⁻ y, L x y ∂μ ≤ 1) |
| 36 | {A B : ℝ≥0∞} |
| 37 | (hA : ∀ x, ∫⁻ y, d x y * K x y ∂μ ≤ A) |
| 38 | (hB : ∀ x, ∫⁻ y, d x y * L x y ∂μ ≤ B) (x : X) : |
| 39 | ∫⁻ y, d x y * (∫⁻ z, K x z * L z y ∂μ) ∂μ ≤ A + B := by |
| 40 | have hdrow (z : X) : Measurable (d z) := hd.comp measurable_prodMk_left |
| 41 | have hLrow (z : X) : Measurable (L z) := hL.comp measurable_prodMk_left |
| 42 | calc |
| 43 | ∫⁻ y, d x y * (∫⁻ z, K x z * L z y ∂μ) ∂μ = |
| 44 | ∫⁻ y, ∫⁻ z, d x y * (K x z * L z y) ∂μ ∂μ := by |
| 45 | apply lintegral_congr |
| 46 | intro y |
| 47 | exact (lintegral_const_mul _ |
| 48 | ((hK x).mul (hL.comp measurable_prodMk_right))).symm |
| 49 | _ = ∫⁻ z, ∫⁻ y, d x y * (K x z * L z y) ∂μ ∂μ := by |
| 50 | exact lintegral_lintegral_swap |
| 51 | (((hdrow x).comp measurable_fst).mul |
| 52 | (((hK x).comp measurable_snd).mul (hL.comp measurable_swap))).aemeasurable |
| 53 | _ ≤ ∫⁻ z, d x z * K x z + K x z * B ∂μ := by |
| 54 | apply lintegral_mono |
| 55 | intro z |
| 56 | calc |
| 57 | ∫⁻ y, d x y * (K x z * L z y) ∂μ ≤ |
| 58 | ∫⁻ y, (d x z + d z y) * (K x z * L z y) ∂μ := |
| 59 | lintegral_mono fun y => mul_le_mul_left (htri x z y) _ |
| 60 | _ = d x z * K x z * (∫⁻ y, L z y ∂μ) + |
| 61 | K x z * (∫⁻ y, d z y * L z y ∂μ) := by |
| 62 | simp_rw [add_mul, ← mul_assoc] |
| 63 | rw [lintegral_add_left |
| 64 | ((hLrow z).const_mul (d x z * K x z))] |
| 65 | rw [lintegral_const_mul _ (hLrow z)] |
| 66 | congr 1 |
| 67 | simp_rw [mul_comm (d z _) (K x z), mul_assoc] |
| 68 | exact lintegral_const_mul _ ((hdrow z).mul (hLrow z)) |
| 69 | _ ≤ d x z * K x z + K x z * B := by |
| 70 | simpa only [mul_one] using |
| 71 | add_le_add (mul_le_mul_right (hmL z) _) (mul_le_mul_right (hB z) _) |
| 72 | _ = (∫⁻ z, d x z * K x z ∂μ) + (∫⁻ z, K x z ∂μ) * B := by |
| 73 | rw [lintegral_add_left (f := fun z => d x z * K x z) |
| 74 | ((hdrow x).mul (hK x)), lintegral_mul_const _ (hK x)] |
| 75 | _ ≤ A + B := by |
| 76 | simpa only [one_mul] using add_le_add (hA x) (mul_le_mul_left (hmK x) B) |
| 77 | |
| 78 | /-- A unit-time moment bound for a subprobability semigroup gives a linear |
| 79 | bound on every bounded positive time interval. -/ |
| 80 | theorem lintegral_cost_semigroup_le_nat_mul |
| 81 | {d : X → X → ℝ≥0∞} {K : ℝ → X → X → ℝ≥0∞} |
| 82 | (hd : Measurable (Function.uncurry d)) |
| 83 | (htri : ∀ x z y, d x y ≤ d x z + d z y) |
| 84 | (hK : ∀ t, 0 < t → Measurable (Function.uncurry (K t))) |
| 85 | (hmass : ∀ t, 0 < t → ∀ x, ∫⁻ y, K t x y ∂μ ≤ 1) |
| 86 | (hadd : ∀ s t, 0 < s → 0 < t → ∀ x y, |
| 87 | K (s + t) x y = ∫⁻ z, K s x z * K t z y ∂μ) |
| 88 | {C : ℝ≥0∞} |
| 89 | (hsmall : ∀ t, 0 < t → t ≤ 1 → ∀ x, ∫⁻ y, d x y * K t x y ∂μ ≤ C) |
| 90 | (N : ℕ) {t : ℝ} (ht : 0 < t) (hN : t ≤ N) (x : X) : |
| 91 | ∫⁻ y, d x y * K t x y ∂μ ≤ N * C := by |
| 92 | induction N generalizing t x with |
| 93 | | zero => norm_num at hN; linarith |
| 94 | | succ N ih => |
| 95 | by_cases ht1 : t ≤ 1 |
| 96 | · exact (hsmall t ht ht1 x).trans (by |
| 97 | have h : (1 : ℝ≥0∞) ≤ (N + 1 : ℕ) := by exact_mod_cast Nat.succ_le_succ (Nat.zero_le N) |
| 98 | simpa only [one_mul] using mul_le_mul_left h C) |
| 99 | · have hs : 0 < t - 1 := by linarith |
| 100 | have hsN : t - 1 ≤ (N : ℝ) := by |
| 101 | push_cast at hN |
| 102 | linarith |
| 103 | have heq : K t = K ((t - 1) + 1) := by congr 1; ring |
| 104 | simp_rw [heq, hadd (t - 1) 1 hs zero_lt_one] |
| 105 | have h := lintegral_cost_convolution_le (K := K (t - 1)) hd (hK 1 zero_lt_one) htri |
| 106 | (fun z => (hK (t - 1) hs).comp measurable_prodMk_left) |
| 107 | (hmass (t - 1) hs) (hmass 1 zero_lt_one) |
| 108 | (fun z => ih hs hsN z) (hsmall 1 zero_lt_one le_rfl) x |
| 109 | simpa only [Nat.cast_add, Nat.cast_one, add_mul, one_mul, |
| 110 | Function.comp_apply, Function.uncurry_apply_pair] using h |
| 111 | |
| 112 | /-- Real-valued subprobability kernels with a uniform small-time first moment |
| 113 | have integrable first moments at every positive time. This form consumes the |
| 114 | ordinary integrals and semigroup identity of the exhaustion heat kernel. -/ |
| 115 | theorem integrable_cost_semigroup_of_small_time |
| 116 | {d : X → X → ℝ} {K : ℝ → X → X → ℝ} |
| 117 | (hd : Measurable (Function.uncurry d)) (hd0 : ∀ x y, 0 ≤ d x y) |
| 118 | (htri : ∀ x z y, d x y ≤ d x z + d z y) |
| 119 | (hK : ∀ t, 0 < t → Measurable (Function.uncurry (K t))) |
| 120 | (hK0 : ∀ t, 0 < t → ∀ x y, 0 ≤ K t x y) |
| 121 | (hmass : ∀ t, 0 < t → ∀ x, |
| 122 | Integrable (K t x) μ ∧ (∫ y, K t x y ∂μ) ≤ 1) |
| 123 | (hadd : ∀ s t, 0 < s → 0 < t → ∀ x y, |
| 124 | Integrable (fun z => K s x z * K t z y) μ ∧ |
| 125 | K (s + t) x y = ∫ z, K s x z * K t z y ∂μ) |
| 126 | {C : ℝ} |
| 127 | (hsmall : ∀ t, 0 < t → t ≤ 1 → ∀ x, |
| 128 | Integrable (fun y => d x y * K t x y) μ ∧ |
| 129 | (∫ y, d x y * K t x y ∂μ) ≤ C) |
| 130 | {t : ℝ} (ht : 0 < t) (x : X) : |
| 131 | Integrable (fun y => d x y * K t x y) μ := by |
| 132 | have hm : ∀ s, 0 < s → ∀ z, ∫⁻ y, ENNReal.ofReal (K s z y) ∂μ ≤ 1 := by |
| 133 | intro s hs z |
| 134 | rw [← ofReal_integral_eq_lintegral_ofReal (hmass s hs z).1 |
| 135 | (Filter.Eventually.of_forall (hK0 s hs z))] |
| 136 | exact (ENNReal.ofReal_le_ofReal (hmass s hs z).2).trans_eq (by simp) |
| 137 | have ha : ∀ s r, 0 < s → 0 < r → ∀ z y, |
| 138 | ENNReal.ofReal (K (s + r) z y) = |
| 139 | ∫⁻ w, ENNReal.ofReal (K s z w) * ENNReal.ofReal (K r w y) ∂μ := by |
| 140 | intro s r hs hr z y |
| 141 | rw [(hadd s r hs hr z y).2, |
| 142 | ofReal_integral_eq_lintegral_ofReal (hadd s r hs hr z y).1 |
| 143 | (Filter.Eventually.of_forall fun w => mul_nonneg (hK0 s hs z w) (hK0 r hr w y))] |
| 144 | simp_rw [ENNReal.ofReal_mul (hK0 s hs z _)] |
| 145 | have hsm : ∀ s, 0 < s → s ≤ 1 → ∀ z, |
| 146 | ∫⁻ y, ENNReal.ofReal (d z y) * ENNReal.ofReal (K s z y) ∂μ ≤ |
| 147 | ENNReal.ofReal C := by |
| 148 | intro s hs hs1 z |
| 149 | simp_rw [← ENNReal.ofReal_mul (hd0 z _)] |
| 150 | rw [← ofReal_integral_eq_lintegral_ofReal (hsmall s hs hs1 z).1 |
| 151 | (Filter.Eventually.of_forall fun y => mul_nonneg (hd0 z y) (hK0 s hs z y))] |
| 152 | exact ENNReal.ofReal_le_ofReal (hsmall s hs hs1 z).2 |
| 153 | obtain ⟨N, hN⟩ := exists_nat_ge t |
| 154 | have hbound := lintegral_cost_semigroup_le_nat_mul |
| 155 | (μ := μ) (d := fun z y => ENNReal.ofReal (d z y)) |
| 156 | (K := fun s z y => ENNReal.ofReal (K s z y)) hd.ennreal_ofReal |
| 157 | (fun z w y => (ENNReal.ofReal_le_ofReal (htri z w y)).trans |
| 158 | ENNReal.ofReal_add_le) |
| 159 | (fun s hs => (hK s hs).ennreal_ofReal) hm ha hsm N ht hN x |
| 160 | have hnonneg : ∀ y, 0 ≤ d x y * K t x y := |
| 161 | fun y => mul_nonneg (hd0 x y) (hK0 t ht x y) |
| 162 | refine ⟨((hd.comp measurable_prodMk_left).mul |
| 163 | ((hK t ht).comp measurable_prodMk_left)).aestronglyMeasurable, ?_⟩ |
| 164 | apply (hasFiniteIntegral_iff_ofReal (Filter.Eventually.of_forall hnonneg)).mpr |
| 165 | simp_rw [ENNReal.ofReal_mul (hd0 x _)] |
| 166 | exact hbound.trans_lt (ENNReal.mul_lt_top (by simp) ENNReal.ofReal_lt_top) |
| 167 | |
| 168 | end Poincare.MeasureTheory |