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.DiophantineGraph |
| 2 | import Mathlib.Analysis.Calculus.SmoothSeries |
| 3 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 4 | import Mathlib.Analysis.Fourier.AddCircle |
| 5 | import Mathlib.MeasureTheory.Integral.Prod |
| 6 | import Mathlib.MeasureTheory.Integral.DominatedConvergence |
| 7 | |
| 8 | /-! |
| 9 | # Smooth Fourier series and directional inversion on the two-dimensional torus |
| 10 | |
| 11 | We work on the universal cover `ℝ × ℝ`, with frequencies in `ℤ × ℤ`. |
| 12 | Rapid coefficients have summable polynomially weighted norms of every order. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | namespace NavierStokes.TorusInverse |
| 18 | |
| 19 | open scoped BigOperators Topology ContDiff |
| 20 | |
| 21 | abbrev Frequency := ℤ × ℤ |
| 22 | abbrev Plane := ℝ × ℝ |
| 23 | |
| 24 | def weight (k : Frequency) : ℝ := 1 + |(k.1 : ℝ)| + |(k.2 : ℝ)| |
| 25 | |
| 26 | theorem weight_pos (k : Frequency) : 0 < weight k := by |
| 27 | unfold weight |
| 28 | positivity |
| 29 | |
| 30 | /-- Polynomially weighted absolute summability of every order. -/ |
| 31 | def Rapid (a : Frequency → ℂ) : Prop := |
| 32 | ∀ p : ℕ, Summable (fun k => weight k ^ p * ‖a k‖) |
| 33 | |
| 34 | theorem Rapid.summable_norm {a : Frequency → ℂ} (ha : Rapid a) : |
| 35 | Summable (fun k => ‖a k‖) := by |
| 36 | simpa using ha 0 |
| 37 | |
| 38 | theorem Rapid.mul_linear {a b : Frequency → ℂ} (ha : Rapid a) (C : ℝ) |
| 39 | (hb : ∀ k, ‖b k‖ ≤ C * weight k) : Rapid (fun k => b k * a k) := by |
| 40 | intro p |
| 41 | apply Summable.of_nonneg_of_le |
| 42 | (fun k => mul_nonneg (pow_nonneg (weight_pos k).le _) (norm_nonneg _)) _ |
| 43 | ((ha (p + 1)).mul_left C) |
| 44 | intro k |
| 45 | calc |
| 46 | weight k ^ p * ‖b k * a k‖ = weight k ^ p * (‖b k‖ * ‖a k‖) := by rw [norm_mul] |
| 47 | _ ≤ weight k ^ p * ((C * weight k) * ‖a k‖) := by |
| 48 | apply mul_le_mul_of_nonneg_left _ (pow_nonneg (weight_pos k).le _) |
| 49 | exact mul_le_mul_of_nonneg_right (hb k) (norm_nonneg _) |
| 50 | _ = C * (weight k ^ (p + 1) * ‖a k‖) := by rw [pow_succ]; ring |
| 51 | |
| 52 | def omega : ℂ := 2 * Real.pi * Complex.I |
| 53 | |
| 54 | def freqX (k : Frequency) : ℂ := omega * (k.1 : ℂ) |
| 55 | def freqY (k : Frequency) : ℂ := omega * (k.2 : ℂ) |
| 56 | |
| 57 | def dx : Plane →L[ℝ] ℝ := ContinuousLinearMap.fst ℝ ℝ ℝ |
| 58 | def dy : Plane →L[ℝ] ℝ := ContinuousLinearMap.snd ℝ ℝ ℝ |
| 59 | |
| 60 | def liftX : ℂ →L[ℝ] (Plane →L[ℝ] ℂ) := ContinuousLinearMap.smulRightL ℝ Plane ℂ dx |
| 61 | def liftY : ℂ →L[ℝ] (Plane →L[ℝ] ℂ) := ContinuousLinearMap.smulRightL ℝ Plane ℂ dy |
| 62 | |
| 63 | @[simp] theorem liftX_apply (c : ℂ) (x : Plane) : liftX c x = x.1 • c := rfl |
| 64 | @[simp] theorem liftY_apply (c : ℂ) (x : Plane) : liftY c x = x.2 • c := rfl |
| 65 | |
| 66 | def phase (k : Frequency) : Plane →L[ℝ] ℂ := liftX (freqX k) + liftY (freqY k) |
| 67 | |
| 68 | def mode (k : Frequency) (x : Plane) : ℂ := Complex.exp (phase k x) |
| 69 | |
| 70 | theorem phase_formula (k : Frequency) (x : Plane) : |
| 71 | phase k x = omega * ((k.1 : ℂ) * (x.1 : ℂ) + (k.2 : ℂ) * (x.2 : ℂ)) := by |
| 72 | simp only [phase, freqX, freqY, add_apply, |
| 73 | liftX_apply, liftY_apply, Complex.real_smul] |
| 74 | ring |
| 75 | |
| 76 | theorem norm_mode (k : Frequency) (x : Plane) : ‖mode k x‖ = 1 := by |
| 77 | rw [mode, Complex.norm_exp, phase_formula] |
| 78 | simp [omega, Complex.mul_re, Complex.mul_im] |
| 79 | |
| 80 | theorem continuous_mode (k : Frequency) : Continuous (mode k) := |
| 81 | Complex.continuous_exp.comp (phase k).continuous |
| 82 | |
| 83 | def derivX (a : Frequency → ℂ) (k : Frequency) : ℂ := freqX k * a k |
| 84 | def derivY (a : Frequency → ℂ) (k : Frequency) : ℂ := freqY k * a k |
| 85 | |
| 86 | theorem norm_freqX_le (k : Frequency) : ‖freqX k‖ ≤ ‖omega‖ * weight k := by |
| 87 | rw [freqX, norm_mul, Complex.norm_intCast] |
| 88 | apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) |
| 89 | unfold weight |
| 90 | have := abs_nonneg (k.2 : ℝ) |
| 91 | linarith |
| 92 | |
| 93 | theorem norm_freqY_le (k : Frequency) : ‖freqY k‖ ≤ ‖omega‖ * weight k := by |
| 94 | rw [freqY, norm_mul, Complex.norm_intCast] |
| 95 | apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) |
| 96 | unfold weight |
| 97 | have := abs_nonneg (k.1 : ℝ) |
| 98 | linarith |
| 99 | |
| 100 | theorem Rapid.derivX {a : Frequency → ℂ} (ha : Rapid a) : Rapid (derivX a) := |
| 101 | ha.mul_linear ‖omega‖ norm_freqX_le |
| 102 | |
| 103 | theorem Rapid.derivY {a : Frequency → ℂ} (ha : Rapid a) : Rapid (derivY a) := |
| 104 | ha.mul_linear ‖omega‖ norm_freqY_le |
| 105 | |
| 106 | def series (a : Frequency → ℂ) (x : Plane) : ℂ := ∑' k, a k * mode k x |
| 107 | |
| 108 | theorem summable_terms {a : Frequency → ℂ} (ha : Rapid a) (x : Plane) : |
| 109 | Summable (fun k => a k * mode k x) := by |
| 110 | apply Summable.of_norm |
| 111 | simpa only [norm_mul, norm_mode, mul_one] using ha.summable_norm |
| 112 | |
| 113 | theorem continuous_series {a : Frequency → ℂ} (ha : Rapid a) : Continuous (series a) := by |
| 114 | apply continuous_tsum (fun k => continuous_const.fun_mul (continuous_mode k)) ha.summable_norm |
| 115 | intro k x |
| 116 | simp only [norm_mul, norm_mode, mul_one, le_refl] |
| 117 | |
| 118 | def termDeriv (a : Frequency → ℂ) (k : Frequency) (x : Plane) : Plane →L[ℝ] ℂ := |
| 119 | liftX (derivX a k * mode k x) + liftY (derivY a k * mode k x) |
| 120 | |
| 121 | theorem hasFDerivAt_term (a : Frequency → ℂ) (k : Frequency) (x : Plane) : |
| 122 | HasFDerivAt (fun y => a k * mode k y) (termDeriv a k x) x := by |
| 123 | have h := ((phase k).hasFDerivAt (x := x)).cexp.const_mul (a k) |
| 124 | have hd : termDeriv a k x = a k • (Complex.exp (phase k x) • phase k) := by |
| 125 | apply ContinuousLinearMap.ext |
| 126 | intro y |
| 127 | simp only [termDeriv, phase, derivX, derivY, liftX_apply, liftY_apply, |
| 128 | add_apply, smul_apply, |
| 129 | Complex.real_smul, smul_eq_mul, mode] |
| 130 | ring |
| 131 | simpa only [mode, hd] using h |
| 132 | |
| 133 | def derivativeMajorant (a : Frequency → ℂ) (k : Frequency) : ℝ := |
| 134 | ‖liftX‖ * ‖derivX a k‖ + ‖liftY‖ * ‖derivY a k‖ |
| 135 | |
| 136 | theorem summable_derivativeMajorant {a : Frequency → ℂ} (ha : Rapid a) : |
| 137 | Summable (derivativeMajorant a) := |
| 138 | (ha.derivX.summable_norm.mul_left ‖liftX‖).add |
| 139 | (ha.derivY.summable_norm.mul_left ‖liftY‖) |
| 140 | |
| 141 | theorem norm_termDeriv_le (a : Frequency → ℂ) (k : Frequency) (x : Plane) : |
| 142 | ‖termDeriv a k x‖ ≤ derivativeMajorant a k := by |
| 143 | apply (norm_add_le _ _).trans |
| 144 | apply add_le_add |
| 145 | · simpa only [norm_mul, norm_mode, mul_one] using |
| 146 | liftX.le_opNorm (derivX a k * mode k x) |
| 147 | · simpa only [norm_mul, norm_mode, mul_one] using |
| 148 | liftY.le_opNorm (derivY a k * mode k x) |
| 149 | |
| 150 | theorem summable_termDeriv {a : Frequency → ℂ} (ha : Rapid a) (x : Plane) : |
| 151 | Summable (fun k => termDeriv a k x) := |
| 152 | Summable.of_norm_bounded (summable_derivativeMajorant ha) (fun k => norm_termDeriv_le a k x) |
| 153 | |
| 154 | theorem hasFDerivAt_series {a : Frequency → ℂ} (ha : Rapid a) (x : Plane) : |
| 155 | HasFDerivAt (series a) (∑' k, termDeriv a k x) x := by |
| 156 | exact hasFDerivAt_tsum (summable_derivativeMajorant ha) (hasFDerivAt_term a) |
| 157 | (norm_termDeriv_le a) (summable_terms ha (0 : Plane)) x |
| 158 | |
| 159 | theorem fderiv_series {a : Frequency → ℂ} (ha : Rapid a) (x : Plane) : |
| 160 | fderiv ℝ (series a) x = liftX (series (derivX a) x) + liftY (series (derivY a) x) := by |
| 161 | rw [(hasFDerivAt_series ha x).fderiv] |
| 162 | have hx := liftX.summable (summable_terms ha.derivX x) |
| 163 | have hy := liftY.summable (summable_terms ha.derivY x) |
| 164 | rw [show (fun k => termDeriv a k x) = |
| 165 | (fun k => liftX (derivX a k * mode k x) + liftY (derivY a k * mode k x)) from rfl] |
| 166 | rw [Summable.tsum_add hx hy, ← liftX.map_tsum (summable_terms ha.derivX x), |
| 167 | ← liftY.map_tsum (summable_terms ha.derivY x)] |
| 168 | rfl |
| 169 | |
| 170 | /-- Smoothness is proved from summability and termwise differentiation. -/ |
| 171 | theorem contDiff_series_nat (p : ℕ) {a : Frequency → ℂ} (ha : Rapid a) : |
| 172 | ContDiff ℝ p (series a) := by |
| 173 | induction p generalizing a with |
| 174 | | zero => exact contDiff_zero.mpr (continuous_series ha) |
| 175 | | succ p ih => |
| 176 | rw [show ((p + 1 : ℕ) : WithTop ℕ∞) = (p : WithTop ℕ∞) + 1 by simp, |
| 177 | contDiff_succ_iff_fderiv] |
| 178 | refine ⟨(fun x => (hasFDerivAt_series ha x).differentiableAt), ?_, ?_⟩ |
| 179 | · simp |
| 180 | · have heq : fderiv ℝ (series a) = |
| 181 | (fun x => liftX (series (derivX a) x) + liftY (series (derivY a) x)) := |
| 182 | funext (fderiv_series ha) |
| 183 | rw [heq] |
| 184 | exact (liftX.contDiff.comp (ih ha.derivX)).add (liftY.contDiff.comp (ih ha.derivY)) |
| 185 | |
| 186 | theorem contDiff_series {a : Frequency → ℂ} (ha : Rapid a) : |
| 187 | ContDiff ℝ ∞ (series a) := |
| 188 | contDiff_infty.mpr (fun p => contDiff_series_nat p ha) |
| 189 | |
| 190 | inductive Direction |
| 191 | | radial |
| 192 | | temporal |
| 193 | deriving DecidableEq |
| 194 | |
| 195 | def vector : Direction → Plane |
| 196 | | .radial => (1, 1 - Real.sqrt 2) |
| 197 | | .temporal => (Real.sqrt 2 - 1, 1) |
| 198 | |
| 199 | def symbol : Direction → Frequency → ℝ |
| 200 | | .radial, k => DiophantineGraph.radialSymbol k.1 k.2 |
| 201 | | .temporal, k => DiophantineGraph.timeSymbol k.1 k.2 |
| 202 | |
| 203 | theorem pair_nonzero {k : Frequency} (hk : k ≠ 0) : k.1 ≠ 0 ∨ k.2 ≠ 0 := by |
| 204 | by_cases h₁ : k.1 = 0 |
| 205 | · right |
| 206 | intro h₂ |
| 207 | exact hk (Prod.ext h₁ h₂) |
| 208 | · exact Or.inl h₁ |
| 209 | |
| 210 | theorem symbol_formula (d : Direction) (k : Frequency) : |
| 211 | symbol d k = (k.1 : ℝ) * (vector d).1 + (k.2 : ℝ) * (vector d).2 := by |
| 212 | cases d <;> simp only [symbol, vector, DiophantineGraph.radialSymbol_formula, |
| 213 | DiophantineGraph.timeSymbol_formula] <;> ring |
| 214 | |
| 215 | theorem symbol_ne_zero (d : Direction) {k : Frequency} (hk : k ≠ 0) : symbol d k ≠ 0 := by |
| 216 | cases d |
| 217 | · exact DiophantineGraph.radialSymbol_ne_zero k.1 k.2 (pair_nonzero hk) |
| 218 | · exact DiophantineGraph.timeSymbol_ne_zero k.1 k.2 (pair_nonzero hk) |
| 219 | |
| 220 | theorem length_le_weight (k : Frequency) : |
| 221 | 1 + DiophantineGraph.frequencyLength k.1 k.2 ≤ weight k := by |
| 222 | have hs := DiophantineGraph.frequencyLength_nonneg k.1 k.2 |
| 223 | have hsq : DiophantineGraph.frequencyLength k.1 k.2 ^ 2 = |
| 224 | (k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2 := Real.sq_sqrt (by positivity) |
| 225 | have ht : DiophantineGraph.frequencyLength k.1 k.2 ≤ |
| 226 | |(k.1 : ℝ)| + |(k.2 : ℝ)| := by |
| 227 | apply (sq_le_sq₀ hs (by positivity)).mp |
| 228 | rw [hsq] |
| 229 | nlinarith [sq_abs (k.1 : ℝ), sq_abs (k.2 : ℝ), |
| 230 | mul_nonneg (abs_nonneg (k.1 : ℝ)) (abs_nonneg (k.2 : ℝ))] |
| 231 | unfold weight |
| 232 | linarith |
| 233 | |
| 234 | theorem reciprocal_symbol_bound (d : Direction) {k : Frequency} (hk : k ≠ 0) : |
| 235 | |1 / symbol d k| ≤ 6 * weight k := by |
| 236 | have hb : |1 / symbol d k| ≤ |
| 237 | 6 * (1 + DiophantineGraph.frequencyLength k.1 k.2) := by |
| 238 | cases d |
| 239 | · exact DiophantineGraph.radial_reciprocal_bound k.1 k.2 (pair_nonzero hk) |
| 240 | · exact DiophantineGraph.time_reciprocal_bound k.1 k.2 (pair_nonzero hk) |
| 241 | exact hb.trans (mul_le_mul_of_nonneg_left (length_le_weight k) (by norm_num)) |
| 242 | |
| 243 | theorem omega_ne_zero : omega ≠ 0 := by |
| 244 | unfold omega |
| 245 | exact mul_ne_zero (mul_ne_zero (by norm_num) |
| 246 | (Complex.ofReal_ne_zero.mpr Real.pi_ne_zero)) Complex.I_ne_zero |
| 247 | |
| 248 | def multiplier (d : Direction) (k : Frequency) : ℂ := (omega * (symbol d k : ℂ))⁻¹ |
| 249 | def inverseCoeff (d : Direction) (a : Frequency → ℂ) (k : Frequency) : ℂ := |
| 250 | multiplier d k * a k |
| 251 | |
| 252 | @[simp] theorem symbol_zero (d : Direction) : symbol d 0 = 0 := by |
| 253 | cases d <;> simp [symbol, DiophantineGraph.radialSymbol, |
| 254 | DiophantineGraph.timeSymbol, DiophantineGraph.quadraticForm] |
| 255 | |
| 256 | @[simp] theorem inverseCoeff_zero (d : Direction) (a : Frequency → ℂ) : |
| 257 | inverseCoeff d a 0 = 0 := by |
| 258 | simp [inverseCoeff, multiplier] |
| 259 | |
| 260 | theorem norm_multiplier_le (d : Direction) (k : Frequency) : |
| 261 | ‖multiplier d k‖ ≤ (6 * ‖omega⁻¹‖) * weight k := by |
| 262 | by_cases hk : k = 0 |
| 263 | · subst k |
| 264 | simp only [multiplier, symbol_zero, Complex.ofReal_zero, mul_zero, inv_zero, norm_zero] |
| 265 | exact mul_nonneg (mul_nonneg (by norm_num) (norm_nonneg _)) (weight_pos _).le |
| 266 | · have h := reciprocal_symbol_bound d hk |
| 267 | calc |
| 268 | ‖multiplier d k‖ = ‖omega⁻¹‖ * |1 / symbol d k| := by |
| 269 | simp [multiplier, Complex.norm_real, Real.norm_eq_abs, |
| 270 | abs_inv, one_div, mul_inv_rev, mul_comm] |
| 271 | _ ≤ ‖omega⁻¹‖ * (6 * weight k) := mul_le_mul_of_nonneg_left h (norm_nonneg _) |
| 272 | _ = _ := by ring |
| 273 | |
| 274 | theorem Rapid.inverseCoeff {a : Frequency → ℂ} (ha : Rapid a) (d : Direction) : |
| 275 | Rapid (inverseCoeff d a) := ha.mul_linear (6 * ‖omega⁻¹‖) (norm_multiplier_le d) |
| 276 | |
| 277 | /-- The coefficient estimate loses one polynomial frequency weight. -/ |
| 278 | theorem inverseCoeff_weighted_bound (d : Direction) (a : Frequency → ℂ) |
| 279 | (p : ℕ) (k : Frequency) : |
| 280 | weight k ^ p * ‖inverseCoeff d a k‖ ≤ |
| 281 | (6 * ‖omega⁻¹‖) * (weight k ^ (p + 1) * ‖a k‖) := by |
| 282 | unfold inverseCoeff |
| 283 | rw [norm_mul] |
| 284 | calc |
| 285 | weight k ^ p * (‖multiplier d k‖ * ‖a k‖) ≤ |
| 286 | weight k ^ p * (((6 * ‖omega⁻¹‖) * weight k) * ‖a k‖) := |
| 287 | mul_le_mul_of_nonneg_left |
| 288 | (mul_le_mul_of_nonneg_right (norm_multiplier_le d k) (norm_nonneg _)) |
| 289 | (pow_nonneg (weight_pos k).le p) |
| 290 | _ = _ := by rw [pow_succ]; ring |
| 291 | |
| 292 | theorem coefficient_cancel (d : Direction) {a : Frequency → ℂ} (hzero : a 0 = 0) |
| 293 | (k : Frequency) : omega * (symbol d k : ℂ) * inverseCoeff d a k = a k := by |
| 294 | by_cases hk : k = 0 |
| 295 | · simp [hk, hzero] |
| 296 | · have hd : omega * (symbol d k : ℂ) ≠ 0 := |
| 297 | mul_ne_zero omega_ne_zero (Complex.ofReal_ne_zero.mpr (symbol_ne_zero d hk)) |
| 298 | change (omega * (symbol d k : ℂ)) * ((omega * (symbol d k : ℂ))⁻¹ * a k) = a k |
| 299 | rw [← mul_assoc, mul_inv_cancel₀ hd, one_mul] |
| 300 | |
| 301 | def directionalInverse (d : Direction) (a : Frequency → ℂ) : Plane → ℂ := |
| 302 | series (inverseCoeff d a) |
| 303 | |
| 304 | theorem contDiff_directionalInverse (d : Direction) {a : Frequency → ℂ} (ha : Rapid a) : |
| 305 | ContDiff ℝ ∞ (directionalInverse d a) := contDiff_series (ha.inverseCoeff d) |
| 306 | |
| 307 | theorem termDeriv_direction (d : Direction) {a : Frequency → ℂ} (hzero : a 0 = 0) |
| 308 | (k : Frequency) (x : Plane) : |
| 309 | termDeriv (inverseCoeff d a) k x (vector d) = a k * mode k x := by |
| 310 | have hs : (symbol d k : ℂ) = (k.1 : ℂ) * ((vector d).1 : ℂ) + |
| 311 | (k.2 : ℂ) * ((vector d).2 : ℂ) := by |
| 312 | exact_mod_cast symbol_formula d k |
| 313 | calc |
| 314 | termDeriv (inverseCoeff d a) k x (vector d) = |
| 315 | (omega * (symbol d k : ℂ) * inverseCoeff d a k) * mode k x := by |
| 316 | rw [hs] |
| 317 | simp only [termDeriv, add_apply, liftX_apply, liftY_apply, |
| 318 | derivX, derivY, freqX, freqY, Complex.real_smul] |
| 319 | ring |
| 320 | _ = a k * mode k x := by rw [coefficient_cancel d hzero k] |
| 321 | |
| 322 | /-- The genuine Fréchet derivative of the smooth inverse solves the equation. -/ |
| 323 | theorem directionalInverse_solves (d : Direction) {a : Frequency → ℂ} |
| 324 | (ha : Rapid a) (hzero : a 0 = 0) (x : Plane) : |
| 325 | fderiv ℝ (directionalInverse d a) x (vector d) = series a x := by |
| 326 | unfold directionalInverse |
| 327 | rw [(hasFDerivAt_series (ha.inverseCoeff d) x).fderiv] |
| 328 | calc |
| 329 | (∑' k, termDeriv (inverseCoeff d a) k x) (vector d) = |
| 330 | ∑' k, termDeriv (inverseCoeff d a) k x (vector d) := |
| 331 | (ContinuousLinearMap.apply ℝ ℂ (vector d)).map_tsum |
| 332 | (summable_termDeriv (ha.inverseCoeff d) x) |
| 333 | _ = series a x := tsum_congr (fun k => termDeriv_direction d hzero k x) |
| 334 | |
| 335 | /-! ## Descent to the torus and actual Haar means -/ |
| 336 | |
| 337 | open MeasureTheory |
| 338 | local instance : Fact ((0 : ℝ) < 1) := ⟨by norm_num⟩ |
| 339 | |
| 340 | abbrev Torus := UnitAddCircle × UnitAddCircle |
| 341 | |
| 342 | def torusMeasure : Measure Torus := |
| 343 | (AddCircle.haarAddCircle : Measure UnitAddCircle).prod AddCircle.haarAddCircle |
| 344 | |
| 345 | instance : IsProbabilityMeasure torusMeasure := by |
| 346 | unfold torusMeasure |
| 347 | infer_instance |
| 348 | |
| 349 | def torusMode (k : Frequency) : C(Torus, ℂ) where |
| 350 | toFun z := fourier k.1 z.1 * fourier k.2 z.2 |
| 351 | continuous_toFun := ((fourier k.1).continuous.comp continuous_fst).mul |
| 352 | ((fourier k.2).continuous.comp continuous_snd) |
| 353 | |
| 354 | theorem norm_torusMode (k : Frequency) (z : Torus) : ‖torusMode k z‖ = 1 := by |
| 355 | simp [torusMode, fourier_apply, Circle.norm_coe] |
| 356 | |
| 357 | def torusSeries (a : Frequency → ℂ) (z : Torus) : ℂ := ∑' k, a k * torusMode k z |
| 358 | |
| 359 | theorem mode_eq_torusMode (k : Frequency) (x : Plane) : |
| 360 | mode k x = torusMode k ((x.1 : UnitAddCircle), (x.2 : UnitAddCircle)) := by |
| 361 | change Complex.exp (phase k x) = |
| 362 | fourier k.1 (x.1 : UnitAddCircle) * fourier k.2 (x.2 : UnitAddCircle) |
| 363 | rw [phase_formula, fourier_coe_apply, fourier_coe_apply, ← Complex.exp_add] |
| 364 | congr 1 |
| 365 | simp only [Complex.ofReal_one, div_one, omega] |
| 366 | ring |
| 367 | |
| 368 | theorem series_eq_torusSeries (a : Frequency → ℂ) (x : Plane) : |
| 369 | series a x = torusSeries a ((x.1 : UnitAddCircle), (x.2 : UnitAddCircle)) := |
| 370 | tsum_congr (fun k => congrArg (fun z => a k * z) (mode_eq_torusMode k x)) |
| 371 | |
| 372 | theorem circle_int_eq_zero (m : ℤ) : (((m : ℝ) : UnitAddCircle)) = 0 := by |
| 373 | apply (AddCircle.coe_eq_zero_iff (1 : ℝ)).mpr |
| 374 | exact ⟨m, by simp⟩ |
| 375 | |
| 376 | /-- Integer translation invariance is actual descent to `(ℝ/ℤ)²`. -/ |
| 377 | theorem series_periodic (a : Frequency → ℂ) (x : Plane) (m n : ℤ) : |
| 378 | series a (x.1 + m, x.2 + n) = series a x := by |
| 379 | rw [series_eq_torusSeries, series_eq_torusSeries] |
| 380 | simp only [AddCircle.coe_add, circle_int_eq_zero, add_zero] |
| 381 | |
| 382 | theorem continuous_torusSeries {a : Frequency → ℂ} (ha : Rapid a) : |
| 383 | Continuous (torusSeries a) := by |
| 384 | apply continuous_tsum (fun k => continuous_const.fun_mul (torusMode k).continuous) ha.summable_norm |
| 385 | intro k z |
| 386 | simp only [norm_mul, norm_torusMode, mul_one, le_refl] |
| 387 | |
| 388 | theorem integral_fourier (n : ℤ) : |
| 389 | (∫ z : UnitAddCircle, fourier n z ∂AddCircle.haarAddCircle) = |
| 390 | if n = 0 then 1 else 0 := by |
| 391 | have h := (orthonormal_iff_ite.mp (orthonormal_fourier (T := (1 : ℝ)))) 0 n |
| 392 | rw [ContinuousMap.inner_toLp] at h |
| 393 | simpa [fourier_zero, eq_comm] using h |
| 394 | |
| 395 | theorem integral_torusMode (k : Frequency) : |
| 396 | (∫ z, torusMode k z ∂torusMeasure) = if k = 0 then 1 else 0 := by |
| 397 | change (∫ z : Torus, fourier k.1 z.1 * fourier k.2 z.2 |
| 398 | ∂(AddCircle.haarAddCircle : Measure UnitAddCircle).prod AddCircle.haarAddCircle) = _ |
| 399 | rw [integral_prod_mul, integral_fourier, integral_fourier] |
| 400 | by_cases h₁ : k.1 = 0 <;> by_cases h₂ : k.2 = 0 <;> |
| 401 | simp [h₁, h₂, Prod.ext_iff] |
| 402 | |
| 403 | theorem integrable_torusTerm (a : Frequency → ℂ) (k : Frequency) : |
| 404 | Integrable (fun z => a k * torusMode k z) torusMeasure := by |
| 405 | apply (integrable_const (‖a k‖ : ℝ)).mono' |
| 406 | (continuous_const.fun_mul (torusMode k).continuous).aestronglyMeasurable |
| 407 | filter_upwards with z |
| 408 | simp only [norm_mul, norm_torusMode, mul_one, le_refl] |
| 409 | |
| 410 | /-- The zeroth coefficient equals the actual normalized Haar integral. -/ |
| 411 | theorem integral_torusSeries {a : Frequency → ℂ} (ha : Rapid a) : |
| 412 | (∫ z, torusSeries a z ∂torusMeasure) = a 0 := by |
| 413 | have hsum : Summable (fun k => ∫ z, ‖a k * torusMode k z‖ ∂torusMeasure) := by |
| 414 | simpa only [norm_mul, norm_torusMode, mul_one, integral_const, |
| 415 | probReal_univ, one_smul] using ha.summable_norm |
| 416 | unfold torusSeries |
| 417 | rw [← integral_tsum_of_summable_integral_norm (integrable_torusTerm a) hsum] |
| 418 | simp only [integral_const_mul, integral_torusMode] |
| 419 | simp only [mul_ite, mul_one, mul_zero] |
| 420 | rw [tsum_eq_single (0 : Frequency) (fun i hi => by simp [hi])] |
| 421 | simp |
| 422 | |
| 423 | /-- Weighted absolute Fourier coefficient seminorm. -/ |
| 424 | def coeffSeminorm (p : ℕ) (a : Frequency → ℂ) : ℝ := |
| 425 | ∑' k, weight k ^ p * ‖a k‖ |
| 426 | |
| 427 | theorem inverseCoeff_seminorm_le (d : Direction) {a : Frequency → ℂ} |
| 428 | (ha : Rapid a) (p : ℕ) : |
| 429 | coeffSeminorm p (inverseCoeff d a) ≤ (6 * ‖omega⁻¹‖) * coeffSeminorm (p + 1) a := by |
| 430 | have h := (ha.inverseCoeff d p).tsum_le_tsum (inverseCoeff_weighted_bound d a p) |
| 431 | ((ha (p + 1)).mul_left (6 * ‖omega⁻¹‖)) |
| 432 | simpa only [coeffSeminorm, tsum_mul_left] using h |
| 433 | |
| 434 | theorem norm_series_le {a : Frequency → ℂ} (ha : Rapid a) (x : Plane) : |
| 435 | ‖series a x‖ ≤ coeffSeminorm 0 a := by |
| 436 | simpa only [series, coeffSeminorm, pow_zero, one_mul, norm_mul, norm_mode, mul_one] using |
| 437 | norm_tsum_le_tsum_norm (summable_terms ha x).norm |
| 438 | |
| 439 | theorem norm_directionalInverse_le (d : Direction) {a : Frequency → ℂ} |
| 440 | (ha : Rapid a) (x : Plane) : |
| 441 | ‖directionalInverse d a x‖ ≤ (6 * ‖omega⁻¹‖) * coeffSeminorm 1 a := by |
| 442 | exact (norm_series_le (ha.inverseCoeff d) x).trans (inverseCoeff_seminorm_le d ha 0) |
| 443 | |
| 444 | def coordinateCoeff (j : Bool) (a : Frequency → ℂ) : Frequency → ℂ := |
| 445 | if j then derivY a else derivX a |
| 446 | |
| 447 | def coordinatePartial (j : Bool) (f : Plane → ℂ) (x : Plane) : ℂ := |
| 448 | fderiv ℝ f x (if j then (0, 1) else (1, 0)) |
| 449 | |
| 450 | def coefficientWord : List Bool → (Frequency → ℂ) → Frequency → ℂ |
| 451 | | [], a => a |
| 452 | | j :: js, a => coordinateCoeff j (coefficientWord js a) |
| 453 | |
| 454 | def derivativeWord : List Bool → (Plane → ℂ) → Plane → ℂ |
| 455 | | [], f => f |
| 456 | | j :: js, f => coordinatePartial j (derivativeWord js f) |
| 457 | |
| 458 | theorem Rapid.coordinateCoeff {a : Frequency → ℂ} (ha : Rapid a) (j : Bool) : |
| 459 | Rapid (coordinateCoeff j a) := by |
| 460 | cases j |
| 461 | · exact ha.derivX |
| 462 | · exact ha.derivY |
| 463 | |
| 464 | theorem Rapid.coefficientWord {a : Frequency → ℂ} (ha : Rapid a) (w : List Bool) : |
| 465 | Rapid (coefficientWord w a) := by |
| 466 | induction w with |
| 467 | | nil => exact ha |
| 468 | | cons j js ih => exact ih.coordinateCoeff j |
| 469 | |
| 470 | theorem coordinatePartial_series (j : Bool) {a : Frequency → ℂ} (ha : Rapid a) : |
| 471 | coordinatePartial j (series a) = series (coordinateCoeff j a) := by |
| 472 | funext x |
| 473 | cases j <;> simp [coordinatePartial, coordinateCoeff, fderiv_series ha, |
| 474 | liftX_apply, liftY_apply] |
| 475 | |
| 476 | theorem derivativeWord_series (w : List Bool) {a : Frequency → ℂ} (ha : Rapid a) : |
| 477 | derivativeWord w (series a) = series (coefficientWord w a) := by |
| 478 | induction w with |
| 479 | | nil => rfl |
| 480 | | cons j js ih => |
| 481 | simp only [derivativeWord, coefficientWord, ih] |
| 482 | exact coordinatePartial_series j (ha.coefficientWord js) |
| 483 | |
| 484 | theorem norm_coordinateCoeff_le (j : Bool) (a : Frequency → ℂ) (k : Frequency) : |
| 485 | ‖coordinateCoeff j a k‖ ≤ (‖omega‖ * weight k) * ‖a k‖ := by |
| 486 | cases j |
| 487 | · exact (norm_mul _ _).le.trans (mul_le_mul_of_nonneg_right (norm_freqX_le k) (norm_nonneg _)) |
| 488 | · exact (norm_mul _ _).le.trans (mul_le_mul_of_nonneg_right (norm_freqY_le k) (norm_nonneg _)) |
| 489 | |
| 490 | theorem norm_coefficientWord_le (w : List Bool) (a : Frequency → ℂ) (k : Frequency) : |
| 491 | ‖coefficientWord w a k‖ ≤ (‖omega‖ * weight k) ^ w.length * ‖a k‖ := by |
| 492 | induction w with |
| 493 | | nil => simp [coefficientWord] |
| 494 | | cons j js ih => |
| 495 | calc |
| 496 | ‖coefficientWord (j :: js) a k‖ ≤ |
| 497 | (‖omega‖ * weight k) * ‖coefficientWord js a k‖ := norm_coordinateCoeff_le _ _ _ |
| 498 | _ ≤ (‖omega‖ * weight k) * ((‖omega‖ * weight k) ^ js.length * ‖a k‖) := |
| 499 | mul_le_mul_of_nonneg_left ih (mul_nonneg (norm_nonneg _) (weight_pos k).le) |
| 500 | _ = _ := by simp only [List.length_cons, pow_succ]; ring |
| 501 | |
| 502 | /-- A uniform bound for every actual mixed coordinate derivative of the inverse. -/ |
| 503 | theorem inverse_derivativeWord_bound (d : Direction) {a : Frequency → ℂ} (ha : Rapid a) |
| 504 | (w : List Bool) (x : Plane) : |
| 505 | ‖derivativeWord w (directionalInverse d a) x‖ ≤ |
| 506 | ((6 * ‖omega⁻¹‖) * ‖omega‖ ^ w.length) * coeffSeminorm (w.length + 1) a := by |
| 507 | have hr := (ha.inverseCoeff d).coefficientWord w |
| 508 | change ‖derivativeWord w (series (inverseCoeff d a)) x‖ ≤ _ |
| 509 | rw [derivativeWord_series w (ha.inverseCoeff d)] |
| 510 | apply (norm_series_le hr x).trans |
| 511 | have hb : ∀ k, ‖coefficientWord w (inverseCoeff d a) k‖ ≤ |
| 512 | ((6 * ‖omega⁻¹‖) * ‖omega‖ ^ w.length) * (weight k ^ (w.length + 1) * ‖a k‖) := by |
| 513 | intro k |
| 514 | calc |
| 515 | ‖coefficientWord w (inverseCoeff d a) k‖ ≤ |
| 516 | (‖omega‖ * weight k) ^ w.length * ‖inverseCoeff d a k‖ := norm_coefficientWord_le _ _ _ |
| 517 | _ ≤ (‖omega‖ * weight k) ^ w.length * (((6 * ‖omega⁻¹‖) * weight k) * ‖a k‖) := by |
| 518 | apply mul_le_mul_of_nonneg_left _ |
| 519 | (pow_nonneg (mul_nonneg (norm_nonneg _) (weight_pos k).le) _) |
| 520 | exact (norm_mul _ _).le.trans |
| 521 | (mul_le_mul_of_nonneg_right (norm_multiplier_le d k) (norm_nonneg _)) |
| 522 | _ = _ := by rw [mul_pow, pow_succ]; ring |
| 523 | have hs := hr.summable_norm.tsum_le_tsum hb |
| 524 | ((ha (w.length + 1)).mul_left ((6 * ‖omega⁻¹‖) * ‖omega‖ ^ w.length)) |
| 525 | simpa only [coeffSeminorm, pow_zero, one_mul, tsum_mul_left] using hs |
| 526 | |
| 527 | /-! ## Parameters and support -/ |
| 528 | |
| 529 | theorem hasDerivAt_parameter_series (a a' : ℝ → Frequency → ℂ) (B : Frequency → ℝ) |
| 530 | (hderiv : ∀ k t, HasDerivAt (fun s => a s k) (a' t k) t) |
| 531 | (hB : Summable B) (hbound : ∀ k t, ‖a' t k‖ ≤ B k) |
| 532 | (t₀ : ℝ) (hinit : Rapid (a t₀)) (x : Plane) (t : ℝ) : |
| 533 | HasDerivAt (fun s => series (a s) x) (series (a' t) x) t := by |
| 534 | apply hasDerivAt_tsum hB |
| 535 | (fun k s => (hderiv k s).mul_const (mode k x)) _ (summable_terms hinit x) t |
| 536 | intro k s |
| 537 | simpa only [norm_mul, norm_mode, mul_one] using hbound k s |
| 538 | |
| 539 | /-- Parameter differentiation commutes with the actual inverse series under a |
| 540 | uniform summable bound on one frequency-weighted parameter derivative. -/ |
| 541 | theorem hasDerivAt_parameter_inverse (d : Direction) (a a' : ℝ → Frequency → ℂ) |
| 542 | (B : Frequency → ℝ) |
| 543 | (hderiv : ∀ k t, HasDerivAt (fun s => a s k) (a' t k) t) |
| 544 | (hB : Summable (fun k => weight k * B k)) |
| 545 | (hbound : ∀ k t, ‖a' t k‖ ≤ B k) |
| 546 | (t₀ : ℝ) (hinit : Rapid (a t₀)) (x : Plane) (t : ℝ) : |
| 547 | HasDerivAt (fun s => directionalInverse d (a s) x) |
| 548 | (directionalInverse d (a' t) x) t := by |
| 549 | refine hasDerivAt_parameter_series |
| 550 | (fun s => inverseCoeff d (a s)) (fun s => inverseCoeff d (a' s)) |
| 551 | (fun k => (6 * ‖omega⁻¹‖) * (weight k * B k)) ?_ ?_ ?_ |
| 552 | t₀ (hinit.inverseCoeff d) x t |
| 553 | · intro k s |
| 554 | exact HasDerivAt.const_mul (multiplier d k) (hderiv k s) |
| 555 | · exact hB.mul_left _ |
| 556 | · intro k s |
| 557 | calc |
| 558 | ‖inverseCoeff d (a' s) k‖ = ‖multiplier d k‖ * ‖a' s k‖ := norm_mul _ _ |
| 559 | _ ≤ ((6 * ‖omega⁻¹‖) * weight k) * B k := |
| 560 | mul_le_mul (norm_multiplier_le d k) (hbound k s) (norm_nonneg _) |
| 561 | (mul_nonneg (mul_nonneg (by norm_num) (norm_nonneg _)) (weight_pos k).le) |
| 562 | _ = _ := by ring |
| 563 | |
| 564 | /-- Inversion uses only the torus variable and preserves support in every |
| 565 | external parameter. No nonvanishing or convergence hypothesis is needed here. -/ |
| 566 | theorem inverse_preserves_parameter_support {P : Type*} (d : Direction) |
| 567 | (a : P → Frequency → ℂ) (S : Set P) |
| 568 | (hsupport : ∀ p, p ∉ S → ∀ k, a p k = 0) : |
| 569 | ∀ p, p ∉ S → ∀ x, directionalInverse d (a p) x = 0 := by |
| 570 | intro p hp x |
| 571 | simp [directionalInverse, series, inverseCoeff, hsupport p hp] |
| 572 | |
| 573 | /-- The constructed directional inverse has zero normalized Haar mean. -/ |
| 574 | theorem inverse_zero_mean (d : Direction) {a : Frequency → ℂ} (ha : Rapid a) : |
| 575 | (∫ z, torusSeries (inverseCoeff d a) z ∂torusMeasure) = 0 := by |
| 576 | rw [integral_torusSeries (ha.inverseCoeff d), inverseCoeff_zero] |
| 577 | |
| 578 | theorem directionalInverse_periodic (d : Direction) (a : Frequency → ℂ) |
| 579 | (x : Plane) (m n : ℤ) : |
| 580 | directionalInverse d a (x.1 + m, x.2 + n) = directionalInverse d a x := |
| 581 | series_periodic (inverseCoeff d a) x m n |
| 582 | |
| 583 | /-- A zero-average rapidly convergent Fourier series on the actual torus has |
| 584 | a zero-average inverse whose universal-cover lift is smooth and solves the |
| 585 | directional equation. Both manuscript directions are covered. -/ |
| 586 | theorem zero_mean_series_has_smooth_inverse (d : Direction) {a : Frequency → ℂ} |
| 587 | (ha : Rapid a) (hmean : (∫ z, torusSeries a z ∂torusMeasure) = 0) : |
| 588 | ∃ u : Torus → ℂ, Continuous u ∧ (∫ z, u z ∂torusMeasure) = 0 ∧ |
| 589 | ContDiff ℝ ∞ (fun x : Plane => u ((x.1 : UnitAddCircle), (x.2 : UnitAddCircle))) ∧ |
| 590 | ∀ x : Plane, |
| 591 | fderiv ℝ (fun y : Plane => u ((y.1 : UnitAddCircle), (y.2 : UnitAddCircle))) |
| 592 | x (vector d) = series a x := by |
| 593 | have hzero : a 0 = 0 := by rwa [integral_torusSeries ha] at hmean |
| 594 | have hpull : (fun x : Plane => |
| 595 | torusSeries (inverseCoeff d a) ((x.1 : UnitAddCircle), (x.2 : UnitAddCircle))) = |
| 596 | directionalInverse d a := by |
| 597 | funext x |
| 598 | exact (series_eq_torusSeries (inverseCoeff d a) x).symm |
| 599 | refine ⟨torusSeries (inverseCoeff d a), continuous_torusSeries (ha.inverseCoeff d), |
| 600 | inverse_zero_mean d ha, ?_, ?_⟩ |
| 601 | · rw [hpull] |
| 602 | exact contDiff_directionalInverse d ha |
| 603 | · rw [hpull] |
| 604 | exact directionalInverse_solves d ha hzero |
| 605 | |
| 606 | end NavierStokes.TorusInverse |