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/HeatPotentialRealization.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.LowerDerivatives |
| 13 | import PoincareLib.Analysis.Parabolic.Interior.Kernel.HolderMoment |
| 14 | import PoincareLib.Analysis.Parabolic.Interior.Kernel.PotentialRegularity |
| 15 | import PoincareLib.Analysis.Parabolic.Interior.Holder |
| 16 | import Mathlib.Analysis.Calculus.ParametricIntervalIntegral |
| 17 | |
| 18 | /-! |
| 19 | # Interior heat kernel: PotentialRealization |
| 20 | |
| 21 | Adapted from Chow--Liao--Qin, HeatPotentialRealization.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 Set Filter |
| 31 | open scoped NNReal RealInnerProductSpace Topology |
| 32 | |
| 33 | namespace Poincare.Parabolic.Interior.Kernel |
| 34 | |
| 35 | open Poincare.Parabolic.Interior |
| 36 | |
| 37 | variable {V F : Type*} |
| 38 | [NormedAddCommGroup V] [InnerProductSpace Real V] [FiniteDimensional Real V] |
| 39 | [MeasurableSpace V] [BorelSpace V] [Nontrivial V] |
| 40 | [NormedAddCommGroup F] [NormedSpace Real F] [CompleteSpace F] |
| 41 | |
| 42 | omit [CompleteSpace F] in |
| 43 | theorem heatSupGradient_norm_le {t : Real} (ht : 0 < t) |
| 44 | (u : BoundedContinuousFunction V F) (x : V) : |
| 45 | ‖heatSupGradient t u x‖ ≤ |
| 46 | (heatScale t)⁻¹ * heatC1 V * ‖u‖ := by |
| 47 | apply ContinuousLinearMap.opNorm_le_bound (heatSupGradient t u x) |
| 48 | (mul_nonneg |
| 49 | (mul_nonneg (inv_nonneg.mpr (heatScale_pos ht).le) |
| 50 | (heatC1_nonneg (V := V))) |
| 51 | (norm_nonneg u)) |
| 52 | intro v |
| 53 | rw [heatSupGradient_apply ht] |
| 54 | exact (heatD1Sup_norm ht v u x).trans_eq (by ring) |
| 55 | |
| 56 | theorem heatSupHessian_norm_le_of_holder {alpha K : NNReal} |
| 57 | (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 58 | {t : Real} (ht : 0 < t) {u : BoundedContinuousFunction V F} |
| 59 | (hu : HolderWith K alpha u) (x : V) : |
| 60 | ‖heatSupHessian t u x‖ ≤ |
| 61 | (K : Real) * holderHeatScale alpha t * heatC2Holder (V := V) alpha := by |
| 62 | let C : Real := |
| 63 | (K : Real) * holderHeatScale alpha t * heatC2Holder (V := V) alpha |
| 64 | have hC : 0 ≤ C := by |
| 65 | unfold C |
| 66 | exact mul_nonneg |
| 67 | (mul_nonneg K.coe_nonneg (Real.rpow_nonneg (le_of_lt ht) _)) |
| 68 | (heatC2Holder_nonneg (V := V) alpha) |
| 69 | apply ContinuousLinearMap.opNorm_le_bound (heatSupHessian t u x) hC |
| 70 | intro w |
| 71 | apply ContinuousLinearMap.opNorm_le_bound (heatSupHessian t u x w) |
| 72 | (mul_nonneg hC (norm_nonneg w)) |
| 73 | intro v |
| 74 | rw [heatSupHessian_apply ht, |
| 75 | heatD2Conv_eq_cancel_of_holder halpha0 halpha1 ht hu] |
| 76 | exact (heatD2Cancel_norm_of_holder halpha1 ht hu v w x).trans_eq (by |
| 77 | unfold C |
| 78 | ring) |
| 79 | |
| 80 | theorem heatD2ConvMap_norm_le_of_holder {alpha K : NNReal} |
| 81 | (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 82 | {t : Real} (ht : 0 < t) (v : V) |
| 83 | {u : BoundedContinuousFunction V F} (hu : HolderWith K alpha u) (x : V) : |
| 84 | ‖heatD2ConvMap t v u x‖ ≤ |
| 85 | ‖v‖ * (K : Real) * holderHeatScale alpha t * |
| 86 | heatC2Holder (V := V) alpha := by |
| 87 | let C : Real := |
| 88 | ‖v‖ * (K : Real) * holderHeatScale alpha t * heatC2Holder (V := V) alpha |
| 89 | have hC : 0 ≤ C := by |
| 90 | unfold C |
| 91 | exact mul_nonneg |
| 92 | (mul_nonneg |
| 93 | (mul_nonneg (norm_nonneg v) K.coe_nonneg) |
| 94 | (Real.rpow_nonneg (le_of_lt ht) _)) |
| 95 | (heatC2Holder_nonneg (V := V) alpha) |
| 96 | apply ContinuousLinearMap.opNorm_le_bound (heatD2ConvMap t v u x) hC |
| 97 | intro w |
| 98 | rw [heatD2ConvMap_apply ht, |
| 99 | heatD2Conv_eq_cancel_of_holder halpha0 halpha1 ht hu] |
| 100 | exact (heatD2Cancel_norm_of_holder halpha1 ht hu v w x).trans_eq (by |
| 101 | unfold C |
| 102 | ring) |
| 103 | |
| 104 | def heatDuhGradientMap (t : Real) |
| 105 | (f : Real → BoundedContinuousFunction V F) (x : V) : V →L[Real] F := |
| 106 | ∫ s : Real in 0..t, heatSupGradient (t - s) (f s) x |
| 107 | |
| 108 | def heatDuhGradientMajor (B : NNReal) (t s : Real) : Real := |
| 109 | (B : Real) * heatC1 V * heatScale12 (t - s) |
| 110 | |
| 111 | omit [Nontrivial V] [NormedAddCommGroup F] [NormedSpace Real F] |
| 112 | [CompleteSpace F] in |
| 113 | theorem heatDuhGradientMajor_intble {t : Real} (B : NNReal) : |
| 114 | IntervalIntegrable (heatDuhGradientMajor (V := V) B t) volume 0 t := |
| 115 | (scale12_intble).const_mul ((B : Real) * heatC1 V) |
| 116 | |
| 117 | omit [CompleteSpace F] in |
| 118 | theorem heatDuh_hasFDerivAt {t : Real} (ht : 0 < t) {B : NNReal} |
| 119 | (f : Real → BoundedContinuousFunction V F) |
| 120 | (hf : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 121 | (hmeas0 : ∀ z : V, AEStronglyMeasurable |
| 122 | (fun s : Real => heatSup (t - s) (f s) z) |
| 123 | (volume.restrict (uIoc (0 : Real) t))) |
| 124 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 125 | (fun s : Real => heatSupGradient (t - s) (f s) z) |
| 126 | (volume.restrict (uIoc (0 : Real) t))) |
| 127 | (x : V) : |
| 128 | HasFDerivAt (heatDuh t f) (heatDuhGradientMap t f x) x := by |
| 129 | let G : V → Real → F := fun z s => heatSup (t - s) (f s) z |
| 130 | let DG : V → Real → V →L[Real] F := fun z s => |
| 131 | heatSupGradient (t - s) (f s) z |
| 132 | let bound : Real → Real := heatDuhGradientMajor (V := V) B t |
| 133 | have hGmeas : ∀ᶠ z in 𝓝 x, |
| 134 | AEStronglyMeasurable (G z) (volume.restrict (uIoc (0 : Real) t)) := by |
| 135 | apply Filter.Eventually.of_forall |
| 136 | exact hmeas0 |
| 137 | have hGint : IntervalIntegrable (G x) volume 0 t := |
| 138 | heatDuh_int ht f hf x (hmeas0 x) |
| 139 | have hDGmeas : AEStronglyMeasurable (DG x) |
| 140 | (volume.restrict (uIoc (0 : Real) t)) := hmeas1 x |
| 141 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 142 | simp [ae_iff, measure_singleton] |
| 143 | have hbound : ∀ᵐ s ∂(volume : Measure Real), s ∈ uIoc (0 : Real) t → |
| 144 | ∀ z ∈ (Set.univ : Set V), ‖DG z s‖ ≤ bound s := by |
| 145 | filter_upwards [hne] with s hst |
| 146 | intro hs z hz |
| 147 | rw [uIoc_of_le ht.le] at hs |
| 148 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 149 | calc |
| 150 | ‖DG z s‖ ≤ (heatScale (t - s))⁻¹ * heatC1 V * ‖f s‖ := by |
| 151 | unfold DG |
| 152 | exact heatSupGradient_norm_le hpos (f s) z |
| 153 | _ ≤ (heatScale (t - s))⁻¹ * heatC1 V * (B : Real) := by |
| 154 | exact mul_le_mul_of_nonneg_left (hf s ⟨hs.1.le, hs.2⟩) |
| 155 | (mul_nonneg (inv_nonneg.mpr (heatScale_pos hpos).le) |
| 156 | (heatC1_nonneg (V := V))) |
| 157 | _ = bound s := by |
| 158 | rw [← heatScale12_eq hpos] |
| 159 | unfold bound heatDuhGradientMajor |
| 160 | ring |
| 161 | have hdiff : ∀ᵐ s ∂(volume : Measure Real), s ∈ uIoc (0 : Real) t → |
| 162 | ∀ z ∈ (Set.univ : Set V), HasFDerivAt (G · s) (DG z s) z := by |
| 163 | filter_upwards [hne] with s hst |
| 164 | intro hs z hz |
| 165 | rw [uIoc_of_le ht.le] at hs |
| 166 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 167 | unfold G DG |
| 168 | exact heatSup_hasFDerivAt hpos (f s) z |
| 169 | have h := intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le |
| 170 | (F := G) (F' := DG) (bound := bound) (s := (Set.univ : Set V)) |
| 171 | univ_mem hGmeas hGint hDGmeas hbound |
| 172 | (heatDuhGradientMajor_intble (V := V) B) hdiff |
| 173 | change HasFDerivAt |
| 174 | (fun z : V => ∫ s : Real in 0..t, heatSup (t - s) (f s) z) |
| 175 | (∫ s : Real in 0..t, heatSupGradient (t - s) (f s) x) x |
| 176 | exact h |
| 177 | |
| 178 | omit [CompleteSpace F] in |
| 179 | theorem heatDuhGradient_int {t : Real} (ht : 0 < t) {B : NNReal} |
| 180 | (f : Real → BoundedContinuousFunction V F) |
| 181 | (hf : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) (x : V) |
| 182 | (hmeas : AEStronglyMeasurable |
| 183 | (fun s : Real => heatSupGradient (t - s) (f s) x) |
| 184 | (volume.restrict (uIoc (0 : Real) t))) : |
| 185 | IntervalIntegrable |
| 186 | (fun s : Real => heatSupGradient (t - s) (f s) x) volume 0 t := by |
| 187 | apply (heatDuhGradientMajor_intble (V := V) B).mono_fun' hmeas |
| 188 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 189 | simp [ae_iff, measure_singleton] |
| 190 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 191 | ae_restrict_of_ae (s := uIoc (0 : Real) t) hne] with s hs hst |
| 192 | rw [uIoc_of_le ht.le] at hs |
| 193 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 194 | calc |
| 195 | ‖heatSupGradient (t - s) (f s) x‖ ≤ |
| 196 | (heatScale (t - s))⁻¹ * heatC1 V * ‖f s‖ := |
| 197 | heatSupGradient_norm_le hpos (f s) x |
| 198 | _ ≤ (heatScale (t - s))⁻¹ * heatC1 V * (B : Real) := |
| 199 | mul_le_mul_of_nonneg_left (hf s ⟨hs.1.le, hs.2⟩) |
| 200 | (mul_nonneg (inv_nonneg.mpr (heatScale_pos hpos).le) |
| 201 | (heatC1_nonneg (V := V))) |
| 202 | _ = heatDuhGradientMajor (V := V) B t s := by |
| 203 | rw [← heatScale12_eq hpos] |
| 204 | unfold heatDuhGradientMajor |
| 205 | ring |
| 206 | |
| 207 | omit [CompleteSpace F] in |
| 208 | theorem heatDuhGradientMap_apply {t : Real} (ht : 0 < t) {B : NNReal} |
| 209 | (f : Real → BoundedContinuousFunction V F) |
| 210 | (hf : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 211 | (x : V) |
| 212 | (hmeas : AEStronglyMeasurable |
| 213 | (fun s : Real => heatSupGradient (t - s) (f s) x) |
| 214 | (volume.restrict (uIoc (0 : Real) t))) |
| 215 | (v : V) : |
| 216 | heatDuhGradientMap t f x v = heatD1Duh t v f x := by |
| 217 | have hInt := heatDuhGradient_int (V := V) ht f hf x hmeas |
| 218 | unfold heatDuhGradientMap heatD1Duh |
| 219 | rw [ContinuousLinearMap.intervalIntegral_apply hInt v] |
| 220 | apply intervalIntegral.integral_congr_ae |
| 221 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 222 | simp [ae_iff, measure_singleton] |
| 223 | filter_upwards [hne] with s hst |
| 224 | intro hs |
| 225 | rw [uIoc_of_le ht.le] at hs |
| 226 | exact heatSupGradient_apply |
| 227 | (sub_pos.mpr (lt_of_le_of_ne hs.2 hst)) (f s) x v |
| 228 | |
| 229 | def heatDuhHessian (t : Real) |
| 230 | (f : Real → BoundedContinuousFunction V F) (x : V) : |
| 231 | V →L[Real] (V →L[Real] F) := |
| 232 | ∫ s : Real in 0..t, heatSupHessian (t - s) (f s) x |
| 233 | |
| 234 | def heatDuhHessianMajor (alpha K : NNReal) (t s : Real) : Real := |
| 235 | (K : Real) * heatC2Holder (V := V) alpha * holderHeatScale alpha (t - s) |
| 236 | |
| 237 | omit [Nontrivial V] [NormedAddCommGroup F] [NormedSpace Real F] |
| 238 | [CompleteSpace F] in |
| 239 | theorem heatDuhHessianMajor_intble {alpha : NNReal} (halpha : 0 < alpha) |
| 240 | {t : Real} (K : NNReal) : |
| 241 | IntervalIntegrable (heatDuhHessianMajor (V := V) alpha K t) volume 0 t := |
| 242 | (holderHeatScale_intble halpha).const_mul |
| 243 | ((K : Real) * heatC2Holder (V := V) alpha) |
| 244 | |
| 245 | theorem heatDuhGradientMap_hasFDerivAt |
| 246 | {alpha K B : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 247 | {t : Real} (ht : 0 < t) |
| 248 | (f : Real → BoundedContinuousFunction V F) |
| 249 | (hbound : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 250 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 251 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 252 | (fun s : Real => heatSupGradient (t - s) (f s) z) |
| 253 | (volume.restrict (uIoc (0 : Real) t))) |
| 254 | (hmeas2 : ∀ z : V, AEStronglyMeasurable |
| 255 | (fun s : Real => heatSupHessian (t - s) (f s) z) |
| 256 | (volume.restrict (uIoc (0 : Real) t))) |
| 257 | (x : V) : |
| 258 | HasFDerivAt (heatDuhGradientMap t f) (heatDuhHessian t f x) x := by |
| 259 | let G : V → Real → V →L[Real] F := fun z s => |
| 260 | heatSupGradient (t - s) (f s) z |
| 261 | let DG : V → Real → V →L[Real] (V →L[Real] F) := fun z s => |
| 262 | heatSupHessian (t - s) (f s) z |
| 263 | let bound : Real → Real := heatDuhHessianMajor (V := V) alpha K t |
| 264 | have hGmeas : ∀ᶠ z in 𝓝 x, |
| 265 | AEStronglyMeasurable (G z) (volume.restrict (uIoc (0 : Real) t)) := by |
| 266 | apply Filter.Eventually.of_forall |
| 267 | exact hmeas1 |
| 268 | have hGint : IntervalIntegrable (G x) volume 0 t := |
| 269 | heatDuhGradient_int ht f hbound x (hmeas1 x) |
| 270 | have hDGmeas : AEStronglyMeasurable (DG x) |
| 271 | (volume.restrict (uIoc (0 : Real) t)) := hmeas2 x |
| 272 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 273 | simp [ae_iff, measure_singleton] |
| 274 | have hmajor : ∀ᵐ s ∂(volume : Measure Real), s ∈ uIoc (0 : Real) t → |
| 275 | ∀ z ∈ (Set.univ : Set V), ‖DG z s‖ ≤ bound s := by |
| 276 | filter_upwards [hne] with s hst |
| 277 | intro hs z hz |
| 278 | rw [uIoc_of_le ht.le] at hs |
| 279 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 280 | calc |
| 281 | ‖DG z s‖ ≤ (K : Real) * holderHeatScale alpha (t - s) * |
| 282 | heatC2Holder (V := V) alpha := by |
| 283 | unfold DG |
| 284 | exact heatSupHessian_norm_le_of_holder halpha0 halpha1 hpos |
| 285 | (hf s ⟨hs.1.le, hs.2⟩) z |
| 286 | _ = bound s := by |
| 287 | unfold bound heatDuhHessianMajor |
| 288 | ring |
| 289 | have hdiff : ∀ᵐ s ∂(volume : Measure Real), s ∈ uIoc (0 : Real) t → |
| 290 | ∀ z ∈ (Set.univ : Set V), HasFDerivAt (G · s) (DG z s) z := by |
| 291 | filter_upwards [hne] with s hst |
| 292 | intro hs z hz |
| 293 | rw [uIoc_of_le ht.le] at hs |
| 294 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 295 | unfold G DG |
| 296 | exact heatSupGradient_hasFDerivAt hpos (f s) z |
| 297 | have h := intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le |
| 298 | (F := G) (F' := DG) (bound := bound) (s := (Set.univ : Set V)) |
| 299 | univ_mem hGmeas hGint hDGmeas hmajor |
| 300 | (heatDuhHessianMajor_intble (V := V) halpha0 K) hdiff |
| 301 | change HasFDerivAt |
| 302 | (fun z : V => ∫ s : Real in 0..t, heatSupGradient (t - s) (f s) z) |
| 303 | (∫ s : Real in 0..t, heatSupHessian (t - s) (f s) x) x |
| 304 | exact h |
| 305 | |
| 306 | def heatD2DuhMap (t : Real) (v : V) |
| 307 | (f : Real → BoundedContinuousFunction V F) (x : V) : V →L[Real] F := |
| 308 | ∫ s : Real in 0..t, heatD2ConvMap (t - s) v (f s) x |
| 309 | |
| 310 | def heatD2DuhMapMajor (alpha K : NNReal) (v : V) (t s : Real) : Real := |
| 311 | ‖v‖ * (K : Real) * heatC2Holder (V := V) alpha * |
| 312 | holderHeatScale alpha (t - s) |
| 313 | |
| 314 | omit [Nontrivial V] [NormedAddCommGroup F] [NormedSpace Real F] |
| 315 | [CompleteSpace F] in |
| 316 | theorem heatD2DuhMapMajor_intble {alpha : NNReal} (halpha : 0 < alpha) |
| 317 | {t : Real} (K : NNReal) (v : V) : |
| 318 | IntervalIntegrable (heatD2DuhMapMajor (V := V) alpha K v t) volume 0 t := |
| 319 | (holderHeatScale_intble halpha).const_mul |
| 320 | (‖v‖ * (K : Real) * heatC2Holder (V := V) alpha) |
| 321 | |
| 322 | theorem heatD2DuhMap_int |
| 323 | {alpha K : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 324 | {t : Real} (ht : 0 < t) |
| 325 | (f : Real → BoundedContinuousFunction V F) |
| 326 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 327 | (v x : V) |
| 328 | (hmeas : AEStronglyMeasurable |
| 329 | (fun s : Real => heatD2ConvMap (t - s) v (f s) x) |
| 330 | (volume.restrict (uIoc (0 : Real) t))) : |
| 331 | IntervalIntegrable |
| 332 | (fun s : Real => heatD2ConvMap (t - s) v (f s) x) volume 0 t := by |
| 333 | apply (heatD2DuhMapMajor_intble (V := V) halpha0 K v).mono_fun' hmeas |
| 334 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 335 | simp [ae_iff, measure_singleton] |
| 336 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 337 | ae_restrict_of_ae (s := uIoc (0 : Real) t) hne] with s hs hst |
| 338 | rw [uIoc_of_le ht.le] at hs |
| 339 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 340 | calc |
| 341 | ‖heatD2ConvMap (t - s) v (f s) x‖ ≤ |
| 342 | ‖v‖ * (K : Real) * holderHeatScale alpha (t - s) * |
| 343 | heatC2Holder (V := V) alpha := |
| 344 | heatD2ConvMap_norm_le_of_holder halpha0 halpha1 hpos v |
| 345 | (hf s ⟨hs.1.le, hs.2⟩) x |
| 346 | _ = heatD2DuhMapMajor (V := V) alpha K v t s := by |
| 347 | unfold heatD2DuhMapMajor |
| 348 | ring |
| 349 | |
| 350 | theorem heatD2DuhMap_apply |
| 351 | {alpha K : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 352 | {t : Real} (ht : 0 < t) |
| 353 | (f : Real → BoundedContinuousFunction V F) |
| 354 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 355 | (v x : V) |
| 356 | (hmeas : AEStronglyMeasurable |
| 357 | (fun s : Real => heatD2ConvMap (t - s) v (f s) x) |
| 358 | (volume.restrict (uIoc (0 : Real) t))) |
| 359 | (w : V) : |
| 360 | heatD2DuhMap t v f x w = heatD2Duh t v w (fun s => f s) x := by |
| 361 | have hInt := heatD2DuhMap_int halpha0 halpha1 ht f hf v x hmeas |
| 362 | unfold heatD2DuhMap heatD2Duh |
| 363 | rw [ContinuousLinearMap.intervalIntegral_apply hInt w] |
| 364 | apply intervalIntegral.integral_congr_ae |
| 365 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 366 | simp [ae_iff, measure_singleton] |
| 367 | filter_upwards [hne] with s hst |
| 368 | intro hs |
| 369 | rw [uIoc_of_le ht.le] at hs |
| 370 | exact heatD2ConvMap_apply (sub_pos.mpr (lt_of_le_of_ne hs.2 hst)) v (f s) x w |
| 371 | |
| 372 | theorem heatD1Duh_hasFDerivAt |
| 373 | {alpha K B : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 374 | {t : Real} (ht : 0 < t) |
| 375 | (f : Real → BoundedContinuousFunction V F) |
| 376 | (hbound : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 377 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 378 | (v : V) |
| 379 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 380 | (fun s : Real => heatD1Sup (t - s) v (f s) z) |
| 381 | (volume.restrict (uIoc (0 : Real) t))) |
| 382 | (hmeas2 : ∀ z : V, AEStronglyMeasurable |
| 383 | (fun s : Real => heatD2ConvMap (t - s) v (f s) z) |
| 384 | (volume.restrict (uIoc (0 : Real) t))) |
| 385 | (x : V) : |
| 386 | HasFDerivAt (heatD1Duh t v f) (heatD2DuhMap t v f x) x := by |
| 387 | let G : V → Real → F := fun z s => heatD1Sup (t - s) v (f s) z |
| 388 | let DG : V → Real → V →L[Real] F := fun z s => |
| 389 | heatD2ConvMap (t - s) v (f s) z |
| 390 | let bound : Real → Real := heatD2DuhMapMajor (V := V) alpha K v t |
| 391 | have hGmeas : ∀ᶠ z in 𝓝 x, |
| 392 | AEStronglyMeasurable (G z) (volume.restrict (uIoc (0 : Real) t)) := by |
| 393 | apply Filter.Eventually.of_forall |
| 394 | exact hmeas1 |
| 395 | have hGint : IntervalIntegrable (G x) volume 0 t := |
| 396 | heatD1Duh_int ht f hbound v x (hmeas1 x) |
| 397 | have hDGmeas : AEStronglyMeasurable (DG x) |
| 398 | (volume.restrict (uIoc (0 : Real) t)) := hmeas2 x |
| 399 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 400 | simp [ae_iff, measure_singleton] |
| 401 | have hmajor : ∀ᵐ s ∂(volume : Measure Real), s ∈ uIoc (0 : Real) t → |
| 402 | ∀ z ∈ (Set.univ : Set V), ‖DG z s‖ ≤ bound s := by |
| 403 | filter_upwards [hne] with s hst |
| 404 | intro hs z hz |
| 405 | rw [uIoc_of_le ht.le] at hs |
| 406 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 407 | calc |
| 408 | ‖DG z s‖ ≤ ‖v‖ * (K : Real) * holderHeatScale alpha (t - s) * |
| 409 | heatC2Holder (V := V) alpha := by |
| 410 | unfold DG |
| 411 | exact heatD2ConvMap_norm_le_of_holder halpha0 halpha1 hpos v |
| 412 | (hf s ⟨hs.1.le, hs.2⟩) z |
| 413 | _ = bound s := by |
| 414 | unfold bound heatD2DuhMapMajor |
| 415 | ring |
| 416 | have hdiff : ∀ᵐ s ∂(volume : Measure Real), s ∈ uIoc (0 : Real) t → |
| 417 | ∀ z ∈ (Set.univ : Set V), HasFDerivAt (G · s) (DG z s) z := by |
| 418 | filter_upwards [hne] with s hst |
| 419 | intro hs z hz |
| 420 | rw [uIoc_of_le ht.le] at hs |
| 421 | have hpos : 0 < t - s := sub_pos.mpr (lt_of_le_of_ne hs.2 hst) |
| 422 | unfold G DG |
| 423 | exact heatD1Sup_hasFDerivAt hpos v (f s) z |
| 424 | have h := intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le |
| 425 | (F := G) (F' := DG) (bound := bound) (s := (Set.univ : Set V)) |
| 426 | univ_mem hGmeas hGint hDGmeas hmajor |
| 427 | (heatD2DuhMapMajor_intble (V := V) halpha0 K v) hdiff |
| 428 | change HasFDerivAt |
| 429 | (fun z : V => ∫ s : Real in 0..t, heatD1Sup (t - s) v (f s) z) |
| 430 | (∫ s : Real in 0..t, heatD2ConvMap (t - s) v (f s) x) x |
| 431 | exact h |
| 432 | |
| 433 | omit [CompleteSpace F] in |
| 434 | private theorem heatD1Sup_time_aestronglyMeasurable |
| 435 | {t : Real} (ht : 0 < t) |
| 436 | (f : Real → BoundedContinuousFunction V F) |
| 437 | (hmeas : ∀ z : V, AEStronglyMeasurable |
| 438 | (fun s : Real => heatSupGradient (t - s) (f s) z) |
| 439 | (volume.restrict (uIoc (0 : Real) t))) |
| 440 | (v z : V) : |
| 441 | AEStronglyMeasurable |
| 442 | (fun s : Real => heatD1Sup (t - s) v (f s) z) |
| 443 | (volume.restrict (uIoc (0 : Real) t)) := by |
| 444 | have hcomp := ((ContinuousLinearMap.apply Real F) v).continuous |
| 445 | |>.comp_aestronglyMeasurable (hmeas z) |
| 446 | apply hcomp.congr |
| 447 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 448 | simp [ae_iff, measure_singleton] |
| 449 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 450 | ae_restrict_of_ae (s := uIoc (0 : Real) t) hne] with s hs hst |
| 451 | rw [uIoc_of_le ht.le] at hs |
| 452 | exact heatSupGradient_apply |
| 453 | (sub_pos.mpr (lt_of_le_of_ne hs.2 hst)) (f s) z v |
| 454 | |
| 455 | omit [CompleteSpace F] in |
| 456 | private theorem heatD2ConvMap_time_aestronglyMeasurable |
| 457 | {t : Real} (ht : 0 < t) |
| 458 | (f : Real → BoundedContinuousFunction V F) |
| 459 | (hmeas : ∀ z : V, AEStronglyMeasurable |
| 460 | (fun s : Real => heatSupHessian (t - s) (f s) z) |
| 461 | (volume.restrict (uIoc (0 : Real) t))) |
| 462 | (v z : V) : |
| 463 | AEStronglyMeasurable |
| 464 | (fun s : Real => heatD2ConvMap (t - s) v (f s) z) |
| 465 | (volume.restrict (uIoc (0 : Real) t)) := by |
| 466 | let L : (V →L[Real] (V →L[Real] F)) →L[Real] (V →L[Real] F) := |
| 467 | ContinuousLinearMap.compL Real V (V →L[Real] F) F |
| 468 | ((ContinuousLinearMap.apply Real F) v) |
| 469 | have hcomp := L.continuous.comp_aestronglyMeasurable (hmeas z) |
| 470 | apply hcomp.congr |
| 471 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 472 | simp [ae_iff, measure_singleton] |
| 473 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 474 | ae_restrict_of_ae (s := uIoc (0 : Real) t) hne] with s hs hst |
| 475 | rw [uIoc_of_le ht.le] at hs |
| 476 | unfold L |
| 477 | rw [ContinuousLinearMap.compL_apply] |
| 478 | exact heatSupHessian_eval_eq_heatD2ConvMap |
| 479 | (sub_pos.mpr (lt_of_le_of_ne hs.2 hst)) (f s) z v |
| 480 | |
| 481 | omit [CompleteSpace F] in |
| 482 | theorem heatD2Conv_time_aestronglyMeasurable |
| 483 | {t : Real} (ht : 0 < t) |
| 484 | (f : Real → BoundedContinuousFunction V F) |
| 485 | (hmeas : ∀ z : V, AEStronglyMeasurable |
| 486 | (fun s : Real => heatSupHessian (t - s) (f s) z) |
| 487 | (volume.restrict (uIoc (0 : Real) t))) |
| 488 | (v w z : V) : |
| 489 | AEStronglyMeasurable |
| 490 | (fun s : Real => heatD2Conv (t - s) v w (f s) z) |
| 491 | (volume.restrict (uIoc (0 : Real) t)) := by |
| 492 | have hcomp := ((ContinuousLinearMap.apply Real F) w).continuous |
| 493 | |>.comp_aestronglyMeasurable |
| 494 | (heatD2ConvMap_time_aestronglyMeasurable ht f hmeas v z) |
| 495 | apply hcomp.congr |
| 496 | have hne : ∀ᵐ s ∂(volume : Measure Real), s ≠ t := by |
| 497 | simp [ae_iff, measure_singleton] |
| 498 | filter_upwards [ae_restrict_mem measurableSet_uIoc, |
| 499 | ae_restrict_of_ae (s := uIoc (0 : Real) t) hne] with s hs hst |
| 500 | rw [uIoc_of_le ht.le] at hs |
| 501 | exact heatD2ConvMap_apply |
| 502 | (sub_pos.mpr (lt_of_le_of_ne hs.2 hst)) v (f s) z w |
| 503 | |
| 504 | theorem heatDuhHessian_apply |
| 505 | {alpha K B : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 506 | {t : Real} (ht : 0 < t) |
| 507 | (f : Real → BoundedContinuousFunction V F) |
| 508 | (hbound : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 509 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 510 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 511 | (fun s : Real => heatSupGradient (t - s) (f s) z) |
| 512 | (volume.restrict (uIoc (0 : Real) t))) |
| 513 | (hmeas2 : ∀ z : V, AEStronglyMeasurable |
| 514 | (fun s : Real => heatSupHessian (t - s) (f s) z) |
| 515 | (volume.restrict (uIoc (0 : Real) t))) |
| 516 | (x w v : V) : |
| 517 | heatDuhHessian t f x w v = |
| 518 | heatD2Duh t v w (fun s => f s) x := by |
| 519 | let L : (V →L[Real] F) →L[Real] F := |
| 520 | (ContinuousLinearMap.apply Real F) v |
| 521 | have heval := L.hasFDerivAt.comp x |
| 522 | (heatDuhGradientMap_hasFDerivAt halpha0 halpha1 ht f hbound hf |
| 523 | hmeas1 hmeas2 x) |
| 524 | have hfun : (fun z : V => L (heatDuhGradientMap t f z)) = |
| 525 | heatD1Duh t v f := by |
| 526 | funext z |
| 527 | exact heatDuhGradientMap_apply ht f hbound z (hmeas1 z) v |
| 528 | have heval' : HasFDerivAt (heatD1Duh t v f) |
| 529 | (L.comp (heatDuhHessian t f x)) x := by |
| 530 | rw [← hfun] |
| 531 | exact heval.congr_of_eventuallyEq <| |
| 532 | Filter.Eventually.of_forall fun _ => rfl |
| 533 | have hraw := heatD1Duh_hasFDerivAt halpha0 halpha1 ht f hbound hf v |
| 534 | (heatD1Sup_time_aestronglyMeasurable ht f hmeas1 v) |
| 535 | (heatD2ConvMap_time_aestronglyMeasurable ht f hmeas2 v) x |
| 536 | have hmaps := heval'.unique hraw |
| 537 | have happly := congrArg (fun A : V →L[Real] F => A w) hmaps |
| 538 | simpa only [L, ContinuousLinearMap.comp_apply, ContinuousLinearMap.apply_apply, |
| 539 | heatD2DuhMap_apply halpha0 halpha1 ht f hf v x |
| 540 | (heatD2ConvMap_time_aestronglyMeasurable ht f hmeas2 v x)] using happly |
| 541 | |
| 542 | theorem heatDuh_iteratedFDeriv_two_apply |
| 543 | {alpha K B : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 544 | {t : Real} (ht : 0 < t) |
| 545 | (f : Real → BoundedContinuousFunction V F) |
| 546 | (hbound : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 547 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 548 | (hmeas0 : ∀ z : V, AEStronglyMeasurable |
| 549 | (fun s : Real => heatSup (t - s) (f s) z) |
| 550 | (volume.restrict (uIoc (0 : Real) t))) |
| 551 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 552 | (fun s : Real => heatSupGradient (t - s) (f s) z) |
| 553 | (volume.restrict (uIoc (0 : Real) t))) |
| 554 | (hmeas2 : ∀ z : V, AEStronglyMeasurable |
| 555 | (fun s : Real => heatSupHessian (t - s) (f s) z) |
| 556 | (volume.restrict (uIoc (0 : Real) t))) |
| 557 | (x : V) (m : Fin 2 → V) : |
| 558 | iteratedFDeriv Real 2 (heatDuh t f) x m = |
| 559 | heatD2Duh t (m 1) (m 0) (fun s => f s) x := by |
| 560 | rw [iteratedFDeriv_two_apply] |
| 561 | have hgrad : fderiv Real (heatDuh t f) = heatDuhGradientMap t f := by |
| 562 | funext z |
| 563 | exact (heatDuh_hasFDerivAt ht f hbound hmeas0 hmeas1 z).fderiv |
| 564 | rw [hgrad, |
| 565 | (heatDuhGradientMap_hasFDerivAt halpha0 halpha1 ht f hbound hf |
| 566 | hmeas1 hmeas2 x).fderiv] |
| 567 | exact heatDuhHessian_apply halpha0 halpha1 ht f hbound hf hmeas1 hmeas2 |
| 568 | x (m 0) (m 1) |
| 569 | |
| 570 | theorem heatDuh_hessianCurryEquiv_iteratedFDeriv_two |
| 571 | {alpha K B : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 572 | {t : Real} (ht : 0 < t) |
| 573 | (f : Real → BoundedContinuousFunction V F) |
| 574 | (hbound : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 575 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 576 | (hmeas0 : ∀ z : V, AEStronglyMeasurable |
| 577 | (fun s : Real ↦ heatSup (t - s) (f s) z) |
| 578 | (volume.restrict (uIoc (0 : Real) t))) |
| 579 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 580 | (fun s : Real ↦ heatSupGradient (t - s) (f s) z) |
| 581 | (volume.restrict (uIoc (0 : Real) t))) |
| 582 | (hmeas2 : ∀ z : V, AEStronglyMeasurable |
| 583 | (fun s : Real ↦ heatSupHessian (t - s) (f s) z) |
| 584 | (volume.restrict (uIoc (0 : Real) t))) |
| 585 | (x : V) : |
| 586 | hessianCurryEquiv V F (iteratedFDeriv Real 2 (heatDuh t f) x) = |
| 587 | heatDuhHessian t f x := by |
| 588 | have hgrad : fderiv Real (heatDuh t f) = heatDuhGradientMap t f := by |
| 589 | funext z |
| 590 | exact (heatDuh_hasFDerivAt ht f hbound hmeas0 hmeas1 z).fderiv |
| 591 | ext v w |
| 592 | simp only [hessianCurryEquiv, LinearIsometryEquiv.trans_apply, |
| 593 | continuousMultilinearCurryFin1_apply, |
| 594 | continuousMultilinearCurryRightEquiv_apply', iteratedFDeriv_two_apply] |
| 595 | rw [hgrad, |
| 596 | (heatDuhGradientMap_hasFDerivAt halpha0 halpha1 ht f hbound hf |
| 597 | hmeas1 hmeas2 x).fderiv] |
| 598 | rfl |
| 599 | |
| 600 | theorem heatDuh_parabolicSpatialJet_two |
| 601 | {alpha K B : NNReal} (halpha0 : 0 < alpha) (halpha1 : alpha ≤ 1) |
| 602 | {t : Real} (ht : 0 < t) |
| 603 | (f : Real → BoundedContinuousFunction V F) |
| 604 | (hbound : ∀ s ∈ Icc (0 : Real) t, ‖f s‖ ≤ B) |
| 605 | (hf : ∀ s ∈ Icc (0 : Real) t, HolderWith K alpha (f s)) |
| 606 | (hmeas0 : ∀ z : V, AEStronglyMeasurable |
| 607 | (fun s : Real => heatSup (t - s) (f s) z) |
| 608 | (volume.restrict (uIoc (0 : Real) t))) |
| 609 | (hmeas1 : ∀ z : V, AEStronglyMeasurable |
| 610 | (fun s : Real => heatSupGradient (t - s) (f s) z) |
| 611 | (volume.restrict (uIoc (0 : Real) t))) |
| 612 | (hmeas2 : ∀ z : V, AEStronglyMeasurable |
| 613 | (fun s : Real => heatSupHessian (t - s) (f s) z) |
| 614 | (volume.restrict (uIoc (0 : Real) t))) |
| 615 | (x : V) (m : Fin 2 → V) : |
| 616 | parabolicSpatialJet 2 (fun r : Real => heatDuh r f) |
| 617 | (parabolicPoint t x) m = |
| 618 | heatD2Duh t (m 0) (m 1) (fun s => f s) x := by |
| 619 | unfold parabolicSpatialJet |
| 620 | simp only [parabolicPoint_time, parabolicPoint_space] |
| 621 | rw [heatDuh_iteratedFDeriv_two_apply halpha0 halpha1 ht f hbound hf |
| 622 | hmeas0 hmeas1 hmeas2] |
| 623 | exact heatD2Duh_comm t (m 1) (m 0) (fun s => f s) x |
| 624 | |
| 625 | end Poincare.Parabolic.Interior.Kernel |
| 626 | |
| 627 | end |