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 | /- |
| 2 | Provenance and modification notice (recorded 2026-09-29). |
| 3 | Source: https://github.com/qinz1yang/differential-geometry |
| 4 | DifferentialGeometry/Analysis/Parabolic/Euclidean/HeatDuhamelLower.lean |
| 5 | Comparison revision: 1b535dd102b94cc42b107cca27059687888f08b3. |
| 6 | Changes: Imports, module paths, and namespaces were adapted to the subject-organized PoincareLib library. |
| 7 | License: Apache-2.0. Source licenses and notices are retained under |
| 8 | PoincareConjecture/provenance/2026-09-29/licenses/. |
| 9 | See PoincareConjecture/MODIFICATIONS.md for the reviewed source mapping. |
| 10 | -/ |
| 11 | |
| 12 | import PoincareLib.Analysis.Parabolic.Interior.Kernel.TimeIntegral |
| 13 | import PoincareLib.Analysis.Parabolic.Interior.Kernel.Bounded |
| 14 | |
| 15 | /-! |
| 16 | # Interior heat kernel: LowerDerivatives |
| 17 | |
| 18 | Adapted from Chow--Liao--Qin, HeatDuhamelLower.lean, revision |
| 19 | 1b535dd102b94cc42b107cca27059687888f08b3. |
| 20 | Copyright 2026 The DifferentialGeometry contributors. Apache-2.0. |
| 21 | See references/ricci-flow/chow-liao-qin-2026/interior-hessian-reuse.md. |
| 22 | The adaptation changes import paths and namespaces. |
| 23 | -/ |
| 24 | |
| 25 | noncomputable section |
| 26 | |
| 27 | open MeasureTheory Real Set |
| 28 | open scoped NNReal RealInnerProductSpace |
| 29 | |
| 30 | namespace Poincare.Parabolic.Interior.Kernel |
| 31 | |
| 32 | section ValuePotential |
| 33 | |
| 34 | variable {V F : Type*} |
| 35 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 36 | [MeasurableSpace V] [BorelSpace V] |
| 37 | [Nontrivial V] |
| 38 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 39 | |
| 40 | def d0DuhMajor (K : ℝ≥0) : ℝ := K |
| 41 | |
| 42 | theorem d0DuhMajor_intble (t : ℝ) (K : ℝ≥0) : |
| 43 | IntervalIntegrable (fun _ : ℝ => d0DuhMajor K) volume 0 t := by |
| 44 | simpa only [d0DuhMajor] using |
| 45 | (intervalIntegrable_const : |
| 46 | IntervalIntegrable (fun _ : ℝ => (K : ℝ)) volume 0 t) |
| 47 | |
| 48 | theorem d0DuhMajor_int (t : ℝ) (K : ℝ≥0) : |
| 49 | ∫ _ : ℝ in 0..t, d0DuhMajor K = t * (K : ℝ) := by |
| 50 | simp only [d0DuhMajor, intervalIntegral.integral_const, sub_zero, |
| 51 | smul_eq_mul] |
| 52 | |
| 53 | def heatDuh (t : ℝ) (f : ℝ → BoundedContinuousFunction V F) (x : V) : F := |
| 54 | ∫ s : ℝ in 0..t, heatSup (t - s) (f s) x |
| 55 | |
| 56 | omit [Nontrivial V] [CompleteSpace F] in |
| 57 | theorem heatDuh_const_eq_integral_heatSup |
| 58 | (t : Real) (f : BoundedContinuousFunction V F) (x : V) : |
| 59 | heatDuh t (fun _ ↦ f) x = |
| 60 | ∫ s : Real in 0..t, heatSup s f x := by |
| 61 | unfold heatDuh |
| 62 | rw [intervalIntegral.integral_comp_sub_left |
| 63 | (fun s : Real ↦ heatSup s f x) t] |
| 64 | simp |
| 65 | |
| 66 | omit [CompleteSpace F] in |
| 67 | theorem heatDuh_int {t : ℝ} (ht : 0 < t) {K : ℝ≥0} |
| 68 | (f : ℝ → BoundedContinuousFunction V F) |
| 69 | (hf : ∀ s ∈ Set.Icc (0 : ℝ) t, ‖f s‖ ≤ K) (x : V) |
| 70 | (hmeas : AEStronglyMeasurable |
| 71 | (fun s : ℝ => heatSup (t - s) (f s) x) |
| 72 | (volume.restrict (Set.uIoc (0 : ℝ) t))) : |
| 73 | IntervalIntegrable |
| 74 | (fun s : ℝ => heatSup (t - s) (f s) x) volume 0 t := by |
| 75 | apply (d0DuhMajor_intble t K).mono_fun' hmeas |
| 76 | have hne : ∀ᵐ s ∂(volume : Measure ℝ), s ≠ t := by |
| 77 | simp [ae_iff, measure_singleton] |
| 78 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 79 | ae_restrict_of_ae (s := Set.uIoc (0 : ℝ) t) hne] with s hs hst |
| 80 | rw [Set.uIoc_of_le ht.le] at hs |
| 81 | have hstlt : s < t := lt_of_le_of_ne hs.2 hst |
| 82 | calc |
| 83 | ‖heatSup (t - s) (f s) x‖ ≤ ‖f s‖ := |
| 84 | heatSup_contract (sub_pos.mpr hstlt) (f s) x |
| 85 | _ ≤ K := hf s ⟨hs.1.le, hs.2⟩ |
| 86 | _ = d0DuhMajor K := by rfl |
| 87 | |
| 88 | omit [CompleteSpace F] in |
| 89 | theorem heatDuh_norm {t : ℝ} (ht : 0 < t) {K : ℝ≥0} |
| 90 | (f : ℝ → BoundedContinuousFunction V F) |
| 91 | (hf : ∀ s ∈ Set.Icc (0 : ℝ) t, ‖f s‖ ≤ K) (x : V) |
| 92 | (hmeas : AEStronglyMeasurable |
| 93 | (fun s : ℝ => heatSup (t - s) (f s) x) |
| 94 | (volume.restrict (Set.uIoc (0 : ℝ) t))) : |
| 95 | ‖heatDuh t f x‖ ≤ t * (K : ℝ) := by |
| 96 | have hint := heatDuh_int ht f hf x hmeas |
| 97 | unfold heatDuh |
| 98 | calc |
| 99 | ‖∫ s : ℝ in 0..t, heatSup (t - s) (f s) x‖ ≤ |
| 100 | ∫ s : ℝ in 0..t, ‖heatSup (t - s) (f s) x‖ := |
| 101 | intervalIntegral.norm_integral_le_integral_norm ht.le |
| 102 | _ ≤ ∫ _ : ℝ in 0..t, d0DuhMajor K := by |
| 103 | apply intervalIntegral.integral_mono_on_of_le_Ioo ht.le hint.norm |
| 104 | (d0DuhMajor_intble t K) |
| 105 | intro s hs |
| 106 | calc |
| 107 | ‖heatSup (t - s) (f s) x‖ ≤ ‖f s‖ := |
| 108 | heatSup_contract (sub_pos.mpr hs.2) (f s) x |
| 109 | _ ≤ K := hf s ⟨hs.1.le, hs.2.le⟩ |
| 110 | _ = d0DuhMajor K := by rfl |
| 111 | _ = t * (K : ℝ) := d0DuhMajor_int t K |
| 112 | |
| 113 | omit [CompleteSpace F] in |
| 114 | theorem heatDuh_sqrt {t : ℝ} (ht : 0 < t) (ht1 : t ≤ 1) {K : ℝ≥0} |
| 115 | (f : ℝ → BoundedContinuousFunction V F) |
| 116 | (hf : ∀ s ∈ Set.Icc (0 : ℝ) t, ‖f s‖ ≤ K) (x : V) |
| 117 | (hmeas : AEStronglyMeasurable |
| 118 | (fun s : ℝ => heatSup (t - s) (f s) x) |
| 119 | (volume.restrict (Set.uIoc (0 : ℝ) t))) : |
| 120 | ‖heatDuh t f x‖ ≤ Real.sqrt t * (K : ℝ) := by |
| 121 | have htsqrt : t ≤ Real.sqrt t := by |
| 122 | have hsqrt_le : Real.sqrt t ≤ 1 := Real.sqrt_le_one.mpr ht1 |
| 123 | nlinarith [Real.sq_sqrt ht.le, Real.sqrt_nonneg t] |
| 124 | exact (heatDuh_norm ht f hf x hmeas).trans |
| 125 | (mul_le_mul_of_nonneg_right htsqrt (NNReal.coe_nonneg K)) |
| 126 | end ValuePotential |
| 127 | |
| 128 | section GradientPotential |
| 129 | |
| 130 | variable {V F : Type*} |
| 131 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 132 | [MeasurableSpace V] [BorelSpace V] |
| 133 | [Nontrivial V] |
| 134 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 135 | |
| 136 | def d1DuhConst (v : V) (K : ℝ≥0) : ℝ := |
| 137 | ‖v‖ * (K : ℝ) * heatC1 V |
| 138 | |
| 139 | def d1DuhMajor (v : V) (K : ℝ≥0) (t s : ℝ) : ℝ := |
| 140 | d1DuhConst v K * heatScale12 (t - s) |
| 141 | |
| 142 | omit [Nontrivial V] in |
| 143 | theorem d1DuhMajor_intble {t : ℝ} (v : V) (K : ℝ≥0) : |
| 144 | IntervalIntegrable (d1DuhMajor v K t) volume 0 t := by |
| 145 | exact (scale12_intble).const_mul (d1DuhConst v K) |
| 146 | |
| 147 | omit [Nontrivial V] in |
| 148 | theorem d1DuhMajor_int {t : ℝ} (v : V) (K : ℝ≥0) : |
| 149 | ∫ s : ℝ in 0..t, d1DuhMajor v K t s = |
| 150 | d1DuhConst v K * (2 * t ^ (1 / 2 : ℝ)) := by |
| 151 | unfold d1DuhMajor |
| 152 | rw [intervalIntegral.integral_const_mul, timeScale12_int] |
| 153 | |
| 154 | def heatD1Duh (t : ℝ) (v : V) |
| 155 | (f : ℝ → BoundedContinuousFunction V F) (x : V) : F := |
| 156 | ∫ s : ℝ in 0..t, heatD1Sup (t - s) v (f s) x |
| 157 | |
| 158 | omit [CompleteSpace F] in |
| 159 | theorem heatD1Duh_int {t : ℝ} (ht : 0 < t) {K : ℝ≥0} |
| 160 | (f : ℝ → BoundedContinuousFunction V F) |
| 161 | (hf : ∀ s ∈ Set.Icc (0 : ℝ) t, ‖f s‖ ≤ K) |
| 162 | (v x : V) |
| 163 | (hmeas : AEStronglyMeasurable |
| 164 | (fun s : ℝ => heatD1Sup (t - s) v (f s) x) |
| 165 | (volume.restrict (Set.uIoc (0 : ℝ) t))) : |
| 166 | IntervalIntegrable |
| 167 | (fun s : ℝ => heatD1Sup (t - s) v (f s) x) volume 0 t := by |
| 168 | apply (d1DuhMajor_intble v K).mono_fun' hmeas |
| 169 | have hne : ∀ᵐ s ∂(volume : Measure ℝ), s ≠ t := by |
| 170 | simp [ae_iff, measure_singleton] |
| 171 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 172 | ae_restrict_of_ae (s := Set.uIoc (0 : ℝ) t) hne] with s hs hst |
| 173 | rw [Set.uIoc_of_le ht.le] at hs |
| 174 | have hstlt : s < t := lt_of_le_of_ne hs.2 hst |
| 175 | have hpos : 0 < t - s := sub_pos.mpr hstlt |
| 176 | have hcoef : 0 ≤ ‖v‖ * (heatScale (t - s))⁻¹ * heatC1 V := by |
| 177 | exact mul_nonneg |
| 178 | (mul_nonneg (norm_nonneg _) (inv_nonneg.mpr (heatScale_pos hpos).le)) |
| 179 | (heatC1_nonneg (V := V)) |
| 180 | calc |
| 181 | ‖heatD1Sup (t - s) v (f s) x‖ ≤ |
| 182 | (‖v‖ * (heatScale (t - s))⁻¹ * heatC1 V) * ‖f s‖ := |
| 183 | heatD1Sup_norm hpos v (f s) x |
| 184 | _ ≤ (‖v‖ * (heatScale (t - s))⁻¹ * heatC1 V) * (K : ℝ) := |
| 185 | mul_le_mul_of_nonneg_left (hf s ⟨hs.1.le, hs.2⟩) hcoef |
| 186 | _ = d1DuhMajor v K t s := by |
| 187 | rw [← heatScale12_eq hpos] |
| 188 | unfold d1DuhMajor d1DuhConst |
| 189 | ring |
| 190 | |
| 191 | omit [CompleteSpace F] in |
| 192 | theorem heatD1Duh_norm {t : ℝ} (ht : 0 < t) {K : ℝ≥0} |
| 193 | (f : ℝ → BoundedContinuousFunction V F) |
| 194 | (hf : ∀ s ∈ Set.Icc (0 : ℝ) t, ‖f s‖ ≤ K) |
| 195 | (v x : V) |
| 196 | (hmeas : AEStronglyMeasurable |
| 197 | (fun s : ℝ => heatD1Sup (t - s) v (f s) x) |
| 198 | (volume.restrict (Set.uIoc (0 : ℝ) t))) : |
| 199 | ‖heatD1Duh t v f x‖ ≤ |
| 200 | 2 * d1DuhConst v K * Real.sqrt t := by |
| 201 | have hint := heatD1Duh_int ht f hf v x hmeas |
| 202 | unfold heatD1Duh |
| 203 | calc |
| 204 | ‖∫ s : ℝ in 0..t, heatD1Sup (t - s) v (f s) x‖ ≤ |
| 205 | ∫ s : ℝ in 0..t, ‖heatD1Sup (t - s) v (f s) x‖ := |
| 206 | intervalIntegral.norm_integral_le_integral_norm ht.le |
| 207 | _ ≤ ∫ s : ℝ in 0..t, d1DuhMajor v K t s := by |
| 208 | apply intervalIntegral.integral_mono_on_of_le_Ioo ht.le hint.norm |
| 209 | (d1DuhMajor_intble v K) |
| 210 | intro s hs |
| 211 | have hpos : 0 < t - s := sub_pos.mpr hs.2 |
| 212 | have hcoef : 0 ≤ ‖v‖ * (heatScale (t - s))⁻¹ * heatC1 V := by |
| 213 | exact mul_nonneg |
| 214 | (mul_nonneg (norm_nonneg _) (inv_nonneg.mpr (heatScale_pos hpos).le)) |
| 215 | (heatC1_nonneg (V := V)) |
| 216 | calc |
| 217 | ‖heatD1Sup (t - s) v (f s) x‖ ≤ |
| 218 | (‖v‖ * (heatScale (t - s))⁻¹ * heatC1 V) * ‖f s‖ := |
| 219 | heatD1Sup_norm hpos v (f s) x |
| 220 | _ ≤ (‖v‖ * (heatScale (t - s))⁻¹ * heatC1 V) * |
| 221 | (K : ℝ) := |
| 222 | mul_le_mul_of_nonneg_left (hf s ⟨hs.1.le, hs.2.le⟩) hcoef |
| 223 | _ = d1DuhMajor v K t s := by |
| 224 | rw [← heatScale12_eq hpos] |
| 225 | unfold d1DuhMajor d1DuhConst |
| 226 | ring |
| 227 | _ = d1DuhConst v K * (2 * t ^ (1 / 2 : ℝ)) := |
| 228 | d1DuhMajor_int v K |
| 229 | _ = 2 * d1DuhConst v K * Real.sqrt t := by |
| 230 | rw [Real.sqrt_eq_rpow] |
| 231 | ring |
| 232 | |
| 233 | end GradientPotential |
| 234 | |
| 235 | end Poincare.Parabolic.Interior.Kernel |