Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import NavierStokes.R3.HeatKernel |
| 2 | import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform |
| 3 | import NavierStokes.R3.RieszTestOperators |
| 4 | import NavierStokes.R3.ComparisonFourierSetup |
| 5 | import NavierStokes.R3.RieszSymbolRegularity |
| 6 | import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals |
| 7 | import Mathlib.Analysis.Fourier.Inversion |
| 8 | |
| 9 | /-! |
| 10 | # Fourier representation of the heat kernel |
| 11 | |
| 12 | The ordinary Gaussian Fourier formula is normalized to the three dimensional |
| 13 | heat kernel used in the comparison proof. Two justified differentiations of |
| 14 | the inverse Fourier integral identify the Hessian multiplier with its kernel. |
| 15 | -/ |
| 16 | |
| 17 | /-! ## From `NavierStokes/R3/RieszHeatRepresentation.lean` |
| 18 | |
| 19 | The text of `NavierStokes/R3/RieszHeatRepresentation.lean`, folded into this file, which was its only importer. -/ |
| 20 | |
| 21 | section |
| 22 | |
| 23 | /-! |
| 24 | # Heat multipliers for the double Riesz transform |
| 25 | |
| 26 | The Fourier convention has a factor `2 * π` in the character. Consequently the |
| 27 | heat semigroup has multiplier `exp (-4 * π² * s * ‖ξ‖²)`. Integrating its second |
| 28 | spatial derivative over positive time recovers the double Riesz multiplier. |
| 29 | -/ |
| 30 | |
| 31 | |
| 32 | noncomputable section |
| 33 | |
| 34 | open Set MeasureTheory |
| 35 | open scoped RealInnerProductSpace |
| 36 | |
| 37 | namespace NavierStokesR3.Comparison |
| 38 | |
| 39 | open ProblemStatement |
| 40 | |
| 41 | private theorem realAlgebraMap_apply (r : ℝ) : (algebraMap ℝ ℂ) r = (r : ℂ) := rfl |
| 42 | |
| 43 | /-- The Fourier multiplier of a second derivative of the heat semigroup. -/ |
| 44 | def heatSecondSymbol (s : ℝ) (i j : Fin 3) (ξ : Space) : ℝ := |
| 45 | -(4 * Real.pi ^ 2 * (ξ i * ξ j)) * |
| 46 | Real.exp (-(4 * Real.pi ^ 2 * ‖ξ‖ ^ 2) * s) |
| 47 | |
| 48 | @[simp] theorem heatSecondSymbol_zero (s : ℝ) (i j : Fin 3) : |
| 49 | heatSecondSymbol s i j 0 = 0 := by |
| 50 | simp [heatSecondSymbol] |
| 51 | |
| 52 | /-- Positive-time integrability holds also at the zero frequency. -/ |
| 53 | theorem integrableOn_heatSecondSymbol (i j : Fin 3) (ξ : Space) : |
| 54 | IntegrableOn (fun s => heatSecondSymbol s i j ξ) (Ioi 0) := by |
| 55 | by_cases hξ : ξ = 0 |
| 56 | · subst ξ |
| 57 | simp only [heatSecondSymbol_zero] |
| 58 | exact integrableOn_zero |
| 59 | · have hpos : 0 < 4 * Real.pi ^ 2 * ‖ξ‖ ^ 2 := by |
| 60 | positivity |
| 61 | exact (integrableOn_exp_mul_Ioi (neg_neg_of_pos hpos) 0).const_mul _ |
| 62 | |
| 63 | /-- Integrating the heat second-derivative multiplier gives the double Riesz symbol. -/ |
| 64 | theorem integral_heatSecondSymbol (i j : Fin 3) (ξ : Space) : |
| 65 | (∫ s : ℝ in Ioi 0, heatSecondSymbol s i j ξ) = rieszSymbol i j ξ := by |
| 66 | by_cases hξ : ξ = 0 |
| 67 | · subst ξ |
| 68 | simp [rieszSymbol] |
| 69 | · have hpos : 0 < 4 * Real.pi ^ 2 * ‖ξ‖ ^ 2 := by |
| 70 | positivity |
| 71 | have hpi : Real.pi ≠ 0 := ne_of_gt Real.pi_pos |
| 72 | have hnorm : ‖ξ‖ ≠ 0 := norm_ne_zero_iff.mpr hξ |
| 73 | simp only [heatSecondSymbol] |
| 74 | rw [integral_const_mul, |
| 75 | integral_exp_mul_Ioi (neg_neg_of_pos hpos)] |
| 76 | simp only [mul_zero, Real.exp_zero] |
| 77 | unfold rieszSymbol |
| 78 | field_simp |
| 79 | |
| 80 | /-- The absolute time integral is the absolute value of the Riesz symbol. -/ |
| 81 | theorem integral_norm_heatSecondSymbol (i j : Fin 3) (ξ : Space) : |
| 82 | (∫ s : ℝ in Ioi 0, ‖heatSecondSymbol s i j ξ‖) = ‖rieszSymbol i j ξ‖ := by |
| 83 | rw [← integral_heatSecondSymbol i j ξ] |
| 84 | simp only [heatSecondSymbol, norm_mul, Real.norm_eq_abs, |
| 85 | abs_of_pos (Real.exp_pos _), integral_const_mul] |
| 86 | rw [abs_of_nonneg (integral_nonneg fun _ => (Real.exp_pos _).le)] |
| 87 | |
| 88 | /-- A second derivative of the heat evolution, expressed in frequency space. -/ |
| 89 | def heatSecondTest (s : ℝ) (i j : Fin 3) (ψ : ComplexTest) : Space → ℂ := |
| 90 | FourierTransform.fourierInv (fun ξ : Space => |
| 91 | (heatSecondSymbol s i j ξ : ℂ) * (FourierTransform.fourierCLE ℂ ComplexTest ψ) ξ) |
| 92 | |
| 93 | private theorem heatSecondTest_eq_integral (s : ℝ) (i j : Fin 3) |
| 94 | (ψ : ComplexTest) (x : Space) : |
| 95 | heatSecondTest s i j ψ x = |
| 96 | ∫ ξ : Space, heatSecondSymbol s i j ξ • |
| 97 | (Real.fourierChar ⟪ξ, x⟫ • (FourierTransform.fourierCLE ℂ ComplexTest ψ) ξ) := by |
| 98 | rw [heatSecondTest, Real.fourierInv_eq] |
| 99 | apply integral_congr_ae |
| 100 | filter_upwards [] with ξ |
| 101 | simp only [Circle.smul_def, smul_eq_mul, Algebra.smul_def, realAlgebraMap_apply] |
| 102 | ring |
| 103 | |
| 104 | private theorem integrable_heatFourierProduct (i j : Fin 3) (ψ : ComplexTest) |
| 105 | (x : Space) : |
| 106 | Integrable (fun p : Space × ℝ => heatSecondSymbol p.2 i j p.1 • |
| 107 | (Real.fourierChar ⟪p.1, x⟫ • (FourierTransform.fourierCLE ℂ ComplexTest ψ) p.1)) |
| 108 | ((volume : Measure Space).prod ((volume : Measure ℝ).restrict (Ioi 0))) := by |
| 109 | let ψhat : ComplexTest := FourierTransform.fourierCLE ℂ ComplexTest ψ |
| 110 | have hs : Continuous (fun p : Space × ℝ => heatSecondSymbol p.2 i j p.1) := by |
| 111 | unfold heatSecondSymbol |
| 112 | fun_prop |
| 113 | have hc : Continuous (fun p : Space × ℝ => heatSecondSymbol p.2 i j p.1 • |
| 114 | (Real.fourierChar ⟪p.1, x⟫ • ψhat p.1)) := |
| 115 | hs.smul ((Real.continuous_fourierChar.comp |
| 116 | (continuous_fst.inner continuous_const)).smul (ψhat.continuous.comp continuous_fst)) |
| 117 | have hm : AEStronglyMeasurable (fun p : Space × ℝ => |
| 118 | heatSecondSymbol p.2 i j p.1 • (Real.fourierChar ⟪p.1, x⟫ • ψhat p.1)) |
| 119 | ((volume : Measure Space).prod ((volume : Measure ℝ).restrict (Ioi 0))) := |
| 120 | hc.aestronglyMeasurable |
| 121 | refine (integrable_prod_iff hm).2 ⟨?_, ?_⟩ |
| 122 | · have hslice (ξ : Space) : Integrable |
| 123 | (fun s : ℝ => heatSecondSymbol s i j ξ • |
| 124 | (Real.fourierChar ⟪ξ, x⟫ • ψhat ξ)) |
| 125 | ((volume : Measure ℝ).restrict (Ioi 0)) := |
| 126 | (integrableOn_heatSecondSymbol i j ξ).smul_const |
| 127 | (Real.fourierChar ⟪ξ, x⟫ • ψhat ξ) |
| 128 | exact Filter.Eventually.of_forall hslice |
| 129 | · refine ψhat.integrable.norm.mono' hm.norm.integral_prod_right' ?_ |
| 130 | filter_upwards [] with ξ |
| 131 | rw [Real.norm_of_nonneg (integral_nonneg fun _ => norm_nonneg _)] |
| 132 | simp only [norm_smul, Circle.norm_smul, integral_mul_const, |
| 133 | integral_norm_heatSecondSymbol] |
| 134 | exact mul_le_of_le_one_left (norm_nonneg _) (RieszTestOperators.norm_rieszSymbol_le i j ξ) |
| 135 | |
| 136 | /-- The positive-time representation converges absolutely at each spatial point. -/ |
| 137 | theorem integrableOn_heatSecondTest (i j : Fin 3) (ψ : ComplexTest) (x : Space) : |
| 138 | IntegrableOn (fun s => heatSecondTest s i j ψ x) (Ioi 0) := by |
| 139 | apply (integrable_heatFourierProduct i j ψ x).integral_prod_right.congr |
| 140 | exact Filter.Eventually.of_forall fun s => (heatSecondTest_eq_integral s i j ψ x).symm |
| 141 | |
| 142 | /-- The actual double Riesz test operator is the positive-time heat integral. -/ |
| 143 | theorem rieszTest_eq_integral_heatSecondTest (i j : Fin 3) (ψ : ComplexTest) (x : Space) : |
| 144 | rieszTest i j ψ x = ∫ s : ℝ in Ioi 0, heatSecondTest s i j ψ x := by |
| 145 | calc |
| 146 | rieszTest i j ψ x = ∫ ξ : Space, ∫ s : ℝ in Ioi 0, |
| 147 | heatSecondSymbol s i j ξ • |
| 148 | (Real.fourierChar ⟪ξ, x⟫ • (FourierTransform.fourierCLE ℂ ComplexTest ψ) ξ) := by |
| 149 | rw [rieszTest, Real.fourierInv_eq] |
| 150 | apply integral_congr_ae |
| 151 | filter_upwards [] with ξ |
| 152 | rw [integral_smul_const, integral_heatSecondSymbol] |
| 153 | simp only [Circle.smul_def, smul_eq_mul, Algebra.smul_def, realAlgebraMap_apply] |
| 154 | ring |
| 155 | _ = ∫ s : ℝ in Ioi 0, ∫ ξ : Space, heatSecondSymbol s i j ξ • |
| 156 | (Real.fourierChar ⟪ξ, x⟫ • (FourierTransform.fourierCLE ℂ ComplexTest ψ) ξ) := |
| 157 | integral_integral_swap (integrable_heatFourierProduct i j ψ x) |
| 158 | _ = ∫ s : ℝ in Ioi 0, heatSecondTest s i j ψ x := by |
| 159 | apply integral_congr_ae |
| 160 | exact Filter.Eventually.of_forall fun s => (heatSecondTest_eq_integral s i j ψ x).symm |
| 161 | |
| 162 | end NavierStokesR3.Comparison |
| 163 | end |
| 164 | |
| 165 | end |
| 166 | |
| 167 | /-! ## From `NavierStokes/R3/GaussianMoments.lean` |
| 168 | |
| 169 | The text of `NavierStokes/R3/GaussianMoments.lean`, folded into this file, which was its only importer. -/ |
| 170 | |
| 171 | section |
| 172 | |
| 173 | /-! |
| 174 | # Gaussian moments for Fourier differentiation |
| 175 | |
| 176 | The zeroth, first and second norm moments of a Gaussian are integrable. |
| 177 | The only polynomial estimate used here absorbs the square of the norm into |
| 178 | a Gaussian with half the decay rate. |
| 179 | -/ |
| 180 | |
| 181 | |
| 182 | noncomputable section |
| 183 | |
| 184 | open MeasureTheory |
| 185 | |
| 186 | namespace NavierStokesR3.Comparison |
| 187 | |
| 188 | open ProblemStatement |
| 189 | |
| 190 | /-- A real Gaussian, regarded as a complex-valued function, is integrable. -/ |
| 191 | theorem integrable_complex_gaussian {a : ℝ} (ha : 0 < a) : |
| 192 | Integrable (fun x : Space => (Real.exp (-a * ‖x‖ ^ 2) : ℂ)) := by |
| 193 | simpa only [zero_mul, add_zero, Complex.ofReal_exp, Complex.ofReal_neg, |
| 194 | Complex.ofReal_mul, Complex.ofReal_pow] using |
| 195 | GaussianFourier.integrable_cexp_neg_mul_sq_norm_add |
| 196 | (b := (a : ℂ)) (by simpa only [Complex.ofReal_re] using ha) 0 (0 : Space) |
| 197 | |
| 198 | /-- The ordinary real Gaussian is integrable on three-dimensional space. -/ |
| 199 | theorem integrable_gaussian {a : ℝ} (ha : 0 < a) : |
| 200 | Integrable (fun x : Space => Real.exp (-a * ‖x‖ ^ 2)) := by |
| 201 | refine (integrable_complex_gaussian ha).norm.congr ?_ |
| 202 | filter_upwards with x |
| 203 | exact Complex.norm_of_nonneg (Real.exp_nonneg _) |
| 204 | |
| 205 | private theorem sq_mul_gaussian_le (a r : ℝ) (ha : 0 < a) : |
| 206 | r ^ 2 * Real.exp (-a * r ^ 2) ≤ |
| 207 | (2 / a) * Real.exp (-(a / 2) * r ^ 2) := by |
| 208 | have hlinear : (a / 2) * r ^ 2 ≤ Real.exp ((a / 2) * r ^ 2) := by |
| 209 | linarith [Real.add_one_le_exp ((a / 2) * r ^ 2)] |
| 210 | have hmul := mul_le_mul_of_nonneg_right hlinear (Real.exp_nonneg (-a * r ^ 2)) |
| 211 | have he : Real.exp ((a / 2) * r ^ 2) * Real.exp (-a * r ^ 2) = |
| 212 | Real.exp (-(a / 2) * r ^ 2) := by |
| 213 | rw [← Real.exp_add] |
| 214 | congr 1 |
| 215 | ring |
| 216 | rw [he] at hmul |
| 217 | calc |
| 218 | r ^ 2 * Real.exp (-a * r ^ 2) = |
| 219 | (2 / a) * (((a / 2) * r ^ 2) * Real.exp (-a * r ^ 2)) := by |
| 220 | field_simp [ha.ne'] |
| 221 | |
| 222 | _ ≤ (2 / a) * Real.exp (-(a / 2) * r ^ 2) := |
| 223 | mul_le_mul_of_nonneg_left hmul (by positivity) |
| 224 | |
| 225 | /-- The second norm moment of a Gaussian is integrable. -/ |
| 226 | theorem integrable_norm_sq_gaussian {a : ℝ} (ha : 0 < a) : |
| 227 | Integrable (fun x : Space => ‖x‖ ^ 2 * Real.exp (-a * ‖x‖ ^ 2)) := by |
| 228 | have hc : Continuous (fun x : Space => ‖x‖ ^ 2 * Real.exp (-a * ‖x‖ ^ 2)) := by |
| 229 | fun_prop |
| 230 | refine ((integrable_gaussian (a := a / 2) (by positivity)).const_mul (2 / a)).mono' |
| 231 | hc.aestronglyMeasurable ?_ |
| 232 | filter_upwards with x |
| 233 | rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] |
| 234 | exact sq_mul_gaussian_le a ‖x‖ ha |
| 235 | |
| 236 | /-- The first norm moment follows from the zeroth and second moments. -/ |
| 237 | theorem integrable_norm_gaussian {a : ℝ} (ha : 0 < a) : |
| 238 | Integrable (fun x : Space => ‖x‖ * Real.exp (-a * ‖x‖ ^ 2)) := by |
| 239 | have hc : Continuous (fun x : Space => ‖x‖ * Real.exp (-a * ‖x‖ ^ 2)) := by |
| 240 | fun_prop |
| 241 | refine ((integrable_gaussian ha).add (integrable_norm_sq_gaussian ha)).mono' |
| 242 | hc.aestronglyMeasurable ?_ |
| 243 | filter_upwards with x |
| 244 | rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] |
| 245 | calc |
| 246 | ‖x‖ * Real.exp (-a * ‖x‖ ^ 2) ≤ |
| 247 | (1 + ‖x‖ ^ 2) * Real.exp (-a * ‖x‖ ^ 2) := by |
| 248 | apply mul_le_mul_of_nonneg_right _ (Real.exp_nonneg _) |
| 249 | linarith [sq_nonneg (‖x‖ - 1 / 2)] |
| 250 | _ = Real.exp (-a * ‖x‖ ^ 2) + ‖x‖ ^ 2 * Real.exp (-a * ‖x‖ ^ 2) := by ring |
| 251 | |
| 252 | end NavierStokesR3.Comparison |
| 253 | end |
| 254 | |
| 255 | end |
| 256 | |
| 257 | noncomputable section |
| 258 | |
| 259 | open MeasureTheory |
| 260 | |
| 261 | namespace NavierStokesR3.Comparison |
| 262 | |
| 263 | open ProblemStatement |
| 264 | |
| 265 | theorem fourierIntegral_gaussian_real {a : ℝ} (ha : 0 < a) (z : Space) : |
| 266 | FourierTransform.fourier (fun ξ : Space => (Real.exp (-a * ‖ξ‖ ^ 2) : ℂ)) z = |
| 267 | (((Real.pi / a) ^ (3 / 2 : ℝ) * |
| 268 | Real.exp (-Real.pi ^ 2 * ‖z‖ ^ 2 / a) : ℝ) : ℂ) := by |
| 269 | have hdim : Module.finrank ℝ Space = 3 := by |
| 270 | simp [Space, NavierStokes.ProblemStatement.Space] |
| 271 | have hpow : ((Real.pi : ℂ) / (a : ℂ)) ^ ((3 : ℂ) / 2) = |
| 272 | (((Real.pi / a) ^ (3 / 2 : ℝ) : ℝ) : ℂ) := by |
| 273 | rw [← Complex.ofReal_div, Complex.ofReal_cpow (by positivity)] |
| 274 | simp |
| 275 | have h := fourier_gaussian_innerProductSpace |
| 276 | (V := Space) (b := (a : ℂ)) (by simpa using ha) z |
| 277 | rw [hdim] at h |
| 278 | norm_num only [Nat.cast_ofNat] at h |
| 279 | rw [hpow] at h |
| 280 | simpa only [Complex.ofReal_exp, Complex.ofReal_mul, Complex.ofReal_div, |
| 281 | Complex.ofReal_neg, Complex.ofReal_pow] using h |
| 282 | |
| 283 | /-- Inverse Fourier transform of the heat semigroup's Gaussian multiplier. -/ |
| 284 | theorem fourierIntegralInv_heatGaussian {s : ℝ} (hs : 0 < s) (z : Space) : |
| 285 | FourierTransform.fourierInv |
| 286 | (fun ξ : Space => (Real.exp (-(4 * Real.pi ^ 2 * s) * ‖ξ‖ ^ 2) : ℂ)) z = |
| 287 | (heatKernel s z : ℂ) := by |
| 288 | have ha : 0 < 4 * Real.pi ^ 2 * s := by positivity |
| 289 | have hb : 0 < 4 * Real.pi * s := by positivity |
| 290 | rw [Real.fourierInv_eq_fourier_neg, fourierIntegral_gaussian_real ha] |
| 291 | simp only [norm_neg] |
| 292 | have hratio : Real.pi / (4 * Real.pi ^ 2 * s) = (4 * Real.pi * s)⁻¹ := by |
| 293 | field_simp [Real.pi_ne_zero, hs.ne'] |
| 294 | have hpower : (Real.pi / (4 * Real.pi ^ 2 * s)) ^ (3 / 2 : ℝ) = |
| 295 | (4 * Real.pi * s) ^ (-(3 / 2 : ℝ)) := by |
| 296 | rw [hratio, Real.rpow_def_of_pos (inv_pos.mpr hb), Real.rpow_def_of_pos hb, |
| 297 | Real.log_inv] |
| 298 | congr 1 |
| 299 | ring |
| 300 | have hexponent : -Real.pi ^ 2 * ‖z‖ ^ 2 / (4 * Real.pi ^ 2 * s) = |
| 301 | -(‖z‖ ^ 2) / (4 * s) := by |
| 302 | field_simp [Real.pi_ne_zero, hs.ne'] |
| 303 | rw [hpower, hexponent] |
| 304 | rfl |
| 305 | |
| 306 | private theorem continuous_complex_coordinate (i : Fin 3) : |
| 307 | Continuous (fun x : Space => (x i : ℂ)) := by |
| 308 | exact Complex.continuous_ofReal.comp |
| 309 | ((continuous_apply i).comp (EuclideanSpace.equiv (Fin 3) ℝ).continuous) |
| 310 | |
| 311 | private theorem norm_coordinate_multiplier_le (c : ℂ) (i : Fin 3) |
| 312 | (f : Space → ℂ) (ξ : Space) : |
| 313 | ‖c * (ξ i : ℂ) * f ξ‖ ≤ ‖c‖ * (‖ξ‖ * ‖f ξ‖) := by |
| 314 | have hcoord : ‖(ξ i : ℂ)‖ ≤ ‖ξ‖ := by |
| 315 | simpa only [Complex.norm_real] using PiLp.norm_apply_le ξ i |
| 316 | rw [norm_mul, norm_mul] |
| 317 | calc |
| 318 | _ ≤ ‖c‖ * ‖ξ‖ * ‖f ξ‖ := |
| 319 | mul_le_mul_of_nonneg_right |
| 320 | (mul_le_mul_of_nonneg_left hcoord (norm_nonneg _)) (norm_nonneg _) |
| 321 | _ = _ := by ring |
| 322 | |
| 323 | private theorem integrable_coordinate_multiplier {f : Space → ℂ} |
| 324 | (c : ℂ) (i : Fin 3) (hf : AEStronglyMeasurable f) |
| 325 | (h1 : Integrable (fun ξ : Space => ‖ξ‖ * ‖f ξ‖)) : |
| 326 | Integrable (fun ξ : Space => c * (ξ i : ℂ) * f ξ) := by |
| 327 | apply (h1.const_mul ‖c‖).mono' |
| 328 | · exact (continuous_const.mul (continuous_complex_coordinate i)).aestronglyMeasurable.mul hf |
| 329 | · filter_upwards with ξ |
| 330 | exact norm_coordinate_multiplier_le c i f ξ |
| 331 | |
| 332 | private theorem integrable_coordinate_multiplier_moment {f : Space → ℂ} |
| 333 | (c : ℂ) (i : Fin 3) (hf : AEStronglyMeasurable f) |
| 334 | (h2 : Integrable (fun ξ : Space => ‖ξ‖ ^ 2 * ‖f ξ‖)) : |
| 335 | Integrable (fun ξ : Space => ‖ξ‖ * ‖c * (ξ i : ℂ) * f ξ‖) := by |
| 336 | have hF : AEStronglyMeasurable (fun ξ : Space => c * (ξ i : ℂ) * f ξ) := |
| 337 | (continuous_const.mul (continuous_complex_coordinate i)).aestronglyMeasurable.mul hf |
| 338 | apply (h2.const_mul ‖c‖).mono' |
| 339 | · exact continuous_norm.aestronglyMeasurable.mul hF.norm |
| 340 | · filter_upwards with ξ |
| 341 | rw [norm_mul, norm_norm, norm_norm] |
| 342 | calc |
| 343 | _ ≤ ‖ξ‖ * (‖c‖ * (‖ξ‖ * ‖f ξ‖)) := |
| 344 | mul_le_mul_of_nonneg_left (norm_coordinate_multiplier_le c i f ξ) (norm_nonneg _) |
| 345 | _ = _ := by ring |
| 346 | |
| 347 | private theorem partialD_ofReal {f : Space → ℝ} (hf : Differentiable ℝ f) |
| 348 | (i : Fin 3) (z : Space) : |
| 349 | partialD i (fun x : Space => (f x : ℂ)) z = (partialD (E := ℝ) i f z : ℂ) := by |
| 350 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 351 | change fderiv ℝ (Complex.ofRealCLM ∘ f) z |
| 352 | (NavierStokes.ProblemStatement.coordinateVector i) = _ |
| 353 | rw [((Complex.ofRealCLM.hasFDerivAt).comp z (hf z).hasFDerivAt).fderiv] |
| 354 | rfl |
| 355 | |
| 356 | private theorem differentiable_partial_heatKernel {s : ℝ} (hs : 0 < s) (j : Fin 3) : |
| 357 | Differentiable ℝ (partialD j (heatKernel s)) := by |
| 358 | have hc : Differentiable ℝ (fun x : Space => x j) := by |
| 359 | convert! (innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)).differentiable |
| 360 | using 1 |
| 361 | ext x |
| 362 | simp [NavierStokes.ProblemStatement.coordinateVector, EuclideanSpace.inner_single_left] |
| 363 | rw [show partialD j (heatKernel s) = |
| 364 | (fun x : Space => -(x j / (2 * s)) * heatKernel s x) from |
| 365 | funext (partial_heatKernel hs j)] |
| 366 | simpa only [div_eq_mul_inv] using! |
| 367 | ((hc.mul_const ((2 * s)⁻¹)).neg.mul (differentiable_heatKernel hs)) |
| 368 | |
| 369 | private theorem secondPartial_ofReal_heatKernel {s : ℝ} (hs : 0 < s) |
| 370 | (i j : Fin 3) (z : Space) : |
| 371 | partialD i (partialD j (fun x : Space => (heatKernel s x : ℂ))) z = |
| 372 | (heatKernelSecond s i j z : ℂ) := by |
| 373 | have hfirst : partialD j (fun x : Space => (heatKernel s x : ℂ)) = |
| 374 | (fun x : Space => (partialD (E := ℝ) j (heatKernel s) x : ℂ)) := |
| 375 | funext (partialD_ofReal (differentiable_heatKernel hs) j) |
| 376 | rw [hfirst, partialD_ofReal (differentiable_partial_heatKernel hs j) i z, |
| 377 | ← heatKernelSecond_eq_partial hs i j z] |
| 378 | |
| 379 | private theorem heatKernelFourierData {s : ℝ} (hs : 0 < s) (i j : Fin 3) : |
| 380 | Integrable (fun ξ : Space => (heatSecondSymbol s i j ξ : ℂ)) ∧ |
| 381 | ∀ z : Space, FourierTransform.fourierInv |
| 382 | (fun ξ : Space => (heatSecondSymbol s i j ξ : ℂ)) z = |
| 383 | (heatKernelSecond s i j z : ℂ) := by |
| 384 | let a : ℝ := 4 * Real.pi ^ 2 * s |
| 385 | let g : Space → ℂ := fun ξ => (Real.exp (-a * ‖ξ‖ ^ 2) : ℂ) |
| 386 | let c : ℂ := 2 * Real.pi * Complex.I |
| 387 | let f1 : Space → ℂ := fun ξ => c * (ξ j : ℂ) * g ξ |
| 388 | let f2 : Space → ℂ := fun ξ => c * (ξ i : ℂ) * f1 ξ |
| 389 | have ha : 0 < a := by dsimp [a]; positivity |
| 390 | have hg : Integrable g := integrable_complex_gaussian ha |
| 391 | have hg1 : Integrable (fun ξ : Space => ‖ξ‖ * ‖g ξ‖) := by |
| 392 | simpa only [g, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] using |
| 393 | integrable_norm_gaussian ha |
| 394 | have hg2 : Integrable (fun ξ : Space => ‖ξ‖ ^ 2 * ‖g ξ‖) := by |
| 395 | simpa only [g, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] using |
| 396 | integrable_norm_sq_gaussian ha |
| 397 | have hf1 : Integrable f1 := |
| 398 | integrable_coordinate_multiplier c j hg.aestronglyMeasurable hg1 |
| 399 | have hf1moment : Integrable (fun ξ : Space => ‖ξ‖ * ‖f1 ξ‖) := |
| 400 | integrable_coordinate_multiplier_moment c j hg.aestronglyMeasurable hg2 |
| 401 | have hf2 : Integrable f2 := |
| 402 | integrable_coordinate_multiplier c i hf1.aestronglyMeasurable hf1moment |
| 403 | have hf2eq : f2 = (fun ξ : Space => (heatSecondSymbol s i j ξ : ℂ)) := by |
| 404 | funext ξ |
| 405 | dsimp [f2, f1, g, c, a] |
| 406 | unfold heatSecondSymbol |
| 407 | have he : -(4 * Real.pi ^ 2 * s) * ‖ξ‖ ^ 2 = |
| 408 | -(4 * Real.pi ^ 2 * ‖ξ‖ ^ 2) * s := by ring |
| 409 | rw [he] |
| 410 | push_cast |
| 411 | ring_nf |
| 412 | simp [Complex.I_sq] |
| 413 | have h0 : FourierTransform.fourierInv g = (fun x : Space => (heatKernel s x : ℂ)) := by |
| 414 | funext x |
| 415 | exact fourierIntegralInv_heatGaussian hs x |
| 416 | have hd1 : partialD j (FourierTransform.fourierInv g) = FourierTransform.fourierInv f1 := by |
| 417 | funext x |
| 418 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 419 | simpa [f1, c, NavierStokes.ProblemStatement.coordinateVector, |
| 420 | EuclideanSpace.inner_single_right] using |
| 421 | RieszTestOperators.fderiv_fourierInv_apply hg hg1 x |
| 422 | (NavierStokes.ProblemStatement.coordinateVector j) |
| 423 | have hd2 : partialD i (FourierTransform.fourierInv f1) = FourierTransform.fourierInv f2 := by |
| 424 | funext x |
| 425 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 426 | simpa [f2, c, NavierStokes.ProblemStatement.coordinateVector, |
| 427 | EuclideanSpace.inner_single_right] using |
| 428 | RieszTestOperators.fderiv_fourierInv_apply hf1 hf1moment x |
| 429 | (NavierStokes.ProblemStatement.coordinateVector i) |
| 430 | constructor |
| 431 | · rw [← hf2eq] |
| 432 | exact hf2 |
| 433 | · intro z |
| 434 | rw [← hf2eq, ← hd2, ← hd1, h0] |
| 435 | exact secondPartial_ofReal_heatKernel hs i j z |
| 436 | |
| 437 | /-- The positive-time heat Hessian multiplier is integrable in frequency. -/ |
| 438 | theorem integrable_heatSecondSymbol_space {s : ℝ} (hs : 0 < s) (i j : Fin 3) : |
| 439 | Integrable (fun ξ : Space => (heatSecondSymbol s i j ξ : ℂ)) := |
| 440 | (heatKernelFourierData hs i j).1 |
| 441 | |
| 442 | /-- The inverse Fourier transform of the heat Hessian multiplier is its actual kernel. -/ |
| 443 | theorem fourierIntegralInv_heatSecondSymbol {s : ℝ} (hs : 0 < s) |
| 444 | (i j : Fin 3) (z : Space) : |
| 445 | FourierTransform.fourierInv (fun ξ : Space => (heatSecondSymbol s i j ξ : ℂ)) z = |
| 446 | (heatKernelSecond s i j z : ℂ) := |
| 447 | (heatKernelFourierData hs i j).2 z |
| 448 | |
| 449 | end NavierStokesR3.Comparison |