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.TorusInverse |
| 2 | import Mathlib.Analysis.Fourier.AddCircleMulti |
| 3 | import Mathlib.Analysis.Calculus.FDeriv.Add |
| 4 | import Mathlib.Analysis.Calculus.Deriv.Prod |
| 5 | import Mathlib.Analysis.Normed.Group.Bounded |
| 6 | import Mathlib.Analysis.PSeries |
| 7 | import Mathlib.Analysis.Normed.Ring.InfiniteSum |
| 8 | |
| 9 | /-! |
| 10 | # Fourier coefficients of actual smooth periodic functions |
| 11 | |
| 12 | Coefficients are defined by actual unit-interval integrals. Their decay is |
| 13 | derived from integration by parts and bounds for actual coordinate derivatives. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | namespace NavierStokes.SmoothFourierData |
| 19 | |
| 20 | open Set Function MeasureTheory TorusInverse |
| 21 | open scoped BigOperators ContDiff Interval Topology |
| 22 | |
| 23 | local instance : Fact ((0 : ℝ) < 1) := ⟨by norm_num⟩ |
| 24 | |
| 25 | /-- The actual unit-period Fourier coefficient of a function on the line. -/ |
| 26 | def unitCoeff (f : ℝ → ℂ) (n : ℤ) : ℂ := |
| 27 | fourierCoeffOn (show (0 : ℝ) < 1 by norm_num) f n |
| 28 | |
| 29 | theorem unitCoeff_eq_integral (f : ℝ → ℂ) (n : ℤ) : |
| 30 | unitCoeff f n = ∫ x in (0 : ℝ)..1, fourier (-n) (x : UnitAddCircle) * f x := by |
| 31 | have h := fourierCoeffOn_eq_integral f n (show (0 : ℝ) < 1 by norm_num) |
| 32 | simpa [unitCoeff, fourier_coe_apply, smul_eq_mul] using h |
| 33 | |
| 34 | theorem unitCoeff_const_mul (f : ℝ → ℂ) (c : ℂ) (n : ℤ) : |
| 35 | unitCoeff (fun x => c * f x) n = c * unitCoeff f n := |
| 36 | fourierCoeffOn.const_mul f c n (show (0 : ℝ) < 1 by norm_num) |
| 37 | |
| 38 | theorem unitCoeff_norm_le {f : ℝ → ℂ} {C : ℝ} (n : ℤ) |
| 39 | (hb : ∀ x ∈ Icc (0 : ℝ) 1, ‖f x‖ ≤ C) : ‖unitCoeff f n‖ ≤ C := by |
| 40 | rw [unitCoeff_eq_integral] |
| 41 | have h := intervalIntegral.norm_integral_le_of_norm_le_const |
| 42 | (a := (0 : ℝ)) (b := 1) (C := C) (f := fun x => fourier (-n) (x : UnitAddCircle) * f x) |
| 43 | (fun x hx => by |
| 44 | have hx' : x ∈ Icc (0 : ℝ) 1 := by |
| 45 | simpa only [uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1)] using uIoc_subset_uIcc hx |
| 46 | simpa only [norm_mul, fourier_apply, Circle.norm_coe, one_mul] using hb x hx') |
| 47 | simpa only [sub_zero, abs_one, mul_one] using h |
| 48 | |
| 49 | /-- The boundary term cancels because the actual endpoint values agree. -/ |
| 50 | theorem unitCoeff_of_hasDerivAt {f f' : ℝ → ℂ} {n : ℤ} (hn : n ≠ 0) |
| 51 | (hd : ∀ x, HasDerivAt f (f' x) x) (hc : Continuous f') (hp : f 1 = f 0) : |
| 52 | unitCoeff f n = (omega * (n : ℂ))⁻¹ * unitCoeff f' n := by |
| 53 | have h := fourierCoeffOn_of_hasDerivAt (show (0 : ℝ) < 1 by norm_num) hn |
| 54 | (fun x _ => hd x) (hc.intervalIntegrable 0 1) |
| 55 | have hden : -2 * (Real.pi : ℂ) * Complex.I * (n : ℂ) = -(omega * (n : ℂ)) := by |
| 56 | unfold omega |
| 57 | ring |
| 58 | simpa only [unitCoeff, hp, sub_self, mul_zero, sub_zero, Complex.ofReal_one, |
| 59 | Complex.ofReal_zero, one_mul, zero_sub, hden, one_div, inv_neg, neg_mul_neg] using h |
| 60 | |
| 61 | /-- Unit-periodicity in both coordinates, expressed on the universal cover. -/ |
| 62 | def UnitPeriodic (f : Plane → ℂ) : Prop := |
| 63 | ∀ z : Plane, ∀ k : Frequency, f (z + ((k.1 : ℝ), (k.2 : ℝ))) = f z |
| 64 | |
| 65 | /-- The genuine first coordinate derivative. -/ |
| 66 | noncomputable def partialX (f : Plane → ℂ) (z : Plane) : ℂ := fderiv ℝ f z (1, 0) |
| 67 | |
| 68 | noncomputable def xJet (p : ℕ) (f : Plane → ℂ) : Plane → ℂ := partialX^[p] f |
| 69 | |
| 70 | @[simp] theorem xJet_zero (f : Plane → ℂ) : xJet 0 f = f := rfl |
| 71 | |
| 72 | theorem xJet_succ (p : ℕ) (f : Plane → ℂ) : xJet (p + 1) f = partialX (xJet p f) := by |
| 73 | exact Function.iterate_succ_apply' partialX p f |
| 74 | |
| 75 | theorem partialX_smooth {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) : |
| 76 | ContDiff ℝ ∞ (partialX f) := |
| 77 | (ContinuousLinearMap.apply ℝ ℂ (1, 0)).contDiff.comp |
| 78 | (hf.fderiv_right (by simp)) |
| 79 | |
| 80 | theorem xJet_smooth {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) (p : ℕ) : |
| 81 | ContDiff ℝ ∞ (xJet p f) := by |
| 82 | induction p with |
| 83 | | zero => exact hf |
| 84 | | succ p ih => rw [xJet_succ]; exact partialX_smooth ih |
| 85 | |
| 86 | theorem partialX_periodic {f : Plane → ℂ} (hf : UnitPeriodic f) : |
| 87 | UnitPeriodic (partialX f) := by |
| 88 | intro z k |
| 89 | have hfun : (fun w : Plane => f (w + ((k.1 : ℝ), (k.2 : ℝ)))) = f := funext fun w => hf w k |
| 90 | have h := congrArg (fun g : Plane → ℂ => fderiv ℝ g z) hfun |
| 91 | rw [fderiv_comp_add_right] at h |
| 92 | exact congrArg (fun L : Plane →L[ℝ] ℂ => L (1, 0)) h |
| 93 | |
| 94 | theorem xJet_periodic {f : Plane → ℂ} (hf : UnitPeriodic f) (p : ℕ) : |
| 95 | UnitPeriodic (xJet p f) := by |
| 96 | induction p with |
| 97 | | zero => exact hf |
| 98 | | succ p ih => rw [xJet_succ]; exact partialX_periodic ih |
| 99 | |
| 100 | theorem hasDerivAt_slice {f : Plane → ℂ} {x y : ℝ} |
| 101 | (hf : DifferentiableAt ℝ f (x, y)) : |
| 102 | HasDerivAt (fun t => f (t, y)) (partialX f (x, y)) x := by |
| 103 | exact hf.hasFDerivAt.comp_hasDerivAt x |
| 104 | ((hasDerivAt_id x).prodMk (hasDerivAt_const x y)) |
| 105 | |
| 106 | /-- The actual two-dimensional Fourier coefficient, with the first coordinate integrated first. -/ |
| 107 | def coefficient (f : Plane → ℂ) (k : Frequency) : ℂ := |
| 108 | unitCoeff (fun y => unitCoeff (fun x => f (x, y)) k.1) k.2 |
| 109 | |
| 110 | theorem coefficient_norm_le {f : Plane → ℂ} {C : ℝ} (k : Frequency) |
| 111 | (hb : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, ‖f (x, y)‖ ≤ C) : |
| 112 | ‖coefficient f k‖ ≤ C := by |
| 113 | apply unitCoeff_norm_le |
| 114 | intro y hy |
| 115 | exact unitCoeff_norm_le k.1 (fun x hx => hb x hx y hy) |
| 116 | |
| 117 | theorem coefficient_partialX {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 118 | (hp : UnitPeriodic f) {k : Frequency} (hk : k.1 ≠ 0) : |
| 119 | coefficient f k = (omega * (k.1 : ℂ))⁻¹ * coefficient (partialX f) k := by |
| 120 | have heq : (fun y => unitCoeff (fun x => f (x, y)) k.1) = |
| 121 | (fun y => (omega * (k.1 : ℂ))⁻¹ * unitCoeff (fun x => partialX f (x, y)) k.1) := by |
| 122 | funext y |
| 123 | apply unitCoeff_of_hasDerivAt hk |
| 124 | · intro x |
| 125 | exact hasDerivAt_slice ((hf.differentiable (by simp)) (x, y)) |
| 126 | · exact (partialX_smooth hf).continuous.comp (continuous_id.prodMk continuous_const) |
| 127 | · simpa using hp (0, y) (1, 0) |
| 128 | unfold coefficient |
| 129 | rw [heq, unitCoeff_const_mul] |
| 130 | |
| 131 | /-- Repeated Fourier integration by parts in the first coordinate. -/ |
| 132 | theorem coefficient_xJet {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 133 | (hp : UnitPeriodic f) {k : Frequency} (hk : k.1 ≠ 0) (p : ℕ) : |
| 134 | coefficient f k = (omega * (k.1 : ℂ))⁻¹ ^ p * coefficient (xJet p f) k := by |
| 135 | induction p with |
| 136 | | zero => simp only [pow_zero, one_mul, xJet_zero] |
| 137 | | succ p ih => |
| 138 | rw [ih, coefficient_partialX (xJet_smooth hf p) (xJet_periodic hp p) hk, |
| 139 | xJet_succ, pow_succ, mul_assoc] |
| 140 | |
| 141 | /-- A coefficient-decay estimate obtained from a bound on an actual derivative. -/ |
| 142 | theorem coefficient_decay_first {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 143 | (hp : UnitPeriodic f) {k : Frequency} (hk : k.1 ≠ 0) (p : ℕ) {C : ℝ} |
| 144 | (hb : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, ‖xJet p f (x, y)‖ ≤ C) : |
| 145 | ‖coefficient f k‖ ≤ ‖(omega * (k.1 : ℂ))⁻¹‖ ^ p * C := by |
| 146 | rw [coefficient_xJet hf hp hk p, norm_mul, norm_pow] |
| 147 | exact mul_le_mul_of_nonneg_left (coefficient_norm_le k hb) (pow_nonneg (norm_nonneg _) p) |
| 148 | |
| 149 | /-- The negative Fourier character on the unit square. -/ |
| 150 | def kernel (k : Frequency) (z : Plane) : ℂ := |
| 151 | fourier (-k.1) (z.1 : UnitAddCircle) * fourier (-k.2) (z.2 : UnitAddCircle) |
| 152 | |
| 153 | theorem kernel_continuous (k : Frequency) : Continuous (kernel k) := |
| 154 | (((fourier (-k.1)).continuous.comp (AddCircle.continuous_mk' 1)).comp continuous_fst).mul |
| 155 | (((fourier (-k.2)).continuous.comp (AddCircle.continuous_mk' 1)).comp continuous_snd) |
| 156 | |
| 157 | theorem coefficient_eq_doubleIntegral (f : Plane → ℂ) (k : Frequency) : |
| 158 | coefficient f k = ∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, kernel k (x, y) * f (x, y) := by |
| 159 | unfold coefficient |
| 160 | rw [unitCoeff_eq_integral] |
| 161 | apply intervalIntegral.integral_congr |
| 162 | intro y _ |
| 163 | dsimp only |
| 164 | rw [unitCoeff_eq_integral, ← intervalIntegral.integral_const_mul] |
| 165 | apply intervalIntegral.integral_congr |
| 166 | intro x _ |
| 167 | unfold kernel |
| 168 | ring |
| 169 | |
| 170 | theorem integral_square_swap {f : Plane → ℂ} (hf : Continuous f) : |
| 171 | (∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, f (x, y)) = |
| 172 | ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, f (x, y) := by |
| 173 | simp only [intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] |
| 174 | apply (integral_integral_swap ?_).symm |
| 175 | change Integrable f ((volume.restrict (Ioc (0 : ℝ) 1)).prod |
| 176 | (volume.restrict (Ioc (0 : ℝ) 1))) |
| 177 | rw [Measure.prod_restrict] |
| 178 | exact (hf.continuousOn.integrableOn_compact |
| 179 | (isCompact_Icc.prod isCompact_Icc)).mono_set |
| 180 | (Set.prod_mono Ioc_subset_Icc_self Ioc_subset_Icc_self) |
| 181 | |
| 182 | noncomputable def swapFunction (f : Plane → ℂ) : Plane → ℂ := fun z => f (z.2, z.1) |
| 183 | |
| 184 | theorem swapFunction_smooth {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) : |
| 185 | ContDiff ℝ ∞ (swapFunction f) := hf.comp (contDiff_snd.prodMk contDiff_fst) |
| 186 | |
| 187 | theorem swapFunction_periodic {f : Plane → ℂ} (hp : UnitPeriodic f) : |
| 188 | UnitPeriodic (swapFunction f) := by |
| 189 | intro z k |
| 190 | exact hp (z.2, z.1) (k.2, k.1) |
| 191 | |
| 192 | theorem coefficient_swap {f : Plane → ℂ} (hf : Continuous f) (k : Frequency) : |
| 193 | coefficient f k = coefficient (swapFunction f) (k.2, k.1) := by |
| 194 | rw [coefficient_eq_doubleIntegral, coefficient_eq_doubleIntegral, |
| 195 | integral_square_swap ((kernel_continuous k).fun_mul hf)] |
| 196 | apply intervalIntegral.integral_congr |
| 197 | intro x _ |
| 198 | apply intervalIntegral.integral_congr |
| 199 | intro y _ |
| 200 | unfold kernel swapFunction |
| 201 | ring |
| 202 | |
| 203 | theorem coefficient_decay_second {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 204 | (hp : UnitPeriodic f) {k : Frequency} (hk : k.2 ≠ 0) (p : ℕ) {C : ℝ} |
| 205 | (hb : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 206 | ‖xJet p (swapFunction f) (x, y)‖ ≤ C) : |
| 207 | ‖coefficient f k‖ ≤ ‖(omega * (k.2 : ℂ))⁻¹‖ ^ p * C := by |
| 208 | rw [coefficient_swap hf.continuous k] |
| 209 | exact coefficient_decay_first (swapFunction_smooth hf) (swapFunction_periodic hp) hk p hb |
| 210 | |
| 211 | theorem norm_omega_ge_one : 1 ≤ ‖omega‖ := by |
| 212 | have hnorm : ‖omega‖ = 2 * Real.pi := by |
| 213 | simp [omega, Complex.norm_real, Real.norm_eq_abs, abs_of_pos Real.pi_pos] |
| 214 | rw [hnorm] |
| 215 | linarith [Real.two_le_pi] |
| 216 | |
| 217 | /-- Multiplying by the first frequency power is controlled by the actual derivative norm. -/ |
| 218 | theorem coefficient_first_moment {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 219 | (hp : UnitPeriodic f) {k : Frequency} (hk : k.1 ≠ 0) (p : ℕ) {C : ℝ} |
| 220 | (hb : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, ‖xJet p f (x, y)‖ ≤ C) : |
| 221 | |(k.1 : ℝ)| ^ p * ‖coefficient f k‖ ≤ C := by |
| 222 | have hsymbol : omega * (k.1 : ℂ) ≠ 0 := |
| 223 | mul_ne_zero omega_ne_zero (by exact_mod_cast hk) |
| 224 | have hident : (omega * (k.1 : ℂ)) ^ p * coefficient f k = coefficient (xJet p f) k := by |
| 225 | rw [coefficient_xJet hf hp hk p, ← mul_assoc, ← mul_pow, |
| 226 | mul_inv_cancel₀ hsymbol, one_pow, one_mul] |
| 227 | have hn := congrArg norm hident |
| 228 | simp only [norm_mul, norm_pow, Complex.norm_intCast] at hn |
| 229 | have hfreq : |(k.1 : ℝ)| ≤ ‖omega‖ * |(k.1 : ℝ)| := by |
| 230 | simpa only [one_mul] using mul_le_mul_of_nonneg_right norm_omega_ge_one (abs_nonneg (k.1 : ℝ)) |
| 231 | calc |
| 232 | |(k.1 : ℝ)| ^ p * ‖coefficient f k‖ ≤ |
| 233 | (‖omega‖ * |(k.1 : ℝ)|) ^ p * ‖coefficient f k‖ := |
| 234 | mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (abs_nonneg _) hfreq p) (norm_nonneg _) |
| 235 | _ = ‖coefficient (xJet p f) k‖ := hn |
| 236 | _ ≤ C := coefficient_norm_le k hb |
| 237 | |
| 238 | theorem dominant_coordinate_ne_zero {k : Frequency} (hk : k ≠ 0) |
| 239 | (hdom : |(k.2 : ℝ)| ≤ |(k.1 : ℝ)|) : k.1 ≠ 0 := by |
| 240 | intro hzero |
| 241 | have hsecond : (k.2 : ℝ) = 0 := abs_eq_zero.mp |
| 242 | (le_antisymm (by simpa [hzero] using hdom) (abs_nonneg _)) |
| 243 | exact hk (Prod.ext hzero (by exact_mod_cast hsecond)) |
| 244 | |
| 245 | theorem weight_le_dominant {k : Frequency} (hk : k.1 ≠ 0) |
| 246 | (hdom : |(k.2 : ℝ)| ≤ |(k.1 : ℝ)|) : weight k ≤ 3 * |(k.1 : ℝ)| := by |
| 247 | have hi : (1 : ℤ) ≤ |k.1| := Int.add_one_le_iff.mpr (abs_pos.mpr hk) |
| 248 | have hr : (1 : ℝ) ≤ |(k.1 : ℝ)| := by exact_mod_cast hi |
| 249 | unfold weight |
| 250 | linarith |
| 251 | |
| 252 | theorem weight_moment_of_dominant {k : Frequency} {p : ℕ} {A C : ℝ} |
| 253 | (hk : k.1 ≠ 0) (hdom : |(k.2 : ℝ)| ≤ |(k.1 : ℝ)|) (hA : 0 ≤ A) |
| 254 | (hb : |(k.1 : ℝ)| ^ p * A ≤ C) : weight k ^ p * A ≤ 3 ^ p * C := by |
| 255 | calc |
| 256 | weight k ^ p * A ≤ (3 * |(k.1 : ℝ)|) ^ p * A := |
| 257 | mul_le_mul_of_nonneg_right |
| 258 | (pow_le_pow_left₀ (weight_pos k).le (weight_le_dominant hk hdom) p) hA |
| 259 | _ = 3 ^ p * (|(k.1 : ℝ)| ^ p * A) := by rw [mul_pow]; ring |
| 260 | _ ≤ 3 ^ p * C := mul_le_mul_of_nonneg_left hb (by positivity) |
| 261 | |
| 262 | /-- Finite derivative loss: a p-th frequency moment uses only the values and |
| 263 | the p-th pure derivative in each coordinate on the unit square. -/ |
| 264 | theorem coefficient_polynomial_bound {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 265 | (hp : UnitPeriodic f) (p : ℕ) {C : ℝ} |
| 266 | (hzero : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, ‖f (x, y)‖ ≤ C) |
| 267 | (hfirst : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, ‖xJet p f (x, y)‖ ≤ C) |
| 268 | (hsecond : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 269 | ‖xJet p (swapFunction f) (x, y)‖ ≤ C) (k : Frequency) : |
| 270 | weight k ^ p * ‖coefficient f k‖ ≤ 3 ^ p * C := by |
| 271 | by_cases hk : k = 0 |
| 272 | · subst k |
| 273 | have hC : 0 ≤ C := (norm_nonneg _).trans (hzero 0 (by norm_num) 0 (by norm_num)) |
| 274 | simp only [weight, Prod.fst_zero, Prod.snd_zero, Int.cast_zero, abs_zero, add_zero, |
| 275 | one_pow, one_mul] |
| 276 | exact (coefficient_norm_le 0 hzero).trans |
| 277 | (le_mul_of_one_le_left hC (one_le_pow₀ (by norm_num : (1 : ℝ) ≤ 3))) |
| 278 | rcases le_total |(k.2 : ℝ)| |(k.1 : ℝ)| with hdom | hdom |
| 279 | · have hne := dominant_coordinate_ne_zero hk hdom |
| 280 | exact weight_moment_of_dominant hne hdom (norm_nonneg _) |
| 281 | (coefficient_first_moment hf hp hne p hfirst) |
| 282 | · have hswap : (k.2, k.1) ≠ (0 : Frequency) := by |
| 283 | intro h |
| 284 | exact hk (Prod.ext (congrArg Prod.snd h) (congrArg Prod.fst h)) |
| 285 | have hne := dominant_coordinate_ne_zero hswap hdom |
| 286 | have h := weight_moment_of_dominant hne hdom |
| 287 | (norm_nonneg (coefficient (swapFunction f) (k.2, k.1))) |
| 288 | (coefficient_first_moment (swapFunction_smooth hf) (swapFunction_periodic hp) hne p hsecond) |
| 289 | rw [← coefficient_swap hf.continuous k] at h |
| 290 | have hw : weight (k.2, k.1) = weight k := by unfold weight; dsimp; ring |
| 291 | simpa only [hw] using h |
| 292 | |
| 293 | /-- Smoothness on the compact unit square supplies the derivative bounds; |
| 294 | no coefficient-decay hypothesis is used. -/ |
| 295 | theorem exists_coefficient_polynomial_bound {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 296 | (hp : UnitPeriodic f) (p : ℕ) : |
| 297 | ∃ C : ℝ, ∀ k : Frequency, weight k ^ p * ‖coefficient f k‖ ≤ C := by |
| 298 | have hc : IsCompact (Icc (0 : ℝ) 1 ×ˢ Icc (0 : ℝ) 1) := isCompact_Icc.prod isCompact_Icc |
| 299 | obtain ⟨A, hA⟩ := hc.exists_bound_of_continuousOn hf.continuous.continuousOn |
| 300 | obtain ⟨B, hB⟩ := hc.exists_bound_of_continuousOn (xJet_smooth hf p).continuous.continuousOn |
| 301 | obtain ⟨D, hD⟩ := hc.exists_bound_of_continuousOn |
| 302 | (xJet_smooth (swapFunction_smooth hf) p).continuous.continuousOn |
| 303 | let C := max A (max B D) |
| 304 | refine ⟨3 ^ p * C, coefficient_polynomial_bound hf hp p ?_ ?_ ?_⟩ |
| 305 | · intro x hx y hy |
| 306 | exact (hA (x, y) ⟨hx, hy⟩).trans (le_max_left _ _) |
| 307 | · intro x hx y hy |
| 308 | exact (hB (x, y) ⟨hx, hy⟩).trans ((le_max_left B D).trans (le_max_right _ _)) |
| 309 | · intro x hx y hy |
| 310 | exact (hD (x, y) ⟨hx, hy⟩).trans ((le_max_right B D).trans (le_max_right _ _)) |
| 311 | |
| 312 | theorem summable_integer_weight_inv_two : |
| 313 | Summable (fun n : ℤ => ((1 + |(n : ℝ)|) ^ 2)⁻¹) := by |
| 314 | have hbase : Summable (fun n : ℕ => 1 / (n : ℝ) ^ 2) := |
| 315 | Real.summable_one_div_nat_pow.mpr (by decide) |
| 316 | have hNat : Summable (fun n : ℕ => 1 / ((n : ℝ) + 1) ^ 2) := by |
| 317 | have h : Summable (fun n : ℕ => 1 / ((n + 1 : ℕ) : ℝ) ^ 2) := |
| 318 | (summable_nat_add_iff 1).mpr hbase |
| 319 | simpa only [Nat.cast_add, Nat.cast_one] using h |
| 320 | apply Summable.of_nat_of_neg |
| 321 | · simpa only [Int.cast_natCast, Nat.abs_cast, add_comm, one_div] using hNat |
| 322 | · simpa only [Int.cast_neg, Int.cast_natCast, abs_neg, |
| 323 | Nat.abs_cast, add_comm, one_div] using hNat |
| 324 | |
| 325 | theorem weight_inv_four_le_product (k : Frequency) : |
| 326 | (weight k ^ 4)⁻¹ ≤ ((1 + |(k.1 : ℝ)|) ^ 2)⁻¹ * ((1 + |(k.2 : ℝ)|) ^ 2)⁻¹ := by |
| 327 | have hfirst : 1 + |(k.1 : ℝ)| ≤ weight k := by |
| 328 | unfold weight |
| 329 | linarith [abs_nonneg (k.2 : ℝ)] |
| 330 | have hsecond : 1 + |(k.2 : ℝ)| ≤ weight k := by |
| 331 | unfold weight |
| 332 | linarith [abs_nonneg (k.1 : ℝ)] |
| 333 | have hproduct : (1 + |(k.1 : ℝ)|) ^ 2 * (1 + |(k.2 : ℝ)|) ^ 2 ≤ weight k ^ 4 := by |
| 334 | calc |
| 335 | _ ≤ (weight k ^ 2) * (weight k ^ 2) := |
| 336 | mul_le_mul (pow_le_pow_left₀ (by positivity) hfirst 2) |
| 337 | (pow_le_pow_left₀ (by positivity) hsecond 2) (sq_nonneg _) (sq_nonneg _) |
| 338 | _ = _ := by ring |
| 339 | have h := one_div_le_one_div_of_le (by positivity : |
| 340 | 0 < (1 + |(k.1 : ℝ)|) ^ 2 * (1 + |(k.2 : ℝ)|) ^ 2) hproduct |
| 341 | simpa only [one_div, mul_inv_rev, mul_comm] using h |
| 342 | |
| 343 | theorem summable_weight_inv_four : Summable (fun k : Frequency => (weight k ^ 4)⁻¹) := by |
| 344 | have hprod := summable_integer_weight_inv_two.mul_of_nonneg |
| 345 | summable_integer_weight_inv_two (fun n => by positivity) (fun n => by positivity) |
| 346 | exact Summable.of_nonneg_of_le (fun k => inv_nonneg.mpr (pow_nonneg (weight_pos k).le _)) |
| 347 | weight_inv_four_le_product hprod |
| 348 | |
| 349 | /-- Every smooth unit-periodic function has all weighted absolute Fourier moments. |
| 350 | For the p-th moment the proof uses p+4 derivatives and a summable lattice majorant. -/ |
| 351 | theorem rapid_coefficient {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) (hp : UnitPeriodic f) : |
| 352 | Rapid (coefficient f) := by |
| 353 | intro p |
| 354 | obtain ⟨C, hC⟩ := exists_coefficient_polynomial_bound hf hp (p + 4) |
| 355 | apply Summable.of_nonneg_of_le |
| 356 | (fun k => mul_nonneg (pow_nonneg (weight_pos k).le _) (norm_nonneg _)) _ |
| 357 | (summable_weight_inv_four.mul_left C) |
| 358 | intro k |
| 359 | rw [← div_eq_mul_inv] |
| 360 | apply (le_div_iff₀ (pow_pos (weight_pos k) 4)).mpr |
| 361 | calc |
| 362 | (weight k ^ p * ‖coefficient f k‖) * weight k ^ 4 = |
| 363 | weight k ^ (p + 4) * ‖coefficient f k‖ := by rw [pow_add]; ring |
| 364 | _ ≤ C := hC k |
| 365 | |
| 366 | /-- A quantitative finite-loss estimate for the exact seminorm used by |
| 367 | `TorusInverse`. The lattice constant is finite by `summable_weight_inv_four`. -/ |
| 368 | theorem coefficient_seminorm_bound {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 369 | (hp : UnitPeriodic f) (p : ℕ) {C : ℝ} |
| 370 | (hzero : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, ‖f (x, y)‖ ≤ C) |
| 371 | (hfirst : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 372 | ‖xJet (p + 4) f (x, y)‖ ≤ C) |
| 373 | (hsecond : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 374 | ‖xJet (p + 4) (swapFunction f) (x, y)‖ ≤ C) : |
| 375 | coeffSeminorm p (coefficient f) ≤ |
| 376 | (3 ^ (p + 4) * C) * ∑' k : Frequency, (weight k ^ 4)⁻¹ := by |
| 377 | have hb (k : Frequency) : weight k ^ p * ‖coefficient f k‖ ≤ |
| 378 | (3 ^ (p + 4) * C) * (weight k ^ 4)⁻¹ := by |
| 379 | rw [← div_eq_mul_inv] |
| 380 | apply (le_div_iff₀ (pow_pos (weight_pos k) 4)).mpr |
| 381 | calc |
| 382 | (weight k ^ p * ‖coefficient f k‖) * weight k ^ 4 = |
| 383 | weight k ^ (p + 4) * ‖coefficient f k‖ := by rw [pow_add]; ring |
| 384 | _ ≤ 3 ^ (p + 4) * C := coefficient_polynomial_bound hf hp (p + 4) hzero hfirst hsecond k |
| 385 | have h := (rapid_coefficient hf hp p).tsum_le_tsum hb |
| 386 | (summable_weight_inv_four.mul_left (3 ^ (p + 4) * C)) |
| 387 | simpa only [coeffSeminorm, tsum_mul_left] using h |
| 388 | |
| 389 | /-! ## Identification with the actual torus Fourier coefficients -/ |
| 390 | |
| 391 | noncomputable def torusLift (f : Torus → ℂ) (x : Plane) : ℂ := |
| 392 | f ((x.1 : UnitAddCircle), (x.2 : UnitAddCircle)) |
| 393 | |
| 394 | theorem torusLift_periodic (f : Torus → ℂ) : UnitPeriodic (torusLift f) := by |
| 395 | intro z k |
| 396 | simp [torusLift] |
| 397 | |
| 398 | def torusCoefficient (f : Torus → ℂ) (k : Frequency) : ℂ := |
| 399 | ∫ z, torusMode (-k) z * f z ∂torusMeasure |
| 400 | |
| 401 | theorem unitCoeff_torusLift (f : UnitAddCircle → ℂ) (n : ℤ) : |
| 402 | unitCoeff (fun x : ℝ => f (x : UnitAddCircle)) n = fourierCoeff f n := by |
| 403 | rw [unitCoeff_eq_integral, fourierCoeff_eq_intervalIntegral f n 0] |
| 404 | simp only [one_div_one, zero_add, one_smul, smul_eq_mul] |
| 405 | |
| 406 | theorem torusCoefficient_integrable (f : C(Torus, ℂ)) (k : Frequency) : |
| 407 | Integrable (fun z => torusMode (-k) z * f z) torusMeasure := by |
| 408 | apply (integrable_const (‖f‖ : ℝ)).mono' |
| 409 | ((torusMode (-k)).continuous.fun_mul f.continuous).aestronglyMeasurable |
| 410 | filter_upwards with z |
| 411 | simpa only [norm_mul, norm_torusMode, one_mul] using f.norm_coe_le_norm z |
| 412 | |
| 413 | theorem coefficient_lift_eq_torus (f : C(Torus, ℂ)) (k : Frequency) : |
| 414 | coefficient (torusLift f) k = torusCoefficient f k := by |
| 415 | change unitCoeff (fun y => unitCoeff |
| 416 | (fun x => f ((x : UnitAddCircle), (y : UnitAddCircle))) k.1) k.2 = _ |
| 417 | have hinner : (fun y : ℝ => unitCoeff |
| 418 | (fun x => f ((x : UnitAddCircle), (y : UnitAddCircle))) k.1) = |
| 419 | (fun y : ℝ => fourierCoeff (fun x : UnitAddCircle => f (x, (y : UnitAddCircle))) k.1) := by |
| 420 | funext y |
| 421 | exact unitCoeff_torusLift (fun x : UnitAddCircle => f (x, (y : UnitAddCircle))) k.1 |
| 422 | rw [hinner, unitCoeff_torusLift |
| 423 | (fun y : UnitAddCircle => fourierCoeff (fun x : UnitAddCircle => f (x, y)) k.1) k.2] |
| 424 | unfold fourierCoeff torusCoefficient |
| 425 | rw [show torusMeasure = (AddCircle.haarAddCircle : Measure UnitAddCircle).prod |
| 426 | AddCircle.haarAddCircle from rfl, |
| 427 | integral_prod_symm _ (torusCoefficient_integrable f k)] |
| 428 | simp only [smul_eq_mul] |
| 429 | apply integral_congr_ae |
| 430 | filter_upwards with y |
| 431 | rw [← integral_const_mul] |
| 432 | apply integral_congr_ae |
| 433 | filter_upwards with x |
| 434 | simp only [torusMode, ContinuousMap.coe_mk, Prod.fst_neg, Prod.snd_neg] |
| 435 | ring |
| 436 | |
| 437 | /-- The same continuous function on Mathlib's native finite-product torus. -/ |
| 438 | noncomputable def nativeFunction (f : C(Torus, ℂ)) : C(UnitAddTorus (Fin 2), ℂ) where |
| 439 | toFun z := f (z 0, z 1) |
| 440 | continuous_toFun := f.continuous.comp ((continuous_apply 0).prodMk (continuous_apply 1)) |
| 441 | |
| 442 | theorem native_mode_eq (k : Fin 2 → ℤ) (z : UnitAddTorus (Fin 2)) : |
| 443 | UnitAddTorus.mFourier k z = torusMode (k 0, k 1) (z 0, z 1) := by |
| 444 | simp [UnitAddTorus.mFourier, torusMode, Fin.prod_univ_two] |
| 445 | |
| 446 | theorem native_coefficient_eq (f : C(Torus, ℂ)) (k : Fin 2 → ℤ) : |
| 447 | UnitAddTorus.mFourierCoeff (nativeFunction f) k = torusCoefficient f (k 0, k 1) := by |
| 448 | have h := (measurePreserving_finTwoArrow |
| 449 | (AddCircle.haarAddCircle : Measure UnitAddCircle)).integral_comp' |
| 450 | (fun z : Torus => torusMode (-(k 0, k 1)) z * f z) |
| 451 | simp only [UnitAddTorus.mFourierCoeff, UnitAddTorus.mFourier, torusMode, torusCoefficient, |
| 452 | torusMeasure, nativeFunction, Fin.prod_univ_two, smul_eq_mul, |
| 453 | MeasureTheory.volume_pi, |
| 454 | MeasurableEquiv.finTwoArrow, MeasurableEquiv.piFinTwo_apply] at h ⊢ |
| 455 | exact h |
| 456 | |
| 457 | /-- Genuine Fourier reconstruction: summability is derived from smoothness. -/ |
| 458 | theorem torusSeries_coefficient (f : C(Torus, ℂ)) |
| 459 | (hf : ContDiff ℝ ∞ (torusLift f)) (z : Torus) : |
| 460 | torusSeries (coefficient (torusLift f)) z = f z := by |
| 461 | have ha := rapid_coefficient hf (torusLift_periodic f) |
| 462 | have hc (k : Fin 2 → ℤ) : UnitAddTorus.mFourierCoeff (nativeFunction f) k = |
| 463 | coefficient (torusLift f) (k 0, k 1) := by |
| 464 | rw [native_coefficient_eq, coefficient_lift_eq_torus] |
| 465 | have hsum : Summable (UnitAddTorus.mFourierCoeff (nativeFunction f)) := by |
| 466 | have hcoef : Summable (coefficient (torusLift f)) := Summable.of_norm ha.summable_norm |
| 467 | have h := hcoef.comp_injective (finTwoArrowEquiv ℤ).injective |
| 468 | have heq : UnitAddTorus.mFourierCoeff (nativeFunction f) = |
| 469 | (fun k : Fin 2 → ℤ => coefficient (torusLift f) (k 0, k 1)) := funext hc |
| 470 | rw [heq] |
| 471 | exact h |
| 472 | have h := UnitAddTorus.hasSum_mFourier_series_apply_of_summable hsum ![z.1, z.2] |
| 473 | simp_rw [hc] at h |
| 474 | have hnative : HasSum (fun k : Fin 2 → ℤ => |
| 475 | coefficient (torusLift f) (k 0, k 1) * torusMode (k 0, k 1) z) (f z) := by |
| 476 | simpa [hc, native_mode_eq, nativeFunction, smul_eq_mul] using h |
| 477 | have hpairs : HasSum (fun k : Frequency => |
| 478 | coefficient (torusLift f) k * torusMode k z) (f z) := |
| 479 | (finTwoArrowEquiv ℤ).hasSum_iff.mp hnative |
| 480 | exact hpairs.tsum_eq |
| 481 | |
| 482 | theorem series_coefficient_lift (f : C(Torus, ℂ)) |
| 483 | (hf : ContDiff ℝ ∞ (torusLift f)) (x : Plane) : |
| 484 | series (coefficient (torusLift f)) x = torusLift f x := by |
| 485 | rw [series_eq_torusSeries] |
| 486 | exact torusSeries_coefficient f hf _ |
| 487 | |
| 488 | theorem coefficient_zero_eq_mean (f : C(Torus, ℂ)) : |
| 489 | coefficient (torusLift f) 0 = ∫ z, f z ∂torusMeasure := by |
| 490 | rw [coefficient_lift_eq_torus] |
| 491 | simp [torusCoefficient, torusMode] |
| 492 | |
| 493 | /-- The constructed inverse now solves the equation for an arbitrary smooth |
| 494 | zero-mean torus function, not only for a preassigned coefficient sequence. -/ |
| 495 | theorem inverse_solves_smooth_torus (d : Direction) (f : C(Torus, ℂ)) |
| 496 | (hf : ContDiff ℝ ∞ (torusLift f)) (hmean : (∫ z, f z ∂torusMeasure) = 0) (x : Plane) : |
| 497 | fderiv ℝ (directionalInverse d (coefficient (torusLift f))) x (vector d) = |
| 498 | torusLift f x := by |
| 499 | have ha := rapid_coefficient hf (torusLift_periodic f) |
| 500 | have hz : coefficient (torusLift f) 0 = 0 := by rw [coefficient_zero_eq_mean, hmean] |
| 501 | rw [directionalInverse_solves d ha hz, series_coefficient_lift f hf] |
| 502 | |
| 503 | /-! ## Descent of an arbitrary periodic function on the plane -/ |
| 504 | |
| 505 | theorem unitPeriodic_first {f : Plane → ℂ} (hp : UnitPeriodic f) (y : ℝ) : |
| 506 | Periodic (fun x => f (x, y)) 1 := by |
| 507 | intro x |
| 508 | simpa using hp (x, y) (1, 0) |
| 509 | |
| 510 | theorem unitPeriodic_second {f : Plane → ℂ} (hp : UnitPeriodic f) (x : ℝ) : |
| 511 | Periodic (fun y => f (x, y)) 1 := by |
| 512 | intro y |
| 513 | simpa using hp (x, y) (0, 1) |
| 514 | |
| 515 | noncomputable def firstLift (f : Plane → ℂ) (hp : UnitPeriodic f) |
| 516 | (z : UnitAddCircle) (y : ℝ) : ℂ := |
| 517 | (unitPeriodic_first hp y).lift z |
| 518 | |
| 519 | theorem firstLift_periodic (f : Plane → ℂ) (hp : UnitPeriodic f) (z : UnitAddCircle) : |
| 520 | Periodic (firstLift f hp z) 1 := by |
| 521 | intro y |
| 522 | refine Quotient.inductionOn' z (fun x => ?_) |
| 523 | change f (x, y + 1) = f (x, y) |
| 524 | exact unitPeriodic_second hp x y |
| 525 | |
| 526 | noncomputable def descend (f : Plane → ℂ) (hp : UnitPeriodic f) (z : Torus) : ℂ := |
| 527 | (firstLift_periodic f hp z.1).lift z.2 |
| 528 | |
| 529 | @[simp] theorem descend_coe (f : Plane → ℂ) (hp : UnitPeriodic f) (x y : ℝ) : |
| 530 | descend f hp ((x : UnitAddCircle), (y : UnitAddCircle)) = f (x, y) := rfl |
| 531 | |
| 532 | theorem descend_continuous {f : Plane → ℂ} (hf : Continuous f) (hp : UnitPeriodic f) : |
| 533 | Continuous (descend f hp) := by |
| 534 | have hq : IsOpenQuotientMap (fun x : ℝ => (x : UnitAddCircle)) := |
| 535 | QuotientAddGroup.isOpenQuotientMap_mk |
| 536 | apply (hq.prodMap hq).isQuotientMap.continuous_iff.mpr |
| 537 | exact hf |
| 538 | |
| 539 | noncomputable def descendContinuous (f : Plane → ℂ) (hf : Continuous f) |
| 540 | (hp : UnitPeriodic f) : C(Torus, ℂ) where |
| 541 | toFun := descend f hp |
| 542 | continuous_toFun := descend_continuous hf hp |
| 543 | |
| 544 | @[simp] theorem torusLift_descendContinuous (f : Plane → ℂ) (hf : Continuous f) |
| 545 | (hp : UnitPeriodic f) : torusLift (descendContinuous f hf hp) = f := rfl |
| 546 | |
| 547 | /-- Pointwise reconstruction for an arbitrary actual smooth unit-periodic |
| 548 | function on the plane; neither rapid decay nor reconstruction is a premise. -/ |
| 549 | theorem series_coefficient {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 550 | (hp : UnitPeriodic f) (x : Plane) : series (coefficient f) x = f x := by |
| 551 | have h := series_coefficient_lift (descendContinuous f hf.continuous hp) |
| 552 | (show ContDiff ℝ ∞ (torusLift (descendContinuous f hf.continuous hp)) from hf) x |
| 553 | exact h |
| 554 | |
| 555 | theorem coefficient_zero_eq_integral (f : Plane → ℂ) : |
| 556 | coefficient f 0 = ∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, f (x, y) := by |
| 557 | rw [coefficient_eq_doubleIntegral] |
| 558 | simp [kernel] |
| 559 | |
| 560 | /-- The final coefficient bridge to the existing inverse construction. -/ |
| 561 | theorem smooth_periodic_fourier_data {f : Plane → ℂ} (hf : ContDiff ℝ ∞ f) |
| 562 | (hp : UnitPeriodic f) : Rapid (coefficient f) ∧ series (coefficient f) = f := |
| 563 | ⟨rapid_coefficient hf hp, funext (series_coefficient hf hp)⟩ |
| 564 | |
| 565 | theorem inverse_solves_smooth_periodic (d : Direction) {f : Plane → ℂ} |
| 566 | (hf : ContDiff ℝ ∞ f) (hp : UnitPeriodic f) |
| 567 | (hmean : (∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, f (x, y)) = 0) (x : Plane) : |
| 568 | fderiv ℝ (directionalInverse d (coefficient f)) x (vector d) = f x := by |
| 569 | have hz : coefficient f 0 = 0 := by rw [coefficient_zero_eq_integral, hmean] |
| 570 | rw [directionalInverse_solves d (rapid_coefficient hf hp) hz, series_coefficient hf hp] |
| 571 | |
| 572 | end NavierStokes.SmoothFourierData |