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/HeatKernelHigher.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.Evolution |
| 13 | |
| 14 | /-! |
| 15 | # Interior heat kernel: HigherDerivatives |
| 16 | |
| 17 | Adapted from Chow--Liao--Qin, HeatKernelHigher.lean, revision |
| 18 | 1b535dd102b94cc42b107cca27059687888f08b3. |
| 19 | Copyright 2026 The DifferentialGeometry contributors. Apache-2.0. |
| 20 | See references/ricci-flow/chow-liao-qin-2026/interior-hessian-reuse.md. |
| 21 | The adaptation changes import paths and namespaces. |
| 22 | -/ |
| 23 | |
| 24 | noncomputable section |
| 25 | |
| 26 | open MeasureTheory Real |
| 27 | open scoped RealInnerProductSpace |
| 28 | |
| 29 | namespace Poincare.Parabolic.Interior.Kernel |
| 30 | |
| 31 | section ThirdDerivative |
| 32 | |
| 33 | variable {V : Type*} |
| 34 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 35 | [MeasurableSpace V] [BorelSpace V] |
| 36 | [Nontrivial V] |
| 37 | |
| 38 | def baseD3 (u v w x : V) : ℝ := |
| 39 | (-(8 : ℝ)⁻¹ * ⟪x, u⟫ * ⟪x, v⟫ * ⟪x, w⟫ + |
| 40 | (4 : ℝ)⁻¹ * |
| 41 | (⟪u, v⟫ * ⟪x, w⟫ + ⟪u, w⟫ * ⟪x, v⟫ + |
| 42 | ⟪v, w⟫ * ⟪x, u⟫)) * |
| 43 | baseHeat x |
| 44 | |
| 45 | def baseD3Map (v w x : V) : V →L[ℝ] ℝ := |
| 46 | (-(8 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫ * baseHeat x) • innerSL ℝ x + |
| 47 | ((4 : ℝ)⁻¹ * ⟪x, w⟫ * baseHeat x) • innerSL ℝ v + |
| 48 | ((4 : ℝ)⁻¹ * ⟪x, v⟫ * baseHeat x) • innerSL ℝ w + |
| 49 | ((4 : ℝ)⁻¹ * ⟪v, w⟫ * baseHeat x) • innerSL ℝ x |
| 50 | |
| 51 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 52 | @[simp] theorem baseD3Map_apply (v w x u : V) : |
| 53 | baseD3Map v w x u = baseD3 u v w x := by |
| 54 | simp only [baseD3Map, add_apply, |
| 55 | smul_apply, innerSL_apply_apply, smul_eq_mul] |
| 56 | unfold baseD3 |
| 57 | rw [real_inner_comm v u, real_inner_comm w u] |
| 58 | ring |
| 59 | |
| 60 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 61 | theorem baseD2_hasFDeriv (v w x : V) : |
| 62 | HasFDerivAt (baseD2 v w) (baseD3Map v w x) x := by |
| 63 | have hv : HasFDerivAt (fun y : V => ⟪y, v⟫) (innerSL ℝ v) x := by |
| 64 | simpa [real_inner_comm] using (innerSL ℝ v).hasFDerivAt |
| 65 | have hw : HasFDerivAt (fun y : V => ⟪y, w⟫) (innerSL ℝ w) x := by |
| 66 | simpa [real_inner_comm] using (innerSL ℝ w).hasFDerivAt |
| 67 | have hp := ((hv.mul hw).const_mul (4 : ℝ)⁻¹).sub_const |
| 68 | ((2 : ℝ)⁻¹ * ⟪v, w⟫) |
| 69 | have h := hp.mul (baseHeat_hasFDeriv x) |
| 70 | have hfun : |
| 71 | (fun y : V => |
| 72 | ((4 : ℝ)⁻¹ * (⟪y, v⟫ * ⟪y, w⟫) - (2 : ℝ)⁻¹ * ⟪v, w⟫) * baseHeat y) = |
| 73 | baseD2 v w := by |
| 74 | funext y |
| 75 | simp only [baseD2] |
| 76 | ring |
| 77 | have hderiv : |
| 78 | ((4 : ℝ)⁻¹ * (⟪x, v⟫ * ⟪x, w⟫) - (2 : ℝ)⁻¹ * ⟪v, w⟫) • baseD1Map x + |
| 79 | baseHeat x • (4 : ℝ)⁻¹ • |
| 80 | (⟪x, v⟫ • innerSL ℝ w + ⟪x, w⟫ • innerSL ℝ v) = |
| 81 | baseD3Map v w x := by |
| 82 | ext u |
| 83 | simp only [baseD1Map, baseD3Map, add_apply, |
| 84 | smul_apply, |
| 85 | innerSL_apply_apply, smul_eq_mul] |
| 86 | ring |
| 87 | rw [← hfun] |
| 88 | exact h.congr_fderiv hderiv |
| 89 | |
| 90 | def baseD3Maj (x : V) : ℝ := |
| 91 | ((8 : ℝ)⁻¹ * ‖x‖ ^ 3 + (3 / 4 : ℝ) * ‖x‖) * baseHeat x |
| 92 | |
| 93 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 94 | theorem baseD3Maj_nonneg (x : V) : 0 ≤ baseD3Maj x := by |
| 95 | unfold baseD3Maj |
| 96 | exact mul_nonneg |
| 97 | (add_nonneg |
| 98 | (mul_nonneg (by positivity) (pow_nonneg (norm_nonneg x) _)) |
| 99 | (mul_nonneg (by positivity) (norm_nonneg x))) |
| 100 | (baseHeat_nonneg x) |
| 101 | |
| 102 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 103 | theorem baseD3_bound (u v w x : V) : |
| 104 | ‖baseD3 u v w x‖ ≤ ‖u‖ * ‖v‖ * ‖w‖ * baseD3Maj x := by |
| 105 | let A : ℝ := -(8 : ℝ)⁻¹ * ⟪x, u⟫ * ⟪x, v⟫ * ⟪x, w⟫ |
| 106 | let B : ℝ := (4 : ℝ)⁻¹ * |
| 107 | (⟪u, v⟫ * ⟪x, w⟫ + ⟪u, w⟫ * ⟪x, v⟫ + |
| 108 | ⟪v, w⟫ * ⟪x, u⟫) |
| 109 | have hA : |A| ≤ |
| 110 | (8 : ℝ)⁻¹ * (‖x‖ * ‖u‖) * (‖x‖ * ‖v‖) * (‖x‖ * ‖w‖) := by |
| 111 | dsimp [A] |
| 112 | rw [abs_mul, abs_mul, abs_mul, abs_neg, |
| 113 | abs_of_nonneg (by positivity : (0 : ℝ) ≤ (8 : ℝ)⁻¹)] |
| 114 | gcongr |
| 115 | · exact abs_real_inner_le_norm x u |
| 116 | · exact abs_real_inner_le_norm x v |
| 117 | · exact abs_real_inner_le_norm x w |
| 118 | have huv : |⟪u, v⟫ * ⟪x, w⟫| ≤ |
| 119 | (‖u‖ * ‖v‖) * (‖x‖ * ‖w‖) := by |
| 120 | rw [abs_mul] |
| 121 | exact mul_le_mul (abs_real_inner_le_norm u v) |
| 122 | (abs_real_inner_le_norm x w) (abs_nonneg _) |
| 123 | (mul_nonneg (norm_nonneg u) (norm_nonneg v)) |
| 124 | have huw : |⟪u, w⟫ * ⟪x, v⟫| ≤ |
| 125 | (‖u‖ * ‖w‖) * (‖x‖ * ‖v‖) := by |
| 126 | rw [abs_mul] |
| 127 | exact mul_le_mul (abs_real_inner_le_norm u w) |
| 128 | (abs_real_inner_le_norm x v) (abs_nonneg _) |
| 129 | (mul_nonneg (norm_nonneg u) (norm_nonneg w)) |
| 130 | have hvw : |⟪v, w⟫ * ⟪x, u⟫| ≤ |
| 131 | (‖v‖ * ‖w‖) * (‖x‖ * ‖u‖) := by |
| 132 | rw [abs_mul] |
| 133 | exact mul_le_mul (abs_real_inner_le_norm v w) |
| 134 | (abs_real_inner_le_norm x u) (abs_nonneg _) |
| 135 | (mul_nonneg (norm_nonneg v) (norm_nonneg w)) |
| 136 | have hB : |B| ≤ (3 / 4 : ℝ) * ‖x‖ * (‖u‖ * ‖v‖ * ‖w‖) := by |
| 137 | dsimp [B] |
| 138 | rw [abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ (4 : ℝ)⁻¹)] |
| 139 | calc |
| 140 | (4 : ℝ)⁻¹ * |
| 141 | |⟪u, v⟫ * ⟪x, w⟫ + ⟪u, w⟫ * ⟪x, v⟫ + |
| 142 | ⟪v, w⟫ * ⟪x, u⟫| ≤ |
| 143 | (4 : ℝ)⁻¹ * |
| 144 | (|⟪u, v⟫ * ⟪x, w⟫| + |⟪u, w⟫ * ⟪x, v⟫| + |
| 145 | |⟪v, w⟫ * ⟪x, u⟫|) := by |
| 146 | gcongr |
| 147 | exact (abs_add_le _ _).trans |
| 148 | (add_le_add (abs_add_le _ _) (le_refl _)) |
| 149 | _ ≤ (4 : ℝ)⁻¹ * |
| 150 | ((‖u‖ * ‖v‖) * (‖x‖ * ‖w‖) + |
| 151 | (‖u‖ * ‖w‖) * (‖x‖ * ‖v‖) + |
| 152 | (‖v‖ * ‖w‖) * (‖x‖ * ‖u‖)) := by |
| 153 | gcongr |
| 154 | _ = (3 / 4 : ℝ) * ‖x‖ * (‖u‖ * ‖v‖ * ‖w‖) := by ring |
| 155 | unfold baseD3 baseD3Maj |
| 156 | rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (baseHeat_nonneg x)] |
| 157 | calc |
| 158 | |A + B| * baseHeat x ≤ (|A| + |B|) * baseHeat x := by |
| 159 | exact mul_le_mul_of_nonneg_right (abs_add_le A B) (baseHeat_nonneg x) |
| 160 | _ ≤ ((8 : ℝ)⁻¹ * (‖x‖ * ‖u‖) * (‖x‖ * ‖v‖) * |
| 161 | (‖x‖ * ‖w‖) + |
| 162 | (3 / 4 : ℝ) * ‖x‖ * (‖u‖ * ‖v‖ * ‖w‖)) * |
| 163 | baseHeat x := by |
| 164 | exact mul_le_mul_of_nonneg_right (add_le_add hA hB) (baseHeat_nonneg x) |
| 165 | _ = ‖u‖ * ‖v‖ * ‖w‖ * |
| 166 | (((8 : ℝ)⁻¹ * ‖x‖ ^ 3 + (3 / 4 : ℝ) * ‖x‖) * |
| 167 | baseHeat x) := by ring |
| 168 | |
| 169 | theorem baseD3Maj_int : Integrable (baseD3Maj : V → ℝ) := by |
| 170 | have h3 := (gaussMoment_int (V := V) 3 |
| 171 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 172 | ((8 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) |
| 173 | have h1 := (gaussMoment_int (V := V) 1 |
| 174 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 175 | ((3 / 4 : ℝ) * (baseHeatMass V)⁻¹) |
| 176 | have heq : baseD3Maj = fun x : V => |
| 177 | ((8 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) * |
| 178 | (‖x‖ ^ 3 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) + |
| 179 | ((3 / 4 : ℝ) * (baseHeatMass V)⁻¹) * |
| 180 | (‖x‖ ^ 1 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) := by |
| 181 | funext x |
| 182 | unfold baseD3Maj baseHeat |
| 183 | ring |
| 184 | rw [heq] |
| 185 | exact h3.add h1 |
| 186 | |
| 187 | def heatC3 (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℝ V] |
| 188 | [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] : ℝ := |
| 189 | ∫ x : V, baseD3Maj x |
| 190 | |
| 191 | omit [Nontrivial V] in |
| 192 | theorem heatC3_nonneg : 0 ≤ heatC3 V := |
| 193 | integral_nonneg baseD3Maj_nonneg |
| 194 | |
| 195 | def heatD3Maj (t : ℝ) (x : V) : ℝ := |
| 196 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 197 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 198 | baseD3Maj ((heatScale t)⁻¹ • x) |
| 199 | |
| 200 | def heatD3 (t : ℝ) (u v w x : V) : ℝ := |
| 201 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 202 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 203 | baseD3 u v w ((heatScale t)⁻¹ • x) |
| 204 | |
| 205 | def heatD3Map (t : ℝ) (v w x : V) : V →L[ℝ] ℝ := |
| 206 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 207 | (heatScale t)⁻¹ * (heatScale t)⁻¹) • |
| 208 | baseD3Map v w ((heatScale t)⁻¹ • x) |
| 209 | |
| 210 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 211 | @[simp] theorem heatD3Map_apply (t : ℝ) (v w x u : V) : |
| 212 | heatD3Map t v w x u = heatD3 t u v w x := by |
| 213 | simp [heatD3Map, heatD3] |
| 214 | |
| 215 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 216 | theorem heatD2_hasFDeriv {t : ℝ} (v w x : V) : |
| 217 | HasFDerivAt (heatD2 t v w) (heatD3Map t v w x) x := by |
| 218 | let S : V →L[ℝ] V := (heatScale t)⁻¹ • ContinuousLinearMap.id ℝ V |
| 219 | have hS : HasFDerivAt (fun y : V => (heatScale t)⁻¹ • y) S x := by |
| 220 | exact S.hasFDerivAt.congr_of_eventuallyEq <| |
| 221 | Filter.Eventually.of_forall fun y => by simp [S] |
| 222 | have h := ((baseD2_hasFDeriv v w ((heatScale t)⁻¹ • x)).comp x hS).const_mul |
| 223 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 224 | (heatScale t)⁻¹) |
| 225 | have hderiv : |
| 226 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 227 | (heatScale t)⁻¹) • |
| 228 | (baseD3Map v w ((heatScale t)⁻¹ • x) ∘L S) = |
| 229 | heatD3Map t v w x := by |
| 230 | ext u |
| 231 | simp [heatD3Map, S, baseD3Map] |
| 232 | ring |
| 233 | exact h.congr_fderiv hderiv |
| 234 | |
| 235 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 236 | omit [FiniteDimensional ℝ V] in |
| 237 | theorem heatD3Maj_nonneg {t : ℝ} (ht : 0 < t) (x : V) : |
| 238 | 0 ≤ heatD3Maj t x := by |
| 239 | unfold heatD3Maj |
| 240 | exact mul_nonneg |
| 241 | (mul_nonneg |
| 242 | (mul_nonneg |
| 243 | (mul_nonneg |
| 244 | (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 245 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 246 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 247 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 248 | (baseD3Maj_nonneg _) |
| 249 | |
| 250 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 251 | omit [FiniteDimensional ℝ V] in |
| 252 | theorem heatD3_bound {t : ℝ} (ht : 0 < t) (u v w x : V) : |
| 253 | ‖heatD3 t u v w x‖ ≤ ‖u‖ * ‖v‖ * ‖w‖ * heatD3Maj t x := by |
| 254 | unfold heatD3 heatD3Maj |
| 255 | rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_mul, abs_mul] |
| 256 | simp only [abs_inv, abs_pow, abs_of_nonneg (heatScale_pos ht).le] |
| 257 | have hfront : 0 ≤ |
| 258 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 259 | (heatScale t)⁻¹ * (heatScale t)⁻¹ := by |
| 260 | exact mul_nonneg |
| 261 | (mul_nonneg |
| 262 | (mul_nonneg |
| 263 | (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 264 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 265 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 266 | (inv_nonneg.mpr (heatScale_pos ht).le) |
| 267 | calc |
| 268 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 269 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 270 | ‖baseD3 u v w ((heatScale t)⁻¹ • x)‖ ≤ |
| 271 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 272 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 273 | (‖u‖ * ‖v‖ * ‖w‖ * baseD3Maj ((heatScale t)⁻¹ • x)) := by |
| 274 | exact mul_le_mul_of_nonneg_left (baseD3_bound u v w _) hfront |
| 275 | _ = ‖u‖ * ‖v‖ * ‖w‖ * |
| 276 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 277 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 278 | baseD3Maj ((heatScale t)⁻¹ • x)) := by ring |
| 279 | |
| 280 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 281 | omit [FiniteDimensional ℝ V] in |
| 282 | theorem heatD3Map_norm_le {t : Real} (ht : 0 < t) (v w x : V) : |
| 283 | ‖heatD3Map t v w x‖ ≤ ‖v‖ * ‖w‖ * heatD3Maj t x := by |
| 284 | apply ContinuousLinearMap.opNorm_le_bound (heatD3Map t v w x) |
| 285 | (mul_nonneg (mul_nonneg (norm_nonneg v) (norm_nonneg w)) |
| 286 | (heatD3Maj_nonneg ht x)) |
| 287 | intro u |
| 288 | rw [heatD3Map_apply] |
| 289 | exact (heatD3_bound ht u v w x).trans_eq (by ring) |
| 290 | |
| 291 | theorem heatD3Maj_int {t : ℝ} (ht : 0 < t) : |
| 292 | Integrable (heatD3Maj t : V → ℝ) := by |
| 293 | unfold heatD3Maj |
| 294 | exact (baseD3Maj_int (V := V)).comp_smul |
| 295 | (inv_ne_zero (heatScale_pos ht).ne') |>.const_mul _ |
| 296 | |
| 297 | omit [Nontrivial V] in |
| 298 | theorem integral_heatD3Maj {t : ℝ} (ht : 0 < t) : |
| 299 | ∫ x : V, heatD3Maj t x = |
| 300 | t⁻¹ * (heatScale t)⁻¹ * heatC3 V := by |
| 301 | have hr : 0 < heatScale t := heatScale_pos ht |
| 302 | have hsqrt : heatScale t ^ 2 = t := by |
| 303 | simpa [heatScale] using Real.sq_sqrt ht.le |
| 304 | have hscale : (heatScale t)⁻¹ * (heatScale t)⁻¹ = t⁻¹ := by |
| 305 | field_simp [hr.ne', ht.ne'] |
| 306 | nlinarith [hsqrt] |
| 307 | unfold heatD3Maj heatC3 |
| 308 | rw [integral_const_mul, |
| 309 | Measure.integral_comp_inv_smul_of_nonneg (volume : Measure V) baseD3Maj hr.le] |
| 310 | simp only [smul_eq_mul] |
| 311 | calc |
| 312 | (heatScale t ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 313 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 314 | (heatScale t ^ Module.finrank ℝ V * ∫ x : V, baseD3Maj x) = |
| 315 | ((heatScale t)⁻¹ * (heatScale t)⁻¹) * |
| 316 | (heatScale t)⁻¹ * ∫ x : V, baseD3Maj x := by |
| 317 | field_simp [hr.ne'] |
| 318 | _ = t⁻¹ * (heatScale t)⁻¹ * ∫ x : V, baseD3Maj x := by rw [hscale] |
| 319 | |
| 320 | theorem integral_norm_D3 {t : ℝ} (ht : 0 < t) (u v w : V) : |
| 321 | (∫ x : V, ‖heatD3 t u v w x‖) ≤ |
| 322 | ‖u‖ * ‖v‖ * ‖w‖ * t⁻¹ * (heatScale t)⁻¹ * heatC3 V := by |
| 323 | have hker : Integrable (fun x : V => ‖heatD3 t u v w x‖) := by |
| 324 | refine ((heatD3Maj_int (V := V) ht).const_mul (‖u‖ * ‖v‖ * ‖w‖)).mono' ?_ ?_ |
| 325 | · apply Continuous.aestronglyMeasurable |
| 326 | unfold heatD3 baseD3 baseHeat baseHeatMass heatScale |
| 327 | fun_prop |
| 328 | · filter_upwards with x |
| 329 | simpa [mul_assoc] using heatD3_bound ht u v w x |
| 330 | calc |
| 331 | (∫ x : V, ‖heatD3 t u v w x‖) ≤ |
| 332 | ∫ x : V, (‖u‖ * ‖v‖ * ‖w‖) * heatD3Maj t x := by |
| 333 | exact integral_mono hker |
| 334 | ((heatD3Maj_int (V := V) ht).const_mul (‖u‖ * ‖v‖ * ‖w‖)) |
| 335 | (fun x => by simpa [mul_assoc] using heatD3_bound ht u v w x) |
| 336 | _ = (‖u‖ * ‖v‖ * ‖w‖) * |
| 337 | (t⁻¹ * (heatScale t)⁻¹ * heatC3 V) := by |
| 338 | rw [integral_const_mul, integral_heatD3Maj ht] |
| 339 | _ = ‖u‖ * ‖v‖ * ‖w‖ * t⁻¹ * (heatScale t)⁻¹ * heatC3 V := by ring |
| 340 | |
| 341 | end ThirdDerivative |
| 342 | |
| 343 | section SecondTimeDerivative |
| 344 | |
| 345 | variable {V : Type*} |
| 346 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 347 | [MeasurableSpace V] [BorelSpace V] |
| 348 | [Nontrivial V] |
| 349 | |
| 350 | def baseD2Dt (v w x : V) : ℝ := |
| 351 | -(((Module.finrank ℝ V : ℝ) + 2) / 2) * baseD2 v w x - |
| 352 | (2 : ℝ)⁻¹ * baseD3 x v w x |
| 353 | |
| 354 | def baseD2DtMaj (x : V) : ℝ := |
| 355 | (((Module.finrank ℝ V : ℝ) + 2) / 2) * baseD2Maj x + |
| 356 | (2 : ℝ)⁻¹ * ‖x‖ * baseD3Maj x |
| 357 | |
| 358 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 359 | omit [FiniteDimensional ℝ V] in |
| 360 | theorem baseD2DtMaj_nonneg (x : V) : 0 ≤ baseD2DtMaj x := by |
| 361 | unfold baseD2DtMaj |
| 362 | exact add_nonneg |
| 363 | (mul_nonneg (by positivity) (baseD2Maj_nonneg x)) |
| 364 | (mul_nonneg |
| 365 | (mul_nonneg (by positivity) (norm_nonneg x)) |
| 366 | (baseD3Maj_nonneg x)) |
| 367 | |
| 368 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 369 | omit [FiniteDimensional ℝ V] in |
| 370 | theorem baseD2Dt_bound (v w x : V) : |
| 371 | ‖baseD2Dt v w x‖ ≤ ‖v‖ * ‖w‖ * baseD2DtMaj x := by |
| 372 | let c : ℝ := ((Module.finrank ℝ V : ℝ) + 2) / 2 |
| 373 | have hc : 0 ≤ c := by dsimp [c]; positivity |
| 374 | unfold baseD2Dt baseD2DtMaj |
| 375 | rw [Real.norm_eq_abs] |
| 376 | calc |
| 377 | |-c * baseD2 v w x - (2 : ℝ)⁻¹ * baseD3 x v w x| ≤ |
| 378 | |-c * baseD2 v w x| + |(2 : ℝ)⁻¹ * baseD3 x v w x| := |
| 379 | abs_sub _ _ |
| 380 | _ = c * ‖baseD2 v w x‖ + (2 : ℝ)⁻¹ * ‖baseD3 x v w x‖ := by |
| 381 | rw [abs_mul, abs_mul, abs_neg, Real.norm_eq_abs, Real.norm_eq_abs, |
| 382 | abs_of_nonneg hc, abs_of_nonneg (by positivity : (0 : ℝ) ≤ (2 : ℝ)⁻¹)] |
| 383 | _ ≤ c * (‖v‖ * ‖w‖ * baseD2Maj x) + |
| 384 | (2 : ℝ)⁻¹ * (‖x‖ * ‖v‖ * ‖w‖ * baseD3Maj x) := by |
| 385 | exact add_le_add |
| 386 | (mul_le_mul_of_nonneg_left (baseD2_bound v w x) hc) |
| 387 | (mul_le_mul_of_nonneg_left (baseD3_bound x v w x) (by positivity)) |
| 388 | _ = ‖v‖ * ‖w‖ * |
| 389 | (c * baseD2Maj x + (2 : ℝ)⁻¹ * ‖x‖ * baseD3Maj x) := by ring |
| 390 | |
| 391 | private theorem baseD3First_int : |
| 392 | Integrable (fun x : V => ‖x‖ * baseD3Maj x) := by |
| 393 | have h4 := (gaussMoment_int (V := V) 4 |
| 394 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 395 | ((8 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) |
| 396 | have h2 := (gaussMoment_int (V := V) 2 |
| 397 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 398 | ((3 / 4 : ℝ) * (baseHeatMass V)⁻¹) |
| 399 | have heq : (fun x : V => ‖x‖ * baseD3Maj x) = fun x : V => |
| 400 | ((8 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) * |
| 401 | (‖x‖ ^ 4 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) + |
| 402 | ((3 / 4 : ℝ) * (baseHeatMass V)⁻¹) * |
| 403 | (‖x‖ ^ 2 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) := by |
| 404 | funext x |
| 405 | unfold baseD3Maj baseHeat |
| 406 | ring |
| 407 | rw [heq] |
| 408 | exact h4.add h2 |
| 409 | |
| 410 | theorem baseD2DtMaj_int : Integrable (baseD2DtMaj : V → ℝ) := by |
| 411 | have h0 := (baseD2Maj_int (V := V)).const_mul |
| 412 | (((Module.finrank ℝ V : ℝ) + 2) / 2) |
| 413 | have h1 := (baseD3First_int (V := V)).const_mul (2 : ℝ)⁻¹ |
| 414 | have heq : baseD2DtMaj = fun x : V => |
| 415 | (((Module.finrank ℝ V : ℝ) + 2) / 2) * baseD2Maj x + |
| 416 | (2 : ℝ)⁻¹ * (‖x‖ * baseD3Maj x) := by |
| 417 | funext x |
| 418 | unfold baseD2DtMaj |
| 419 | ring |
| 420 | rw [heq] |
| 421 | exact h0.add h1 |
| 422 | |
| 423 | def heatC2Dt (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℝ V] |
| 424 | [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] : ℝ := |
| 425 | ∫ x : V, baseD2DtMaj x |
| 426 | |
| 427 | omit [Nontrivial V] in |
| 428 | theorem heatC2Dt_nonneg : 0 ≤ heatC2Dt V := |
| 429 | integral_nonneg baseD2DtMaj_nonneg |
| 430 | |
| 431 | def heatD2Dt (t : ℝ) (v w x : V) : ℝ := |
| 432 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (t ^ 2)⁻¹ * |
| 433 | baseD2Dt v w ((heatScale t)⁻¹ • x) |
| 434 | |
| 435 | def heatD2DtMaj (t : ℝ) (x : V) : ℝ := |
| 436 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (t ^ 2)⁻¹ * |
| 437 | baseD2DtMaj ((heatScale t)⁻¹ • x) |
| 438 | |
| 439 | omit [MeasurableSpace V] [BorelSpace V] in |
| 440 | theorem heatD2_time {t : ℝ} (ht : 0 < t) (v w x : V) : |
| 441 | HasDerivAt (fun s : ℝ => heatD2 s v w x) (heatD2Dt t v w x) t := by |
| 442 | let n := Module.finrank ℝ V |
| 443 | let r := heatScale t |
| 444 | let z := r⁻¹ • x |
| 445 | have hr : 0 < r := by |
| 446 | simpa only [r] using heatScale_pos ht |
| 447 | have hrsq : r ^ 2 = t := by |
| 448 | simpa only [r, heatScale] using Real.sq_sqrt ht.le |
| 449 | have hn : 0 < n := by |
| 450 | simpa only [n] using (Module.finrank_pos : 0 < Module.finrank ℝ V) |
| 451 | have hscale : HasDerivAt heatScale (1 / (2 * r)) t := by |
| 452 | exact (Real.hasDerivAt_sqrt ht.ne').congr_of_eventuallyEq <| |
| 453 | Filter.Eventually.of_forall fun s => by rfl |
| 454 | have hpow0 := (hscale.fun_pow n).inv (pow_ne_zero n hr.ne') |
| 455 | change HasDerivAt (fun s : ℝ => ((heatScale s) ^ n)⁻¹) |
| 456 | (-((n : ℝ) * r ^ (n - 1) * (1 / (2 * r))) / (r ^ n) ^ 2) t at hpow0 |
| 457 | have hpow : HasDerivAt (fun s : ℝ => ((heatScale s) ^ n)⁻¹) |
| 458 | (-((n : ℝ) / (2 * t)) * (r ^ n)⁻¹) t := by |
| 459 | convert hpow0 using 1 |
| 460 | rw [← hrsq] |
| 461 | obtain ⟨m, hm⟩ := Nat.exists_eq_succ_of_ne_zero hn.ne' |
| 462 | rw [hm] |
| 463 | simp only [Nat.cast_succ, Nat.succ_sub_one, pow_succ] |
| 464 | field_simp [hr.ne'] |
| 465 | have hinv := hscale.inv hr.ne' |
| 466 | change HasDerivAt (fun s : ℝ => (heatScale s)⁻¹) |
| 467 | (-(1 / (2 * r)) / r ^ 2) t at hinv |
| 468 | have hcoeff0 := (hpow.mul hinv).mul hinv |
| 469 | simp only [Pi.mul_apply] at hcoeff0 |
| 470 | rw [show heatScale t = r from rfl] at hcoeff0 |
| 471 | have hcoeff : |
| 472 | HasDerivAt |
| 473 | (fun s : ℝ => ((heatScale s) ^ n)⁻¹ * (heatScale s)⁻¹ * |
| 474 | (heatScale s)⁻¹) |
| 475 | (-(((n : ℝ) + 2) / 2) * (r ^ n)⁻¹ * (t ^ 2)⁻¹) t := by |
| 476 | refine hcoeff0.congr_deriv ?_ |
| 477 | rw [← hrsq] |
| 478 | field_simp [hr.ne'] |
| 479 | ring |
| 480 | have hz0 := hinv.smul_const x |
| 481 | change HasDerivAt (fun s : ℝ => (heatScale s)⁻¹ • x) |
| 482 | ((-(1 / (2 * r)) / r ^ 2) • x) t at hz0 |
| 483 | have hz : HasDerivAt (fun s : ℝ => (heatScale s)⁻¹ • x) |
| 484 | ((-(2 * t)⁻¹) • z) t := by |
| 485 | convert hz0 using 1 |
| 486 | simp only [z, smul_smul] |
| 487 | congr 1 |
| 488 | rw [← hrsq] |
| 489 | field_simp [hr.ne'] |
| 490 | have hbase0 : |
| 491 | HasDerivAt (fun s : ℝ => baseD2 v w ((heatScale s)⁻¹ • x)) |
| 492 | (baseD3Map v w z ((-(2 * t)⁻¹) • z)) t := by |
| 493 | exact (baseD2_hasFDeriv v w z).comp_hasDerivAt t hz |
| 494 | have hbase : |
| 495 | HasDerivAt (fun s : ℝ => baseD2 v w ((heatScale s)⁻¹ • x)) |
| 496 | (-(2 * t)⁻¹ * baseD3 z v w z) t := by |
| 497 | convert hbase0 using 1 |
| 498 | simp only [baseD3Map_apply] |
| 499 | unfold baseD3 |
| 500 | simp only [real_inner_smul_right, real_inner_smul_left] |
| 501 | ring |
| 502 | have hprod := hcoeff.mul hbase |
| 503 | have hderiv : |
| 504 | -(((n : ℝ) + 2) / 2) * (r ^ n)⁻¹ * (t ^ 2)⁻¹ * baseD2 v w z + |
| 505 | ((r ^ n)⁻¹ * r⁻¹ * r⁻¹) * (-(2 * t)⁻¹ * baseD3 z v w z) = |
| 506 | heatD2Dt t v w x := by |
| 507 | unfold heatD2Dt baseD2Dt |
| 508 | simp only [n, z] |
| 509 | rw [show heatScale t = r from rfl] |
| 510 | rw [← hrsq] |
| 511 | field_simp [hr.ne'] |
| 512 | ring |
| 513 | exact (hprod.congr_deriv hderiv).congr_of_eventuallyEq <| |
| 514 | Filter.Eventually.of_forall fun s => by rfl |
| 515 | |
| 516 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 517 | omit [FiniteDimensional ℝ V] in |
| 518 | theorem heatD2DtMaj_nonneg {t : ℝ} (ht : 0 < t) (x : V) : |
| 519 | 0 ≤ heatD2DtMaj t x := by |
| 520 | unfold heatD2DtMaj |
| 521 | exact mul_nonneg |
| 522 | (mul_nonneg |
| 523 | (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 524 | (inv_nonneg.mpr (sq_nonneg t))) |
| 525 | (baseD2DtMaj_nonneg _) |
| 526 | |
| 527 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 528 | omit [FiniteDimensional ℝ V] in |
| 529 | theorem heatD2Dt_bound {t : ℝ} (ht : 0 < t) (v w x : V) : |
| 530 | ‖heatD2Dt t v w x‖ ≤ ‖v‖ * ‖w‖ * heatD2DtMaj t x := by |
| 531 | unfold heatD2Dt heatD2DtMaj |
| 532 | rw [Real.norm_eq_abs, abs_mul, abs_mul, |
| 533 | abs_of_nonneg |
| 534 | (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)), |
| 535 | abs_of_nonneg (inv_nonneg.mpr (sq_nonneg t))] |
| 536 | have hfront : |
| 537 | 0 ≤ ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (t ^ 2)⁻¹ := by |
| 538 | exact mul_nonneg |
| 539 | (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 540 | (inv_nonneg.mpr (sq_nonneg t)) |
| 541 | calc |
| 542 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (t ^ 2)⁻¹ * |
| 543 | ‖baseD2Dt v w ((heatScale t)⁻¹ • x)‖ ≤ |
| 544 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (t ^ 2)⁻¹ * |
| 545 | (‖v‖ * ‖w‖ * baseD2DtMaj ((heatScale t)⁻¹ • x)) := by |
| 546 | exact mul_le_mul_of_nonneg_left (baseD2Dt_bound v w _) hfront |
| 547 | _ = ‖v‖ * ‖w‖ * |
| 548 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (t ^ 2)⁻¹ * |
| 549 | baseD2DtMaj ((heatScale t)⁻¹ • x)) := by ring |
| 550 | |
| 551 | theorem heatD2DtMaj_int {t : ℝ} (ht : 0 < t) : |
| 552 | Integrable (heatD2DtMaj t : V → ℝ) := by |
| 553 | unfold heatD2DtMaj |
| 554 | exact (baseD2DtMaj_int (V := V)).comp_smul |
| 555 | (inv_ne_zero (heatScale_pos ht).ne') |>.const_mul _ |
| 556 | |
| 557 | omit [Nontrivial V] in |
| 558 | theorem integral_heatD2DtMaj {t : ℝ} (ht : 0 < t) : |
| 559 | ∫ x : V, heatD2DtMaj t x = (t ^ 2)⁻¹ * heatC2Dt V := by |
| 560 | have hr : 0 < heatScale t := heatScale_pos ht |
| 561 | unfold heatD2DtMaj heatC2Dt |
| 562 | rw [integral_const_mul, |
| 563 | Measure.integral_comp_inv_smul_of_nonneg (volume : Measure V) baseD2DtMaj hr.le] |
| 564 | simp only [smul_eq_mul] |
| 565 | field_simp [hr.ne'] |
| 566 | |
| 567 | theorem integral_norm_D2Dt {t : ℝ} (ht : 0 < t) (v w : V) : |
| 568 | (∫ x : V, ‖heatD2Dt t v w x‖) ≤ |
| 569 | ‖v‖ * ‖w‖ * (t ^ 2)⁻¹ * heatC2Dt V := by |
| 570 | have hker : Integrable (fun x : V => ‖heatD2Dt t v w x‖) := by |
| 571 | refine ((heatD2DtMaj_int (V := V) ht).const_mul (‖v‖ * ‖w‖)).mono' ?_ ?_ |
| 572 | · apply Continuous.aestronglyMeasurable |
| 573 | unfold heatD2Dt baseD2Dt baseD2 baseD3 baseHeat baseHeatMass heatScale |
| 574 | fun_prop |
| 575 | · filter_upwards with x |
| 576 | simpa [mul_assoc] using heatD2Dt_bound ht v w x |
| 577 | calc |
| 578 | (∫ x : V, ‖heatD2Dt t v w x‖) ≤ |
| 579 | ∫ x : V, (‖v‖ * ‖w‖) * heatD2DtMaj t x := by |
| 580 | exact integral_mono hker |
| 581 | ((heatD2DtMaj_int (V := V) ht).const_mul (‖v‖ * ‖w‖)) |
| 582 | (fun x => by simpa [mul_assoc] using heatD2Dt_bound ht v w x) |
| 583 | _ = (‖v‖ * ‖w‖) * ((t ^ 2)⁻¹ * heatC2Dt V) := by |
| 584 | rw [integral_const_mul, integral_heatD2DtMaj ht] |
| 585 | _ = ‖v‖ * ‖w‖ * (t ^ 2)⁻¹ * heatC2Dt V := by ring |
| 586 | |
| 587 | end SecondTimeDerivative |
| 588 | |
| 589 | end Poincare.Parabolic.Interior.Kernel |
| 590 | |
| 591 | end |