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.HarmonicCalculus |
| 2 | import NavierStokes.MeanResidual |
| 3 | import Mathlib.Algebra.MonoidAlgebra.Support |
| 4 | import Mathlib.Analysis.SpecialFunctions.Integrals.Basic |
| 5 | |
| 6 | /-! |
| 7 | # Finite integer-harmonic fields |
| 8 | |
| 9 | The coefficients form a genuine finite group algebra. Evaluation is the |
| 10 | literal exponential sum, multiplication is convolution, and angular means |
| 11 | are actual interval integrals over a period of length `2*pi`. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open Set Filter Function MeasureTheory |
| 17 | open scoped BigOperators Topology ContDiff ComplexConjugate Pointwise |
| 18 | |
| 19 | namespace NavierStokes.HarmonicFields |
| 20 | |
| 21 | abbrev Coefficients (α : Type*) := AddMonoidAlgebra (α → ℂ) ℤ |
| 22 | |
| 23 | /-- Coefficient access for the wrapped group algebra. -/ |
| 24 | instance {α : Type*} : CoeFun (Coefficients α) (fun _ => ℤ → α → ℂ) := |
| 25 | ⟨fun c => c.coeff⟩ |
| 26 | |
| 27 | abbrev Coefficients.support {α : Type*} (c : Coefficients α) : Finset ℤ := c.coeff.support |
| 28 | |
| 29 | abbrev Coefficients.sum {α M : Type*} [AddCommMonoid M] (c : Coefficients α) |
| 30 | (f : ℤ → (α → ℂ) → M) : M := c.coeff.sum f |
| 31 | |
| 32 | noncomputable def character (j : ℤ) (φ : ℝ) : ℂ := |
| 33 | Complex.exp ((j : ℂ) * (φ : ℂ) * Complex.I) |
| 34 | |
| 35 | @[simp] theorem character_zero (φ : ℝ) : character 0 φ = 1 := by |
| 36 | simp [character] |
| 37 | |
| 38 | theorem character_add (i j : ℤ) (φ : ℝ) : |
| 39 | character (i + j) φ = character i φ * character j φ := by |
| 40 | simp only [character, Int.cast_add, add_mul, Complex.exp_add] |
| 41 | |
| 42 | theorem character_phase_add (j : ℤ) (φ ψ : ℝ) : |
| 43 | character j (φ + ψ) = character j φ * character j ψ := by |
| 44 | simp only [character, Complex.ofReal_add, mul_add, add_mul, Complex.exp_add] |
| 45 | |
| 46 | theorem character_int_mul (j kp : ℤ) (θ : ℝ) : |
| 47 | character j ((kp : ℝ) * θ) = character (j * kp) θ := by |
| 48 | unfold character |
| 49 | congr 1 |
| 50 | simp only [Complex.ofReal_mul, Complex.ofReal_intCast, Int.cast_mul] |
| 51 | ring |
| 52 | |
| 53 | @[simp] theorem norm_character (j : ℤ) (φ : ℝ) : ‖character j φ‖ = 1 := by |
| 54 | have he : (j : ℂ) * (φ : ℂ) * Complex.I = ((j * φ : ℝ) : ℂ) * Complex.I := by |
| 55 | simp only [Complex.ofReal_mul, Complex.ofReal_intCast] |
| 56 | rw [character, he, Complex.norm_exp_ofReal_mul_I] |
| 57 | |
| 58 | theorem character_neg (j : ℤ) (φ : ℝ) : character (-j) φ = conj (character j φ) := by |
| 59 | rw [character, character, ← Complex.exp_conj] |
| 60 | congr 1 |
| 61 | simp only [Int.cast_neg, map_mul, map_intCast, Complex.conj_ofReal, Complex.conj_I] |
| 62 | ring |
| 63 | |
| 64 | theorem character_continuous (j : ℤ) : Continuous (character j) := by |
| 65 | exact ((continuous_const.mul Complex.continuous_ofReal).mul continuous_const).cexp |
| 66 | |
| 67 | noncomputable def characterHom (φ : ℝ) : Multiplicative ℤ →* ℂ where |
| 68 | toFun j := character (Multiplicative.toAdd j) φ |
| 69 | map_one' := character_zero φ |
| 70 | map_mul' i j := character_add (Multiplicative.toAdd i) (Multiplicative.toAdd j) φ |
| 71 | |
| 72 | noncomputable def evaluateHom {α : Type*} (x : α) (φ : ℝ) : Coefficients α →+* ℂ := |
| 73 | AddMonoidAlgebra.liftNCRingHom (Pi.evalRingHom (fun _ : α => ℂ) x) (characterHom φ) |
| 74 | (fun _ _ => Commute.all _ _) |
| 75 | |
| 76 | noncomputable def evaluate {α : Type*} (c : Coefficients α) (x : α) (φ : ℝ) : ℂ := |
| 77 | c.sum (fun j a => a x * character j φ) |
| 78 | |
| 79 | theorem evaluate_eq_hom {α : Type*} (c : Coefficients α) (x : α) (φ : ℝ) : |
| 80 | evaluate c x φ = evaluateHom x φ c := rfl |
| 81 | |
| 82 | @[simp] theorem evaluate_zero {α : Type*} (x : α) (φ : ℝ) : |
| 83 | evaluate (0 : Coefficients α) x φ = 0 := (evaluateHom x φ).map_zero |
| 84 | |
| 85 | theorem evaluate_add {α : Type*} (c d : Coefficients α) (x : α) (φ : ℝ) : |
| 86 | evaluate (c + d) x φ = evaluate c x φ + evaluate d x φ := (evaluateHom x φ).map_add c d |
| 87 | |
| 88 | /-- The actual product of two finite fields is evaluation of the finite |
| 89 | coefficient convolution. -/ |
| 90 | theorem evaluate_mul {α : Type*} (c d : Coefficients α) (x : α) (φ : ℝ) : |
| 91 | evaluate (c * d) x φ = evaluate c x φ * evaluate d x φ := (evaluateHom x φ).map_mul c d |
| 92 | |
| 93 | theorem evaluate_single {α : Type*} (j : ℤ) (a : α → ℂ) (x : α) (φ : ℝ) : |
| 94 | evaluate (AddMonoidAlgebra.single j a : Coefficients α) x φ = a x * character j φ := by |
| 95 | simp [evaluate, Coefficients.sum] |
| 96 | |
| 97 | theorem evaluate_over {α : Type*} (c : Coefficients α) (s : Finset ℤ) |
| 98 | (hs : c.support ⊆ s) (x : α) (φ : ℝ) : |
| 99 | evaluate c x φ = ∑ j ∈ s, c j x * character j φ := by |
| 100 | apply Finset.sum_subset hs |
| 101 | intro j hj hnot |
| 102 | rw [Finsupp.notMem_support_iff.mp hnot] |
| 103 | simp |
| 104 | |
| 105 | /-- The slow/auxiliary parameter is `x`. Its coefficient functions have |
| 106 | no angular input. The angular frequency is the literal integer `j*kp`. -/ |
| 107 | noncomputable def field {α : Type*} (c : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 108 | (kp : ℤ) (p : α × ℝ) : ℂ := evaluate c p.1 (k * Φ p.1 + (kp : ℝ) * p.2) |
| 109 | |
| 110 | theorem field_expansion {α : Type*} (c : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 111 | (kp : ℤ) (x : α) (θ : ℝ) : |
| 112 | field c k Φ kp (x, θ) = |
| 113 | ∑ j ∈ c.support, c j x * character j (k * Φ x) * character (j * kp) θ := by |
| 114 | simp only [field, evaluate, Finsupp.sum, character_phase_add, character_int_mul, mul_assoc] |
| 115 | |
| 116 | theorem field_mul {α : Type*} (c d : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 117 | (kp : ℤ) (p : α × ℝ) : |
| 118 | field (c * d) k Φ kp p = field c k Φ kp p * field d k Φ kp p := |
| 119 | evaluate_mul c d p.1 _ |
| 120 | |
| 121 | theorem field_angular_continuous {α : Type*} (c : Coefficients α) (k : ℝ) |
| 122 | (Φ : α → ℝ) (kp : ℤ) (x : α) : Continuous (fun θ => field c k Φ kp (x, θ)) := by |
| 123 | simp only [field_expansion] |
| 124 | exact continuous_finsetSum _ (fun j _ => continuous_const.fun_mul (character_continuous _)) |
| 125 | |
| 126 | noncomputable def period : ℝ := 2 * Real.pi |
| 127 | |
| 128 | theorem period_pos : 0 < period := mul_pos (by norm_num) Real.pi_pos |
| 129 | |
| 130 | theorem period_ne_zero : period ≠ 0 := period_pos.ne' |
| 131 | |
| 132 | /-- This is a genuine normalized angular integral. -/ |
| 133 | noncomputable def angularMean (f : ℝ → ℂ) : ℂ := |
| 134 | (period : ℂ)⁻¹ * ∫ θ in (0 : ℝ)..period, f θ |
| 135 | |
| 136 | theorem character_period (j : ℤ) : character j period = 1 := by |
| 137 | have he : (j : ℂ) * (period : ℂ) * Complex.I = |
| 138 | (j : ℂ) * (2 * Real.pi * Complex.I) := by |
| 139 | simp only [period, Complex.ofReal_mul, Complex.ofReal_ofNat] |
| 140 | ring |
| 141 | rw [character, he, Complex.exp_int_mul_two_pi_mul_I] |
| 142 | |
| 143 | theorem character_periodic (j : ℤ) : Function.Periodic (character j) period := by |
| 144 | intro θ |
| 145 | rw [character_phase_add, character_period, mul_one] |
| 146 | |
| 147 | theorem field_angular_periodic {α : Type*} (c : Coefficients α) (k : ℝ) |
| 148 | (Φ : α → ℝ) (kp : ℤ) (x : α) : |
| 149 | Function.Periodic (fun θ => field c k Φ kp (x, θ)) period := by |
| 150 | intro θ |
| 151 | simp only [field_expansion] |
| 152 | exact Finset.sum_congr rfl (fun j _ => congrArg |
| 153 | (c j x * character j (k * Φ x) * ·) (character_periodic (j * kp) θ)) |
| 154 | |
| 155 | theorem integral_character (j : ℤ) : |
| 156 | (∫ θ in (0 : ℝ)..period, character j θ) = if j = 0 then (period : ℂ) else 0 := by |
| 157 | by_cases hj : j = 0 |
| 158 | · simp [hj, period] |
| 159 | · rw [ite_eq_right hj] |
| 160 | have hc : (j : ℂ) * Complex.I ≠ 0 := mul_ne_zero (Int.cast_ne_zero.mpr hj) Complex.I_ne_zero |
| 161 | have he : character j = fun θ : ℝ => Complex.exp (((j : ℂ) * Complex.I) * θ) := by |
| 162 | funext θ |
| 163 | unfold character |
| 164 | congr 1 |
| 165 | ring |
| 166 | rw [he, integral_exp_mul_complex hc] |
| 167 | have hb : Complex.exp (((j : ℂ) * Complex.I) * (period : ℂ)) = 1 := by |
| 168 | convert! character_period j using 1 |
| 169 | unfold character |
| 170 | congr 1 |
| 171 | ring |
| 172 | simp [hb] |
| 173 | |
| 174 | theorem angularMean_const_character (A : ℂ) (j : ℤ) : |
| 175 | angularMean (fun θ => A * character j θ) = if j = 0 then A else 0 := by |
| 176 | rw [angularMean, intervalIntegral.integral_const_mul, integral_character] |
| 177 | by_cases hj : j = 0 |
| 178 | · rw [ite_eq_left hj, ite_eq_left hj] |
| 179 | have hp : (period : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr period_ne_zero |
| 180 | field_simp |
| 181 | · simp [hj] |
| 182 | |
| 183 | theorem angularMean_sum {ι : Type*} (s : Finset ι) (f : ι → ℝ → ℂ) |
| 184 | (hf : ∀ i ∈ s, Continuous (f i)) : |
| 185 | angularMean (fun θ => ∑ i ∈ s, f i θ) = ∑ i ∈ s, angularMean (f i) := by |
| 186 | simp only [angularMean] |
| 187 | rw [intervalIntegral.integral_finsetSum (fun i hi => (hf i hi).intervalIntegrable _ _), |
| 188 | Finset.mul_sum] |
| 189 | |
| 190 | /-- Nonzero integer angular frequency makes the actual angular mean pick |
| 191 | precisely the zero harmonic, regardless of the slow phase or carrier band. -/ |
| 192 | theorem angularMean_field {α : Type*} (c : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 193 | {kp : ℤ} (hkp : kp ≠ 0) (x : α) : |
| 194 | angularMean (fun θ => field c k Φ kp (x, θ)) = c 0 x := by |
| 195 | simp only [field_expansion] |
| 196 | rw [angularMean_sum c.support _ (fun j _ => continuous_const.fun_mul (character_continuous _))] |
| 197 | simp only [angularMean_const_character, mul_eq_zero, hkp, or_false] |
| 198 | by_cases h0 : 0 ∈ c.support |
| 199 | · simp [h0] |
| 200 | · have hc : c 0 = 0 := Finsupp.notMem_support_iff.mp h0 |
| 201 | simp [h0, hc] |
| 202 | |
| 203 | noncomputable def coefficientMass {α : Type*} (c : Coefficients α) (x : α) : ℝ := |
| 204 | ∑ j ∈ c.support, ‖c j x‖ |
| 205 | |
| 206 | theorem coefficientMass_nonneg {α : Type*} (c : Coefficients α) (x : α) : |
| 207 | 0 ≤ coefficientMass c x := Finset.sum_nonneg (fun _ _ => norm_nonneg _) |
| 208 | |
| 209 | /-- A value estimate with constant one, independent of every frequency |
| 210 | and of the largest occupied harmonic. -/ |
| 211 | theorem norm_evaluate_le_mass {α : Type*} (c : Coefficients α) (x : α) (φ : ℝ) : |
| 212 | ‖evaluate c x φ‖ ≤ coefficientMass c x := by |
| 213 | calc |
| 214 | _ ≤ ∑ j ∈ c.support, ‖c j x * character j φ‖ := norm_sum_le _ _ |
| 215 | _ = _ := by simp only [norm_mul, norm_character, mul_one, coefficientMass] |
| 216 | |
| 217 | theorem norm_field_le_mass {α : Type*} (c : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 218 | (kp : ℤ) (p : α × ℝ) : ‖field c k Φ kp p‖ ≤ coefficientMass c p.1 := |
| 219 | norm_evaluate_le_mass c p.1 _ |
| 220 | |
| 221 | theorem norm_field_product_le {α : Type*} (c d : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 222 | (kp : ℤ) (p : α × ℝ) : |
| 223 | ‖field (c * d) k Φ kp p‖ ≤ coefficientMass c p.1 * coefficientMass d p.1 := by |
| 224 | rw [field_mul, norm_mul] |
| 225 | exact mul_le_mul (norm_field_le_mass c k Φ kp p) (norm_field_le_mass d k Φ kp p) |
| 226 | (norm_nonneg _) (coefficientMass_nonneg c p.1) |
| 227 | |
| 228 | theorem convolution_apply {α : Type*} (c d : Coefficients α) (m : ℤ) (x : α) : |
| 229 | (c * d) m x = ∑ j ∈ c.support, c j x * d (m - j) x := by |
| 230 | rw [AddMonoidAlgebra.coeff_mul] |
| 231 | simp only [Finsupp.sum, Finset.sum_apply, ite_apply, Pi.mul_apply, Pi.zero_apply] |
| 232 | apply Finset.sum_congr rfl |
| 233 | intro j hj |
| 234 | simp_rw [show ∀ l : ℤ, j + l = m ↔ l = m - j by intro l; omega] |
| 235 | rw [Finset.sum_ite_eq'] |
| 236 | by_cases hm : m - j ∈ d.support |
| 237 | · simp [hm] |
| 238 | · have hd : d (m - j) = 0 := Finsupp.notMem_support_iff.mp hm |
| 239 | simp [hm, hd] |
| 240 | |
| 241 | theorem angularMean_product {α : Type*} (c d : Coefficients α) (k : ℝ) (Φ : α → ℝ) |
| 242 | {kp : ℤ} (hkp : kp ≠ 0) (x : α) : |
| 243 | angularMean (fun θ => field c k Φ kp (x, θ) * field d k Φ kp (x, θ)) = |
| 244 | ∑ j ∈ c.support, c j x * d (-j) x := by |
| 245 | have heq : (fun θ => field c k Φ kp (x, θ) * field d k Φ kp (x, θ)) = |
| 246 | (fun θ => field (c * d) k Φ kp (x, θ)) := by |
| 247 | funext θ |
| 248 | exact (field_mul c d k Φ kp (x, θ)).symm |
| 249 | rw [heq, angularMean_field (c * d) k Φ hkp x, convolution_apply] |
| 250 | simp only [zero_sub] |
| 251 | |
| 252 | noncomputable def conjugateReverse {α : Type*} (c : Coefficients α) : Coefficients α := |
| 253 | AddMonoidAlgebra.ofCoeff <| Finsupp.equivMapDomain (Equiv.neg ℤ) |
| 254 | (Finsupp.mapRange (fun a : α → ℂ => fun x => conj (a x)) (by ext x; simp) c.coeff) |
| 255 | |
| 256 | @[simp] theorem conjugateReverse_apply {α : Type*} (c : Coefficients α) (j : ℤ) (x : α) : |
| 257 | conjugateReverse c j x = conj (c (-j) x) := rfl |
| 258 | |
| 259 | theorem evaluate_conjugateReverse {α : Type*} (c : Coefficients α) (x : α) (φ : ℝ) : |
| 260 | evaluate (conjugateReverse c) x φ = conj (evaluate c x φ) := by |
| 261 | unfold evaluate conjugateReverse Coefficients.sum |
| 262 | simp only [] |
| 263 | rw [Finsupp.sum_equivMapDomain, Finsupp.sum_mapRange_index (fun _ => by simp)] |
| 264 | simp only [Equiv.neg_apply, Finsupp.sum, map_sum, map_mul, character_neg] |
| 265 | |
| 266 | def ConjugateSymmetric {α : Type*} (c : Coefficients α) : Prop := |
| 267 | ∀ j x, c (-j) x = conj (c j x) |
| 268 | |
| 269 | theorem conjugateReverse_eq_self {α : Type*} {c : Coefficients α} |
| 270 | (hc : ConjugateSymmetric c) : conjugateReverse c = c := by |
| 271 | apply AddMonoidAlgebra.ext |
| 272 | apply Finsupp.ext |
| 273 | intro j |
| 274 | funext x |
| 275 | rw [conjugateReverse_apply, hc j x] |
| 276 | simp |
| 277 | |
| 278 | theorem evaluate_conj_eq_self {α : Type*} {c : Coefficients α} |
| 279 | (hc : ConjugateSymmetric c) (x : α) (φ : ℝ) : conj (evaluate c x φ) = evaluate c x φ := by |
| 280 | rw [← evaluate_conjugateReverse, conjugateReverse_eq_self hc] |
| 281 | |
| 282 | theorem field_real {α : Type*} {c : Coefficients α} (hc : ConjugateSymmetric c) |
| 283 | (k : ℝ) (Φ : α → ℝ) (kp : ℤ) (p : α × ℝ) : |
| 284 | ((field c k Φ kp p).re : ℂ) = field c k Φ kp p := |
| 285 | Complex.conj_eq_iff_re.mp (evaluate_conj_eq_self hc p.1 _) |
| 286 | |
| 287 | /-- The zero mode of the actual product is the complex coefficient |
| 288 | covariance, with conjugacy supplying the negative harmonics. -/ |
| 289 | theorem angularMean_coefficient_covariance {α : Type*} (c : Coefficients α) |
| 290 | {d : Coefficients α} (hd : ConjugateSymmetric d) (k : ℝ) (Φ : α → ℝ) |
| 291 | {kp : ℤ} (hkp : kp ≠ 0) (x : α) : |
| 292 | angularMean (fun θ => field c k Φ kp (x, θ) * field d k Φ kp (x, θ)) = |
| 293 | ∑ j ∈ c.support, c j x * conj (d j x) := by |
| 294 | rw [angularMean_product c d k Φ hkp x] |
| 295 | exact Finset.sum_congr rfl (fun j _ => congrArg (c j x * ·) (hd j x)) |
| 296 | |
| 297 | theorem chart_trace (c : Coefficients ProblemStatement.SpaceTime) (Ψ : ProblemStatement.SpaceTime → ℝ) |
| 298 | (kp : ℤ) (hc : ∀ j ∈ c.support, MeanResidual.AngularInvariant (c j)) |
| 299 | (hΨ : ∀ q θ, Ψ (MeanResidual.angularShift q θ) = Ψ q + (kp : ℝ) * θ) |
| 300 | (q : ProblemStatement.SpaceTime) (θ : ℝ) : |
| 301 | evaluate c (MeanResidual.angularShift q θ) (Ψ (MeanResidual.angularShift q θ)) = |
| 302 | field c 1 Ψ kp (q, θ) := by |
| 303 | rw [hΨ] |
| 304 | unfold evaluate field |
| 305 | simp only [one_mul] |
| 306 | exact Finset.sum_congr rfl (fun j hj => congrArg (· * character j (Ψ q + (kp : ℝ) * θ)) |
| 307 | (hc j hj q θ)) |
| 308 | |
| 309 | /-- The coefficient covariance is the actual angular average used by |
| 310 | `MeanResidual`, when coefficients are angularly invariant and the phase |
| 311 | has the stated integer angular increment. -/ |
| 312 | theorem meanResidual_product_covariance |
| 313 | (c d : Coefficients ProblemStatement.SpaceTime) (Ψ : ProblemStatement.SpaceTime → ℝ) |
| 314 | {kp : ℤ} (hkp : kp ≠ 0) |
| 315 | (hc : ∀ j ∈ c.support, MeanResidual.AngularInvariant (c j)) |
| 316 | (hd : ∀ j ∈ d.support, MeanResidual.AngularInvariant (d j)) |
| 317 | (hΨ : ∀ q θ, Ψ (MeanResidual.angularShift q θ) = Ψ q + (kp : ℝ) * θ) |
| 318 | (hconj : ConjugateSymmetric d) (q : ProblemStatement.SpaceTime) : |
| 319 | MeanResidual.average (fun y => evaluate c y (Ψ y) * evaluate d y (Ψ y)) q = |
| 320 | ∑ j ∈ c.support, c j q * conj (d j q) := by |
| 321 | have he : MeanResidual.average (fun y => evaluate c y (Ψ y) * evaluate d y (Ψ y)) q = |
| 322 | angularMean (fun θ => field c 1 Ψ kp (q, θ) * field d 1 Ψ kp (q, θ)) := by |
| 323 | simp only [MeanResidual.average, angularMean, MeanResidual.period, period, |
| 324 | Complex.real_smul, Complex.ofReal_inv] |
| 325 | congr 1 |
| 326 | apply intervalIntegral.integral_congr |
| 327 | intro θ hθ |
| 328 | dsimp only |
| 329 | rw [chart_trace c Ψ kp hc hΨ, chart_trace d Ψ kp hd hΨ] |
| 330 | rw [he, angularMean_coefficient_covariance c hconj 1 Ψ hkp q] |
| 331 | |
| 332 | def BandLimited {α : Type*} (c : Coefficients α) (N : ℕ) : Prop := |
| 333 | ∀ j ∈ c.support, j.natAbs ≤ N |
| 334 | |
| 335 | theorem BandLimited.mono {α : Type*} {c : Coefficients α} {M N : ℕ} |
| 336 | (hc : BandLimited c M) (hMN : M ≤ N) : BandLimited c N := |
| 337 | fun j hj => (hc j hj).trans hMN |
| 338 | |
| 339 | theorem BandLimited.add {α : Type*} {c d : Coefficients α} {N : ℕ} |
| 340 | (hc : BandLimited c N) (hd : BandLimited d N) : BandLimited (c + d) N := by |
| 341 | intro j hj |
| 342 | rcases Finset.mem_union.mp (Finsupp.support_add hj) with hj | hj |
| 343 | · exact hc j hj |
| 344 | · exact hd j hj |
| 345 | |
| 346 | theorem BandLimited.mul {α : Type*} {c d : Coefficients α} {M N : ℕ} |
| 347 | (hc : BandLimited c M) (hd : BandLimited d N) : BandLimited (c * d) (M + N) := by |
| 348 | have hs : (c * d).support ⊆ c.support + d.support := |
| 349 | AddMonoidAlgebra.support_coeff_mul_subset c d |
| 350 | intro j hj |
| 351 | obtain ⟨i, hi, l, hl, rfl⟩ := Finset.mem_add.mp (hs hj) |
| 352 | exact (Int.natAbs_add_le i l).trans (Nat.add_le_add (hc i hi) (hd l hl)) |
| 353 | |
| 354 | theorem band_single_zero {α : Type*} (a : α → ℂ) : |
| 355 | BandLimited (AddMonoidAlgebra.single (0 : ℤ) a : Coefficients α) 0 := by |
| 356 | intro j hj |
| 357 | have hj0 : j = 0 := Finset.mem_singleton.mp (Finsupp.support_single_subset hj) |
| 358 | simp [hj0] |
| 359 | |
| 360 | noncomputable def constantCoefficient {α : Type*} (a : α → ℂ) : Coefficients α := |
| 361 | AddMonoidAlgebra.single 0 a |
| 362 | |
| 363 | theorem band_constantCoefficient {α : Type*} (a : α → ℂ) : |
| 364 | BandLimited (constantCoefficient a) 0 := band_single_zero a |
| 365 | |
| 366 | /-- A literal quadratic update with arbitrary slow coefficient functions. -/ |
| 367 | noncomputable def quadraticStep {α : Type*} (A B C : α → ℂ) (c : Coefficients α) : |
| 368 | Coefficients α := |
| 369 | constantCoefficient A + constantCoefficient B * c + constantCoefficient C * (c * c) |
| 370 | |
| 371 | theorem band_quadraticStep {α : Type*} (A B C : α → ℂ) {c : Coefficients α} {N : ℕ} |
| 372 | (hc : BandLimited c N) : BandLimited (quadraticStep A B C c) (N + N) := by |
| 373 | have hB : BandLimited (constantCoefficient B * c) N := by |
| 374 | simpa only [zero_add] using (band_constantCoefficient B).mul hc |
| 375 | have hC : BandLimited (constantCoefficient C * (c * c)) (N + N) := by |
| 376 | simpa only [zero_add] using (band_constantCoefficient C).mul (hc.mul hc) |
| 377 | exact ((band_constantCoefficient A).mono (Nat.zero_le _) |>.add |
| 378 | (hB.mono (Nat.le_add_right _ _))).add hC |
| 379 | |
| 380 | noncomputable def quadraticIterate {α : Type*} (A B C : ℕ → α → ℂ) (c : Coefficients α) : |
| 381 | ℕ → Coefficients α |
| 382 | | 0 => c |
| 383 | | n + 1 => quadraticStep (A n) (B n) (C n) (quadraticIterate A B C c n) |
| 384 | |
| 385 | /-- Starting in harmonics `{-1,0,1}`, the actual convolution update has |
| 386 | largest harmonic value at most `2^stage`. This is a bound on values, |
| 387 | not merely on the number of supported frequencies. -/ |
| 388 | theorem band_quadraticIterate {α : Type*} (A B C : ℕ → α → ℂ) {c : Coefficients α} |
| 389 | (hc : BandLimited c 1) (n : ℕ) : BandLimited (quadraticIterate A B C c n) (2 ^ n) := by |
| 390 | induction n with |
| 391 | | zero => simpa only [quadraticIterate, pow_zero] using hc |
| 392 | | succ n ih => |
| 393 | simpa only [quadraticIterate, pow_succ, mul_two] using |
| 394 | band_quadraticStep (A n) (B n) (C n) ih |
| 395 | |
| 396 | theorem quadratic_angular_frequency_bound {α : Type*} (A B C : ℕ → α → ℂ) |
| 397 | {c : Coefficients α} (hc : BandLimited c 1) (n : ℕ) (kp : ℤ) |
| 398 | {j : ℤ} (hj : j ∈ (quadraticIterate A B C c n).support) : |
| 399 | (j * kp).natAbs ≤ 2 ^ n * kp.natAbs := by |
| 400 | rw [Int.natAbs_mul] |
| 401 | exact Nat.mul_le_mul_right _ (band_quadraticIterate A B C hc n j hj) |
| 402 | |
| 403 | theorem field_quadraticStep {α : Type*} (A B C : α → ℂ) (c : Coefficients α) |
| 404 | (k : ℝ) (Φ : α → ℝ) (kp : ℤ) (p : α × ℝ) : |
| 405 | field (quadraticStep A B C c) k Φ kp p = |
| 406 | A p.1 + B p.1 * field c k Φ kp p + C p.1 * field c k Φ kp p ^ 2 := by |
| 407 | simp only [quadraticStep, field, evaluate_add, evaluate_mul, constantCoefficient, evaluate_single, |
| 408 | character_zero, mul_one, pow_two] |
| 409 | |
| 410 | noncomputable def quadraticEnvelope {α : Type*} (A B C : ℕ → α → ℂ) |
| 411 | (c : Coefficients α) (x : α) : ℕ → ℝ |
| 412 | | 0 => coefficientMass c x |
| 413 | | n + 1 => ‖A n x‖ + ‖B n x‖ * quadraticEnvelope A B C c x n + |
| 414 | ‖C n x‖ * quadraticEnvelope A B C c x n ^ 2 |
| 415 | |
| 416 | /-- The value envelope follows the actual quadratic update and contains |
| 417 | no factor involving the harmonic band or its cardinality. -/ |
| 418 | theorem norm_quadraticIterate_le {α : Type*} (A B C : ℕ → α → ℂ) (c : Coefficients α) |
| 419 | (k : ℝ) (Φ : α → ℝ) (kp : ℤ) (p : α × ℝ) (n : ℕ) : |
| 420 | ‖field (quadraticIterate A B C c n) k Φ kp p‖ ≤ quadraticEnvelope A B C c p.1 n := by |
| 421 | induction n with |
| 422 | | zero => exact norm_field_le_mass c k Φ kp p |
| 423 | | succ n ih => |
| 424 | rw [quadraticIterate, field_quadraticStep, quadraticEnvelope] |
| 425 | calc |
| 426 | _ ≤ ‖A n p.1‖ + ‖B n p.1‖ * ‖field (quadraticIterate A B C c n) k Φ kp p‖ + |
| 427 | ‖C n p.1‖ * ‖field (quadraticIterate A B C c n) k Φ kp p‖ ^ 2 := by |
| 428 | exact (norm_add_le _ _).trans (add_le_add |
| 429 | ((norm_add_le _ _).trans (by rw [norm_mul])) (by rw [norm_mul, norm_pow])) |
| 430 | _ ≤ _ := add_le_add |
| 431 | (add_le_add_right (mul_le_mul_of_nonneg_left ih (norm_nonneg _)) _) |
| 432 | (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg _) ih 2) (norm_nonneg _)) |
| 433 | |
| 434 | section Derivatives |
| 435 | |
| 436 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 437 | |
| 438 | noncomputable def wave (c : Coefficients E) (k : ℝ) (Φ : E → ℝ) (x : E) : ℂ := |
| 439 | c.sum (fun j a => HarmonicCalculus.mode (k * (j : ℝ)) Φ a x) |
| 440 | |
| 441 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] in |
| 442 | theorem character_eq_carrier (j : ℤ) (k : ℝ) (Φ : E → ℝ) (x : E) : |
| 443 | character j (k * Φ x) = HarmonicCalculus.carrier (k * (j : ℝ)) Φ x := by |
| 444 | apply congrArg Complex.exp |
| 445 | simp only [HarmonicCalculus.phaseFactor, Complex.ofReal_mul, Complex.ofReal_intCast] |
| 446 | ring |
| 447 | |
| 448 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] in |
| 449 | theorem wave_eq_evaluate (c : Coefficients E) (k : ℝ) (Φ : E → ℝ) (x : E) : |
| 450 | wave c k Φ x = evaluate c x (k * Φ x) := by |
| 451 | apply Finset.sum_congr rfl |
| 452 | intro j hj |
| 453 | change c j x * Complex.exp (HarmonicCalculus.phaseFactor (k * (j : ℝ)) * (Φ x : ℂ)) = |
| 454 | c j x * Complex.exp ((j : ℂ) * ((k * Φ x : ℝ) : ℂ) * Complex.I) |
| 455 | apply congrArg (c j x * ·) |
| 456 | apply congrArg Complex.exp |
| 457 | simp only [HarmonicCalculus.phaseFactor, Complex.ofReal_mul, Complex.ofReal_intCast] |
| 458 | ring |
| 459 | |
| 460 | noncomputable def derivativeCoefficient (V : E → E) (k : ℝ) (Φ : E → ℝ) |
| 461 | (j : ℤ) (a : E → ℂ) (x : E) : ℂ := |
| 462 | HarmonicCalculus.along V a x + HarmonicCalculus.phaseFactor (k * (j : ℝ)) * |
| 463 | Complex.ofReal (HarmonicCalculus.along V Φ x) * a x |
| 464 | |
| 465 | theorem derivativeCoefficient_zero (V : E → E) (k : ℝ) (Φ : E → ℝ) (j : ℤ) : |
| 466 | derivativeCoefficient V k Φ j (0 : E → ℂ) = 0 := by |
| 467 | funext x |
| 468 | simp [derivativeCoefficient, HarmonicCalculus.along] |
| 469 | |
| 470 | noncomputable def differentiate (V : E → E) (k : ℝ) (Φ : E → ℝ) |
| 471 | (c : Coefficients E) : Coefficients E := |
| 472 | AddMonoidAlgebra.ofCoeff <| Finsupp.onFinset c.support (fun j => derivativeCoefficient V k Φ j (c j)) (by |
| 473 | intro j hj |
| 474 | by_contra hnot |
| 475 | apply hj |
| 476 | change derivativeCoefficient V k Φ j (c j) = 0 |
| 477 | rw [Finsupp.notMem_support_iff.mp hnot, derivativeCoefficient_zero]) |
| 478 | |
| 479 | @[simp] theorem differentiate_apply (V : E → E) (k : ℝ) (Φ : E → ℝ) |
| 480 | (c : Coefficients E) (j : ℤ) : |
| 481 | differentiate V k Φ c j = derivativeCoefficient V k Φ j (c j) := rfl |
| 482 | |
| 483 | theorem support_differentiate (V : E → E) (k : ℝ) (Φ : E → ℝ) (c : Coefficients E) : |
| 484 | (differentiate V k Φ c).support ⊆ c.support := by |
| 485 | unfold Coefficients.support differentiate |
| 486 | simp only [] |
| 487 | exact Finsupp.support_onFinset_subset |
| 488 | |
| 489 | theorem BandLimited.differentiate (V : E → E) (k : ℝ) (Φ : E → ℝ) |
| 490 | {c : Coefficients E} {N : ℕ} (hc : BandLimited c N) : |
| 491 | BandLimited (differentiate V k Φ c) N := |
| 492 | fun j hj => hc j (support_differentiate V k Φ c hj) |
| 493 | |
| 494 | theorem wave_differentiate_expansion (V : E → E) (k : ℝ) (Φ : E → ℝ) |
| 495 | (c : Coefficients E) (x : E) : |
| 496 | wave (differentiate V k Φ c) k Φ x = |
| 497 | ∑ j ∈ c.support, derivativeCoefficient V k Φ j (c j) x * |
| 498 | HarmonicCalculus.carrier (k * (j : ℝ)) Φ x := by |
| 499 | unfold wave Coefficients.sum Finsupp.sum |
| 500 | have hs := Finset.sum_subset (support_differentiate V k Φ c) (f := fun j : ℤ => |
| 501 | HarmonicCalculus.mode (k * (j : ℝ)) Φ (differentiate V k Φ c j) x) (by |
| 502 | intro j hj hnot |
| 503 | change HarmonicCalculus.mode (k * (j : ℝ)) Φ (differentiate V k Φ c j) x = 0 |
| 504 | rw [Finsupp.notMem_support_iff.mp hnot] |
| 505 | simp [HarmonicCalculus.mode]) |
| 506 | exact hs |
| 507 | |
| 508 | /-- Differentiating the actual finite wave applies the full product rule |
| 509 | to each coefficient and phase, and introduces no new harmonic values. -/ |
| 510 | theorem along_wave (V : E → E) (k : ℝ) (Φ : E → ℝ) (c : Coefficients E) {x : E} |
| 511 | (hΦ : DifferentiableAt ℝ Φ x) (hc : ∀ j ∈ c.support, DifferentiableAt ℝ (c j) x) : |
| 512 | HarmonicCalculus.along V (wave c k Φ) x = wave (differentiate V k Φ c) k Φ x := by |
| 513 | rw [wave_differentiate_expansion] |
| 514 | change fderiv ℝ (fun y => ∑ j ∈ c.support, |
| 515 | HarmonicCalculus.mode (k * (j : ℝ)) Φ (c j) y) x (V x) = _ |
| 516 | dsimp only [HarmonicCalculus.mode] |
| 517 | rw [fderiv_fun_sum (fun j hj => (hc j hj).fun_mul |
| 518 | (HarmonicCalculus.differentiableAt_carrier (k * (j : ℝ)) hΦ))] |
| 519 | simp only [_root_.sum_apply] |
| 520 | exact Finset.sum_congr rfl (fun j hj => HarmonicCalculus.along_mode V |
| 521 | (k * (j : ℝ)) hΦ (hc j hj)) |
| 522 | |
| 523 | theorem along_field_slow (V : E → E) (k : ℝ) (Φ : E → ℝ) (kp : ℤ) |
| 524 | (c : Coefficients E) (θ : ℝ) {x : E} |
| 525 | (hΦ : DifferentiableAt ℝ Φ x) (hc : ∀ j ∈ c.support, DifferentiableAt ℝ (c j) x) : |
| 526 | HarmonicCalculus.along V (fun y => field c k Φ kp (y, θ)) x = |
| 527 | field (differentiate V k Φ c) k Φ kp (x, θ) := by |
| 528 | have heq : (fun y => field c k Φ kp (y, θ)) = fun y => ∑ j ∈ c.support, |
| 529 | (c j y * HarmonicCalculus.carrier (k * (j : ℝ)) Φ y) * character (j * kp) θ := by |
| 530 | funext y |
| 531 | simp only [field_expansion, character_eq_carrier] |
| 532 | rw [heq] |
| 533 | change fderiv ℝ (fun y => ∑ j ∈ c.support, |
| 534 | (c j y * HarmonicCalculus.carrier (k * (j : ℝ)) Φ y) * character (j * kp) θ) x (V x) = _ |
| 535 | rw [fderiv_fun_sum (fun j hj => ((hc j hj).fun_mul |
| 536 | (HarmonicCalculus.differentiableAt_carrier (k * (j : ℝ)) hΦ)).mul_const _)] |
| 537 | simp only [_root_.sum_apply] |
| 538 | rw [field, evaluate_over _ c.support (support_differentiate V k Φ c)] |
| 539 | simp only [differentiate_apply, character_phase_add, character_int_mul, character_eq_carrier] |
| 540 | apply Finset.sum_congr rfl |
| 541 | intro j hj |
| 542 | have hm : DifferentiableAt ℝ (HarmonicCalculus.mode (k * (j : ℝ)) Φ (c j)) x := |
| 543 | (hc j hj).fun_mul (HarmonicCalculus.differentiableAt_carrier (k * (j : ℝ)) hΦ) |
| 544 | change HarmonicCalculus.along V |
| 545 | (fun y => HarmonicCalculus.mode (k * (j : ℝ)) Φ (c j) y * character (j * kp) θ) x = _ |
| 546 | rw [HarmonicCalculus.along_mul V hm (differentiableAt_const _), |
| 547 | HarmonicCalculus.along_mode V (k * (j : ℝ)) hΦ (hc j hj)] |
| 548 | simp only [HarmonicCalculus.along, fderiv_fun_const, Pi.zero_apply, _root_.zero_apply, |
| 549 | mul_zero, add_zero, derivativeCoefficient] |
| 550 | ring |
| 551 | |
| 552 | theorem derivativeCoefficient_contDiffOn {U : Set E} (hU : IsOpen U) |
| 553 | {V : E → E} {Φ : E → ℝ} {a : E → ℂ} |
| 554 | (hV : ContDiffOn ℝ ∞ V U) (hΦ : ContDiffOn ℝ ∞ Φ U) (ha : ContDiffOn ℝ ∞ a U) |
| 555 | (k : ℝ) (j : ℤ) : ContDiffOn ℝ ∞ (derivativeCoefficient V k Φ j a) U := |
| 556 | (HarmonicCalculus.contDiffOn_along hU hV ha).add |
| 557 | ((contDiffOn_const.mul (Complex.ofRealCLM.contDiff.comp_contDiffOn |
| 558 | (HarmonicCalculus.contDiffOn_along hU hV hΦ))).mul ha) |
| 559 | |
| 560 | theorem differentiate_contDiffOn {U : Set E} (hU : IsOpen U) |
| 561 | {V : E → E} {Φ : E → ℝ} (hV : ContDiffOn ℝ ∞ V U) (hΦ : ContDiffOn ℝ ∞ Φ U) |
| 562 | (k : ℝ) {c : Coefficients E} (hc : ∀ j ∈ c.support, ContDiffOn ℝ ∞ (c j) U) : |
| 563 | ∀ j ∈ (differentiate V k Φ c).support, ContDiffOn ℝ ∞ (differentiate V k Φ c j) U := by |
| 564 | intro j hj |
| 565 | exact derivativeCoefficient_contDiffOn hU hV hΦ (hc j (support_differentiate V k Φ c hj)) k j |
| 566 | |
| 567 | noncomputable def iteratedCoefficients (V : E → E) (k : ℝ) (Φ : E → ℝ) (c : Coefficients E) : |
| 568 | ℕ → Coefficients E |
| 569 | | 0 => c |
| 570 | | n + 1 => differentiate V k Φ (iteratedCoefficients V k Φ c n) |
| 571 | |
| 572 | noncomputable def iteratedAlong (V : E → E) : ℕ → (E → ℂ) → E → ℂ |
| 573 | | 0, f => f |
| 574 | | n + 1, f => HarmonicCalculus.along V (iteratedAlong V n f) |
| 575 | |
| 576 | theorem band_iteratedCoefficients (V : E → E) (k : ℝ) (Φ : E → ℝ) |
| 577 | {c : Coefficients E} {N : ℕ} (hc : BandLimited c N) (n : ℕ) : |
| 578 | BandLimited (iteratedCoefficients V k Φ c n) N := by |
| 579 | induction n with |
| 580 | | zero => exact hc |
| 581 | | succ n ih => exact ih.differentiate V k Φ |
| 582 | |
| 583 | theorem iteratedCoefficients_contDiffOn {U : Set E} (hU : IsOpen U) |
| 584 | {V : E → E} {Φ : E → ℝ} (hV : ContDiffOn ℝ ∞ V U) (hΦ : ContDiffOn ℝ ∞ Φ U) |
| 585 | (k : ℝ) {c : Coefficients E} (hc : ∀ j ∈ c.support, ContDiffOn ℝ ∞ (c j) U) (n : ℕ) : |
| 586 | ∀ j ∈ (iteratedCoefficients V k Φ c n).support, |
| 587 | ContDiffOn ℝ ∞ (iteratedCoefficients V k Φ c n j) U := by |
| 588 | induction n with |
| 589 | | zero => exact hc |
| 590 | | succ n ih => exact differentiate_contDiffOn hU hV hΦ k ih |
| 591 | |
| 592 | /-- All repeated actual directional derivatives retain the original |
| 593 | finite set of harmonic values. Direction-field derivatives are included. -/ |
| 594 | theorem iteratedAlong_wave {U : Set E} (hU : IsOpen U) |
| 595 | {V : E → E} {Φ : E → ℝ} (hV : ContDiffOn ℝ ∞ V U) (hΦ : ContDiffOn ℝ ∞ Φ U) |
| 596 | (k : ℝ) {c : Coefficients E} (hc : ∀ j ∈ c.support, ContDiffOn ℝ ∞ (c j) U) (n : ℕ) : |
| 597 | EqOn (iteratedAlong V n (wave c k Φ)) (wave (iteratedCoefficients V k Φ c n) k Φ) U := by |
| 598 | induction n with |
| 599 | | zero => exact fun _ _ => rfl |
| 600 | | succ n ih => |
| 601 | intro x hx |
| 602 | change HarmonicCalculus.along V (iteratedAlong V n (wave c k Φ)) x = _ |
| 603 | rw [HarmonicCalculus.along_congr hU ih hx] |
| 604 | exact along_wave V k Φ _ ((hΦ.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 605 | (fun j hj => ((iteratedCoefficients_contDiffOn hU hV hΦ k hc n j hj).contDiffAt |
| 606 | (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 607 | |
| 608 | end Derivatives |
| 609 | |
| 610 | theorem character_hasDerivAt (j : ℤ) (θ : ℝ) : |
| 611 | HasDerivAt (character j) (((j : ℂ) * Complex.I) * character j θ) θ := by |
| 612 | let c : ℂ := (j : ℂ) * Complex.I |
| 613 | have hc : HasDerivAt (fun x : ℝ => c * (x : ℂ)) c θ := by |
| 614 | simpa only [mul_one, id_eq] using (((hasDerivAt_id (θ : ℂ)).const_mul c).comp_ofReal) |
| 615 | have he : ∀ x : ℝ, Complex.exp (c * (x : ℂ)) = character j x := by |
| 616 | intro x |
| 617 | apply congrArg Complex.exp |
| 618 | dsimp [c] |
| 619 | ring |
| 620 | have hd := hc.cexp |
| 621 | simp only [he] at hd |
| 622 | convert! hd using 1 |
| 623 | dsimp [c] |
| 624 | ring |
| 625 | |
| 626 | noncomputable def angularDifferentiate {α : Type*} (kp : ℤ) (c : Coefficients α) : |
| 627 | Coefficients α := |
| 628 | AddMonoidAlgebra.ofCoeff <| Finsupp.onFinset c.support (fun j x => (((j * kp : ℤ) : ℂ) * Complex.I) * c j x) (by |
| 629 | intro j hj |
| 630 | by_contra hn |
| 631 | apply hj |
| 632 | have hc : c j = 0 := Finsupp.notMem_support_iff.mp hn |
| 633 | funext x |
| 634 | simp [hc]) |
| 635 | |
| 636 | @[simp] theorem angularDifferentiate_apply {α : Type*} (kp : ℤ) (c : Coefficients α) |
| 637 | (j : ℤ) (x : α) : |
| 638 | angularDifferentiate kp c j x = (((j * kp : ℤ) : ℂ) * Complex.I) * c j x := rfl |
| 639 | |
| 640 | theorem support_angularDifferentiate {α : Type*} (kp : ℤ) (c : Coefficients α) : |
| 641 | (angularDifferentiate kp c).support ⊆ c.support := by |
| 642 | unfold Coefficients.support angularDifferentiate |
| 643 | simp only [] |
| 644 | exact Finsupp.support_onFinset_subset |
| 645 | |
| 646 | theorem BandLimited.angularDifferentiate {α : Type*} (kp : ℤ) {c : Coefficients α} |
| 647 | {N : ℕ} (hc : BandLimited c N) : BandLimited (angularDifferentiate kp c) N := |
| 648 | fun j hj => hc j (support_angularDifferentiate kp c hj) |
| 649 | |
| 650 | /-- The literal angular derivative acts diagonally on the same harmonic |
| 651 | values, with multiplier `i*j*kp`. -/ |
| 652 | theorem field_hasDerivAt_angle {α : Type*} (c : Coefficients α) (k : ℝ) |
| 653 | (Φ : α → ℝ) (kp : ℤ) (x : α) (θ : ℝ) : |
| 654 | HasDerivAt (fun a => field c k Φ kp (x, a)) |
| 655 | (field (angularDifferentiate kp c) k Φ kp (x, θ)) θ := by |
| 656 | have hd := HasDerivAt.fun_sum (u := c.support) (fun j _ => |
| 657 | (character_hasDerivAt (j * kp) θ).const_mul (c j x * character j (k * Φ x))) |
| 658 | convert! hd using 1 |
| 659 | · funext a |
| 660 | exact field_expansion c k Φ kp x a |
| 661 | · rw [field, evaluate_over _ c.support (support_angularDifferentiate kp c)] |
| 662 | apply Finset.sum_congr rfl |
| 663 | intro j hj |
| 664 | simp only [angularDifferentiate_apply, character_phase_add, character_int_mul] |
| 665 | ring |
| 666 | |
| 667 | end NavierStokes.HarmonicFields |