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.SignedCovariance |
| 2 | import NavierStokes.SignedStressPrimitive |
| 3 | import NavierStokes.PrimaryPulseBounds |
| 4 | import NavierStokes.ParticularWaveBounds |
| 5 | import NavierStokes.ErrorHarmonics |
| 6 | import NavierStokes.MeanMomentBounds |
| 7 | import NavierStokes.CopyAngularInvariance |
| 8 | |
| 9 | /-! |
| 10 | # Constructed signed wave increments |
| 11 | |
| 12 | The signed coefficient is the inverse of the same integrated primary matrix, |
| 13 | divided by twice the same positive primary amplitude. Its sign is unrestricted. |
| 14 | The homogeneous pressure, exact curl, signed square, and slot-cutoff error are |
| 15 | retained as actual fields. |
| 16 | -/ |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | namespace NavierStokes.SignedWaveUpdate |
| 21 | |
| 22 | open Set Function Filter MeasureTheory Matrix |
| 23 | open WeightedClasses HarmonicCalculus |
| 24 | open scoped ContDiff Topology BigOperators ComplexConjugate InnerProductSpace |
| 25 | |
| 26 | |
| 27 | abbrev Mat2 := SmoothCovariance.Mat2 |
| 28 | abbrev Vec2 := SmoothCovariance.Vec2 |
| 29 | abbrev Space := ProblemStatement.Space |
| 30 | |
| 31 | variable {D E : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 32 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 33 | |
| 34 | /-! ## The requested stress is the negative primitive of the actual state -/ |
| 35 | |
| 36 | noncomputable def requestedStress (p : SignedStressPrimitive.Patch) |
| 37 | (c : CorrectionState.Context (PressureStream.Lift E)) |
| 38 | (u : CorrectionState.State (PressureStream.Lift E)) : ℕ → ℝ × E → Vec2 := |
| 39 | fun n z => ![SignedStressPrimitive.barSigma p 2 (u.thetaResidual c n) z, |
| 40 | SignedStressPrimitive.barSigma p 1 (u.axialResidual c n) z] |
| 41 | |
| 42 | /-! ## Inverse jets and the signed quotient -/ |
| 43 | |
| 44 | theorem weights_smul (H : Mat2) (T : Vec2) (a : ℝ) (j : Fin 2) : |
| 45 | SmoothCovariance.weights H (a • T) j = a * SmoothCovariance.weights H T j := by |
| 46 | fin_cases j <;> |
| 47 | simp [SmoothCovariance.weights, SmoothCovariance.cramerNumerator, |
| 48 | Pi.smul_apply, smul_eq_mul] <;> ring |
| 49 | |
| 50 | /-- Only primitive matrix/target jets and zeroth-order primary margins occur |
| 51 | in this record. There is no assumption on an inverse or a signed output. -/ |
| 52 | structure CovarianceControl (s : StripData D) (H : ℕ → D → Mat2) |
| 53 | (T : ℕ → D → Vec2) where |
| 54 | matrix_jets : ∀ i j, PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) |
| 55 | (fun n x => H n x i j) |
| 56 | target_jets : ∀ i, MeanClass s 0 (fun n x => T n x i) |
| 57 | zeta_pos : ∀ x ∈ s.domain, 0 < s.zeta x |
| 58 | b : ℝ |
| 59 | M : ℝ |
| 60 | c : ℝ |
| 61 | b_pos : 0 < b |
| 62 | M_one : 1 ≤ M |
| 63 | c_pos : 0 < c |
| 64 | determinant : ∀ n x, x ∈ s.domain → |
| 65 | b ≤ |(PrimaryPulseBounds.normalizedMatrix (Real.sqrt (s.slow n)) (H n x)).det| |
| 66 | entries : ∀ n x, x ∈ s.domain → ∀ i j, |
| 67 | |Real.sqrt (s.slow n) * H n x i j| ≤ M |
| 68 | lower : ∀ n x, x ∈ s.domain → ∀ j, |
| 69 | c * s.zeta x ≤ SmoothCovariance.weights (H n x) (T n x) j |
| 70 | |
| 71 | namespace CovarianceControl |
| 72 | |
| 73 | variable {s : StripData D} {H : ℕ → D → Mat2} {T : ℕ → D → Vec2} |
| 74 | |
| 75 | theorem cone (h : CovarianceControl s H T) (n : ℕ) {x : D} (hx : x ∈ s.domain) : |
| 76 | SmoothCovariance.StrictCone (H n x) (T n x) := |
| 77 | (SmoothCovariance.weights_pos_iff _ _).mp |
| 78 | (fun j => (mul_pos h.c_pos (h.zeta_pos x hx)).trans_le (h.lower n x hx j)) |
| 79 | |
| 80 | /-- Cramer's actual formula preserves every band exponent, including signed |
| 81 | targets. Its denominator estimates are taken from the same primary matrix. -/ |
| 82 | theorem inverse_class (h : CovarianceControl s H T) {R : ℕ → D → Vec2} {β : ℝ} |
| 83 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) (j : Fin 2) : |
| 84 | MeanClass s β (fun n x => ((H n x)⁻¹.mulVec (R n x)) j) := by |
| 85 | have hR0 (i : Fin 2) : MeanClass s 0 (fun n x => s.epsilon n ^ (-β) * R n x i) := by |
| 86 | simpa only [smul_eq_mul, add_neg_cancel] using (hR i).band_smul (bandBound_rpow s (-β)) |
| 87 | have h0 := PrimaryPulseBounds.covariance_weights_class |
| 88 | (PrimaryPulseBounds.sqrt_slow_polynomial s) |
| 89 | (fun n => (Real.sqrt_pos.mpr (zero_lt_one.trans_le (s.one_le_slow n))).ne') |
| 90 | h.matrix_jets hR0 h.b_pos h.M_one h.determinant h.entries j |
| 91 | have hβ := h0.band_smul (bandBound_rpow s β) |
| 92 | apply LinearWaveBounds.class_congr (by simpa only [zero_add] using hβ) |
| 93 | intro n x hx |
| 94 | dsimp only |
| 95 | rw [SmoothCovariance.inverse_formula _ _ (h.cone n hx).det_ne_zero] |
| 96 | change s.epsilon n ^ β * SmoothCovariance.weights (H n x) |
| 97 | (s.epsilon n ^ (-β) • R n x) j = _ |
| 98 | rw [weights_smul, ← mul_assoc, ← Real.rpow_add (s.epsilon_pos n), |
| 99 | add_neg_cancel, Real.rpow_zero, one_mul] |
| 100 | |
| 101 | theorem inverse_control (h : CovarianceControl s H T) (j : Fin 2) : |
| 102 | SignedCovariance.InverseControl s (fun _ x => s.zeta x) |
| 103 | (fun n x => ((H n x)⁻¹.mulVec (T n x)) j) := by |
| 104 | apply SignedCovariance.inverseControl_of_lower |
| 105 | (fun n x hx => (PartitionedCovariance.amplitudes_are_inverse_weights (h.cone n hx) j).1) |
| 106 | h.c_pos 0 |
| 107 | intro n x hx |
| 108 | simpa only [pow_zero, div_one, SmoothCovariance.inverse_formula _ _ (h.cone n hx).det_ne_zero] |
| 109 | using h.lower n x hx j |
| 110 | |
| 111 | theorem increment_class (h : CovarianceControl s H T) {R : ℕ → D → Vec2} {β : ℝ} |
| 112 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) (j : Fin 2) : |
| 113 | WaveClass s (fun _ _ => 1) β |
| 114 | (fun n x => SignedCovariance.increment (H n x) (T n x) (R n x) j) := |
| 115 | SignedCovariance.increment_wave_class j h.zeta_pos (fun n _ hx => h.cone n hx) |
| 116 | (h.inverse_class h.target_jets j) (h.inverse_class hR j) (h.inverse_control j) |
| 117 | |
| 118 | end CovarianceControl |
| 119 | |
| 120 | noncomputable def signedScalar (s : StripData D) (H : ℕ → D → Mat2) |
| 121 | (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) (j : Fin 2) : ℕ → D → ℝ := |
| 122 | fun n x => Real.sqrt (s.epsilon n) * SignedCovariance.increment (H n x) (T n x) (R n x) j * mask n x |
| 123 | |
| 124 | noncomputable def signedVector (s : StripData D) (H : ℕ → D → Mat2) |
| 125 | (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) (v : ℕ → D → Space) (j : Fin 2) : |
| 126 | ℕ → D → Space := fun n x => signedScalar s H T R mask j n x • v n x |
| 127 | |
| 128 | theorem signedScalar_class {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 129 | {mask : ℕ → D → ℝ} {β : ℝ} (h : CovarianceControl s H T) |
| 130 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 131 | (hm : UnweightedClass s 0 mask) (j : Fin 2) : |
| 132 | WaveClass s (fun _ _ => 1) (β + 1 / 2) (signedScalar s H T R mask j) := by |
| 133 | have hi := h.increment_class hR j |
| 134 | have hh := (LinearWaveBounds.unweighted_smul hm (show MemClass s (fun _ x => Real.sqrt (s.zeta x)) β |
| 135 | (fun n x => SignedCovariance.increment (H n x) (T n x) (R n x) j) from by |
| 136 | simpa only [WaveClass, mul_one] using hi)) |
| 137 | have hh' := hh.band_smul (bandBound_rpow s (1 / 2)) |
| 138 | apply LinearWaveBounds.class_congr (by simpa only [WaveClass, mul_one, zero_add] using hh') |
| 139 | intro n x _ |
| 140 | simp only [signedScalar, smul_eq_mul, ← Real.sqrt_eq_rpow] |
| 141 | ring |
| 142 | |
| 143 | theorem signedVector_class {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 144 | {mask : ℕ → D → ℝ} {v : ℕ → D → Space} {P : ℕ → D → ℝ} {β : ℝ} |
| 145 | (h : CovarianceControl s H T) (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 146 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) (j : Fin 2) : |
| 147 | WaveClass s P (β + 1 / 2) (signedVector s H T R mask v j) := by |
| 148 | have hs := signedScalar_class h hR hm j |
| 149 | have h := hs.smul hv |
| 150 | simp only [mul_one, add_zero] at h |
| 151 | exact h |
| 152 | |
| 153 | /-! ## The same homogeneous fundamental and its constructed pressure -/ |
| 154 | |
| 155 | noncomputable def homogeneousCoefficients (a : LinearWaveBounds.WaveCoefficients D) |
| 156 | (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 157 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) : |
| 158 | LinearWaveBounds.WaveCoefficients D := |
| 159 | { a with |
| 160 | amplitude := fun n x => CurlClassBounds.complexify (v n x) |
| 161 | pressure := fun n => ParticularWaveBounds.projectedPressure (a.frequency n) |
| 162 | (a.normal s d n) (Ndot n) (v n) (fun x => A n x (v n x)) (fun _ => 0) } |
| 163 | |
| 164 | noncomputable def coefficients (a : LinearWaveBounds.WaveCoefficients D) |
| 165 | (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 166 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 167 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) (j : Fin 2) : |
| 168 | LinearWaveBounds.WaveCoefficients D := |
| 169 | homogeneousCoefficients a s d (signedVector s H T R mask v j) Ndot A |
| 170 | |
| 171 | /-- Every signed amplitude and pressure bound is obtained from the actual |
| 172 | inverse quotient and the primitive homogeneous fundamental. The input wave |
| 173 | bound supplies only the already fixed background geometry. -/ |
| 174 | theorem coefficients_inputBounds |
| 175 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 176 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ β κ : ℝ} |
| 177 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) |
| 178 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask : ℕ → D → ℝ} |
| 179 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 180 | (hcov : CovarianceControl s H T) |
| 181 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 182 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 183 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 184 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 185 | {b M : ℝ} (hb : 0 < b) |
| 186 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 187 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 188 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) (j : Fin 2) : |
| 189 | LinearWaveBounds.InputBounds s P (β + 1 / 2) κ d |
| 190 | (coefficients a s d H T R mask v Ndot A j) := by |
| 191 | have hs := signedVector_class hcov hR hm hv j |
| 192 | have ha := hs.map CurlClassBounds.complexify |
| 193 | have hp := ParticularWaveBounds.pressure_class hN hNdot hA hs |
| 194 | (MemClass.zero hs.weight_nonneg) hb hlo hhi hK |
| 195 | exact { hbase with |
| 196 | amplitude := fun i => CurlClassBounds.class_component ha i |
| 197 | pressure := hp } |
| 198 | |
| 199 | /-- Equality along an actual straight fast orbit, imposed on the primitive |
| 200 | slow data, not on the signed solve or its derivatives. -/ |
| 201 | def FrozenAlong (v : D) (f : ℕ → D → E) : Prop := |
| 202 | ∀ n x (t : ℝ), f n (x + t • v) = f n x |
| 203 | |
| 204 | theorem FrozenAlong.derivative {v : D} {f : ℕ → D → E} |
| 205 | (hf : FrozenAlong v f) (n : ℕ) {x : D} (hd : DifferentiableAt ℝ (f n) x) : |
| 206 | fderiv ℝ (f n) x v = 0 := by |
| 207 | have hl : HasDerivAt (fun t : ℝ => x + t • v) v 0 := by |
| 208 | simpa using ((hasDerivAt_id (0 : ℝ)).smul_const v).const_add x |
| 209 | have hh : HasDerivAt (fun t : ℝ => f n (x + t • v)) (fderiv ℝ (f n) x v) 0 := by |
| 210 | apply HasFDerivAt.comp_hasDerivAt 0 _ hl |
| 211 | simpa only [zero_smul, add_zero] using hd.hasFDerivAt |
| 212 | have he : (fun t : ℝ => f n (x + t • v)) = fun _ => f n x := funext (hf n x) |
| 213 | rw [he] at hh |
| 214 | exact hh.unique (hasDerivAt_const (0 : ℝ) (f n x)) |
| 215 | |
| 216 | theorem signedScalar_frozen {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 217 | {mask : ℕ → D → ℝ} {v : D} |
| 218 | (hH : FrozenAlong v H) (hT : FrozenAlong v T) (hR : FrozenAlong v R) |
| 219 | (hm : FrozenAlong v mask) (j : Fin 2) : |
| 220 | FrozenAlong v (signedScalar s H T R mask j) := by |
| 221 | intro n x t |
| 222 | simp only [signedScalar, hH n x t, hT n x t, hR n x t, hm n x t] |
| 223 | |
| 224 | theorem along_smul (V : D → D) {f : D → ℝ} {g : D → E} {x : D} |
| 225 | (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) : |
| 226 | along V (fun y => f y • g y) x = along V f x • g x + f x • along V g x := by |
| 227 | simp only [along, fderiv_fun_smul hf hg, _root_.add_apply, |
| 228 | ContinuousLinearMap.smulRight_apply, _root_.smul_apply] |
| 229 | exact add_comm _ _ |
| 230 | |
| 231 | theorem projectedRhs_smul (N Ndot v Av : Space) (δ c : ℝ) : |
| 232 | TangentProjection.projectedRhs N Ndot (c • v) (c • Av) 0 δ = |
| 233 | c • TangentProjection.projectedRhs N Ndot v Av 0 δ := by |
| 234 | ext i |
| 235 | simp [TangentProjection.projectedRhs, TangentProjection.tangentProj, |
| 236 | inner_smul_right, PiLp.smul_apply] |
| 237 | ring |
| 238 | |
| 239 | theorem shear_smul (R F G : D → ℝ) (Vr : D → D) (v : D → ComplexVector) |
| 240 | (c : D → ℝ) (x : D) : |
| 241 | LinearWaveResidual.shear R F G Vr (fun y => c y • v y) x = |
| 242 | c x • LinearWaveResidual.shear R F G Vr v x := by |
| 243 | ext i |
| 244 | fin_cases i <;> simp [LinearWaveResidual.shear, Complex.real_smul] <;> ring |
| 245 | |
| 246 | /-- Scaling the actual homogeneous projected ODE by the frozen inverse |
| 247 | coefficient gives the signed principal equation, with its pressure constructed |
| 248 | from the same normal and action. No signed equation is an input. -/ |
| 249 | theorem coefficients_principal_zero |
| 250 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 251 | (a : LinearWaveBounds.WaveCoefficients D) |
| 252 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask : ℕ → D → ℝ} |
| 253 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 254 | (hcov : CovarianceControl s H T) {β : ℝ} |
| 255 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 256 | (hm : UnweightedClass s 0 mask) {P : ℕ → D → ℝ} (hv : MemClass s P 0 v) |
| 257 | (hHf : FrozenAlong d.fast H) (hTf : FrozenAlong d.fast T) |
| 258 | (hRf : FrozenAlong d.fast R) (hmf : FrozenAlong d.fast mask) |
| 259 | (hK : ∀ n, a.frequency n ≠ 0) |
| 260 | (hode : ∀ n x, x ∈ s.domain → along (d.fastField n) (v n) x = |
| 261 | TangentProjection.projectedRhs (a.normal s d n x) (Ndot n x) (v n x) |
| 262 | (A n x (v n x)) 0 (s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2)) |
| 263 | (haction : ∀ n x, x ∈ s.domain → CurlClassBounds.complexify (A n x (v n x)) = |
| 264 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 265 | (d.radialField n) (fun y => CurlClassBounds.complexify (v n y)) x) |
| 266 | (j : Fin 2) (n : ℕ) {x : D} (hx : x ∈ s.domain) : |
| 267 | (coefficients a s d H T R mask v Ndot A j).principal s d n x = 0 := by |
| 268 | have hs := signedScalar_class hcov hR hm j |
| 269 | have hsD := ((hs.smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx)).differentiableAt (by simp) |
| 270 | have hvD := ((hv.smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx)).differentiableAt (by simp) |
| 271 | have hfreeze := (signedScalar_frozen hHf hTf hRf hmf j).derivative n hsD |
| 272 | have hfast : along (d.fastField n) (signedScalar s H T R mask j n) x = 0 := by |
| 273 | simp only [along, LinearWaveBounds.GraphDirections.fastField, map_smul, hfreeze, smul_zero] |
| 274 | have hd : along (d.fastField n) (signedVector s H T R mask v j n) x = |
| 275 | TangentProjection.projectedRhs (a.normal s d n x) (Ndot n x) |
| 276 | (signedVector s H T R mask v j n x) (A n x (signedVector s H T R mask v j n x)) |
| 277 | 0 (s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2) := by |
| 278 | change along (d.fastField n) (fun y => signedScalar s H T R mask j n y • v n y) x = _ |
| 279 | rw [along_smul _ hsD hvD, hfast, zero_smul, zero_add, hode n x hx] |
| 280 | simp only [signedVector, map_smul, projectedRhs_smul] |
| 281 | have hact : CurlClassBounds.complexify (A n x (signedVector s H T R mask v j n x)) = |
| 282 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 283 | (d.radialField n) (fun y => CurlClassBounds.complexify (signedVector s H T R mask v j n y)) x := by |
| 284 | simp only [signedVector, map_smul] |
| 285 | rw [shear_smul, haction n x hx] |
| 286 | have hh := ParticularWaveBounds.principal_eq_neg_source_of_projected |
| 287 | (s.epsilon n) (a.frequency n) (hK n) (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 288 | (a.phase n) (d.radialField n) (fun _ => d.angular) (d.axialField s n) (d.fastField n) |
| 289 | (signedVector s H T R mask v j n) (Ndot n) |
| 290 | (fun y => A n y (signedVector s H T R mask v j n y)) (fun _ => 0) |
| 291 | (hsD.smul hvD) hd hact |
| 292 | simpa only [coefficients, homogeneousCoefficients, LinearWaveBounds.WaveCoefficients.principal, |
| 293 | LinearWaveBounds.WaveCoefficients.normal, map_zero, neg_zero] using hh |
| 294 | |
| 295 | /-! ## Instantiation with the constructed primary phase and pulse -/ |
| 296 | |
| 297 | noncomputable def phaseMatrix {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 298 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 299 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) : ℕ → D → Mat2 := |
| 300 | PrimaryPulseBounds.chartCovariance pref (fun j => (F j).frame) |
| 301 | (fun j => (F j).lam) (fun j => (F j).u) (fun j => (F j).L) χ |
| 302 | |
| 303 | noncomputable def phaseFundamental {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 304 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 305 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (j : Fin 2) : ℕ → D → Space := |
| 306 | fun n x => PrimaryPulseBounds.normalizedPulse ((F j).frame n) |
| 307 | ((F j).lam n) ((F j).u n) ((F j).L n) (χ n x) |
| 308 | |
| 309 | noncomputable def phaseEnvelope {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 310 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 311 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (j : Fin 2) : ℕ → D → ℝ := |
| 312 | fun n x => PrimaryPulseBounds.referenceP ((F j).lam n) ((F j).u n) |
| 313 | ((F j).L n) ((F j).L n * (χ n x).2) |
| 314 | |
| 315 | theorem phaseFundamental_class {s : StripData D} |
| 316 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 317 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 318 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) |
| 319 | (hscale : ∀ n, U.scale n = s.slow n) |
| 320 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 321 | (hmap : ∀ n x, x ∈ s.domain → χ n x ∈ U.carrier n ×ˢ Ioo (0 : ℝ) 1) |
| 322 | (j : Fin 2) : MemClass s (phaseEnvelope F χ j) 0 (phaseFundamental F χ j) := by |
| 323 | have hp := (F j).pulse_jets.comp hχ hscale hmap |
| 324 | exact hp.memClass s (fun _ => rfl) (fun _ => rfl) |
| 325 | |
| 326 | /-! ## Literal harmonic blocks, with the same carrier metadata -/ |
| 327 | |
| 328 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 329 | theorem conjugatePair_apply (a : D → ℂ) (j : ℤ) (x : D) : |
| 330 | ErrorHarmonics.conjugatePair 1 a j x = |
| 331 | (if j = 1 then a x / 2 else 0) + conj (if -j = 1 then a x / 2 else 0) := by |
| 332 | classical |
| 333 | change Finsupp.single (1 : ℤ) (fun x => a x / 2) j x + |
| 334 | conj (Finsupp.single (1 : ℤ) (fun x => a x / 2) (-j) x) = _ |
| 335 | by_cases hj : j = 1 <;> by_cases hjn : -j = 1 <;> |
| 336 | simp [hj, hjn, eq_comm] |
| 337 | |
| 338 | noncomputable def coefficientBlock (frequency : ℕ → ℝ) (phase : ℕ → D → ℝ) |
| 339 | (angularFrequency : ℕ → ℤ) (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 340 | CorrectionState.HarmonicBlock D where |
| 341 | velocity n i := ErrorHarmonics.conjugatePair 1 (fun x => v n x i) |
| 342 | pressure n := ErrorHarmonics.conjugatePair 1 (p n) |
| 343 | frequency := frequency |
| 344 | phase := phase |
| 345 | angularFrequency := angularFrequency |
| 346 | |
| 347 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 348 | theorem coefficientBlock_band (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 349 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 350 | (coefficientBlock k Φ kp v p).BandLimited 1 := |
| 351 | ⟨fun n i => ErrorHarmonics.band_conjugatePair 1 (fun x => v n x i), |
| 352 | fun n => ErrorHarmonics.band_conjugatePair 1 (p n)⟩ |
| 353 | |
| 354 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 355 | theorem coefficientBlock_symmetric (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 356 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 357 | (∀ n i, HarmonicFields.ConjugateSymmetric ((coefficientBlock k Φ kp v p).velocity n i)) ∧ |
| 358 | ∀ n, HarmonicFields.ConjugateSymmetric ((coefficientBlock k Φ kp v p).pressure n) := |
| 359 | ⟨fun n i => ErrorHarmonics.conjugatePair_symmetric 1 (fun x => v n x i), |
| 360 | fun n => ErrorHarmonics.conjugatePair_symmetric 1 (p n)⟩ |
| 361 | |
| 362 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 363 | theorem coefficientBlock_zero_coefficient (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 364 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 365 | (∀ n i, (coefficientBlock k Φ kp v p).velocity n i 0 = 0) ∧ |
| 366 | ∀ n, (coefficientBlock k Φ kp v p).pressure n 0 = 0 := by |
| 367 | constructor |
| 368 | · intro n i |
| 369 | ext x |
| 370 | simp only [coefficientBlock, conjugatePair_apply] |
| 371 | norm_num |
| 372 | · intro n |
| 373 | ext x |
| 374 | simp only [coefficientBlock, conjugatePair_apply] |
| 375 | norm_num |
| 376 | |
| 377 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 378 | theorem coefficientBlock_velocity (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 379 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) (n : ℕ) (x : D × ℝ) (i : Fin 3) : |
| 380 | (coefficientBlock k Φ kp v p).oscillation n x i = |
| 381 | (v n x.1 i * HarmonicFields.character 1 (k n * Φ n x.1 + (kp n : ℝ) * x.2)).re := by |
| 382 | exact ErrorHarmonics.pairedBlock_evaluation 1 k Φ kp v n x i |
| 383 | |
| 384 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 385 | theorem coefficientBlock_pressure (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 386 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) (n : ℕ) (x : D × ℝ) : |
| 387 | (coefficientBlock k Φ kp v p).oscillatoryPressure n x = |
| 388 | (p n x.1 * HarmonicFields.character 1 (k n * Φ n x.1 + (kp n : ℝ) * x.2)).re := by |
| 389 | have h := congrArg Complex.re (ErrorHarmonics.field_conjugatePair 1 (p n) (k n) (Φ n) (kp n) x) |
| 390 | simp only [Complex.ofReal_re] at h |
| 391 | exact h |
| 392 | |
| 393 | theorem conjugatePair_class {s : StripData D} {w : ℕ → D → ℝ} {α : ℝ} |
| 394 | {a : ℕ → D → ℂ} (ha : MemClass s w α a) (j : ℤ) : |
| 395 | MemClass s w α (fun n x => ErrorHarmonics.conjugatePair 1 (a n) j x) := by |
| 396 | have hp := LinearWaveBounds.constant_complex_mul ha (1 / 2) |
| 397 | have hn := hp.map (Complex.conjCLE : ℂ →L[ℝ] ℂ) |
| 398 | by_cases hj : j = 1 |
| 399 | · subst j |
| 400 | simpa [conjugatePair_apply, div_eq_mul_inv, |
| 401 | mul_comm] using hp |
| 402 | by_cases hjn : -j = 1 |
| 403 | · simpa [conjugatePair_apply, hj, hjn, div_eq_mul_inv, mul_comm] using hn |
| 404 | · simpa [conjugatePair_apply, hj, hjn] using |
| 405 | (MemClass.zero (E := ℂ) (α := α) ha.weight_nonneg) |
| 406 | |
| 407 | theorem coefficientBlock_classes {s : StripData D} {P : ℕ → D → ℝ} {α γ : ℝ} |
| 408 | (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 409 | {v : ℕ → D → ComplexVector} {p : ℕ → D → ℂ} |
| 410 | (hv : WaveClass s P α v) (hp : WaveClass s P γ p) : |
| 411 | (coefficientBlock k Φ kp v p).WaveBounds s P α ∧ |
| 412 | (coefficientBlock k Φ kp v p).PressureBounds s P γ := by |
| 413 | exact ⟨fun i j _ => conjugatePair_class (CurlClassBounds.class_component hv i) j, |
| 414 | fun j _ => conjugatePair_class hp j⟩ |
| 415 | |
| 416 | /-- The full cylindrical construction is evaluated at angle zero to obtain |
| 417 | the coefficient algebra. Its physical angle is reintroduced by the unchanged |
| 418 | integer carrier, as proved in `blockOfCoefficients_represents`. -/ |
| 419 | noncomputable def blockOfCoefficients (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 420 | (kp : ℕ → ℤ) : CorrectionState.HarmonicBlock D := |
| 421 | coefficientBlock a.frequency (fun n x => a.phase n (x,0)) kp |
| 422 | (fun n x => a.amplitude n (x,0)) (fun n x => a.pressure n (x,0)) |
| 423 | |
| 424 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 425 | theorem blockOfCoefficients_represents |
| 426 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (kp : ℕ → ℤ) |
| 427 | (ha : ErrorHarmonics.AngleIndependent a.amplitude) |
| 428 | (hp : ErrorHarmonics.AngleIndependent a.pressure) |
| 429 | (hphase : ∀ n x θ, a.frequency n * a.phase n (x,θ) = |
| 430 | a.frequency n * a.phase n (x,0) + (kp n : ℝ) * θ) : |
| 431 | (blockOfCoefficients a kp).oscillation = |
| 432 | (fun n x i => (vectorMode (a.frequency n) (a.phase n) (a.amplitude n) x i).re) ∧ |
| 433 | (blockOfCoefficients a kp).oscillatoryPressure = |
| 434 | (fun n x => (mode (a.frequency n) (a.phase n) (a.pressure n) x).re) := by |
| 435 | constructor |
| 436 | · funext n x i |
| 437 | rw [blockOfCoefficients, coefficientBlock_velocity] |
| 438 | have hc := HarmonicFields.character_eq_carrier 1 (a.frequency n) (a.phase n) x |
| 439 | simp only [Int.cast_one, mul_one] at hc |
| 440 | rw [← hphase, hc] |
| 441 | simp only [vectorMode, mode, ha n x.1 x.2] |
| 442 | · funext n x |
| 443 | rw [blockOfCoefficients, coefficientBlock_pressure] |
| 444 | have hc := HarmonicFields.character_eq_carrier 1 (a.frequency n) (a.phase n) x |
| 445 | simp only [Int.cast_one, mul_one] at hc |
| 446 | rw [← hphase, hc] |
| 447 | simp only [mode, hp n x.1 x.2] |
| 448 | |
| 449 | /-! ## The bar operation preserves the actual flat mean class -/ |
| 450 | |
| 451 | theorem meanClass_radialAverage |
| 452 | {a b cL cR : ℝ} (ha : 0 < a) (hcL : 0 < cL) (hcR : 0 < cR) |
| 453 | (ε S : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) |
| 454 | (hS : ∀ n, 1 ≤ S n) {α : ℝ} {f : ℕ → ℝ × E → ℝ} |
| 455 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 456 | (hglobal : MeanMomentBounds.GlobalBandJets ε S α f) |
| 457 | (hclass : MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 458 | ε S hε hεone hS) α f) |
| 459 | (L : (ℝ × E) →L[ℝ] (ℝ × E)) (hL : ‖L‖ ≤ 1) (v : ℝ × E) |
| 460 | (hpreserve : ∀ x (t : ℝ), (L x + t • v).1 = x.1) : |
| 461 | MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 462 | ε S hε hεone hS) α (fun n => MeanMomentBounds.affineAverage L v 0 1 (f n)) := by |
| 463 | let s : StripData (ℝ × E) := |
| 464 | WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR ε S hε hεone hS |
| 465 | refine ⟨hclass.weight_nonneg, |
| 466 | fun n => (MeanMomentBounds.affineAverage_contDiff L v 0 1 (hf n)).contDiffOn, ?_⟩ |
| 467 | intro m |
| 468 | obtain ⟨C, hC, p, hb⟩ := hclass.bounds m |
| 469 | refine ⟨C, hC, p, ?_⟩ |
| 470 | intro n x hx j hj |
| 471 | have hall : ∀ k : ℕ, ∃ A : ℝ, ∀ y, ‖iteratedFDeriv ℝ k (f n) y‖ ≤ A := by |
| 472 | intro k |
| 473 | obtain ⟨A, _, q, hA⟩ := hglobal k |
| 474 | exact ⟨A * ε n ^ α * S n ^ q, fun y => hA n y k le_rfl⟩ |
| 475 | have hh := MeanMomentBounds.affineAverage_jet_bound L hL v zero_le_one (hf n) hall j x |
| 476 | (majorant s (fun _ y => s.zeta y) α C p n x) (fun t _ => by |
| 477 | have hx' : L x + t • v ∈ s.domain := by |
| 478 | change (L x + t • v).1 ∈ Ioo a b |
| 479 | rw [hpreserve] |
| 480 | exact hx |
| 481 | have hh := hb n (L x + t • v) hx' j hj |
| 482 | simpa only [s, majorant, StripData.growth, WeightedRadialPrimitive.logStripData, |
| 483 | hpreserve] using hh) |
| 484 | simpa only [sub_zero, mul_one] using hh |
| 485 | |
| 486 | theorem meanClass_liftedTorusAverage |
| 487 | {a b cL cR : ℝ} (ha : 0 < a) (hcL : 0 < cL) (hcR : 0 < cR) |
| 488 | (ε S : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) |
| 489 | (hS : ∀ n, 1 ≤ S n) {α : ℝ} {f : ℕ → PressureStream.Lift E → ℝ} |
| 490 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 491 | (hs : ∀ n, RadialAlias.RadiallySupported a b (f n)) |
| 492 | (hclass : MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 493 | ε S hε hεone hS) α f) : |
| 494 | MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 495 | ε S hε hεone hS) α (fun n => MeanMomentBounds.liftedTorusAverage (f n)) := by |
| 496 | have hg := MeanMomentBounds.meanClass_globalBandJets ha hcL hcR ε S hε hεone hS hf hs hclass |
| 497 | have hi := meanClass_radialAverage ha hcL hcR ε S hε hεone hS hf hg hclass |
| 498 | MeanMomentBounds.eraseAuxX MeanMomentBounds.norm_eraseAuxX_le MeanMomentBounds.auxX |
| 499 | (fun x t => by simp only [MeanMomentBounds.eraseAuxX_add_smul]) |
| 500 | have hgi := hg.affineAverage hf MeanMomentBounds.eraseAuxX MeanMomentBounds.norm_eraseAuxX_le |
| 501 | MeanMomentBounds.auxX zero_le_one |
| 502 | have ho := meanClass_radialAverage ha hcL hcR ε S hε hεone hS |
| 503 | (fun n => MeanMomentBounds.affineAverage_contDiff _ _ _ _ (hf n)) hgi hi |
| 504 | MeanMomentBounds.eraseAuxY MeanMomentBounds.norm_eraseAuxY_le MeanMomentBounds.auxY |
| 505 | (fun x t => by simp only [MeanMomentBounds.eraseAuxY_add_smul]) |
| 506 | simpa only [MeanMomentBounds.liftedTorusAverage_eq_affine] using ho |
| 507 | |
| 508 | theorem sigma_liftedTorusAverage (p : SignedStressPrimitive.Patch) (e : ℕ) |
| 509 | (f : PressureStream.Lift E → ℝ) (x : PressureStream.Lift E) : |
| 510 | SignedStressPrimitive.sigma p e (MeanMomentBounds.liftedTorusAverage f) x = |
| 511 | SignedStressPrimitive.barSigma p e f (x.1, x.2.1) := by |
| 512 | rcases x with ⟨r,z,Y⟩ |
| 513 | simp only [SignedStressPrimitive.sigma, SignedStressPrimitive.barSigma, |
| 514 | SignedStressPrimitive.primitive, TransportPrimitive.compactIntegral, |
| 515 | TransportPrimitive.pastIntegral, TransportPrimitive.totalIntegral, |
| 516 | SignedStressPrimitive.weightedSource, MeanMomentBounds.liftedTorusAverage, |
| 517 | TransportPrimitive.shift, zero_mul, zero_smul, Prod.mk_add_mk, add_zero] |
| 518 | |
| 519 | noncomputable def normalizedRequest (s : StripData (PressureStream.Lift E)) |
| 520 | (p : SignedStressPrimitive.Patch) (c : CorrectionState.Context (PressureStream.Lift E)) |
| 521 | (u : CorrectionState.State (PressureStream.Lift E)) : ℕ → PressureStream.Lift E → Vec2 := |
| 522 | fun n x => (s.epsilon n)⁻¹ • requestedStress p c u n (x.1,x.2.1) |
| 523 | |
| 524 | /-! ## Angular independence is proved before taking a zero-angle section -/ |
| 525 | |
| 526 | structure AngularInputs (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 527 | (a : LinearWaveBounds.WaveCoefficients D) (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) |
| 528 | (mask : ℕ → D → ℝ) (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 529 | (ψ : ℕ → D → ℝ) (m : ℕ → ℝ) : Prop where |
| 530 | radius : FrozenAlong d.angular a.radius |
| 531 | radial_base : FrozenAlong d.angular a.radialBase |
| 532 | frequency_base : FrozenAlong d.angular a.frequencyBase |
| 533 | axial_base : FrozenAlong d.angular a.axialBase |
| 534 | radial_profile : CopyAngularInvariance.Invariant d.angular d.radialProfile |
| 535 | phase : ∀ n, CopyAngularInvariance.AffinePhase d.angular (m n) (a.phase n) |
| 536 | phase_smooth : ∀ n, ContDiffOn ℝ ∞ (a.phase n) s.domain |
| 537 | matrix : FrozenAlong d.angular H |
| 538 | primary_target : FrozenAlong d.angular T |
| 539 | signed_target : FrozenAlong d.angular R |
| 540 | mask : FrozenAlong d.angular mask |
| 541 | fundamental : FrozenAlong d.angular v |
| 542 | normal_motion : FrozenAlong d.angular Ndot |
| 543 | action : FrozenAlong d.angular A |
| 544 | cutoff : FrozenAlong d.angular ψ |
| 545 | |
| 546 | namespace AngularInputs |
| 547 | |
| 548 | variable {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 549 | {a : LinearWaveBounds.WaveCoefficients D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 550 | {mask : ℕ → D → ℝ} {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 551 | {ψ : ℕ → D → ℝ} {m : ℕ → ℝ} |
| 552 | |
| 553 | theorem radialField (h : AngularInputs s d a H T R mask v Ndot A ψ m) (n : ℕ) : |
| 554 | CopyAngularInvariance.Invariant d.angular (d.radialField n) := by |
| 555 | intro x t |
| 556 | simp only [LinearWaveBounds.GraphDirections.radialField, h.radial_profile x t] |
| 557 | |
| 558 | theorem normal (h : AngularInputs s d a H T R mask v Ndot A ψ m) (n : ℕ) : |
| 559 | CopyAngularInvariance.Invariant d.angular (a.normal s d n) := |
| 560 | CopyAngularInvariance.phaseNormal_invariant (h.radius n) (h.radialField n) |
| 561 | (CopyAngularInvariance.Invariant.const _) (CopyAngularInvariance.Invariant.const _) (h.phase n) |
| 562 | |
| 563 | theorem amplitude (h : AngularInputs s d a H T R mask v Ndot A ψ m) (j : Fin 2) (n : ℕ) : |
| 564 | CopyAngularInvariance.Invariant d.angular ((coefficients a s d H T R mask v Ndot A j).amplitude n) := by |
| 565 | intro x t |
| 566 | simp only [coefficients, homogeneousCoefficients, signedVector, signedScalar, |
| 567 | h.matrix n x t, h.primary_target n x t, h.signed_target n x t, |
| 568 | h.mask n x t, h.fundamental n x t] |
| 569 | |
| 570 | theorem pressure (h : AngularInputs s d a H T R mask v Ndot A ψ m) (j : Fin 2) (n : ℕ) : |
| 571 | CopyAngularInvariance.Invariant d.angular ((coefficients a s d H T R mask v Ndot A j).pressure n) := by |
| 572 | intro x t |
| 573 | simp only [coefficients, homogeneousCoefficients, ParticularWaveBounds.projectedPressure, |
| 574 | signedVector, signedScalar, h.matrix n x t, h.primary_target n x t, |
| 575 | h.signed_target n x t, h.mask n x t, h.fundamental n x t, h.action n x t, |
| 576 | h.normal_motion n x t, h.normal n x t] |
| 577 | |
| 578 | theorem corrected_amplitude (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 579 | (j : Fin 2) (n : ℕ) : |
| 580 | CopyAngularInvariance.Invariant d.angular |
| 581 | (((coefficients a s d H T R mask v Ndot A j).corrected s d ψ).amplitude n) := by |
| 582 | exact CopyAngularInvariance.corrected_amplitude_invariant |
| 583 | (a := coefficients a s d H T R mask v Ndot A j) (s := s) (d := d) ψ h.radius h.radialField |
| 584 | (fun _ => CopyAngularInvariance.Invariant.const _) (fun n => ⟨m n, h.phase n⟩) |
| 585 | (h.amplitude j) h.cutoff n |
| 586 | |
| 587 | theorem corrected_pressure (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 588 | (j : Fin 2) (n : ℕ) : |
| 589 | CopyAngularInvariance.Invariant d.angular |
| 590 | (((coefficients a s d H T R mask v Ndot A j).corrected s d ψ).pressure n) := |
| 591 | CopyAngularInvariance.corrected_pressure_invariant |
| 592 | (a := coefficients a s d H T R mask v Ndot A j) (s := s) (d := d) ψ (h.pressure j) h.cutoff n |
| 593 | |
| 594 | theorem exactConditions (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 595 | (hRne : ∀ n x, x ∈ s.domain → a.radius n x ≠ 0) |
| 596 | (hDrR : ∀ n x, x ∈ s.domain → along (d.radialField n) (a.radius n) x = 1) |
| 597 | (j : Fin 2) : LinearWaveBounds.ExactConditions s d |
| 598 | ((coefficients a s d H T R mask v Ndot A j).corrected s d ψ) := by |
| 599 | exact CopyAngularInvariance.exactConditions_corrected_of_invariants |
| 600 | (a := coefficients a s d H T R mask v Ndot A j) (s := s) (d := d) ψ h.phase_smooth hRne hDrR |
| 601 | h.radius h.radial_base h.frequency_base h.axial_base h.radialField |
| 602 | (fun _ => CopyAngularInvariance.Invariant.const _) (fun n => ⟨m n, h.phase n⟩) |
| 603 | (h.amplitude j) (h.pressure j) h.cutoff |
| 604 | |
| 605 | end AngularInputs |
| 606 | |
| 607 | theorem signedBlock_represents |
| 608 | {s : StripData (D × ℝ)} {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 609 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} |
| 610 | {H : ℕ → D × ℝ → Mat2} {T R : ℕ → D × ℝ → Vec2} {mask : ℕ → D × ℝ → ℝ} |
| 611 | {v Ndot : ℕ → D × ℝ → Space} {A : ℕ → D × ℝ → Space →L[ℝ] Space} |
| 612 | {ψ : ℕ → D × ℝ → ℝ} {m : ℕ → ℝ} |
| 613 | (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 614 | (hθ : d.angular = (0,1)) (kp : ℕ → ℤ) (hkp : ∀ n, a.frequency n * m n = (kp n : ℝ)) |
| 615 | (j : Fin 2) : |
| 616 | let z := (coefficients a s d H T R mask v Ndot A j).corrected s d ψ |
| 617 | (blockOfCoefficients z kp).oscillation = |
| 618 | (fun n x i => (vectorMode (a.frequency n) (a.phase n) (z.amplitude n) x i).re) ∧ |
| 619 | (blockOfCoefficients z kp).oscillatoryPressure = |
| 620 | (fun n x => (mode (a.frequency n) (a.phase n) (z.pressure n) x).re) := by |
| 621 | apply blockOfCoefficients_represents |
| 622 | · intro n x t |
| 623 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 624 | simpa only [hθ] using h.corrected_amplitude j n |
| 625 | · intro n x t |
| 626 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 627 | simpa only [hθ] using h.corrected_pressure j n |
| 628 | · intro n x t |
| 629 | change a.frequency n * a.phase n (x,t) = a.frequency n * a.phase n (x,0) + _ |
| 630 | have hp := CopyAngularInvariance.affinePhase_eq_zeroSlice (by simpa only [hθ] using h.phase n) x t |
| 631 | rw [hp, mul_add, ← mul_assoc, hkp] |
| 632 | |
| 633 | /-! ## Restriction of actual coefficient jets to the angular section -/ |
| 634 | |
| 635 | noncomputable def zeroSection : D →L[ℝ] (D × ℝ) := (ContinuousLinearMap.id ℝ D).prod 0 |
| 636 | |
| 637 | theorem zeroSection_norm_le : ‖zeroSection (D := D)‖ ≤ 1 := by |
| 638 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 639 | intro x |
| 640 | simp [zeroSection, Prod.norm_def] |
| 641 | |
| 642 | noncomputable def sectionStrip (s : StripData (D × ℝ)) : StripData D where |
| 643 | domain := (zeroSection (D := D)) ⁻¹' s.domain |
| 644 | isOpen_domain := s.isOpen_domain.preimage (zeroSection (D := D)).continuous |
| 645 | epsilon := s.epsilon |
| 646 | epsilon_pos := s.epsilon_pos |
| 647 | epsilon_le_one := s.epsilon_le_one |
| 648 | slow := s.slow |
| 649 | one_le_slow := s.one_le_slow |
| 650 | delta := fun x => s.delta (zeroSection x) |
| 651 | delta_pos := fun _ hx => s.delta_pos _ hx |
| 652 | zeta := fun x => s.zeta (zeroSection x) |
| 653 | zeta_smooth := s.zeta_smooth.comp (zeroSection (D := D)).contDiff.contDiffOn (fun _ hx => hx) |
| 654 | zeta_nonneg := fun _ hx => s.zeta_nonneg _ hx |
| 655 | |
| 656 | theorem class_zeroSection {s : StripData (D × ℝ)} {w : ℕ → D × ℝ → ℝ} {α : ℝ} |
| 657 | {f : ℕ → D × ℝ → E} (hf : MemClass s w α f) : |
| 658 | MemClass (sectionStrip s) (fun n x => w n (x,0)) α (fun n x => f n (x,0)) := by |
| 659 | refine ⟨fun n x hx => hf.weight_nonneg n _ hx, |
| 660 | fun n => (hf.smooth n).comp (zeroSection (D := D)).contDiff.contDiffOn (fun _ hx => hx), ?_⟩ |
| 661 | intro m |
| 662 | obtain ⟨C, hC, p, hb⟩ := hf.bounds m |
| 663 | refine ⟨C, hC, p, ?_⟩ |
| 664 | intro n x hx j hj |
| 665 | have hc := PhaseJetBounds.norm_jet_comp_linear s.isOpen_domain (hf.smooth n) |
| 666 | (zeroSection (D := D)) hx j |
| 667 | have hpow : ‖zeroSection (D := D)‖ ^ j ≤ 1 := |
| 668 | pow_le_one₀ (norm_nonneg _) zeroSection_norm_le |
| 669 | have hh := hc.trans (mul_le_of_le_one_right (norm_nonneg _) hpow) |
| 670 | exact hh.trans (hb n (x,0) hx j hj) |
| 671 | |
| 672 | theorem blockOfCoefficients_classes |
| 673 | {s : StripData (D × ℝ)} {P : ℕ → D × ℝ → ℝ} {α γ : ℝ} |
| 674 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (kp : ℕ → ℤ) |
| 675 | (ha : WaveClass s P α a.amplitude) (hp : WaveClass s P γ a.pressure) : |
| 676 | (blockOfCoefficients a kp).WaveBounds (sectionStrip s) (fun n x => P n (x,0)) α ∧ |
| 677 | (blockOfCoefficients a kp).PressureBounds (sectionStrip s) (fun n x => P n (x,0)) γ := |
| 678 | coefficientBlock_classes a.frequency (fun n x => a.phase n (x,0)) kp |
| 679 | (class_zeroSection ha) (class_zeroSection hp) |
| 680 | |
| 681 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 682 | theorem angularAverage_re_field (c : HarmonicFields.Coefficients D) (k : ℝ) |
| 683 | (Φ : D → ℝ) (kp : ℤ) (x : D) : |
| 684 | (∫ θ in (0 : ℝ)..2 * Real.pi, (HarmonicFields.field c k Φ kp (x,θ)).re) / (2 * Real.pi) = |
| 685 | (HarmonicFields.angularMean (fun θ => HarmonicFields.field c k Φ kp (x,θ))).re := by |
| 686 | have hi := Complex.reCLM.intervalIntegral_comp_comm (μ := volume) |
| 687 | ((HarmonicFields.field_angular_continuous c k Φ kp x).intervalIntegrable (0 : ℝ) (2 * Real.pi)) |
| 688 | change (∫ θ in (0 : ℝ)..2 * Real.pi, (HarmonicFields.field c k Φ kp (x,θ)).re) = |
| 689 | (∫ θ in (0 : ℝ)..2 * Real.pi, HarmonicFields.field c k Φ kp (x,θ)).re at hi |
| 690 | rw [hi] |
| 691 | simp [HarmonicFields.angularMean, HarmonicFields.period, Complex.mul_re, div_eq_mul_inv, |
| 692 | ← Complex.ofReal_inv, mul_comm] |
| 693 | |
| 694 | /-! ## Actual homogeneous ODE under the native clock -/ |
| 695 | |
| 696 | theorem normalizedPulse_along |
| 697 | {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 698 | (f : PrimaryODE.FrameData Q) (lam u : ℝ) {L : ℝ} (hL : 0 < L) |
| 699 | (U : Set Q) (hA : ContinuousOn (f.coefficient 1) (U ×ˢ Icc 0 L)) |
| 700 | (χ : D → Q × ℝ) (V : D → D) {x : D} |
| 701 | (hp : (χ x).1 ∈ U) (ht : (χ x).2 ∈ Ioo (0 : ℝ) 1) |
| 702 | (hk : f.Kinematics (χ x).1 (Icc 0 L)) |
| 703 | (hv : DifferentiableAt ℝ (fun y => PrimaryPulseBounds.normalizedPulse f lam u L (χ y)) x) |
| 704 | (hclock : ∀ t : ℝ, χ (x + t • V x) = ((χ x).1, (χ x).2 + t / L)) : |
| 705 | along V (fun y => PrimaryPulseBounds.normalizedPulse f lam u L (χ y)) x = |
| 706 | TangentProjection.projectedRhs (f.normal ((χ x).1,L*(χ x).2)) |
| 707 | (f.normalMotion ((χ x).1,L*(χ x).2)) (PrimaryPulseBounds.normalizedPulse f lam u L (χ x)) |
| 708 | (MovingFrameODE.baseAction (f.F ((χ x).1,L*(χ x).2)) (f.shear ((χ x).1,L*(χ x).2)) |
| 709 | (PrimaryPulseBounds.normalizedPulse f lam u L (χ x))) 0 (f.viscosity ((χ x).1,L*(χ x).2)) := by |
| 710 | have hd := PrimaryPulseBounds.normalizedPulse_hasDerivAt f lam u hL U hA hp hk ht |
| 711 | have ht' : HasDerivAt (fun t : ℝ => (χ x).2 + t / L) (1 / L) 0 := by |
| 712 | simpa using (((hasDerivAt_id (0 : ℝ)).div_const L).const_add (χ x).2) |
| 713 | have hd' : HasDerivAt (fun t : ℝ => PrimaryPulseBounds.normalizedPulse f lam u L |
| 714 | ((χ x).1, (χ x).2 + t / L)) ((1 / L) • (L • |
| 715 | TangentProjection.projectedRhs (f.normal ((χ x).1,L*(χ x).2)) |
| 716 | (f.normalMotion ((χ x).1,L*(χ x).2)) (PrimaryPulseBounds.normalizedPulse f lam u L (χ x)) |
| 717 | (MovingFrameODE.baseAction (f.F ((χ x).1,L*(χ x).2)) (f.shear ((χ x).1,L*(χ x).2)) |
| 718 | (PrimaryPulseBounds.normalizedPulse f lam u L (χ x))) 0 (f.viscosity ((χ x).1,L*(χ x).2)))) 0 := by |
| 719 | simpa only [Prod.mk.eta, Function.comp_def] using hd.scomp_of_eq (0 : ℝ) ht' (by simp) |
| 720 | have hl : HasDerivAt (fun t : ℝ => x + t • V x) (V x) 0 := by |
| 721 | simpa using ((hasDerivAt_id (0 : ℝ)).smul_const (V x)).const_add x |
| 722 | have hv' : HasDerivAt (fun t : ℝ => PrimaryPulseBounds.normalizedPulse f lam u L (χ (x+t•V x))) |
| 723 | (along V (fun y => PrimaryPulseBounds.normalizedPulse f lam u L (χ y)) x) 0 := by |
| 724 | simpa only [along, Function.comp_def] using hv.hasFDerivAt.comp_hasDerivAt_of_eq (0 : ℝ) hl (by simp) |
| 725 | simp only [hclock] at hv' |
| 726 | have he := hv'.unique hd' |
| 727 | simpa only [smul_smul, one_div, inv_mul_cancel₀ hL.ne', one_smul, Prod.mk.eta] using he |
| 728 | |
| 729 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 730 | theorem phaseFundamental_tangent {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 731 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 732 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (j : Fin 2) (n : ℕ) (x : D) : |
| 733 | ⟪((F j).frame n).normal ((χ n x).1, (F j).L n * (χ n x).2), phaseFundamental F χ j n x⟫_ℝ = 0 := by |
| 734 | exact ((F j).frame n).ambient_tangent _ _ |
| 735 | |
| 736 | theorem phase_coefficients_principal_zero |
| 737 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 738 | (a : LinearWaveBounds.WaveCoefficients D) |
| 739 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 740 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 741 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) {T R : ℕ → D → Vec2} {mask : ℕ → D → ℝ} |
| 742 | {Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 743 | (hscale : ∀ n, U.scale n = s.slow n) |
| 744 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 745 | (hmap : ∀ n x, x ∈ s.domain → χ n x ∈ U.carrier n ×ˢ Ioo (0 : ℝ) 1) |
| 746 | (hcov : CovarianceControl s (phaseMatrix F pref χ) T) {β : ℝ} |
| 747 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) (hm : UnweightedClass s 0 mask) |
| 748 | (hHf : FrozenAlong d.fast (phaseMatrix F pref χ)) (hTf : FrozenAlong d.fast T) |
| 749 | (hRf : FrozenAlong d.fast R) (hmf : FrozenAlong d.fast mask) |
| 750 | (hK : ∀ n, a.frequency n ≠ 0) (j : Fin 2) |
| 751 | (hcoef : ∀ n, ContinuousOn (((F j).frame n).coefficient 1) (U.carrier n ×ˢ Icc 0 ((F j).L n))) |
| 752 | (hkin : ∀ n x, x ∈ s.domain → ((F j).frame n).Kinematics (χ n x).1 (Icc 0 ((F j).L n))) |
| 753 | (hclock : ∀ n x, x ∈ s.domain → ∀ t : ℝ, |
| 754 | χ n (x + t • d.fastField n x) = ((χ n x).1, (χ n x).2 + t / (F j).L n)) |
| 755 | (hnormal : ∀ n x, x ∈ s.domain → ((F j).frame n).normal ((χ n x).1,(F j).L n*(χ n x).2) = a.normal s d n x) |
| 756 | (hmotion : ∀ n x, x ∈ s.domain → ((F j).frame n).normalMotion ((χ n x).1,(F j).L n*(χ n x).2) = Ndot n x) |
| 757 | (haction : ∀ n x, x ∈ s.domain → ∀ z : Space, |
| 758 | MovingFrameODE.baseAction (((F j).frame n).F ((χ n x).1,(F j).L n*(χ n x).2)) |
| 759 | (((F j).frame n).shear ((χ n x).1,(F j).L n*(χ n x).2)) z = A n x z) |
| 760 | (hdamp : ∀ n x, x ∈ s.domain → ((F j).frame n).viscosity ((χ n x).1,(F j).L n*(χ n x).2) = |
| 761 | s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2) |
| 762 | (hphysical : ∀ n x, x ∈ s.domain → CurlClassBounds.complexify (A n x (phaseFundamental F χ j n x)) = |
| 763 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) (d.radialField n) |
| 764 | (fun y => CurlClassBounds.complexify (phaseFundamental F χ j n y)) x) : |
| 765 | ∀ n x, x ∈ s.domain → |
| 766 | (coefficients a s d (phaseMatrix F pref χ) T R mask (phaseFundamental F χ j) Ndot A j).principal s d n x = 0 := by |
| 767 | have hv := phaseFundamental_class F χ hscale hχ hmap j |
| 768 | apply coefficients_principal_zero a hcov hR hm hv hHf hTf hRf hmf hK _ hphysical j |
| 769 | intro n x hx |
| 770 | have hd := normalizedPulse_along ((F j).frame n) ((F j).lam n) ((F j).u n) ((F j).L_pos n) |
| 771 | (U.carrier n) (hcoef n) (χ n) (d.fastField n) (hmap n x hx).1 (hmap n x hx).2 (hkin n x hx) |
| 772 | (((hv.smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx)).differentiableAt (by simp)) (hclock n x hx) |
| 773 | simp only [phaseFundamental, hnormal n x hx, hmotion n x hx, haction n x hx, hdamp n x hx] at hd ⊢ |
| 774 | exact hd |
| 775 | |
| 776 | /-! ## The constructed curl, pressure, and retained linear error -/ |
| 777 | |
| 778 | noncomputable def exactCoefficients (a : LinearWaveBounds.WaveCoefficients D) |
| 779 | (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 780 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 781 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 782 | (ψ : ℕ → D → ℝ) (j : Fin 2) : LinearWaveBounds.WaveCoefficients D := |
| 783 | (coefficients a s d H T R mask v Ndot A j).corrected s d ψ |
| 784 | |
| 785 | theorem signed_bounds |
| 786 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 787 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ B κ : ℝ} |
| 788 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) (hκ : κ ≤ 1 / 2) |
| 789 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask ψ : ℕ → D → ℝ} |
| 790 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 791 | (hcov : CovarianceControl s H T) |
| 792 | (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) |
| 793 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 794 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 795 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 796 | {b M : ℝ} (hb : 0 < b) |
| 797 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 798 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 799 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 800 | {radius : D → ℝ} (hradius : a.radius = fun _ => radius) |
| 801 | (hψ : UnweightedClass s 0 ψ) (j : Fin 2) : |
| 802 | let z := coefficients a s d H T R mask v Ndot A j |
| 803 | WaveClass s P (B - κ) (z.corrected s d ψ).amplitude ∧ |
| 804 | WaveClass s P (B + 1 / 2 - κ) (z.corrected s d ψ).pressure ∧ |
| 805 | WaveClass s P (B + 1 / 2 - 2 * κ) |
| 806 | (fun n x => (z.corrected s d ψ).amplitude n x - (z.withCutoff ψ).amplitude n x) ∧ |
| 807 | WaveClass s P (B + 1 / 2 - 4 * κ) (z.constructedGood s d ψ) := by |
| 808 | let z := coefficients a s d H T R mask v Ndot A j |
| 809 | have hi : LinearWaveBounds.InputBounds s P (B - κ) κ d z := by |
| 810 | convert! coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j using 1 |
| 811 | ring |
| 812 | have hc := (hi.with_cutoff hψ).curlCorrection_class hradius hN hb hlo hhi hK |
| 813 | have he := (hi.with_cutoff hψ).add_curl_amplitude hκ |
| 814 | (fun i => CurlClassBounds.class_component hc i) |
| 815 | have hdiff : WaveClass s P ((B - κ) + 1 / 2 - κ) |
| 816 | (fun n x => (z.corrected s d ψ).amplitude n x - (z.withCutoff ψ).amplitude n x) := by |
| 817 | apply LinearWaveBounds.class_congr hc |
| 818 | intro n x hx |
| 819 | simp only [LinearWaveBounds.WaveCoefficients.corrected, |
| 820 | LinearWaveBounds.WaveCoefficients.addAmplitude, add_sub_cancel_left] |
| 821 | refine ⟨LinearWaveBounds.component_classes he.amplitude, ?_, ?_, ?_⟩ |
| 822 | · convert! he.pressure using 1 |
| 823 | ring |
| 824 | · convert! hdiff using 1 |
| 825 | ring |
| 826 | · convert! hi.constructed_goodCoefficient_class hκ hψ hradius hN hb hlo hhi hK using 1 |
| 827 | ring |
| 828 | |
| 829 | theorem normalDot_complexify (N v : Space) : |
| 830 | normalDot N (CurlClassBounds.complexify v) = (⟪N,v⟫_ℝ : ℂ) := by |
| 831 | simp [normalDot, PiLp.inner_apply, Fin.sum_univ_three, mul_comm] |
| 832 | |
| 833 | theorem coefficients_tangent {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 834 | (a : LinearWaveBounds.WaveCoefficients D) |
| 835 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 836 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 837 | (ht : ∀ n x, x ∈ s.domain → ⟪a.normal s d n x, v n x⟫_ℝ = 0) (j : Fin 2) |
| 838 | (n : ℕ) {x : D} (hx : x ∈ s.domain) : |
| 839 | normalDot ((coefficients a s d H T R mask v Ndot A j).normal s d n x) |
| 840 | ((coefficients a s d H T R mask v Ndot A j).amplitude n x) = 0 := by |
| 841 | change normalDot (a.normal s d n x) (CurlClassBounds.complexify (signedScalar s H T R mask j n x • v n x)) = 0 |
| 842 | rw [normalDot_complexify, inner_smul_right, ht n x hx, mul_zero] |
| 843 | rfl |
| 844 | |
| 845 | theorem signed_curl_realization |
| 846 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 847 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ β κ : ℝ} |
| 848 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) |
| 849 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask ψ : ℕ → D → ℝ} |
| 850 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 851 | (hcov : CovarianceControl s H T) (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 852 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 853 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 854 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 855 | {b M : ℝ} (hb : 0 < b) |
| 856 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 857 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 858 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 859 | (hψ : UnweightedClass s 0 ψ) (j : Fin 2) (n : ℕ) |
| 860 | (G : CurlClassBounds.CylindricalGeometry s.domain (a.radius n) (d.radialField n) |
| 861 | (fun _ => d.angular) (d.axialField s n)) |
| 862 | (hfreq : a.frequency n ≠ 0) (hphase : ContDiffOn ℝ ∞ (a.phase n) s.domain) |
| 863 | (ht : ∀ n x, x ∈ s.domain → ⟪a.normal s d n x, v n x⟫_ℝ = 0) : |
| 864 | let z := coefficients a s d H T R mask v Ndot A j |
| 865 | ∀ x ∈ s.domain, |
| 866 | CurlClassBounds.cylindricalCurl (a.radius n) (d.radialField n) (fun _ => d.angular) |
| 867 | (d.axialField s n) ((z.withCutoff ψ).curlPotential s d n) x = |
| 868 | vectorMode (a.frequency n) (a.phase n) ((z.corrected s d ψ).amplitude n) x ∧ |
| 869 | cylindricalDivergence (a.radius n) (d.radialField n) (fun _ => d.angular) (d.axialField s n) |
| 870 | (vectorMode (a.frequency n) (a.phase n) ((z.corrected s d ψ).amplitude n)) x = 0 := by |
| 871 | dsimp only |
| 872 | have hi := coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j |
| 873 | have hn : ∀ x ∈ s.domain, a.normal s d n x ≠ 0 := by |
| 874 | intro x hx hz |
| 875 | have h := hlo n x hx |
| 876 | rw [hz, norm_zero] at h |
| 877 | exact (not_le_of_gt hb) h |
| 878 | intro x hx |
| 879 | exact ⟨LinearWaveBounds.corrected_realizes_curl hi hψ n G hfreq hphase hn |
| 880 | (fun x hx => coefficients_tangent a H T R mask v Ndot A ht j n hx) hx, |
| 881 | LinearWaveBounds.corrected_divergence hi hψ n G hfreq hphase hn |
| 882 | (fun x hx => coefficients_tangent a H T R mask v Ndot A ht j n hx) hx⟩ |
| 883 | |
| 884 | /-- Exact residual identity for the signed increment. The slot derivative |
| 885 | is kept as a separate nonzero field and is not included in the good bound. -/ |
| 886 | theorem signed_linear_identity |
| 887 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 888 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ β κ : ℝ} |
| 889 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) (hκ : κ ≤ 1 / 2) |
| 890 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask ψ : ℕ → D → ℝ} |
| 891 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 892 | (hcov : CovarianceControl s H T) (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 893 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 894 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 895 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 896 | {b M : ℝ} (hb : 0 < b) |
| 897 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 898 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 899 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 900 | {radius : D → ℝ} (hradius : a.radius = fun _ => radius) |
| 901 | (hψ : UnweightedClass s 0 ψ) {m : ℕ → ℝ} |
| 902 | (hangle : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 903 | (hG : ∀ n, CurlClassBounds.CylindricalGeometry s.domain (a.radius n) (d.radialField n) |
| 904 | (fun _ => d.angular) (d.axialField s n)) |
| 905 | (hHf : FrozenAlong d.fast H) (hTf : FrozenAlong d.fast T) |
| 906 | (hRf : FrozenAlong d.fast R) (hmf : FrozenAlong d.fast mask) |
| 907 | (hfreq : ∀ n, a.frequency n ≠ 0) |
| 908 | (hode : ∀ n x, x ∈ s.domain → along (d.fastField n) (v n) x = |
| 909 | TangentProjection.projectedRhs (a.normal s d n x) (Ndot n x) (v n x) |
| 910 | (A n x (v n x)) 0 (s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2)) |
| 911 | (haction : ∀ n x, x ∈ s.domain → CurlClassBounds.complexify (A n x (v n x)) = |
| 912 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 913 | (d.radialField n) (fun y => CurlClassBounds.complexify (v n y)) x) (j : Fin 2) : |
| 914 | let z := coefficients a s d H T R mask v Ndot A j |
| 915 | ∀ n x, x ∈ s.domain → |
| 916 | (z.corrected s d ψ).harmonicResidual s d n x = |
| 917 | (fun i => (z.constructedGood s d ψ n x i + |
| 918 | LinearWaveBounds.excludedSlotError d ψ z.amplitude 0 n x i) * |
| 919 | carrier (a.frequency n) (a.phase n) x) := by |
| 920 | have hi := coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j |
| 921 | have hs := coefficients_principal_zero a hcov hR hm hv hHf hTf hRf hmf hfreq hode haction j |
| 922 | have hs' : ∀ n x, x ∈ s.domain → |
| 923 | (coefficients a s d H T R mask v Ndot A j).principal s d n x = |
| 924 | -(0 : ℕ → D → ComplexVector) n x := by simpa using hs |
| 925 | have hg := hangle.exactConditions (fun n => (hG n).radius_ne) (fun n => (hG n).radial_radius) j |
| 926 | have hres := (LinearWaveBounds.constructed_linear_wave_with_excluded |
| 927 | hi hκ hψ hradius hN hb hlo hhi hK hs' hg).2 |
| 928 | dsimp only |
| 929 | intro n x hx |
| 930 | ext i |
| 931 | have hv := congrFun (hres n x hx) i |
| 932 | simpa only [Pi.add_apply, Pi.zero_apply, zero_mul, add_zero, coefficients, homogeneousCoefficients] using hv |
| 933 | |
| 934 | /-! ## The same native pulse blocks in the exact covariance identity -/ |
| 935 | |
| 936 | section NativeBlocks |
| 937 | |
| 938 | open PartitionedCovariance |
| 939 | |
| 940 | noncomputable def nativeUnit {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 941 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 942 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (j : Fin 2) (Y : TorusInverse.Plane) : Space := |
| 943 | !₂[covered (SlotColoring.nativeIndex h U.1) (P.rawRadial hdet j) Y, |
| 944 | covered (SlotColoring.nativeIndex h U.1) (P.rawTangent hdet j 0) Y, |
| 945 | covered (SlotColoring.nativeIndex h U.1) (P.rawTangent hdet j 1) Y] |
| 946 | |
| 947 | noncomputable def nativeTangentBlock {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 948 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 949 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : Vec2) |
| 950 | (q : ℝ) (x : SlotColoring.Position) (j : Fin 2) : |
| 951 | CorrectionState.HarmonicBlock TorusInverse.Plane := |
| 952 | coefficientBlock (fun _ => 1) (fun _ => P.phases j) (fun _ => P.modes j) |
| 953 | (fun _ Y => CurlClassBounds.complexify |
| 954 | ((outer * (Real.sqrt ε * a j * mask D U q x)) • nativeUnit P hdet j Y)) 0 |
| 955 | |
| 956 | theorem real_character_one (a t : ℝ) : |
| 957 | ((a : ℂ) * HarmonicFields.character 1 t).re = a * Real.cos t := by |
| 958 | simp [HarmonicFields.character, Complex.mul_re, Complex.exp_re] |
| 959 | |
| 960 | theorem nativeTangentBlock_radial {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 961 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 962 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : Vec2) |
| 963 | (q : ℝ) (x : SlotColoring.Position) (j : Fin 2) (n : ℕ) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 964 | (nativeTangentBlock P hdet outer ε a q x j).oscillation n (Y,θ) 0 = |
| 965 | SignedCovariance.radialWith P hdet outer ε a q x j Y θ := by |
| 966 | rw [nativeTangentBlock, coefficientBlock_velocity] |
| 967 | change ((outer * (Real.sqrt ε * a j * mask D U q x) * |
| 968 | covered (SlotColoring.nativeIndex h U.1) (P.rawRadial hdet j) Y : ℝ) * |
| 969 | HarmonicFields.character 1 (1 * P.phases j Y + (P.modes j : ℝ) * θ)).re = _ |
| 970 | rw [real_character_one] |
| 971 | simp only [SignedCovariance.radialWith, wave, one_mul, add_comm] |
| 972 | |
| 973 | theorem nativeTangentBlock_tangent {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 974 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 975 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : Vec2) |
| 976 | (q : ℝ) (x : SlotColoring.Position) (j i : Fin 2) (n : ℕ) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 977 | (nativeTangentBlock P hdet outer ε a q x j).oscillation n (Y,θ) i.succ = |
| 978 | SignedCovariance.tangentWith P hdet outer ε a q x j i Y θ := by |
| 979 | rw [nativeTangentBlock, coefficientBlock_velocity] |
| 980 | have hv : nativeUnit P hdet j Y i.succ = |
| 981 | covered (SlotColoring.nativeIndex h U.1) (P.rawTangent hdet j i) Y := by fin_cases i <;> rfl |
| 982 | simp only [ CurlClassBounds.complexify_apply, PiLp.smul_apply, |
| 983 | hv] |
| 984 | rw [real_character_one] |
| 985 | simp only [SignedCovariance.tangentWith, wave, one_mul, add_comm, smul_eq_mul] |
| 986 | |
| 987 | noncomputable def nativeAssembly {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 988 | {sys : SlotSystem D h vr vt} {N : ℕ} |
| 989 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 990 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 991 | (a : UnsignedLabel → Vec2) (q : ℝ) (x : SlotColoring.Position) : |
| 992 | TorusInverse.Plane → ℝ → Fin 3 → ℝ := fun Y θ i => |
| 993 | ∑ᶠ v : UnsignedLabel × Fin 2, |
| 994 | (nativeTangentBlock (P v.1) hdet (outer v.1) (ε v.1) (a v.1) q x v.2).oscillation 0 (Y,θ) i |
| 995 | |
| 996 | theorem nativeAssembly_radial {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 997 | {sys : SlotSystem D h vr vt} {N : ℕ} |
| 998 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 999 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 1000 | (a : UnsignedLabel → Vec2) (q : ℝ) (x : SlotColoring.Position) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 1001 | nativeAssembly P hdet outer ε a q x Y θ 0 = |
| 1002 | SignedCovariance.assembledRadialWith P hdet outer ε a q x Y θ := by |
| 1003 | simp only [nativeAssembly, nativeTangentBlock_radial, SignedCovariance.assembledRadialWith] |
| 1004 | |
| 1005 | theorem nativeAssembly_tangent {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1006 | {sys : SlotSystem D h vr vt} {N : ℕ} |
| 1007 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 1008 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 1009 | (a : UnsignedLabel → Vec2) (q : ℝ) (x : SlotColoring.Position) |
| 1010 | (i : Fin 2) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 1011 | nativeAssembly P hdet outer ε a q x Y θ i.succ = |
| 1012 | SignedCovariance.assembledTangentWith P hdet outer ε a q x i Y θ := by |
| 1013 | simp only [nativeAssembly, nativeTangentBlock_tangent, SignedCovariance.assembledTangentWith] |
| 1014 | |
| 1015 | end NativeBlocks |
| 1016 | |
| 1017 | /-! ## Canonical pulse binding for the matrix and the native blocks -/ |
| 1018 | |
| 1019 | /-! ## Exported blocks for the correction state -/ |
| 1020 | |
| 1021 | noncomputable def signedBlock (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 1022 | (s : StripData (D × ℝ)) (d : LinearWaveBounds.GraphDirections (D × ℝ)) |
| 1023 | (H : ℕ → D × ℝ → Mat2) (T R : ℕ → D × ℝ → Vec2) (mask : ℕ → D × ℝ → ℝ) |
| 1024 | (v Ndot : ℕ → D × ℝ → Space) (A : ℕ → D × ℝ → Space →L[ℝ] Space) |
| 1025 | (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) (j : Fin 2) : CorrectionState.HarmonicBlock D := |
| 1026 | blockOfCoefficients (exactCoefficients a s d H T R mask v Ndot A ψ j) kp |
| 1027 | |
| 1028 | noncomputable def gaussianBlock (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 1029 | (d : LinearWaveBounds.GraphDirections (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) |
| 1030 | (kp : ℕ → ℤ) : CorrectionState.HarmonicBlock D := |
| 1031 | ErrorHarmonics.gaussianBlock d ψ a.amplitude 0 1 a.frequency (fun n x => a.phase n (x,0)) kp |
| 1032 | |
| 1033 | /-- The error block is evaluated from the actual cutoff derivative and the |
| 1034 | same uncut signed coefficient. It has the original carrier and its conjugate. -/ |
| 1035 | theorem gaussianBlock_represents |
| 1036 | {s : StripData (D × ℝ)} {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 1037 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} |
| 1038 | {H : ℕ → D × ℝ → Mat2} {T R : ℕ → D × ℝ → Vec2} {mask : ℕ → D × ℝ → ℝ} |
| 1039 | {v Ndot : ℕ → D × ℝ → Space} {A : ℕ → D × ℝ → Space →L[ℝ] Space} |
| 1040 | {ψ : ℕ → D × ℝ → ℝ} {m : ℕ → ℝ} |
| 1041 | (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 1042 | (hθ : d.angular = (0,1)) (hψ : ∀ n, ContDiff ℝ ∞ (ψ n)) |
| 1043 | (kp : ℕ → ℤ) (hkp : ∀ n, a.frequency n * m n = (kp n : ℝ)) (j : Fin 2) : |
| 1044 | let z := coefficients a s d H T R mask v Ndot A j |
| 1045 | (gaussianBlock z d ψ kp).oscillation = fun n x i => |
| 1046 | (LinearWaveBounds.excludedSlotError d ψ z.amplitude 0 n x i * |
| 1047 | carrier (a.frequency n) (a.phase n) x).re := by |
| 1048 | have hψa : ErrorHarmonics.AngleIndependent ψ := by |
| 1049 | intro n x t |
| 1050 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 1051 | have hc := h.cutoff n |
| 1052 | simp only [hθ] at hc |
| 1053 | exact hc |
| 1054 | have ha : ErrorHarmonics.AngleIndependent (coefficients a s d H T R mask v Ndot A j).amplitude := by |
| 1055 | intro n x t |
| 1056 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 1057 | simpa only [hθ] using h.amplitude j n |
| 1058 | have hs : ErrorHarmonics.AngleIndependent (0 : ℕ → D × ℝ → ComplexVector) := by |
| 1059 | intro n x t |
| 1060 | rfl |
| 1061 | have hp : ∀ n x t, a.frequency n * a.phase n (x,t) = |
| 1062 | a.frequency n * a.phase n (x,0) + (kp n : ℝ) * t := by |
| 1063 | intro n x t |
| 1064 | rw [CopyAngularInvariance.affinePhase_eq_zeroSlice (Φ := a.phase n) (m := m n) |
| 1065 | (by simpa only [hθ] using h.phase n) x t, |
| 1066 | mul_add, ← mul_assoc, hkp] |
| 1067 | have he := ErrorHarmonics.gaussianBlock_represents d 1 a.frequency |
| 1068 | (fun n x => a.phase n (x,0)) a.phase kp hψ hψa ha hs hp |
| 1069 | dsimp only |
| 1070 | funext n x i |
| 1071 | have hi := congrFun (congrFun (congrFun he n) x) i |
| 1072 | simpa only [gaussianBlock, ErrorHarmonics.gaussianField, vectorMode, mode, |
| 1073 | Int.cast_one, mul_one, coefficients, homogeneousCoefficients] using hi |
| 1074 | |
| 1075 | /-! The realization hypothesis below concerns only the already constructed |
| 1076 | unit pulse and chart. It never identifies or bounds a signed output. The |
| 1077 | canonical unit pulse and its matrix are identified by the two preceding |
| 1078 | canonical-pulse theorems. -/ |
| 1079 | |
| 1080 | end NavierStokes.SignedWaveUpdate |