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/HeatKernelLp.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 Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform |
| 13 | import Mathlib.Analysis.InnerProductSpace.Calculus |
| 14 | import Mathlib.MeasureTheory.Constructions.HaarToSphere |
| 15 | import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Continuous |
| 16 | import Mathlib.MeasureTheory.Measure.Haar.NormedSpace |
| 17 | |
| 18 | /-! |
| 19 | # Gaussian estimates for interior heat equations |
| 20 | |
| 21 | Adapted from Chow--Liao--Qin, HeatKernelLp.lean, revision |
| 22 | 1b535dd102b94cc42b107cca27059687888f08b3. |
| 23 | Copyright 2026 The DifferentialGeometry contributors. Apache-2.0. |
| 24 | See references/ricci-flow/chow-liao-qin-2026/interior-hessian-reuse.md. |
| 25 | The adaptation changes import paths and namespaces. |
| 26 | -/ |
| 27 | |
| 28 | noncomputable section |
| 29 | |
| 30 | open MeasureTheory Real |
| 31 | open scoped ENNReal RealInnerProductSpace |
| 32 | |
| 33 | namespace Poincare.Parabolic.Interior.Kernel |
| 34 | |
| 35 | section KernelOperator |
| 36 | |
| 37 | variable {V F : Type*} |
| 38 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 39 | [MeasurableSpace V] [BorelSpace V] |
| 40 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 41 | {p : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (p ≠ ∞)] |
| 42 | |
| 43 | def lpTranslate (y : V) (u : Lp F p (volume : Measure V)) : |
| 44 | Lp F p (volume : Measure V) := |
| 45 | DomAddAct.mk (-y) +ᵥ u |
| 46 | |
| 47 | omit [NormedSpace ℝ F] [CompleteSpace F] in |
| 48 | theorem lpTranslate_cont (u : Lp F p (volume : Measure V)) : |
| 49 | Continuous (fun y : V => lpTranslate y u) := by |
| 50 | unfold lpTranslate |
| 51 | fun_prop |
| 52 | |
| 53 | omit [NormedSpace ℝ F] [CompleteSpace F] [Fact (1 ≤ p)] [Fact (p ≠ ∞)] in |
| 54 | @[simp] theorem lpTranslate_norm (y : V) (u : Lp F p (volume : Measure V)) : |
| 55 | ‖lpTranslate y u‖ = ‖u‖ := by |
| 56 | simp [lpTranslate] |
| 57 | |
| 58 | def lpKernel (η : V → ℝ) (u : Lp F p (volume : Measure V)) : |
| 59 | Lp F p (volume : Measure V) := |
| 60 | ∫ y, η y • lpTranslate y u |
| 61 | |
| 62 | omit [CompleteSpace F] in |
| 63 | theorem lpKernel_integrable {η : V → ℝ} (hη : Integrable η) |
| 64 | (u : Lp F p (volume : Measure V)) : |
| 65 | Integrable (fun y : V => η y • lpTranslate y u) := by |
| 66 | refine (hη.norm.mul_const ‖u‖).mono' ?_ ?_ |
| 67 | · exact hη.aestronglyMeasurable.smul (lpTranslate_cont u).aestronglyMeasurable |
| 68 | · filter_upwards with y |
| 69 | rw [norm_smul, lpTranslate_norm, Real.norm_eq_abs] |
| 70 | |
| 71 | omit [CompleteSpace F] [Fact (p ≠ ∞)] in |
| 72 | theorem lpKernel_norm_le {η : V → ℝ} (hη : Integrable η) |
| 73 | (u : Lp F p (volume : Measure V)) : |
| 74 | ‖lpKernel η u‖ ≤ (∫ y, ‖η y‖) * ‖u‖ := by |
| 75 | unfold lpKernel |
| 76 | calc |
| 77 | ‖∫ y, η y • lpTranslate y u‖ |
| 78 | ≤ ∫ y, ‖η y‖ * ‖u‖ := |
| 79 | norm_integral_le_of_norm_le (hη.norm.mul_const ‖u‖) |
| 80 | (Filter.Eventually.of_forall fun y => by |
| 81 | rw [norm_smul, lpTranslate_norm, Real.norm_eq_abs]) |
| 82 | _ = (∫ y, ‖η y‖) * ‖u‖ := by rw [integral_mul_const] |
| 83 | |
| 84 | omit [CompleteSpace F] [Fact (p ≠ ∞)] in |
| 85 | theorem lpKernel_contract {η : V → ℝ} (hη : Integrable η) |
| 86 | (hη0 : ∀ y, 0 ≤ η y) (hη1 : ∫ y, η y = 1) |
| 87 | (u : Lp F p (volume : Measure V)) : |
| 88 | ‖lpKernel η u‖ ≤ ‖u‖ := by |
| 89 | refine (lpKernel_norm_le hη u).trans_eq ?_ |
| 90 | have habs : (fun y : V => ‖η y‖) = η := by |
| 91 | funext y |
| 92 | simp [Real.norm_eq_abs, abs_of_nonneg (hη0 y)] |
| 93 | rw [habs, hη1, one_mul] |
| 94 | |
| 95 | end KernelOperator |
| 96 | |
| 97 | section OperatorKernel |
| 98 | |
| 99 | variable {V F G : Type*} |
| 100 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 101 | [MeasurableSpace V] [BorelSpace V] |
| 102 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 103 | [NormedAddCommGroup G] [NormedSpace ℝ G] [CompleteSpace G] |
| 104 | {p : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (p ≠ ∞)] |
| 105 | |
| 106 | def liftLp : (F →L[ℝ] G) →L[ℝ] |
| 107 | (Lp F p (volume : Measure V) →L[ℝ] Lp G p (volume : Measure V)) := |
| 108 | LinearMap.mkContinuous |
| 109 | { toFun := fun A => A.compLpL p (volume : Measure V) |
| 110 | map_add' := fun A B => ContinuousLinearMap.add_compLpL A B |
| 111 | map_smul' := fun c A => ContinuousLinearMap.smul_compLpL c A } |
| 112 | 1 |
| 113 | (fun A => by |
| 114 | simpa only [one_mul] using! |
| 115 | (ContinuousLinearMap.norm_compLpL_le (p := p) (μ := (volume : Measure V)) A)) |
| 116 | |
| 117 | omit [CompleteSpace F] [CompleteSpace G] [Fact (p ≠ ∞)] in |
| 118 | @[simp] theorem liftLp_apply (A : F →L[ℝ] G) : |
| 119 | liftLp (V := V) (p := p) A = A.compLpL p (volume : Measure V) := rfl |
| 120 | |
| 121 | omit [CompleteSpace F] [CompleteSpace G] [Fact (p ≠ ∞)] in |
| 122 | theorem liftLp_norm_le (A : F →L[ℝ] G) : |
| 123 | ‖liftLp (V := V) (p := p) A‖ ≤ ‖A‖ := by |
| 124 | simpa [liftLp_apply] using |
| 125 | (ContinuousLinearMap.norm_compLpL_le (p := p) (μ := (volume : Measure V)) A) |
| 126 | |
| 127 | def lpOpIntegrand (K : V → F →L[ℝ] G) |
| 128 | (u : Lp F p (volume : Measure V)) (y : V) : |
| 129 | Lp G p (volume : Measure V) := |
| 130 | (liftLp (V := V) (p := p) (K y)) (lpTranslate y u) |
| 131 | |
| 132 | def lpOpKernel (K : V → F →L[ℝ] G) |
| 133 | (u : Lp F p (volume : Measure V)) : |
| 134 | Lp G p (volume : Measure V) := |
| 135 | ∫ y, lpOpIntegrand K u y |
| 136 | |
| 137 | omit [CompleteSpace F] [CompleteSpace G] in |
| 138 | theorem lpOpIntegrand_aesm {K : V → F →L[ℝ] G} (hK : AEStronglyMeasurable K) |
| 139 | (u : Lp F p (volume : Measure V)) : |
| 140 | AEStronglyMeasurable (lpOpIntegrand K u) := by |
| 141 | have hKl : AEStronglyMeasurable |
| 142 | (fun y : V => liftLp (V := V) (p := p) (K y)) := |
| 143 | (liftLp (V := V) (p := p)).continuous.comp_aestronglyMeasurable hK |
| 144 | have htr : AEStronglyMeasurable (fun y : V => lpTranslate y u) := |
| 145 | (lpTranslate_cont u).aestronglyMeasurable |
| 146 | have h := (ContinuousLinearMap.apply ℝ (Lp G p (volume : Measure V))).aestronglyMeasurable_comp₂ |
| 147 | htr hKl |
| 148 | simpa only [lpOpIntegrand, ContinuousLinearMap.apply_apply] using! h |
| 149 | |
| 150 | omit [CompleteSpace F] [CompleteSpace G] [Fact (p ≠ ∞)] in |
| 151 | theorem lpOpIntegrand_norm (K : V → F →L[ℝ] G) |
| 152 | (u : Lp F p (volume : Measure V)) (y : V) : |
| 153 | ‖lpOpIntegrand K u y‖ ≤ ‖K y‖ * ‖u‖ := by |
| 154 | calc |
| 155 | ‖lpOpIntegrand K u y‖ |
| 156 | ≤ ‖liftLp (V := V) (p := p) (K y)‖ * ‖lpTranslate y u‖ := |
| 157 | (liftLp (V := V) (p := p) (K y)).le_opNorm _ |
| 158 | _ ≤ ‖K y‖ * ‖u‖ := by |
| 159 | rw [lpTranslate_norm] |
| 160 | exact mul_le_mul_of_nonneg_right (liftLp_norm_le (V := V) (p := p) (K y)) |
| 161 | (norm_nonneg _) |
| 162 | |
| 163 | omit [CompleteSpace F] [CompleteSpace G] in |
| 164 | theorem lpOpKernel_int {K : V → F →L[ℝ] G} (hK : Integrable K) |
| 165 | (u : Lp F p (volume : Measure V)) : |
| 166 | Integrable (lpOpIntegrand K u) := by |
| 167 | refine (hK.norm.mul_const ‖u‖).mono' (lpOpIntegrand_aesm hK.aestronglyMeasurable u) ?_ |
| 168 | filter_upwards with y |
| 169 | exact lpOpIntegrand_norm K u y |
| 170 | |
| 171 | omit [CompleteSpace F] [CompleteSpace G] [Fact (p ≠ ∞)] in |
| 172 | theorem lpOpKernel_norm {K : V → F →L[ℝ] G} (hK : Integrable K) |
| 173 | (u : Lp F p (volume : Measure V)) : |
| 174 | ‖lpOpKernel K u‖ ≤ (∫ y, ‖K y‖) * ‖u‖ := by |
| 175 | unfold lpOpKernel |
| 176 | calc |
| 177 | ‖∫ y, lpOpIntegrand K u y‖ |
| 178 | ≤ ∫ y, ‖K y‖ * ‖u‖ := |
| 179 | norm_integral_le_of_norm_le (hK.norm.mul_const ‖u‖) |
| 180 | (Filter.Eventually.of_forall fun y => lpOpIntegrand_norm K u y) |
| 181 | _ = (∫ y, ‖K y‖) * ‖u‖ := by rw [integral_mul_const] |
| 182 | |
| 183 | end OperatorKernel |
| 184 | |
| 185 | section Gaussian |
| 186 | |
| 187 | variable {V : Type*} |
| 188 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 189 | [MeasurableSpace V] [BorelSpace V] |
| 190 | [Nontrivial V] |
| 191 | |
| 192 | theorem gauss_integrable {a : ℝ} (ha : 0 < a) : |
| 193 | Integrable (fun x : V => Real.exp (-a * ‖x‖ ^ 2)) := by |
| 194 | apply (integrable_fun_norm_addHaar (volume : Measure V) |
| 195 | (f := fun r : ℝ => Real.exp (-a * r ^ 2))).2 |
| 196 | have h := integrableOn_rpow_mul_exp_neg_mul_sq ha |
| 197 | (s := ((Module.finrank ℝ V - 1 : ℕ) : ℝ)) |
| 198 | (lt_of_lt_of_le (by norm_num) (Nat.cast_nonneg _)) |
| 199 | simpa only [smul_eq_mul, Real.rpow_natCast] using h |
| 200 | |
| 201 | theorem gaussMoment_int (k : ℕ) {a : ℝ} (ha : 0 < a) : |
| 202 | Integrable (fun x : V => ‖x‖ ^ k * Real.exp (-a * ‖x‖ ^ 2)) := by |
| 203 | apply (integrable_fun_norm_addHaar (volume : Measure V) |
| 204 | (f := fun r : ℝ => r ^ k * Real.exp (-a * r ^ 2))).2 |
| 205 | have h := integrableOn_rpow_mul_exp_neg_mul_sq ha |
| 206 | (s := ((Module.finrank ℝ V - 1 + k : ℕ) : ℝ)) |
| 207 | (lt_of_lt_of_le (by norm_num) (Nat.cast_nonneg _)) |
| 208 | simpa only [smul_eq_mul, Real.rpow_natCast, pow_add, mul_assoc] using h |
| 209 | |
| 210 | def baseHeatMass (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℝ V] |
| 211 | : ℝ := |
| 212 | (Real.pi / (4 : ℝ)⁻¹) ^ (Module.finrank ℝ V / 2 : ℝ) |
| 213 | |
| 214 | def baseHeat (x : V) : ℝ := |
| 215 | (baseHeatMass V)⁻¹ * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2) |
| 216 | |
| 217 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 218 | theorem baseHeatMass_pos : 0 < baseHeatMass V := by |
| 219 | unfold baseHeatMass |
| 220 | exact Real.rpow_pos_of_pos (div_pos Real.pi_pos (by positivity)) _ |
| 221 | |
| 222 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 223 | theorem baseHeat_nonneg (x : V) : 0 ≤ baseHeat x := by |
| 224 | exact mul_nonneg (inv_nonneg.mpr (baseHeatMass_pos (V := V)).le) |
| 225 | (Real.exp_pos _).le |
| 226 | |
| 227 | theorem baseHeat_int : Integrable (baseHeat : V → ℝ) := by |
| 228 | unfold baseHeat |
| 229 | exact (gauss_integrable (V := V) (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul _ |
| 230 | |
| 231 | omit [Nontrivial V] in |
| 232 | theorem integral_baseHeat : ∫ x : V, baseHeat x = 1 := by |
| 233 | unfold baseHeat |
| 234 | rw [integral_const_mul, |
| 235 | GaussianFourier.integral_rexp_neg_mul_sq_norm |
| 236 | (V := V) (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)] |
| 237 | exact inv_mul_cancel₀ (baseHeatMass_pos (V := V)).ne' |
| 238 | |
| 239 | def heatScale (t : ℝ) : ℝ := Real.sqrt t |
| 240 | |
| 241 | def heatKernel (t : ℝ) (x : V) : ℝ := |
| 242 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * |
| 243 | baseHeat ((heatScale t)⁻¹ • x) |
| 244 | |
| 245 | theorem heatScale_pos {t : ℝ} (ht : 0 < t) : 0 < heatScale t := by |
| 246 | simpa [heatScale] using Real.sqrt_pos.2 ht |
| 247 | |
| 248 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 249 | theorem heatKernel_nonneg {t : ℝ} (ht : 0 < t) (x : V) : |
| 250 | 0 ≤ heatKernel t x := by |
| 251 | unfold heatKernel |
| 252 | exact mul_nonneg (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 253 | (baseHeat_nonneg _) |
| 254 | |
| 255 | theorem heatKernel_int {t : ℝ} (ht : 0 < t) : |
| 256 | Integrable (heatKernel t : V → ℝ) := by |
| 257 | unfold heatKernel |
| 258 | exact (baseHeat_int (V := V)).comp_smul (inv_ne_zero (heatScale_pos ht).ne') |>.const_mul _ |
| 259 | |
| 260 | omit [Nontrivial V] in |
| 261 | theorem integral_heatKernel {t : ℝ} (ht : 0 < t) : |
| 262 | ∫ x : V, heatKernel t x = 1 := by |
| 263 | let r := heatScale t |
| 264 | have hr : 0 < r := heatScale_pos ht |
| 265 | unfold heatKernel |
| 266 | rw [integral_const_mul, |
| 267 | Measure.integral_comp_inv_smul_of_nonneg (volume : Measure V) baseHeat hr.le, |
| 268 | integral_baseHeat] |
| 269 | simp only [smul_eq_mul, mul_one] |
| 270 | exact inv_mul_cancel₀ (pow_ne_zero _ hr.ne') |
| 271 | |
| 272 | end Gaussian |
| 273 | |
| 274 | section GaussianDeriv |
| 275 | |
| 276 | variable {V : Type*} |
| 277 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 278 | [MeasurableSpace V] [BorelSpace V] |
| 279 | [Nontrivial V] |
| 280 | |
| 281 | def baseD1 (v x : V) : ℝ := |
| 282 | -(2 : ℝ)⁻¹ * ⟪x, v⟫ * baseHeat x |
| 283 | |
| 284 | def baseD2 (v w x : V) : ℝ := |
| 285 | ((4 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫ - |
| 286 | (2 : ℝ)⁻¹ * ⟪v, w⟫) * baseHeat x |
| 287 | |
| 288 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 289 | theorem baseD2_comm (v w x : V) : |
| 290 | baseD2 v w x = baseD2 w v x := by |
| 291 | unfold baseD2 |
| 292 | rw [real_inner_comm v w] |
| 293 | ring |
| 294 | |
| 295 | def baseD1Map (x : V) : V →L[ℝ] ℝ := |
| 296 | (-(2 : ℝ)⁻¹ * baseHeat x) • innerSL ℝ x |
| 297 | |
| 298 | def baseD2Map (v x : V) : V →L[ℝ] ℝ := |
| 299 | ((4 : ℝ)⁻¹ * ⟪x, v⟫ * baseHeat x) • innerSL ℝ x - |
| 300 | ((2 : ℝ)⁻¹ * baseHeat x) • innerSL ℝ v |
| 301 | |
| 302 | def baseD2CurriedMap (x : V) : V →L[ℝ] (V →L[ℝ] ℝ) := |
| 303 | (innerSL ℝ x).smulRight |
| 304 | (((4 : ℝ)⁻¹ * baseHeat x) • innerSL ℝ x) - |
| 305 | ((2 : ℝ)⁻¹ * baseHeat x) • |
| 306 | (innerSL ℝ (E := V)).toContinuousLinearMap |
| 307 | |
| 308 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 309 | @[simp] theorem baseD1Map_apply (x v : V) : |
| 310 | baseD1Map x v = baseD1 v x := by |
| 311 | simp [baseD1Map, baseD1] |
| 312 | ring |
| 313 | |
| 314 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 315 | @[simp] theorem baseD2Map_apply (v x w : V) : |
| 316 | baseD2Map v x w = baseD2 v w x := by |
| 317 | simp [baseD2Map, baseD2] |
| 318 | ring |
| 319 | |
| 320 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 321 | @[simp] theorem baseD2CurriedMap_apply (x w v : V) : |
| 322 | baseD2CurriedMap x w v = baseD2 v w x := by |
| 323 | simp only [baseD2CurriedMap, baseD2, sub_apply, |
| 324 | ContinuousLinearMap.smulRight_apply, smul_apply, |
| 325 | innerSL_apply_apply, smul_eq_mul] |
| 326 | have hinner : |
| 327 | ((innerSL ℝ (E := V)).toContinuousLinearMap w) v = ⟪w, v⟫ := rfl |
| 328 | rw [hinner, real_inner_comm w v] |
| 329 | ring |
| 330 | |
| 331 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 332 | theorem baseHeat_hasFDeriv (x : V) : |
| 333 | HasFDerivAt (baseHeat : V → ℝ) (baseD1Map x) x := by |
| 334 | have hq := (hasStrictFDerivAt_norm_sq x).hasFDerivAt.const_mul (-(4 : ℝ)⁻¹) |
| 335 | have he := hq.exp |
| 336 | have hc := he.const_mul (baseHeatMass V)⁻¹ |
| 337 | have hc' := hc.congr_fderiv (g' := baseD1Map x) (by |
| 338 | ext v |
| 339 | simp [baseD1Map, baseHeat] |
| 340 | ring) |
| 341 | simpa only [baseHeat] using! hc' |
| 342 | |
| 343 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 344 | theorem baseD1_hasFDeriv (v x : V) : |
| 345 | HasFDerivAt (baseD1 v) (baseD2Map v x) x := by |
| 346 | have hi : HasFDerivAt (fun y : V => ⟪y, v⟫) (innerSL ℝ v) x := by |
| 347 | simpa [real_inner_comm] using (innerSL ℝ v).hasFDerivAt |
| 348 | have h := (hi.mul (baseHeat_hasFDeriv x)).const_mul (-(2 : ℝ)⁻¹) |
| 349 | have h' := h.congr_fderiv (g' := baseD2Map v x) (by |
| 350 | ext w |
| 351 | simp only [baseD1Map, baseD2Map, sub_apply, add_apply, smul_apply, |
| 352 | innerSL_apply_apply, smul_eq_mul] |
| 353 | ring |
| 354 | ) |
| 355 | have hfun : baseD1 v = |
| 356 | fun y => -(2 : ℝ)⁻¹ * (⟪y, v⟫ * baseHeat y) := by |
| 357 | funext y |
| 358 | simp only [baseD1] |
| 359 | ring |
| 360 | rw [hfun] |
| 361 | exact h' |
| 362 | |
| 363 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 364 | theorem baseD1Map_hasFDeriv (x : V) : |
| 365 | HasFDerivAt (baseD1Map (V := V)) (baseD2CurriedMap x) x := by |
| 366 | have hc := (baseHeat_hasFDeriv (V := V) x).const_mul (-(2 : ℝ)⁻¹) |
| 367 | have hi : HasFDerivAt |
| 368 | (fun y : V => (innerSL ℝ (E := V)).toContinuousLinearMap y) |
| 369 | (innerSL ℝ (E := V)).toContinuousLinearMap x := |
| 370 | (innerSL ℝ (E := V)).toContinuousLinearMap.hasFDerivAt |
| 371 | have h := hc.smul hi |
| 372 | have h' := h.congr_fderiv (g' := baseD2CurriedMap x) (by |
| 373 | ext w v |
| 374 | simp only [baseD2CurriedMap, sub_apply, add_apply, smul_apply, |
| 375 | ContinuousLinearMap.smulRight_apply, innerSL_apply_apply, smul_eq_mul] |
| 376 | have hinner : |
| 377 | ((innerSL ℝ (E := V)).toContinuousLinearMap w) v = ⟪w, v⟫ := rfl |
| 378 | have hinnerX : |
| 379 | ((innerSL ℝ (E := V)).toContinuousLinearMap x) v = ⟪x, v⟫ := rfl |
| 380 | rw [hinner, hinnerX, baseD1Map_apply] |
| 381 | unfold baseD1 |
| 382 | ring) |
| 383 | simpa only [baseD1Map] using! h' |
| 384 | |
| 385 | def baseD1Maj (x : V) : ℝ := |
| 386 | (2 : ℝ)⁻¹ * ‖x‖ * baseHeat x |
| 387 | |
| 388 | def baseD2Maj (x : V) : ℝ := |
| 389 | ((4 : ℝ)⁻¹ * ‖x‖ ^ 2 + (2 : ℝ)⁻¹) * baseHeat x |
| 390 | |
| 391 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 392 | theorem baseD1Maj_nonneg (x : V) : 0 ≤ baseD1Maj x := by |
| 393 | unfold baseD1Maj |
| 394 | exact mul_nonneg (mul_nonneg (by positivity) (norm_nonneg x)) (baseHeat_nonneg x) |
| 395 | |
| 396 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 397 | theorem baseD2Maj_nonneg (x : V) : 0 ≤ baseD2Maj x := by |
| 398 | unfold baseD2Maj |
| 399 | exact mul_nonneg (add_nonneg (mul_nonneg (by positivity) (sq_nonneg ‖x‖)) (by positivity)) |
| 400 | (baseHeat_nonneg x) |
| 401 | |
| 402 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 403 | theorem baseD1_bound (v x : V) : |
| 404 | ‖baseD1 v x‖ ≤ ‖v‖ * baseD1Maj x := by |
| 405 | rw [baseD1, baseD1Maj, Real.norm_eq_abs, abs_mul, abs_mul, abs_neg, |
| 406 | abs_of_nonneg (by positivity : (0 : ℝ) ≤ (2 : ℝ)⁻¹), |
| 407 | abs_of_nonneg (baseHeat_nonneg x)] |
| 408 | calc |
| 409 | (2 : ℝ)⁻¹ * |⟪x, v⟫| * baseHeat x |
| 410 | ≤ (2 : ℝ)⁻¹ * (‖x‖ * ‖v‖) * baseHeat x := by |
| 411 | exact mul_le_mul_of_nonneg_right |
| 412 | (mul_le_mul_of_nonneg_left (abs_real_inner_le_norm x v) (by positivity)) |
| 413 | (baseHeat_nonneg x) |
| 414 | _ = ‖v‖ * ((2 : ℝ)⁻¹ * ‖x‖ * baseHeat x) := by ring |
| 415 | |
| 416 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 417 | theorem baseD2_bound (v w x : V) : |
| 418 | ‖baseD2 v w x‖ ≤ ‖v‖ * ‖w‖ * baseD2Maj x := by |
| 419 | rw [baseD2, baseD2Maj, Real.norm_eq_abs, abs_mul, |
| 420 | abs_of_nonneg (baseHeat_nonneg x)] |
| 421 | have htri : |
| 422 | |(4 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫ - (2 : ℝ)⁻¹ * ⟪v, w⟫| ≤ |
| 423 | (4 : ℝ)⁻¹ * |⟪x, v⟫| * |⟪x, w⟫| + |
| 424 | (2 : ℝ)⁻¹ * |⟪v, w⟫| := by |
| 425 | calc |
| 426 | |(4 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫ - (2 : ℝ)⁻¹ * ⟪v, w⟫| |
| 427 | = |(4 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫ + |
| 428 | -((2 : ℝ)⁻¹ * ⟪v, w⟫)| := by ring_nf |
| 429 | _ ≤ |(4 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫| + |
| 430 | |-((2 : ℝ)⁻¹ * ⟪v, w⟫)| := abs_add_le _ _ |
| 431 | _ = (4 : ℝ)⁻¹ * |⟪x, v⟫| * |⟪x, w⟫| + |
| 432 | (2 : ℝ)⁻¹ * |⟪v, w⟫| := by |
| 433 | rw [abs_mul, abs_mul, abs_neg, abs_mul, |
| 434 | abs_of_nonneg (by positivity : (0 : ℝ) ≤ (4 : ℝ)⁻¹), |
| 435 | abs_of_nonneg (by positivity : (0 : ℝ) ≤ (2 : ℝ)⁻¹)] |
| 436 | calc |
| 437 | |(4 : ℝ)⁻¹ * ⟪x, v⟫ * ⟪x, w⟫ - (2 : ℝ)⁻¹ * ⟪v, w⟫| * baseHeat x |
| 438 | ≤ ((4 : ℝ)⁻¹ * |⟪x, v⟫| * |⟪x, w⟫| + |
| 439 | (2 : ℝ)⁻¹ * |⟪v, w⟫|) * baseHeat x := by |
| 440 | exact mul_le_mul_of_nonneg_right htri (baseHeat_nonneg x) |
| 441 | _ ≤ ((4 : ℝ)⁻¹ * (‖x‖ * ‖v‖) * (‖x‖ * ‖w‖) + |
| 442 | (2 : ℝ)⁻¹ * (‖v‖ * ‖w‖)) * baseHeat x := by |
| 443 | apply mul_le_mul_of_nonneg_right _ (baseHeat_nonneg x) |
| 444 | apply add_le_add |
| 445 | · have hp : |⟪x, v⟫| * |⟪x, w⟫| ≤ |
| 446 | (‖x‖ * ‖v‖) * (‖x‖ * ‖w‖) := |
| 447 | mul_le_mul (abs_real_inner_le_norm x v) (abs_real_inner_le_norm x w) |
| 448 | (abs_nonneg _) (mul_nonneg (norm_nonneg x) (norm_nonneg v)) |
| 449 | calc |
| 450 | (4 : ℝ)⁻¹ * |⟪x, v⟫| * |⟪x, w⟫| |
| 451 | = (4 : ℝ)⁻¹ * (|⟪x, v⟫| * |⟪x, w⟫|) := by ring |
| 452 | _ ≤ (4 : ℝ)⁻¹ * ((‖x‖ * ‖v‖) * (‖x‖ * ‖w‖)) := |
| 453 | mul_le_mul_of_nonneg_left hp (by positivity) |
| 454 | _ = (4 : ℝ)⁻¹ * (‖x‖ * ‖v‖) * (‖x‖ * ‖w‖) := by ring |
| 455 | · exact mul_le_mul_of_nonneg_left (abs_real_inner_le_norm v w) (by positivity) |
| 456 | _ = ‖v‖ * ‖w‖ * |
| 457 | (((4 : ℝ)⁻¹ * ‖x‖ ^ 2 + (2 : ℝ)⁻¹) * baseHeat x) := by ring |
| 458 | |
| 459 | theorem baseD1Maj_int : Integrable (baseD1Maj : V → ℝ) := by |
| 460 | have h := (gaussMoment_int (V := V) 1 |
| 461 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 462 | ((2 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) |
| 463 | have heq : baseD1Maj = fun x : V => |
| 464 | ((2 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) * |
| 465 | (‖x‖ ^ 1 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) := by |
| 466 | funext x |
| 467 | unfold baseD1Maj baseHeat |
| 468 | ring |
| 469 | rw [heq] |
| 470 | exact h |
| 471 | |
| 472 | theorem baseD2Maj_int : Integrable (baseD2Maj : V → ℝ) := by |
| 473 | have h2 := (gaussMoment_int (V := V) 2 |
| 474 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 475 | ((4 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) |
| 476 | have h0 := (gaussMoment_int (V := V) 0 |
| 477 | (by positivity : (0 : ℝ) < (4 : ℝ)⁻¹)).const_mul |
| 478 | ((2 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) |
| 479 | have heq : baseD2Maj = fun x : V => |
| 480 | ((4 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) * |
| 481 | (‖x‖ ^ 2 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) + |
| 482 | ((2 : ℝ)⁻¹ * (baseHeatMass V)⁻¹) * |
| 483 | (‖x‖ ^ 0 * Real.exp (-(4 : ℝ)⁻¹ * ‖x‖ ^ 2)) := by |
| 484 | funext x |
| 485 | unfold baseD2Maj baseHeat |
| 486 | ring |
| 487 | rw [heq] |
| 488 | exact h2.add h0 |
| 489 | |
| 490 | def heatC1 (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℝ V] |
| 491 | [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] : ℝ := |
| 492 | ∫ x : V, baseD1Maj x |
| 493 | |
| 494 | def heatC2 (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℝ V] |
| 495 | [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] : ℝ := |
| 496 | ∫ x : V, baseD2Maj x |
| 497 | |
| 498 | omit [Nontrivial V] in |
| 499 | theorem heatC1_nonneg : 0 ≤ heatC1 V := |
| 500 | integral_nonneg baseD1Maj_nonneg |
| 501 | |
| 502 | omit [Nontrivial V] in |
| 503 | theorem heatC2_nonneg : 0 ≤ heatC2 V := |
| 504 | integral_nonneg baseD2Maj_nonneg |
| 505 | |
| 506 | def heatD1Maj (t : ℝ) (x : V) : ℝ := |
| 507 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 508 | baseD1Maj ((heatScale t)⁻¹ • x) |
| 509 | |
| 510 | def heatD2Maj (t : ℝ) (x : V) : ℝ := |
| 511 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 512 | baseD2Maj ((heatScale t)⁻¹ • x) |
| 513 | |
| 514 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 515 | theorem heatD1Maj_nonneg {t : ℝ} (ht : 0 < t) (x : V) : |
| 516 | 0 ≤ heatD1Maj t x := by |
| 517 | unfold heatD1Maj |
| 518 | exact mul_nonneg |
| 519 | (mul_nonneg (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 520 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 521 | (baseD1Maj_nonneg _) |
| 522 | |
| 523 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 524 | theorem heatD2Maj_nonneg {t : ℝ} (ht : 0 < t) (x : V) : |
| 525 | 0 ≤ heatD2Maj t x := by |
| 526 | unfold heatD2Maj |
| 527 | exact mul_nonneg |
| 528 | (mul_nonneg |
| 529 | (mul_nonneg (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 530 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 531 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 532 | (baseD2Maj_nonneg _) |
| 533 | |
| 534 | theorem heatD1Maj_int {t : ℝ} (ht : 0 < t) : |
| 535 | Integrable (heatD1Maj t : V → ℝ) := by |
| 536 | unfold heatD1Maj |
| 537 | exact (baseD1Maj_int (V := V)).comp_smul |
| 538 | (inv_ne_zero (heatScale_pos ht).ne') |>.const_mul _ |
| 539 | |
| 540 | theorem heatD2Maj_int {t : ℝ} (ht : 0 < t) : |
| 541 | Integrable (heatD2Maj t : V → ℝ) := by |
| 542 | unfold heatD2Maj |
| 543 | exact (baseD2Maj_int (V := V)).comp_smul |
| 544 | (inv_ne_zero (heatScale_pos ht).ne') |>.const_mul _ |
| 545 | |
| 546 | omit [Nontrivial V] in |
| 547 | theorem integral_heatD1Maj {t : ℝ} (ht : 0 < t) : |
| 548 | ∫ x : V, heatD1Maj t x = (heatScale t)⁻¹ * heatC1 V := by |
| 549 | have hr : 0 < heatScale t := heatScale_pos ht |
| 550 | unfold heatD1Maj heatC1 |
| 551 | rw [integral_const_mul, |
| 552 | Measure.integral_comp_inv_smul_of_nonneg (volume : Measure V) baseD1Maj hr.le] |
| 553 | simp only [smul_eq_mul] |
| 554 | field_simp [hr.ne'] |
| 555 | |
| 556 | omit [Nontrivial V] in |
| 557 | theorem integral_heatD2Maj {t : ℝ} (ht : 0 < t) : |
| 558 | ∫ x : V, heatD2Maj t x = t⁻¹ * heatC2 V := by |
| 559 | have hr : 0 < heatScale t := heatScale_pos ht |
| 560 | have hsqrt : heatScale t ^ 2 = t := by |
| 561 | simpa [heatScale] using Real.sq_sqrt ht.le |
| 562 | unfold heatD2Maj heatC2 |
| 563 | rw [integral_const_mul, |
| 564 | Measure.integral_comp_inv_smul_of_nonneg (volume : Measure V) baseD2Maj hr.le] |
| 565 | simp only [smul_eq_mul] |
| 566 | have hscale : (heatScale t)⁻¹ * (heatScale t)⁻¹ = t⁻¹ := by |
| 567 | field_simp [hr.ne', ht.ne'] |
| 568 | nlinarith [hsqrt] |
| 569 | calc |
| 570 | (heatScale t ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 571 | (heatScale t)⁻¹ * |
| 572 | (heatScale t ^ Module.finrank ℝ V * ∫ x : V, baseD2Maj x) |
| 573 | = ((heatScale t)⁻¹ * (heatScale t)⁻¹) * |
| 574 | ∫ x : V, baseD2Maj x := by |
| 575 | field_simp [hr.ne'] |
| 576 | _ = t⁻¹ * ∫ x : V, baseD2Maj x := by rw [hscale] |
| 577 | |
| 578 | def heatD1 (t : ℝ) (v x : V) : ℝ := |
| 579 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 580 | baseD1 v ((heatScale t)⁻¹ • x) |
| 581 | |
| 582 | def heatD2 (t : ℝ) (v w x : V) : ℝ := |
| 583 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 584 | baseD2 v w ((heatScale t)⁻¹ • x) |
| 585 | |
| 586 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 587 | theorem heatD2_comm (t : ℝ) (v w x : V) : |
| 588 | heatD2 t v w x = heatD2 t w v x := by |
| 589 | unfold heatD2 |
| 590 | rw [baseD2_comm] |
| 591 | |
| 592 | def heatD1Map (t : ℝ) (x : V) : V →L[ℝ] ℝ := |
| 593 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹) • |
| 594 | baseD1Map ((heatScale t)⁻¹ • x) |
| 595 | |
| 596 | def heatD2Map (t : ℝ) (v x : V) : V →L[ℝ] ℝ := |
| 597 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 598 | (heatScale t)⁻¹) • |
| 599 | baseD2Map v ((heatScale t)⁻¹ • x) |
| 600 | |
| 601 | def heatD2CurriedMap (t : ℝ) (x : V) : V →L[ℝ] (V →L[ℝ] ℝ) := |
| 602 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 603 | (heatScale t)⁻¹) • |
| 604 | baseD2CurriedMap ((heatScale t)⁻¹ • x) |
| 605 | |
| 606 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 607 | @[simp] theorem heatD1Map_apply (t : ℝ) (x v : V) : |
| 608 | heatD1Map t x v = heatD1 t v x := by |
| 609 | simp [heatD1Map, heatD1] |
| 610 | |
| 611 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 612 | @[simp] theorem heatD2Map_apply (t : ℝ) (v x w : V) : |
| 613 | heatD2Map t v x w = heatD2 t v w x := by |
| 614 | simp [heatD2Map, heatD2] |
| 615 | |
| 616 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 617 | @[simp] theorem heatD2CurriedMap_apply (t : ℝ) (x w v : V) : |
| 618 | heatD2CurriedMap t x w v = heatD2 t v w x := by |
| 619 | simp only [heatD2CurriedMap, smul_apply, smul_eq_mul, |
| 620 | baseD2CurriedMap_apply] |
| 621 | rfl |
| 622 | |
| 623 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 624 | theorem heatKernel_hasFDeriv {t : ℝ} (x : V) : |
| 625 | HasFDerivAt (heatKernel t) (heatD1Map t x) x := by |
| 626 | let S : V →L[ℝ] V := (heatScale t)⁻¹ • ContinuousLinearMap.id ℝ V |
| 627 | have hS : HasFDerivAt (fun y : V => (heatScale t)⁻¹ • y) S x := by |
| 628 | simpa [S] using! S.hasFDerivAt |
| 629 | have h := ((baseHeat_hasFDeriv ((heatScale t)⁻¹ • x)).comp x hS).const_mul |
| 630 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹) |
| 631 | have h' := h.congr_fderiv (g' := heatD1Map t x) (by |
| 632 | ext v |
| 633 | simp [heatD1Map, S, baseD1Map] |
| 634 | ring) |
| 635 | simpa only [heatKernel] using! h' |
| 636 | |
| 637 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 638 | theorem heatD1_hasFDeriv {t : ℝ} (v x : V) : |
| 639 | HasFDerivAt (heatD1 t v) (heatD2Map t v x) x := by |
| 640 | let S : V →L[ℝ] V := (heatScale t)⁻¹ • ContinuousLinearMap.id ℝ V |
| 641 | have hS : HasFDerivAt (fun y : V => (heatScale t)⁻¹ • y) S x := by |
| 642 | simpa [S] using! S.hasFDerivAt |
| 643 | have h := ((baseD1_hasFDeriv v ((heatScale t)⁻¹ • x)).comp x hS).const_mul |
| 644 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹) |
| 645 | have h' := h.congr_fderiv (g' := heatD2Map t v x) (by |
| 646 | ext w |
| 647 | simp [heatD2Map, S, baseD2Map] |
| 648 | ring) |
| 649 | simpa only [heatD1] using! h' |
| 650 | |
| 651 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 652 | theorem heatD1Map_hasFDeriv (t : ℝ) (x : V) : |
| 653 | HasFDerivAt (heatD1Map (V := V) t) (heatD2CurriedMap t x) x := by |
| 654 | let S : V →L[ℝ] V := (heatScale t)⁻¹ • ContinuousLinearMap.id ℝ V |
| 655 | have hS : HasFDerivAt (fun y : V => (heatScale t)⁻¹ • y) S x := by |
| 656 | simpa [S] using! S.hasFDerivAt |
| 657 | have hb : HasFDerivAt (baseD1Map (V := V)) |
| 658 | (baseD2CurriedMap ((heatScale t)⁻¹ • x)) ((heatScale t)⁻¹ • x) := |
| 659 | baseD1Map_hasFDeriv _ |
| 660 | have h := (hb.comp x hS).const_smul |
| 661 | (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹) |
| 662 | have h' := h.congr_fderiv (g' := heatD2CurriedMap t x) (by |
| 663 | ext w v |
| 664 | simp only [heatD2CurriedMap, S, smul_apply, |
| 665 | ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply, map_smul, |
| 666 | smul_eq_mul] |
| 667 | ring) |
| 668 | simpa only [heatD1Map] using! h' |
| 669 | |
| 670 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 671 | theorem heatD1_bound {t : ℝ} (ht : 0 < t) (v x : V) : |
| 672 | ‖heatD1 t v x‖ ≤ ‖v‖ * heatD1Maj t x := by |
| 673 | unfold heatD1 heatD1Maj |
| 674 | rw [Real.norm_eq_abs, abs_mul, abs_mul, |
| 675 | abs_of_nonneg (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)), |
| 676 | abs_of_nonneg (inv_nonneg.mpr (heatScale_pos ht).le)] |
| 677 | calc |
| 678 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 679 | ‖baseD1 v ((heatScale t)⁻¹ • x)‖ |
| 680 | ≤ ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * |
| 681 | (‖v‖ * baseD1Maj ((heatScale t)⁻¹ • x)) := by |
| 682 | exact mul_le_mul_of_nonneg_left (baseD1_bound v _) |
| 683 | (mul_nonneg (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 684 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 685 | _ = ‖v‖ * (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * |
| 686 | (heatScale t)⁻¹ * baseD1Maj ((heatScale t)⁻¹ • x)) := by ring |
| 687 | |
| 688 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 689 | theorem heatD2_bound {t : ℝ} (ht : 0 < t) (v w x : V) : |
| 690 | ‖heatD2 t v w x‖ ≤ ‖v‖ * ‖w‖ * heatD2Maj t x := by |
| 691 | unfold heatD2 heatD2Maj |
| 692 | rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_mul] |
| 693 | simp only [abs_inv, abs_pow, abs_of_nonneg (heatScale_pos ht).le] |
| 694 | calc |
| 695 | ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 696 | ‖baseD2 v w ((heatScale t)⁻¹ • x)‖ |
| 697 | ≤ ((heatScale t) ^ Module.finrank ℝ V)⁻¹ * (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 698 | (‖v‖ * ‖w‖ * baseD2Maj ((heatScale t)⁻¹ • x)) := by |
| 699 | exact mul_le_mul_of_nonneg_left (baseD2_bound v w _) |
| 700 | (mul_nonneg |
| 701 | (mul_nonneg (inv_nonneg.mpr (pow_nonneg (heatScale_pos ht).le _)) |
| 702 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 703 | (inv_nonneg.mpr (heatScale_pos ht).le)) |
| 704 | _ = ‖v‖ * ‖w‖ * (((heatScale t) ^ Module.finrank ℝ V)⁻¹ * |
| 705 | (heatScale t)⁻¹ * (heatScale t)⁻¹ * |
| 706 | baseD2Maj ((heatScale t)⁻¹ • x)) := by ring |
| 707 | |
| 708 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 709 | theorem heatD1Map_norm_le {t : Real} (ht : 0 < t) (x : V) : |
| 710 | ‖heatD1Map t x‖ ≤ heatD1Maj t x := by |
| 711 | apply ContinuousLinearMap.opNorm_le_bound (heatD1Map t x) |
| 712 | (heatD1Maj_nonneg ht x) |
| 713 | intro v |
| 714 | rw [heatD1Map_apply] |
| 715 | exact (heatD1_bound ht v x).trans_eq (by ring) |
| 716 | |
| 717 | omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 718 | theorem heatD2Map_norm_le {t : Real} (ht : 0 < t) (v x : V) : |
| 719 | ‖heatD2Map t v x‖ ≤ ‖v‖ * heatD2Maj t x := by |
| 720 | apply ContinuousLinearMap.opNorm_le_bound (heatD2Map t v x) |
| 721 | (mul_nonneg (norm_nonneg v) (heatD2Maj_nonneg ht x)) |
| 722 | intro w |
| 723 | rw [heatD2Map_apply] |
| 724 | exact (heatD2_bound ht v w x).trans_eq (by ring) |
| 725 | |
| 726 | omit [MeasurableSpace V] [BorelSpace V] [Nontrivial V] in |
| 727 | theorem heatD2CurriedMap_norm_le {t : Real} (ht : 0 < t) (x : V) : |
| 728 | ‖heatD2CurriedMap t x‖ ≤ heatD2Maj t x := by |
| 729 | apply ContinuousLinearMap.opNorm_le_bound (heatD2CurriedMap t x) |
| 730 | (heatD2Maj_nonneg ht x) |
| 731 | intro w |
| 732 | apply ContinuousLinearMap.opNorm_le_bound (heatD2CurriedMap t x w) |
| 733 | (mul_nonneg (heatD2Maj_nonneg ht x) (norm_nonneg w)) |
| 734 | intro v |
| 735 | rw [heatD2CurriedMap_apply] |
| 736 | exact (heatD2_bound ht v w x).trans_eq (by ring) |
| 737 | |
| 738 | theorem heatD1_int {t : ℝ} (ht : 0 < t) (v : V) : |
| 739 | Integrable (heatD1 t v : V → ℝ) := by |
| 740 | refine ((heatD1Maj_int (V := V) ht).const_mul ‖v‖).mono' |
| 741 | (by |
| 742 | apply Continuous.aestronglyMeasurable |
| 743 | unfold heatD1 baseD1 baseHeat baseHeatMass heatScale |
| 744 | fun_prop) ?_ |
| 745 | filter_upwards with x |
| 746 | exact heatD1_bound ht v x |
| 747 | |
| 748 | theorem heatD2_int {t : ℝ} (ht : 0 < t) (v w : V) : |
| 749 | Integrable (heatD2 t v w : V → ℝ) := by |
| 750 | refine (((heatD2Maj_int (V := V) ht).const_mul ‖w‖).const_mul ‖v‖).mono' |
| 751 | (by |
| 752 | apply Continuous.aestronglyMeasurable |
| 753 | unfold heatD2 baseD2 baseHeat baseHeatMass heatScale |
| 754 | fun_prop) ?_ |
| 755 | filter_upwards with x |
| 756 | simpa [mul_assoc] using heatD2_bound ht v w x |
| 757 | |
| 758 | theorem integral_norm_D1 {t : ℝ} (ht : 0 < t) (v : V) : |
| 759 | (∫ x : V, ‖heatD1 t v x‖) ≤ |
| 760 | ‖v‖ * (heatScale t)⁻¹ * heatC1 V := by |
| 761 | calc |
| 762 | (∫ x : V, ‖heatD1 t v x‖) |
| 763 | ≤ ∫ x : V, ‖v‖ * heatD1Maj t x := by |
| 764 | exact integral_mono (heatD1_int ht v).norm |
| 765 | ((heatD1Maj_int (V := V) ht).const_mul ‖v‖) |
| 766 | (fun x => heatD1_bound ht v x) |
| 767 | _ = ‖v‖ * ((heatScale t)⁻¹ * heatC1 V) := by |
| 768 | rw [integral_const_mul, integral_heatD1Maj ht] |
| 769 | _ = ‖v‖ * (heatScale t)⁻¹ * heatC1 V := by ring |
| 770 | |
| 771 | theorem integral_norm_D2 {t : ℝ} (ht : 0 < t) (v w : V) : |
| 772 | (∫ x : V, ‖heatD2 t v w x‖) ≤ |
| 773 | ‖v‖ * ‖w‖ * t⁻¹ * heatC2 V := by |
| 774 | calc |
| 775 | (∫ x : V, ‖heatD2 t v w x‖) |
| 776 | ≤ ∫ x : V, (‖v‖ * ‖w‖) * heatD2Maj t x := by |
| 777 | exact integral_mono (heatD2_int ht v w).norm |
| 778 | ((heatD2Maj_int (V := V) ht).const_mul (‖v‖ * ‖w‖)) |
| 779 | (fun x => by simpa [mul_assoc] using heatD2_bound ht v w x) |
| 780 | _ = (‖v‖ * ‖w‖) * (t⁻¹ * heatC2 V) := by |
| 781 | rw [integral_const_mul, integral_heatD2Maj ht] |
| 782 | _ = ‖v‖ * ‖w‖ * t⁻¹ * heatC2 V := by ring |
| 783 | |
| 784 | end GaussianDeriv |
| 785 | |
| 786 | section HeatLp |
| 787 | |
| 788 | variable {V F : Type*} |
| 789 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 790 | [MeasurableSpace V] [BorelSpace V] |
| 791 | [Nontrivial V] |
| 792 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 793 | {p : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (p ≠ ∞)] |
| 794 | |
| 795 | def heatLp (t : ℝ) (u : Lp F p (volume : Measure V)) : |
| 796 | Lp F p (volume : Measure V) := |
| 797 | lpKernel (heatKernel t) u |
| 798 | |
| 799 | omit [CompleteSpace F] [Fact (p ≠ ∞)] in |
| 800 | theorem heatLp_contract {t : ℝ} (ht : 0 < t) |
| 801 | (u : Lp F p (volume : Measure V)) : |
| 802 | ‖heatLp t u‖ ≤ ‖u‖ := by |
| 803 | exact lpKernel_contract (heatKernel_int ht) (heatKernel_nonneg ht) |
| 804 | (integral_heatKernel ht) u |
| 805 | |
| 806 | def heatD1Lp (t : ℝ) (v : V) (u : Lp F p (volume : Measure V)) : |
| 807 | Lp F p (volume : Measure V) := |
| 808 | lpKernel (heatD1 t v) u |
| 809 | |
| 810 | def heatD2Lp (t : ℝ) (v w : V) (u : Lp F p (volume : Measure V)) : |
| 811 | Lp F p (volume : Measure V) := |
| 812 | lpKernel (heatD2 t v w) u |
| 813 | |
| 814 | omit [CompleteSpace F] [Fact (p ≠ ∞)] in |
| 815 | theorem heatD1Lp_norm {t : ℝ} (ht : 0 < t) (v : V) |
| 816 | (u : Lp F p (volume : Measure V)) : |
| 817 | ‖heatD1Lp t v u‖ ≤ |
| 818 | (‖v‖ * (heatScale t)⁻¹ * heatC1 V) * ‖u‖ := by |
| 819 | refine (lpKernel_norm_le (heatD1_int ht v) u).trans ?_ |
| 820 | exact mul_le_mul_of_nonneg_right (integral_norm_D1 ht v) (norm_nonneg _) |
| 821 | |
| 822 | omit [CompleteSpace F] [Fact (p ≠ ∞)] in |
| 823 | theorem heatD2Lp_norm {t : ℝ} (ht : 0 < t) (v w : V) |
| 824 | (u : Lp F p (volume : Measure V)) : |
| 825 | ‖heatD2Lp t v w u‖ ≤ |
| 826 | (‖v‖ * ‖w‖ * t⁻¹ * heatC2 V) * ‖u‖ := by |
| 827 | refine (lpKernel_norm_le (heatD2_int ht v w) u).trans ?_ |
| 828 | exact mul_le_mul_of_nonneg_right (integral_norm_D2 ht v w) (norm_nonneg _) |
| 829 | |
| 830 | end HeatLp |
| 831 | |
| 832 | end Poincare.Parabolic.Interior.Kernel |