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 | theorem requestedStress_contDiff (p : SignedStressPrimitive.Patch) |
| 43 | (c : CorrectionState.Context (PressureStream.Lift E)) |
| 44 | (u : CorrectionState.State (PressureStream.Lift E)) (n : ℕ) |
| 45 | (ht : ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 46 | (hz : ContDiff ℝ ∞ (u.axialResidual c n)) |
| 47 | (hst : RadialAlias.RadiallySupported p.a p.b (u.thetaResidual c n)) |
| 48 | (hsz : RadialAlias.RadiallySupported p.a p.b (u.axialResidual c n)) : |
| 49 | ContDiff ℝ ∞ (requestedStress p c u n) := by |
| 50 | apply contDiff_pi.mpr |
| 51 | intro i |
| 52 | fin_cases i |
| 53 | · exact SignedStressPrimitive.barSigma_contDiff p 2 ht hst |
| 54 | · exact SignedStressPrimitive.barSigma_contDiff p 1 hz hsz |
| 55 | |
| 56 | theorem requestedStress_negative_primitive (p : SignedStressPrimitive.Patch) |
| 57 | (c : CorrectionState.Context (PressureStream.Lift E)) |
| 58 | (u : CorrectionState.State (PressureStream.Lift E)) (n : ℕ) |
| 59 | (ht : ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 60 | (hz : ContDiff ℝ ∞ (u.axialResidual c n)) |
| 61 | (hst : RadialAlias.RadiallySupported p.a p.b (u.thetaResidual c n)) |
| 62 | (hsz : RadialAlias.RadiallySupported p.a p.b (u.axialResidual c n)) (z : ℝ × E) : |
| 63 | requestedStress p c u n z = |
| 64 | ![-(∫ r in (0 : ℝ)..z.1, r ^ 2 * SignedStressPrimitive.adjusted p 2 |
| 65 | (PressureStream.torusAverage (u.thetaResidual c n)) (r, z.2)) / z.1 ^ 2, |
| 66 | -(∫ r in (0 : ℝ)..z.1, r ^ 1 * SignedStressPrimitive.adjusted p 1 |
| 67 | (PressureStream.torusAverage (u.axialResidual c n)) (r, z.2)) / z.1 ^ 1] := by |
| 68 | ext i |
| 69 | fin_cases i |
| 70 | · exact SignedStressPrimitive.barSigma_eq_primitive p 2 ht hst z |
| 71 | · exact SignedStressPrimitive.barSigma_eq_primitive p 1 hz hsz z |
| 72 | |
| 73 | theorem requestedStress_divergence (p : SignedStressPrimitive.Patch) |
| 74 | (c : CorrectionState.Context (PressureStream.Lift E)) |
| 75 | (u : CorrectionState.State (PressureStream.Lift E)) (n : ℕ) |
| 76 | (ht : ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 77 | (hz : ContDiff ℝ ∞ (u.axialResidual c n)) |
| 78 | (hst : RadialAlias.RadiallySupported p.a p.b (u.thetaResidual c n)) |
| 79 | (hsz : RadialAlias.RadiallySupported p.a p.b (u.axialResidual c n)) |
| 80 | (z : E) {r : ℝ} (hr : 0 < r) : |
| 81 | IntegratedMeanBalances.radialDivergence 2 (fun t => requestedStress p c u n (t,z) 0) r = |
| 82 | -SignedStressPrimitive.adjusted p 2 (PressureStream.torusAverage (u.thetaResidual c n)) (r,z) ∧ |
| 83 | IntegratedMeanBalances.radialDivergence 1 (fun t => requestedStress p c u n (t,z) 1) r = |
| 84 | -SignedStressPrimitive.adjusted p 1 (PressureStream.torusAverage (u.axialResidual c n)) (r,z) := by |
| 85 | exact ⟨SignedStressPrimitive.angular_divergence p |
| 86 | (PressureStream.torusAverage_contDiff ht) (PressureStream.torusAverage_supported hst) z hr, |
| 87 | SignedStressPrimitive.axial_divergence p |
| 88 | (PressureStream.torusAverage_contDiff hz) (PressureStream.torusAverage_supported hsz) z hr⟩ |
| 89 | |
| 90 | /-! ## Inverse jets and the signed quotient -/ |
| 91 | |
| 92 | theorem weights_smul (H : Mat2) (T : Vec2) (a : ℝ) (j : Fin 2) : |
| 93 | SmoothCovariance.weights H (a • T) j = a * SmoothCovariance.weights H T j := by |
| 94 | fin_cases j <;> |
| 95 | simp [SmoothCovariance.weights, SmoothCovariance.cramerNumerator, |
| 96 | Pi.smul_apply, smul_eq_mul] <;> ring |
| 97 | |
| 98 | /-- Only primitive matrix/target jets and zeroth-order primary margins occur |
| 99 | in this record. There is no assumption on an inverse or a signed output. -/ |
| 100 | structure CovarianceControl (s : StripData D) (H : ℕ → D → Mat2) |
| 101 | (T : ℕ → D → Vec2) where |
| 102 | matrix_jets : ∀ i j, PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) |
| 103 | (fun n x => H n x i j) |
| 104 | target_jets : ∀ i, MeanClass s 0 (fun n x => T n x i) |
| 105 | zeta_pos : ∀ x ∈ s.domain, 0 < s.zeta x |
| 106 | b : ℝ |
| 107 | M : ℝ |
| 108 | c : ℝ |
| 109 | b_pos : 0 < b |
| 110 | M_one : 1 ≤ M |
| 111 | c_pos : 0 < c |
| 112 | determinant : ∀ n x, x ∈ s.domain → |
| 113 | b ≤ |(PrimaryPulseBounds.normalizedMatrix (Real.sqrt (s.slow n)) (H n x)).det| |
| 114 | entries : ∀ n x, x ∈ s.domain → ∀ i j, |
| 115 | |Real.sqrt (s.slow n) * H n x i j| ≤ M |
| 116 | lower : ∀ n x, x ∈ s.domain → ∀ j, |
| 117 | c * s.zeta x ≤ SmoothCovariance.weights (H n x) (T n x) j |
| 118 | |
| 119 | namespace CovarianceControl |
| 120 | |
| 121 | variable {s : StripData D} {H : ℕ → D → Mat2} {T : ℕ → D → Vec2} |
| 122 | |
| 123 | theorem cone (h : CovarianceControl s H T) (n : ℕ) {x : D} (hx : x ∈ s.domain) : |
| 124 | SmoothCovariance.StrictCone (H n x) (T n x) := |
| 125 | (SmoothCovariance.weights_pos_iff _ _).mp |
| 126 | (fun j => (mul_pos h.c_pos (h.zeta_pos x hx)).trans_le (h.lower n x hx j)) |
| 127 | |
| 128 | /-- Cramer's actual formula preserves every band exponent, including signed |
| 129 | targets. Its denominator estimates are taken from the same primary matrix. -/ |
| 130 | theorem inverse_class (h : CovarianceControl s H T) {R : ℕ → D → Vec2} {β : ℝ} |
| 131 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) (j : Fin 2) : |
| 132 | MeanClass s β (fun n x => ((H n x)⁻¹.mulVec (R n x)) j) := by |
| 133 | have hR0 (i : Fin 2) : MeanClass s 0 (fun n x => s.epsilon n ^ (-β) * R n x i) := by |
| 134 | simpa only [smul_eq_mul, add_neg_cancel] using (hR i).band_smul (bandBound_rpow s (-β)) |
| 135 | have h0 := PrimaryPulseBounds.covariance_weights_class |
| 136 | (PrimaryPulseBounds.sqrt_slow_polynomial s) |
| 137 | (fun n => (Real.sqrt_pos.mpr (zero_lt_one.trans_le (s.one_le_slow n))).ne') |
| 138 | h.matrix_jets hR0 h.b_pos h.M_one h.determinant h.entries j |
| 139 | have hβ := h0.band_smul (bandBound_rpow s β) |
| 140 | apply LinearWaveBounds.class_congr (by simpa only [zero_add] using hβ) |
| 141 | intro n x hx |
| 142 | dsimp only |
| 143 | rw [SmoothCovariance.inverse_formula _ _ (h.cone n hx).det_ne_zero] |
| 144 | change s.epsilon n ^ β * SmoothCovariance.weights (H n x) |
| 145 | (s.epsilon n ^ (-β) • R n x) j = _ |
| 146 | rw [weights_smul, ← mul_assoc, ← Real.rpow_add (s.epsilon_pos n), |
| 147 | add_neg_cancel, Real.rpow_zero, one_mul] |
| 148 | |
| 149 | theorem inverse_control (h : CovarianceControl s H T) (j : Fin 2) : |
| 150 | SignedCovariance.InverseControl s (fun _ x => s.zeta x) |
| 151 | (fun n x => ((H n x)⁻¹.mulVec (T n x)) j) := by |
| 152 | apply SignedCovariance.inverseControl_of_lower |
| 153 | (fun n x hx => (PartitionedCovariance.amplitudes_are_inverse_weights (h.cone n hx) j).1) |
| 154 | h.c_pos 0 |
| 155 | intro n x hx |
| 156 | simpa only [pow_zero, div_one, SmoothCovariance.inverse_formula _ _ (h.cone n hx).det_ne_zero] |
| 157 | using h.lower n x hx j |
| 158 | |
| 159 | theorem increment_class (h : CovarianceControl s H T) {R : ℕ → D → Vec2} {β : ℝ} |
| 160 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) (j : Fin 2) : |
| 161 | WaveClass s (fun _ _ => 1) β |
| 162 | (fun n x => SignedCovariance.increment (H n x) (T n x) (R n x) j) := |
| 163 | SignedCovariance.increment_wave_class j h.zeta_pos (fun n _ hx => h.cone n hx) |
| 164 | (h.inverse_class h.target_jets j) (h.inverse_class hR j) (h.inverse_control j) |
| 165 | |
| 166 | end CovarianceControl |
| 167 | |
| 168 | noncomputable def signedScalar (s : StripData D) (H : ℕ → D → Mat2) |
| 169 | (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) (j : Fin 2) : ℕ → D → ℝ := |
| 170 | fun n x => Real.sqrt (s.epsilon n) * SignedCovariance.increment (H n x) (T n x) (R n x) j * mask n x |
| 171 | |
| 172 | noncomputable def signedVector (s : StripData D) (H : ℕ → D → Mat2) |
| 173 | (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) (v : ℕ → D → Space) (j : Fin 2) : |
| 174 | ℕ → D → Space := fun n x => signedScalar s H T R mask j n x • v n x |
| 175 | |
| 176 | theorem signedScalar_class {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 177 | {mask : ℕ → D → ℝ} {β : ℝ} (h : CovarianceControl s H T) |
| 178 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 179 | (hm : UnweightedClass s 0 mask) (j : Fin 2) : |
| 180 | WaveClass s (fun _ _ => 1) (β + 1 / 2) (signedScalar s H T R mask j) := by |
| 181 | have hi := h.increment_class hR j |
| 182 | have hh := (LinearWaveBounds.unweighted_smul hm (show MemClass s (fun _ x => Real.sqrt (s.zeta x)) β |
| 183 | (fun n x => SignedCovariance.increment (H n x) (T n x) (R n x) j) from by |
| 184 | simpa only [WaveClass, mul_one] using hi)) |
| 185 | have hh' := hh.band_smul (bandBound_rpow s (1 / 2)) |
| 186 | apply LinearWaveBounds.class_congr (by simpa only [WaveClass, mul_one, zero_add] using hh') |
| 187 | intro n x _ |
| 188 | simp only [signedScalar, smul_eq_mul, ← Real.sqrt_eq_rpow] |
| 189 | ring |
| 190 | |
| 191 | theorem signedVector_class {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 192 | {mask : ℕ → D → ℝ} {v : ℕ → D → Space} {P : ℕ → D → ℝ} {β : ℝ} |
| 193 | (h : CovarianceControl s H T) (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 194 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) (j : Fin 2) : |
| 195 | WaveClass s P (β + 1 / 2) (signedVector s H T R mask v j) := by |
| 196 | have hs := signedScalar_class h hR hm j |
| 197 | have h := hs.smul hv |
| 198 | simp only [mul_one, add_zero] at h |
| 199 | exact h |
| 200 | |
| 201 | /-! ## The same homogeneous fundamental and its constructed pressure -/ |
| 202 | |
| 203 | noncomputable def homogeneousCoefficients (a : LinearWaveBounds.WaveCoefficients D) |
| 204 | (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 205 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) : |
| 206 | LinearWaveBounds.WaveCoefficients D := |
| 207 | { a with |
| 208 | amplitude := fun n x => CurlClassBounds.complexify (v n x) |
| 209 | pressure := fun n => ParticularWaveBounds.projectedPressure (a.frequency n) |
| 210 | (a.normal s d n) (Ndot n) (v n) (fun x => A n x (v n x)) (fun _ => 0) } |
| 211 | |
| 212 | noncomputable def coefficients (a : LinearWaveBounds.WaveCoefficients D) |
| 213 | (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 214 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 215 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) (j : Fin 2) : |
| 216 | LinearWaveBounds.WaveCoefficients D := |
| 217 | homogeneousCoefficients a s d (signedVector s H T R mask v j) Ndot A |
| 218 | |
| 219 | /-- Every signed amplitude and pressure bound is obtained from the actual |
| 220 | inverse quotient and the primitive homogeneous fundamental. The input wave |
| 221 | bound supplies only the already fixed background geometry. -/ |
| 222 | theorem coefficients_inputBounds |
| 223 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 224 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ β κ : ℝ} |
| 225 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) |
| 226 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask : ℕ → D → ℝ} |
| 227 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 228 | (hcov : CovarianceControl s H T) |
| 229 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 230 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 231 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 232 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 233 | {b M : ℝ} (hb : 0 < b) |
| 234 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 235 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 236 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) (j : Fin 2) : |
| 237 | LinearWaveBounds.InputBounds s P (β + 1 / 2) κ d |
| 238 | (coefficients a s d H T R mask v Ndot A j) := by |
| 239 | have hs := signedVector_class hcov hR hm hv j |
| 240 | have ha := hs.map CurlClassBounds.complexify |
| 241 | have hp := ParticularWaveBounds.pressure_class hN hNdot hA hs |
| 242 | (MemClass.zero hs.weight_nonneg) hb hlo hhi hK |
| 243 | exact { hbase with |
| 244 | amplitude := fun i => CurlClassBounds.class_component ha i |
| 245 | pressure := hp } |
| 246 | |
| 247 | /-- Equality along an actual straight fast orbit, imposed on the primitive |
| 248 | slow data, not on the signed solve or its derivatives. -/ |
| 249 | def FrozenAlong (v : D) (f : ℕ → D → E) : Prop := |
| 250 | ∀ n x (t : ℝ), f n (x + t • v) = f n x |
| 251 | |
| 252 | theorem FrozenAlong.derivative {v : D} {f : ℕ → D → E} |
| 253 | (hf : FrozenAlong v f) (n : ℕ) {x : D} (hd : DifferentiableAt ℝ (f n) x) : |
| 254 | fderiv ℝ (f n) x v = 0 := by |
| 255 | have hl : HasDerivAt (fun t : ℝ => x + t • v) v 0 := by |
| 256 | simpa using ((hasDerivAt_id (0 : ℝ)).smul_const v).const_add x |
| 257 | have hh : HasDerivAt (fun t : ℝ => f n (x + t • v)) (fderiv ℝ (f n) x v) 0 := by |
| 258 | apply HasFDerivAt.comp_hasDerivAt 0 _ hl |
| 259 | simpa only [zero_smul, add_zero] using hd.hasFDerivAt |
| 260 | have he : (fun t : ℝ => f n (x + t • v)) = fun _ => f n x := funext (hf n x) |
| 261 | rw [he] at hh |
| 262 | exact hh.unique (hasDerivAt_const (0 : ℝ) (f n x)) |
| 263 | |
| 264 | theorem signedScalar_frozen {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 265 | {mask : ℕ → D → ℝ} {v : D} |
| 266 | (hH : FrozenAlong v H) (hT : FrozenAlong v T) (hR : FrozenAlong v R) |
| 267 | (hm : FrozenAlong v mask) (j : Fin 2) : |
| 268 | FrozenAlong v (signedScalar s H T R mask j) := by |
| 269 | intro n x t |
| 270 | simp only [signedScalar, hH n x t, hT n x t, hR n x t, hm n x t] |
| 271 | |
| 272 | theorem along_smul (V : D → D) {f : D → ℝ} {g : D → E} {x : D} |
| 273 | (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) : |
| 274 | along V (fun y => f y • g y) x = along V f x • g x + f x • along V g x := by |
| 275 | simp only [along, fderiv_fun_smul hf hg, _root_.add_apply, |
| 276 | ContinuousLinearMap.smulRight_apply, _root_.smul_apply] |
| 277 | exact add_comm _ _ |
| 278 | |
| 279 | theorem projectedRhs_smul (N Ndot v Av : Space) (δ c : ℝ) : |
| 280 | TangentProjection.projectedRhs N Ndot (c • v) (c • Av) 0 δ = |
| 281 | c • TangentProjection.projectedRhs N Ndot v Av 0 δ := by |
| 282 | ext i |
| 283 | simp [TangentProjection.projectedRhs, TangentProjection.tangentProj, |
| 284 | inner_smul_right, PiLp.smul_apply] |
| 285 | ring |
| 286 | |
| 287 | theorem shear_smul (R F G : D → ℝ) (Vr : D → D) (v : D → ComplexVector) |
| 288 | (c : D → ℝ) (x : D) : |
| 289 | LinearWaveResidual.shear R F G Vr (fun y => c y • v y) x = |
| 290 | c x • LinearWaveResidual.shear R F G Vr v x := by |
| 291 | ext i |
| 292 | fin_cases i <;> simp [LinearWaveResidual.shear, Complex.real_smul] <;> ring |
| 293 | |
| 294 | /-- Scaling the actual homogeneous projected ODE by the frozen inverse |
| 295 | coefficient gives the signed principal equation, with its pressure constructed |
| 296 | from the same normal and action. No signed equation is an input. -/ |
| 297 | theorem coefficients_principal_zero |
| 298 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 299 | (a : LinearWaveBounds.WaveCoefficients D) |
| 300 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask : ℕ → D → ℝ} |
| 301 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 302 | (hcov : CovarianceControl s H T) {β : ℝ} |
| 303 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 304 | (hm : UnweightedClass s 0 mask) {P : ℕ → D → ℝ} (hv : MemClass s P 0 v) |
| 305 | (hHf : FrozenAlong d.fast H) (hTf : FrozenAlong d.fast T) |
| 306 | (hRf : FrozenAlong d.fast R) (hmf : FrozenAlong d.fast mask) |
| 307 | (hK : ∀ n, a.frequency n ≠ 0) |
| 308 | (hode : ∀ n x, x ∈ s.domain → along (d.fastField n) (v n) x = |
| 309 | TangentProjection.projectedRhs (a.normal s d n x) (Ndot n x) (v n x) |
| 310 | (A n x (v n x)) 0 (s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2)) |
| 311 | (haction : ∀ n x, x ∈ s.domain → CurlClassBounds.complexify (A n x (v n x)) = |
| 312 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 313 | (d.radialField n) (fun y => CurlClassBounds.complexify (v n y)) x) |
| 314 | (j : Fin 2) (n : ℕ) {x : D} (hx : x ∈ s.domain) : |
| 315 | (coefficients a s d H T R mask v Ndot A j).principal s d n x = 0 := by |
| 316 | have hs := signedScalar_class hcov hR hm j |
| 317 | have hsD := ((hs.smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx)).differentiableAt (by simp) |
| 318 | have hvD := ((hv.smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx)).differentiableAt (by simp) |
| 319 | have hfreeze := (signedScalar_frozen hHf hTf hRf hmf j).derivative n hsD |
| 320 | have hfast : along (d.fastField n) (signedScalar s H T R mask j n) x = 0 := by |
| 321 | simp only [along, LinearWaveBounds.GraphDirections.fastField, map_smul, hfreeze, smul_zero] |
| 322 | have hd : along (d.fastField n) (signedVector s H T R mask v j n) x = |
| 323 | TangentProjection.projectedRhs (a.normal s d n x) (Ndot n x) |
| 324 | (signedVector s H T R mask v j n x) (A n x (signedVector s H T R mask v j n x)) |
| 325 | 0 (s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2) := by |
| 326 | change along (d.fastField n) (fun y => signedScalar s H T R mask j n y • v n y) x = _ |
| 327 | rw [along_smul _ hsD hvD, hfast, zero_smul, zero_add, hode n x hx] |
| 328 | simp only [signedVector, map_smul, projectedRhs_smul] |
| 329 | have hact : CurlClassBounds.complexify (A n x (signedVector s H T R mask v j n x)) = |
| 330 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 331 | (d.radialField n) (fun y => CurlClassBounds.complexify (signedVector s H T R mask v j n y)) x := by |
| 332 | simp only [signedVector, map_smul] |
| 333 | rw [shear_smul, haction n x hx] |
| 334 | have hh := ParticularWaveBounds.principal_eq_neg_source_of_projected |
| 335 | (s.epsilon n) (a.frequency n) (hK n) (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 336 | (a.phase n) (d.radialField n) (fun _ => d.angular) (d.axialField s n) (d.fastField n) |
| 337 | (signedVector s H T R mask v j n) (Ndot n) |
| 338 | (fun y => A n y (signedVector s H T R mask v j n y)) (fun _ => 0) |
| 339 | (hsD.smul hvD) hd hact |
| 340 | simpa only [coefficients, homogeneousCoefficients, LinearWaveBounds.WaveCoefficients.principal, |
| 341 | LinearWaveBounds.WaveCoefficients.normal, map_zero, neg_zero] using hh |
| 342 | |
| 343 | /-! ## Instantiation with the constructed primary phase and pulse -/ |
| 344 | |
| 345 | noncomputable def phaseMatrix {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 346 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 347 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) : ℕ → D → Mat2 := |
| 348 | PrimaryPulseBounds.chartCovariance pref (fun j => (F j).frame) |
| 349 | (fun j => (F j).lam) (fun j => (F j).u) (fun j => (F j).L) χ |
| 350 | |
| 351 | noncomputable def phaseFundamental {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 352 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 353 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (j : Fin 2) : ℕ → D → Space := |
| 354 | fun n x => PrimaryPulseBounds.normalizedPulse ((F j).frame n) |
| 355 | ((F j).lam n) ((F j).u n) ((F j).L n) (χ n x) |
| 356 | |
| 357 | noncomputable def phaseEnvelope {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 358 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 359 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (j : Fin 2) : ℕ → D → ℝ := |
| 360 | fun n x => PrimaryPulseBounds.referenceP ((F j).lam n) ((F j).u n) |
| 361 | ((F j).L n) ((F j).L n * (χ n x).2) |
| 362 | |
| 363 | theorem phaseFundamental_class {s : StripData D} |
| 364 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 365 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 366 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) |
| 367 | (hscale : ∀ n, U.scale n = s.slow n) |
| 368 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 369 | (hmap : ∀ n x, x ∈ s.domain → χ n x ∈ U.carrier n ×ˢ Ioo (0 : ℝ) 1) |
| 370 | (j : Fin 2) : MemClass s (phaseEnvelope F χ j) 0 (phaseFundamental F χ j) := by |
| 371 | have hp := (F j).pulse_jets.comp hχ hscale hmap |
| 372 | exact hp.memClass s (fun _ => rfl) (fun _ => rfl) |
| 373 | |
| 374 | theorem phaseMatrix_jets {s : StripData D} |
| 375 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 376 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 377 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) |
| 378 | (hscale : ∀ n, U.scale n = s.slow n) |
| 379 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 380 | (hmap : ∀ n x, x ∈ s.domain → (χ n x).1 ∈ U.carrier n) |
| 381 | (hpref : ∀ j, PhaseJetBounds.PolynomialJets U (fun n _ => pref j n)) (i j : Fin 2) : |
| 382 | PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) |
| 383 | (fun n x => phaseMatrix F pref χ n x i j) := by |
| 384 | apply ((PrimaryPulseBounds.EnvelopeJets.of_polynomial |
| 385 | (PrimaryPulseBounds.primaryCovariance_entry_polynomial U pref (fun j => (F j).frame) |
| 386 | (fun j => (F j).lam) (fun j => (F j).u) (fun j => (F j).L) hpref |
| 387 | (fun j => (F j).pulse_jets) (fun j => (F j).lam_pos) (fun j => (F j).u_pos) |
| 388 | (fun j => (F j).L_pos) i j)).comp |
| 389 | (hχ.clm (ContinuousLinearMap.fst ℝ PhaseCalculus.Slow ℝ)) hscale hmap).to_polynomial |
| 390 | intro n x hx |
| 391 | rfl |
| 392 | |
| 393 | /-- The matrix jets in this constructor are proved from the actual primary |
| 394 | ODE, including its Gaussian initial normalization and slot integrals. -/ |
| 395 | noncomputable def phaseControl {s : StripData D} |
| 396 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 397 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 398 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (T : ℕ → D → Vec2) |
| 399 | (hscale : ∀ n, U.scale n = s.slow n) |
| 400 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 401 | (hmap : ∀ n x, x ∈ s.domain → (χ n x).1 ∈ U.carrier n) |
| 402 | (hpref : ∀ j, PhaseJetBounds.PolynomialJets U (fun n _ => pref j n)) |
| 403 | (hT : ∀ i, MeanClass s 0 (fun n x => T n x i)) |
| 404 | (hζ : ∀ x ∈ s.domain, 0 < s.zeta x) |
| 405 | {b M c : ℝ} (hb : 0 < b) (hM : 1 ≤ M) (hc : 0 < c) |
| 406 | (hdet : ∀ n x, x ∈ s.domain → |
| 407 | b ≤ |(PrimaryPulseBounds.normalizedMatrix (Real.sqrt (s.slow n)) (phaseMatrix F pref χ n x)).det|) |
| 408 | (hentry : ∀ n x, x ∈ s.domain → ∀ i j, |
| 409 | |Real.sqrt (s.slow n) * phaseMatrix F pref χ n x i j| ≤ M) |
| 410 | (hlower : ∀ n x, x ∈ s.domain → ∀ j, |
| 411 | c * s.zeta x ≤ SmoothCovariance.weights (phaseMatrix F pref χ n x) (T n x) j) : |
| 412 | CovarianceControl s (phaseMatrix F pref χ) T where |
| 413 | matrix_jets := phaseMatrix_jets F pref χ hscale hχ hmap hpref |
| 414 | target_jets := hT |
| 415 | zeta_pos := hζ |
| 416 | b := b |
| 417 | M := M |
| 418 | c := c |
| 419 | b_pos := hb |
| 420 | M_one := hM |
| 421 | c_pos := hc |
| 422 | determinant := hdet |
| 423 | entries := hentry |
| 424 | lower := hlower |
| 425 | |
| 426 | /-- Same phase fundamental, same integrated matrix, arbitrary signed target. |
| 427 | There is no assumed estimate for the inverse, the fundamental, or the result. -/ |
| 428 | theorem phase_signedVector_class {s : StripData D} |
| 429 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 430 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 431 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 432 | (hscale : ∀ n, U.scale n = s.slow n) |
| 433 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 434 | (hmap : ∀ n x, x ∈ s.domain → χ n x ∈ U.carrier n ×ˢ Ioo (0 : ℝ) 1) |
| 435 | (hpref : ∀ j, PhaseJetBounds.PolynomialJets U (fun n _ => pref j n)) |
| 436 | (hT : ∀ i, MeanClass s 0 (fun n x => T n x i)) |
| 437 | (hζ : ∀ x ∈ s.domain, 0 < s.zeta x) |
| 438 | {b M c : ℝ} (hb : 0 < b) (hM : 1 ≤ M) (hc : 0 < c) |
| 439 | (hdet : ∀ n x, x ∈ s.domain → |
| 440 | b ≤ |(PrimaryPulseBounds.normalizedMatrix (Real.sqrt (s.slow n)) (phaseMatrix F pref χ n x)).det|) |
| 441 | (hentry : ∀ n x, x ∈ s.domain → ∀ i j, |
| 442 | |Real.sqrt (s.slow n) * phaseMatrix F pref χ n x i j| ≤ M) |
| 443 | (hlower : ∀ n x, x ∈ s.domain → ∀ j, |
| 444 | c * s.zeta x ≤ SmoothCovariance.weights (phaseMatrix F pref χ n x) (T n x) j) |
| 445 | {B κ : ℝ} (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) |
| 446 | (hm : UnweightedClass s 0 mask) (j : Fin 2) : |
| 447 | WaveClass s (phaseEnvelope F χ j) (B - κ) |
| 448 | (signedVector s (phaseMatrix F pref χ) T R mask (phaseFundamental F χ j) j) := by |
| 449 | have hc := phaseControl F pref χ T hscale hχ (fun n x hx => (hmap n x hx).1) |
| 450 | hpref hT hζ hb hM hc hdet hentry hlower |
| 451 | have hh := signedVector_class hc hR hm (phaseFundamental_class F χ hscale hχ hmap j) j |
| 452 | convert! hh using 1 |
| 453 | ring |
| 454 | |
| 455 | /-! ## Literal harmonic blocks, with the same carrier metadata -/ |
| 456 | |
| 457 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 458 | theorem conjugatePair_apply (a : D → ℂ) (j : ℤ) (x : D) : |
| 459 | ErrorHarmonics.conjugatePair 1 a j x = |
| 460 | (if j = 1 then a x / 2 else 0) + conj (if -j = 1 then a x / 2 else 0) := by |
| 461 | classical |
| 462 | change Finsupp.single (1 : ℤ) (fun x => a x / 2) j x + |
| 463 | conj (Finsupp.single (1 : ℤ) (fun x => a x / 2) (-j) x) = _ |
| 464 | by_cases hj : j = 1 <;> by_cases hjn : -j = 1 <;> |
| 465 | simp [hj, hjn, eq_comm] |
| 466 | |
| 467 | noncomputable def coefficientBlock (frequency : ℕ → ℝ) (phase : ℕ → D → ℝ) |
| 468 | (angularFrequency : ℕ → ℤ) (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 469 | CorrectionState.HarmonicBlock D where |
| 470 | velocity n i := ErrorHarmonics.conjugatePair 1 (fun x => v n x i) |
| 471 | pressure n := ErrorHarmonics.conjugatePair 1 (p n) |
| 472 | frequency := frequency |
| 473 | phase := phase |
| 474 | angularFrequency := angularFrequency |
| 475 | |
| 476 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 477 | theorem coefficientBlock_band (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 478 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 479 | (coefficientBlock k Φ kp v p).BandLimited 1 := |
| 480 | ⟨fun n i => ErrorHarmonics.band_conjugatePair 1 (fun x => v n x i), |
| 481 | fun n => ErrorHarmonics.band_conjugatePair 1 (p n)⟩ |
| 482 | |
| 483 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 484 | theorem coefficientBlock_symmetric (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 485 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 486 | (∀ n i, HarmonicFields.ConjugateSymmetric ((coefficientBlock k Φ kp v p).velocity n i)) ∧ |
| 487 | ∀ n, HarmonicFields.ConjugateSymmetric ((coefficientBlock k Φ kp v p).pressure n) := |
| 488 | ⟨fun n i => ErrorHarmonics.conjugatePair_symmetric 1 (fun x => v n x i), |
| 489 | fun n => ErrorHarmonics.conjugatePair_symmetric 1 (p n)⟩ |
| 490 | |
| 491 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 492 | theorem coefficientBlock_zero_coefficient (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 493 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) : |
| 494 | (∀ n i, (coefficientBlock k Φ kp v p).velocity n i 0 = 0) ∧ |
| 495 | ∀ n, (coefficientBlock k Φ kp v p).pressure n 0 = 0 := by |
| 496 | constructor |
| 497 | · intro n i |
| 498 | ext x |
| 499 | simp only [coefficientBlock, conjugatePair_apply] |
| 500 | norm_num |
| 501 | · intro n |
| 502 | ext x |
| 503 | simp only [coefficientBlock, conjugatePair_apply] |
| 504 | norm_num |
| 505 | |
| 506 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 507 | theorem coefficientBlock_velocity (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 508 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) (n : ℕ) (x : D × ℝ) (i : Fin 3) : |
| 509 | (coefficientBlock k Φ kp v p).oscillation n x i = |
| 510 | (v n x.1 i * HarmonicFields.character 1 (k n * Φ n x.1 + (kp n : ℝ) * x.2)).re := by |
| 511 | exact ErrorHarmonics.pairedBlock_evaluation 1 k Φ kp v n x i |
| 512 | |
| 513 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 514 | theorem coefficientBlock_pressure (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 515 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) (n : ℕ) (x : D × ℝ) : |
| 516 | (coefficientBlock k Φ kp v p).oscillatoryPressure n x = |
| 517 | (p n x.1 * HarmonicFields.character 1 (k n * Φ n x.1 + (kp n : ℝ) * x.2)).re := by |
| 518 | have h := congrArg Complex.re (ErrorHarmonics.field_conjugatePair 1 (p n) (k n) (Φ n) (kp n) x) |
| 519 | simp only [Complex.ofReal_re] at h |
| 520 | exact h |
| 521 | |
| 522 | theorem conjugatePair_class {s : StripData D} {w : ℕ → D → ℝ} {α : ℝ} |
| 523 | {a : ℕ → D → ℂ} (ha : MemClass s w α a) (j : ℤ) : |
| 524 | MemClass s w α (fun n x => ErrorHarmonics.conjugatePair 1 (a n) j x) := by |
| 525 | have hp := LinearWaveBounds.constant_complex_mul ha (1 / 2) |
| 526 | have hn := hp.map (Complex.conjCLE : ℂ →L[ℝ] ℂ) |
| 527 | by_cases hj : j = 1 |
| 528 | · subst j |
| 529 | simpa [conjugatePair_apply, div_eq_mul_inv, |
| 530 | mul_comm] using hp |
| 531 | by_cases hjn : -j = 1 |
| 532 | · simpa [conjugatePair_apply, hj, hjn, div_eq_mul_inv, mul_comm] using hn |
| 533 | · simpa [conjugatePair_apply, hj, hjn] using |
| 534 | (MemClass.zero (E := ℂ) (α := α) ha.weight_nonneg) |
| 535 | |
| 536 | theorem coefficientBlock_classes {s : StripData D} {P : ℕ → D → ℝ} {α γ : ℝ} |
| 537 | (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 538 | {v : ℕ → D → ComplexVector} {p : ℕ → D → ℂ} |
| 539 | (hv : WaveClass s P α v) (hp : WaveClass s P γ p) : |
| 540 | (coefficientBlock k Φ kp v p).WaveBounds s P α ∧ |
| 541 | (coefficientBlock k Φ kp v p).PressureBounds s P γ := by |
| 542 | exact ⟨fun i j _ => conjugatePair_class (CurlClassBounds.class_component hv i) j, |
| 543 | fun j _ => conjugatePair_class hp j⟩ |
| 544 | |
| 545 | /-- The full cylindrical construction is evaluated at angle zero to obtain |
| 546 | the coefficient algebra. Its physical angle is reintroduced by the unchanged |
| 547 | integer carrier, as proved in `blockOfCoefficients_represents`. -/ |
| 548 | noncomputable def blockOfCoefficients (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 549 | (kp : ℕ → ℤ) : CorrectionState.HarmonicBlock D := |
| 550 | coefficientBlock a.frequency (fun n x => a.phase n (x,0)) kp |
| 551 | (fun n x => a.amplitude n (x,0)) (fun n x => a.pressure n (x,0)) |
| 552 | |
| 553 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 554 | theorem blockOfCoefficients_represents |
| 555 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (kp : ℕ → ℤ) |
| 556 | (ha : ErrorHarmonics.AngleIndependent a.amplitude) |
| 557 | (hp : ErrorHarmonics.AngleIndependent a.pressure) |
| 558 | (hphase : ∀ n x θ, a.frequency n * a.phase n (x,θ) = |
| 559 | a.frequency n * a.phase n (x,0) + (kp n : ℝ) * θ) : |
| 560 | (blockOfCoefficients a kp).oscillation = |
| 561 | (fun n x i => (vectorMode (a.frequency n) (a.phase n) (a.amplitude n) x i).re) ∧ |
| 562 | (blockOfCoefficients a kp).oscillatoryPressure = |
| 563 | (fun n x => (mode (a.frequency n) (a.phase n) (a.pressure n) x).re) := by |
| 564 | constructor |
| 565 | · funext n x i |
| 566 | rw [blockOfCoefficients, coefficientBlock_velocity] |
| 567 | have hc := HarmonicFields.character_eq_carrier 1 (a.frequency n) (a.phase n) x |
| 568 | simp only [Int.cast_one, mul_one] at hc |
| 569 | rw [← hphase, hc] |
| 570 | simp only [vectorMode, mode, ha n x.1 x.2] |
| 571 | · funext n x |
| 572 | rw [blockOfCoefficients, coefficientBlock_pressure] |
| 573 | have hc := HarmonicFields.character_eq_carrier 1 (a.frequency n) (a.phase n) x |
| 574 | simp only [Int.cast_one, mul_one] at hc |
| 575 | rw [← hphase, hc] |
| 576 | simp only [mode, hp n x.1 x.2] |
| 577 | |
| 578 | /-! ## The bar operation preserves the actual flat mean class -/ |
| 579 | |
| 580 | theorem meanClass_radialAverage |
| 581 | {a b cL cR : ℝ} (ha : 0 < a) (hcL : 0 < cL) (hcR : 0 < cR) |
| 582 | (ε S : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) |
| 583 | (hS : ∀ n, 1 ≤ S n) {α : ℝ} {f : ℕ → ℝ × E → ℝ} |
| 584 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 585 | (hglobal : MeanMomentBounds.GlobalBandJets ε S α f) |
| 586 | (hclass : MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 587 | ε S hε hεone hS) α f) |
| 588 | (L : (ℝ × E) →L[ℝ] (ℝ × E)) (hL : ‖L‖ ≤ 1) (v : ℝ × E) |
| 589 | (hpreserve : ∀ x (t : ℝ), (L x + t • v).1 = x.1) : |
| 590 | MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 591 | ε S hε hεone hS) α (fun n => MeanMomentBounds.affineAverage L v 0 1 (f n)) := by |
| 592 | let s : StripData (ℝ × E) := |
| 593 | WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR ε S hε hεone hS |
| 594 | refine ⟨hclass.weight_nonneg, |
| 595 | fun n => (MeanMomentBounds.affineAverage_contDiff L v 0 1 (hf n)).contDiffOn, ?_⟩ |
| 596 | intro m |
| 597 | obtain ⟨C, hC, p, hb⟩ := hclass.bounds m |
| 598 | refine ⟨C, hC, p, ?_⟩ |
| 599 | intro n x hx j hj |
| 600 | have hall : ∀ k : ℕ, ∃ A : ℝ, ∀ y, ‖iteratedFDeriv ℝ k (f n) y‖ ≤ A := by |
| 601 | intro k |
| 602 | obtain ⟨A, _, q, hA⟩ := hglobal k |
| 603 | exact ⟨A * ε n ^ α * S n ^ q, fun y => hA n y k le_rfl⟩ |
| 604 | have hh := MeanMomentBounds.affineAverage_jet_bound L hL v zero_le_one (hf n) hall j x |
| 605 | (majorant s (fun _ y => s.zeta y) α C p n x) (fun t _ => by |
| 606 | have hx' : L x + t • v ∈ s.domain := by |
| 607 | change (L x + t • v).1 ∈ Ioo a b |
| 608 | rw [hpreserve] |
| 609 | exact hx |
| 610 | have hh := hb n (L x + t • v) hx' j hj |
| 611 | simpa only [s, majorant, StripData.growth, WeightedRadialPrimitive.logStripData, |
| 612 | hpreserve] using hh) |
| 613 | simpa only [sub_zero, mul_one] using hh |
| 614 | |
| 615 | theorem meanClass_liftedTorusAverage |
| 616 | {a b cL cR : ℝ} (ha : 0 < a) (hcL : 0 < cL) (hcR : 0 < cR) |
| 617 | (ε S : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) |
| 618 | (hS : ∀ n, 1 ≤ S n) {α : ℝ} {f : ℕ → PressureStream.Lift E → ℝ} |
| 619 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 620 | (hs : ∀ n, RadialAlias.RadiallySupported a b (f n)) |
| 621 | (hclass : MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 622 | ε S hε hεone hS) α f) : |
| 623 | MeanClass (WeightedRadialPrimitive.logStripData a b cL cR ha hcL hcR |
| 624 | ε S hε hεone hS) α (fun n => MeanMomentBounds.liftedTorusAverage (f n)) := by |
| 625 | have hg := MeanMomentBounds.meanClass_globalBandJets ha hcL hcR ε S hε hεone hS hf hs hclass |
| 626 | have hi := meanClass_radialAverage ha hcL hcR ε S hε hεone hS hf hg hclass |
| 627 | MeanMomentBounds.eraseAuxX MeanMomentBounds.norm_eraseAuxX_le MeanMomentBounds.auxX |
| 628 | (fun x t => by simp only [MeanMomentBounds.eraseAuxX_add_smul]) |
| 629 | have hgi := hg.affineAverage hf MeanMomentBounds.eraseAuxX MeanMomentBounds.norm_eraseAuxX_le |
| 630 | MeanMomentBounds.auxX zero_le_one |
| 631 | have ho := meanClass_radialAverage ha hcL hcR ε S hε hεone hS |
| 632 | (fun n => MeanMomentBounds.affineAverage_contDiff _ _ _ _ (hf n)) hgi hi |
| 633 | MeanMomentBounds.eraseAuxY MeanMomentBounds.norm_eraseAuxY_le MeanMomentBounds.auxY |
| 634 | (fun x t => by simp only [MeanMomentBounds.eraseAuxY_add_smul]) |
| 635 | simpa only [MeanMomentBounds.liftedTorusAverage_eq_affine] using ho |
| 636 | |
| 637 | theorem sigma_liftedTorusAverage (p : SignedStressPrimitive.Patch) (e : ℕ) |
| 638 | (f : PressureStream.Lift E → ℝ) (x : PressureStream.Lift E) : |
| 639 | SignedStressPrimitive.sigma p e (MeanMomentBounds.liftedTorusAverage f) x = |
| 640 | SignedStressPrimitive.barSigma p e f (x.1, x.2.1) := by |
| 641 | rcases x with ⟨r,z,Y⟩ |
| 642 | simp only [SignedStressPrimitive.sigma, SignedStressPrimitive.barSigma, |
| 643 | SignedStressPrimitive.primitive, TransportPrimitive.compactIntegral, |
| 644 | TransportPrimitive.pastIntegral, TransportPrimitive.totalIntegral, |
| 645 | SignedStressPrimitive.weightedSource, MeanMomentBounds.liftedTorusAverage, |
| 646 | TransportPrimitive.shift, zero_mul, zero_smul, Prod.mk_add_mk, add_zero] |
| 647 | |
| 648 | theorem meanClass_barSigma |
| 649 | (p : SignedStressPrimitive.Patch) (e : ℕ) {cL cR : ℝ} (hcL : 0 < cL) (hcR : 0 < cR) |
| 650 | (ε S : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) |
| 651 | (hS : ∀ n, 1 ≤ S n) {α : ℝ} {f : ℕ → PressureStream.Lift E → ℝ} |
| 652 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 653 | (hs : ∀ n, RadialAlias.RadiallySupported p.a p.b (f n)) |
| 654 | (hclass : MeanClass (WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR |
| 655 | ε S hε hεone hS) α f) : |
| 656 | MeanClass (WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR |
| 657 | ε S hε hεone hS) α |
| 658 | (fun n (x : PressureStream.Lift E) => SignedStressPrimitive.barSigma p e (f n) (x.1,x.2.1)) := by |
| 659 | have hb := meanClass_liftedTorusAverage p.a_pos hcL hcR ε S hε hεone hS hf hs hclass |
| 660 | have hh := SignedStressPrimitive.meanClass_sigma p e hcL hcR ε S hε hεone hS α |
| 661 | (fun n => MeanMomentBounds.liftedTorusAverage (f n)) |
| 662 | (fun n => MeanMomentBounds.liftedTorusAverage_contDiff (hf n)) |
| 663 | (fun n => MeanMomentBounds.liftedTorusAverage_supported (hs n)) hb |
| 664 | change MeanClass _ α (fun n x => |
| 665 | SignedStressPrimitive.sigma p e (MeanMomentBounds.liftedTorusAverage (f n)) x) at hh |
| 666 | simp only [sigma_liftedTorusAverage] at hh |
| 667 | exact hh |
| 668 | |
| 669 | noncomputable def normalizedRequest (s : StripData (PressureStream.Lift E)) |
| 670 | (p : SignedStressPrimitive.Patch) (c : CorrectionState.Context (PressureStream.Lift E)) |
| 671 | (u : CorrectionState.State (PressureStream.Lift E)) : ℕ → PressureStream.Lift E → Vec2 := |
| 672 | fun n x => (s.epsilon n)⁻¹ • requestedStress p c u n (x.1,x.2.1) |
| 673 | |
| 674 | theorem normalizedRequest_frozen (s : StripData (PressureStream.Lift E)) |
| 675 | (p : SignedStressPrimitive.Patch) (c : CorrectionState.Context (PressureStream.Lift E)) |
| 676 | (u : CorrectionState.State (PressureStream.Lift E)) (v : PressureStream.Plane) : |
| 677 | FrozenAlong (0,(0,v)) (normalizedRequest s p c u) := by |
| 678 | rintro n ⟨r,z,Y⟩ t |
| 679 | simp only [normalizedRequest, Prod.smul_mk, smul_zero, Prod.mk_add_mk, add_zero] |
| 680 | |
| 681 | theorem normalizedRequest_class |
| 682 | (p : SignedStressPrimitive.Patch) {cL cR : ℝ} (hcL : 0 < cL) (hcR : 0 < cR) |
| 683 | (ε S : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hS : ∀ n, 1 ≤ S n) |
| 684 | (c : CorrectionState.Context (PressureStream.Lift E)) (u : CorrectionState.State (PressureStream.Lift E)) |
| 685 | {α : ℝ} (ht : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 686 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 687 | (hst : ∀ n, RadialAlias.RadiallySupported p.a p.b (u.thetaResidual c n)) |
| 688 | (hsz : ∀ n, RadialAlias.RadiallySupported p.a p.b (u.axialResidual c n)) |
| 689 | (hct : MeanClass (WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR |
| 690 | ε S hε hεone hS) α (u.thetaResidual c)) |
| 691 | (hcz : MeanClass (WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR |
| 692 | ε S hε hεone hS) α (u.axialResidual c)) (i : Fin 2) : |
| 693 | MeanClass (WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR |
| 694 | ε S hε hεone hS) (α - 1) |
| 695 | (fun n x => normalizedRequest |
| 696 | (WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR ε S hε hεone hS) |
| 697 | p c u n x i) := by |
| 698 | let s : StripData (PressureStream.Lift E) := |
| 699 | WeightedRadialPrimitive.logStripData p.a p.b cL cR p.a_pos hcL hcR ε S hε hεone hS |
| 700 | have hbar : MeanClass s α (fun n (x : PressureStream.Lift E) => requestedStress p c u n (x.1,x.2.1) i) := by |
| 701 | fin_cases i |
| 702 | · exact meanClass_barSigma p 2 hcL hcR ε S hε hεone hS ht hst hct |
| 703 | · exact meanClass_barSigma p 1 hcL hcR ε S hε hεone hS hz hsz hcz |
| 704 | have hh := hbar.band_smul (bandBound_rpow s (-1)) |
| 705 | simpa only [normalizedRequest, Pi.smul_apply, smul_eq_mul, Real.rpow_neg_one, sub_eq_add_neg] using hh |
| 706 | |
| 707 | /-! ## Angular independence is proved before taking a zero-angle section -/ |
| 708 | |
| 709 | structure AngularInputs (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 710 | (a : LinearWaveBounds.WaveCoefficients D) (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) |
| 711 | (mask : ℕ → D → ℝ) (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 712 | (ψ : ℕ → D → ℝ) (m : ℕ → ℝ) : Prop where |
| 713 | radius : FrozenAlong d.angular a.radius |
| 714 | radial_base : FrozenAlong d.angular a.radialBase |
| 715 | frequency_base : FrozenAlong d.angular a.frequencyBase |
| 716 | axial_base : FrozenAlong d.angular a.axialBase |
| 717 | radial_profile : CopyAngularInvariance.Invariant d.angular d.radialProfile |
| 718 | phase : ∀ n, CopyAngularInvariance.AffinePhase d.angular (m n) (a.phase n) |
| 719 | phase_smooth : ∀ n, ContDiffOn ℝ ∞ (a.phase n) s.domain |
| 720 | matrix : FrozenAlong d.angular H |
| 721 | primary_target : FrozenAlong d.angular T |
| 722 | signed_target : FrozenAlong d.angular R |
| 723 | mask : FrozenAlong d.angular mask |
| 724 | fundamental : FrozenAlong d.angular v |
| 725 | normal_motion : FrozenAlong d.angular Ndot |
| 726 | action : FrozenAlong d.angular A |
| 727 | cutoff : FrozenAlong d.angular ψ |
| 728 | |
| 729 | namespace AngularInputs |
| 730 | |
| 731 | variable {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 732 | {a : LinearWaveBounds.WaveCoefficients D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 733 | {mask : ℕ → D → ℝ} {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 734 | {ψ : ℕ → D → ℝ} {m : ℕ → ℝ} |
| 735 | |
| 736 | theorem radialField (h : AngularInputs s d a H T R mask v Ndot A ψ m) (n : ℕ) : |
| 737 | CopyAngularInvariance.Invariant d.angular (d.radialField n) := by |
| 738 | intro x t |
| 739 | simp only [LinearWaveBounds.GraphDirections.radialField, h.radial_profile x t] |
| 740 | |
| 741 | theorem normal (h : AngularInputs s d a H T R mask v Ndot A ψ m) (n : ℕ) : |
| 742 | CopyAngularInvariance.Invariant d.angular (a.normal s d n) := |
| 743 | CopyAngularInvariance.phaseNormal_invariant (h.radius n) (h.radialField n) |
| 744 | (CopyAngularInvariance.Invariant.const _) (CopyAngularInvariance.Invariant.const _) (h.phase n) |
| 745 | |
| 746 | theorem amplitude (h : AngularInputs s d a H T R mask v Ndot A ψ m) (j : Fin 2) (n : ℕ) : |
| 747 | CopyAngularInvariance.Invariant d.angular ((coefficients a s d H T R mask v Ndot A j).amplitude n) := by |
| 748 | intro x t |
| 749 | simp only [coefficients, homogeneousCoefficients, signedVector, signedScalar, |
| 750 | h.matrix n x t, h.primary_target n x t, h.signed_target n x t, |
| 751 | h.mask n x t, h.fundamental n x t] |
| 752 | |
| 753 | theorem pressure (h : AngularInputs s d a H T R mask v Ndot A ψ m) (j : Fin 2) (n : ℕ) : |
| 754 | CopyAngularInvariance.Invariant d.angular ((coefficients a s d H T R mask v Ndot A j).pressure n) := by |
| 755 | intro x t |
| 756 | simp only [coefficients, homogeneousCoefficients, ParticularWaveBounds.projectedPressure, |
| 757 | signedVector, signedScalar, h.matrix n x t, h.primary_target n x t, |
| 758 | h.signed_target n x t, h.mask n x t, h.fundamental n x t, h.action n x t, |
| 759 | h.normal_motion n x t, h.normal n x t] |
| 760 | |
| 761 | theorem corrected_amplitude (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 762 | (j : Fin 2) (n : ℕ) : |
| 763 | CopyAngularInvariance.Invariant d.angular |
| 764 | (((coefficients a s d H T R mask v Ndot A j).corrected s d ψ).amplitude n) := by |
| 765 | exact CopyAngularInvariance.corrected_amplitude_invariant |
| 766 | (a := coefficients a s d H T R mask v Ndot A j) (s := s) (d := d) ψ h.radius h.radialField |
| 767 | (fun _ => CopyAngularInvariance.Invariant.const _) (fun n => ⟨m n, h.phase n⟩) |
| 768 | (h.amplitude j) h.cutoff n |
| 769 | |
| 770 | theorem corrected_pressure (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 771 | (j : Fin 2) (n : ℕ) : |
| 772 | CopyAngularInvariance.Invariant d.angular |
| 773 | (((coefficients a s d H T R mask v Ndot A j).corrected s d ψ).pressure n) := |
| 774 | CopyAngularInvariance.corrected_pressure_invariant |
| 775 | (a := coefficients a s d H T R mask v Ndot A j) (s := s) (d := d) ψ (h.pressure j) h.cutoff n |
| 776 | |
| 777 | theorem exactConditions (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 778 | (hRne : ∀ n x, x ∈ s.domain → a.radius n x ≠ 0) |
| 779 | (hDrR : ∀ n x, x ∈ s.domain → along (d.radialField n) (a.radius n) x = 1) |
| 780 | (j : Fin 2) : LinearWaveBounds.ExactConditions s d |
| 781 | ((coefficients a s d H T R mask v Ndot A j).corrected s d ψ) := by |
| 782 | exact CopyAngularInvariance.exactConditions_corrected_of_invariants |
| 783 | (a := coefficients a s d H T R mask v Ndot A j) (s := s) (d := d) ψ h.phase_smooth hRne hDrR |
| 784 | h.radius h.radial_base h.frequency_base h.axial_base h.radialField |
| 785 | (fun _ => CopyAngularInvariance.Invariant.const _) (fun n => ⟨m n, h.phase n⟩) |
| 786 | (h.amplitude j) (h.pressure j) h.cutoff |
| 787 | |
| 788 | end AngularInputs |
| 789 | |
| 790 | theorem signedBlock_represents |
| 791 | {s : StripData (D × ℝ)} {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 792 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} |
| 793 | {H : ℕ → D × ℝ → Mat2} {T R : ℕ → D × ℝ → Vec2} {mask : ℕ → D × ℝ → ℝ} |
| 794 | {v Ndot : ℕ → D × ℝ → Space} {A : ℕ → D × ℝ → Space →L[ℝ] Space} |
| 795 | {ψ : ℕ → D × ℝ → ℝ} {m : ℕ → ℝ} |
| 796 | (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 797 | (hθ : d.angular = (0,1)) (kp : ℕ → ℤ) (hkp : ∀ n, a.frequency n * m n = (kp n : ℝ)) |
| 798 | (j : Fin 2) : |
| 799 | let z := (coefficients a s d H T R mask v Ndot A j).corrected s d ψ |
| 800 | (blockOfCoefficients z kp).oscillation = |
| 801 | (fun n x i => (vectorMode (a.frequency n) (a.phase n) (z.amplitude n) x i).re) ∧ |
| 802 | (blockOfCoefficients z kp).oscillatoryPressure = |
| 803 | (fun n x => (mode (a.frequency n) (a.phase n) (z.pressure n) x).re) := by |
| 804 | apply blockOfCoefficients_represents |
| 805 | · intro n x t |
| 806 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 807 | simpa only [hθ] using h.corrected_amplitude j n |
| 808 | · intro n x t |
| 809 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 810 | simpa only [hθ] using h.corrected_pressure j n |
| 811 | · intro n x t |
| 812 | change a.frequency n * a.phase n (x,t) = a.frequency n * a.phase n (x,0) + _ |
| 813 | have hp := CopyAngularInvariance.affinePhase_eq_zeroSlice (by simpa only [hθ] using h.phase n) x t |
| 814 | rw [hp, mul_add, ← mul_assoc, hkp] |
| 815 | |
| 816 | /-! ## Restriction of actual coefficient jets to the angular section -/ |
| 817 | |
| 818 | noncomputable def zeroSection : D →L[ℝ] (D × ℝ) := (ContinuousLinearMap.id ℝ D).prod 0 |
| 819 | |
| 820 | theorem zeroSection_norm_le : ‖zeroSection (D := D)‖ ≤ 1 := by |
| 821 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 822 | intro x |
| 823 | simp [zeroSection, Prod.norm_def] |
| 824 | |
| 825 | noncomputable def sectionStrip (s : StripData (D × ℝ)) : StripData D where |
| 826 | domain := (zeroSection (D := D)) ⁻¹' s.domain |
| 827 | isOpen_domain := s.isOpen_domain.preimage (zeroSection (D := D)).continuous |
| 828 | epsilon := s.epsilon |
| 829 | epsilon_pos := s.epsilon_pos |
| 830 | epsilon_le_one := s.epsilon_le_one |
| 831 | slow := s.slow |
| 832 | one_le_slow := s.one_le_slow |
| 833 | delta := fun x => s.delta (zeroSection x) |
| 834 | delta_pos := fun _ hx => s.delta_pos _ hx |
| 835 | zeta := fun x => s.zeta (zeroSection x) |
| 836 | zeta_smooth := s.zeta_smooth.comp (zeroSection (D := D)).contDiff.contDiffOn (fun _ hx => hx) |
| 837 | zeta_nonneg := fun _ hx => s.zeta_nonneg _ hx |
| 838 | |
| 839 | theorem class_zeroSection {s : StripData (D × ℝ)} {w : ℕ → D × ℝ → ℝ} {α : ℝ} |
| 840 | {f : ℕ → D × ℝ → E} (hf : MemClass s w α f) : |
| 841 | MemClass (sectionStrip s) (fun n x => w n (x,0)) α (fun n x => f n (x,0)) := by |
| 842 | refine ⟨fun n x hx => hf.weight_nonneg n _ hx, |
| 843 | fun n => (hf.smooth n).comp (zeroSection (D := D)).contDiff.contDiffOn (fun _ hx => hx), ?_⟩ |
| 844 | intro m |
| 845 | obtain ⟨C, hC, p, hb⟩ := hf.bounds m |
| 846 | refine ⟨C, hC, p, ?_⟩ |
| 847 | intro n x hx j hj |
| 848 | have hc := PhaseJetBounds.norm_jet_comp_linear s.isOpen_domain (hf.smooth n) |
| 849 | (zeroSection (D := D)) hx j |
| 850 | have hpow : ‖zeroSection (D := D)‖ ^ j ≤ 1 := |
| 851 | pow_le_one₀ (norm_nonneg _) zeroSection_norm_le |
| 852 | have hh := hc.trans (mul_le_of_le_one_right (norm_nonneg _) hpow) |
| 853 | exact hh.trans (hb n (x,0) hx j hj) |
| 854 | |
| 855 | theorem blockOfCoefficients_classes |
| 856 | {s : StripData (D × ℝ)} {P : ℕ → D × ℝ → ℝ} {α γ : ℝ} |
| 857 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (kp : ℕ → ℤ) |
| 858 | (ha : WaveClass s P α a.amplitude) (hp : WaveClass s P γ a.pressure) : |
| 859 | (blockOfCoefficients a kp).WaveBounds (sectionStrip s) (fun n x => P n (x,0)) α ∧ |
| 860 | (blockOfCoefficients a kp).PressureBounds (sectionStrip s) (fun n x => P n (x,0)) γ := |
| 861 | coefficientBlock_classes a.frequency (fun n x => a.phase n (x,0)) kp |
| 862 | (class_zeroSection ha) (class_zeroSection hp) |
| 863 | |
| 864 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 865 | theorem angularAverage_re_field (c : HarmonicFields.Coefficients D) (k : ℝ) |
| 866 | (Φ : D → ℝ) (kp : ℤ) (x : D) : |
| 867 | (∫ θ in (0 : ℝ)..2 * Real.pi, (HarmonicFields.field c k Φ kp (x,θ)).re) / (2 * Real.pi) = |
| 868 | (HarmonicFields.angularMean (fun θ => HarmonicFields.field c k Φ kp (x,θ))).re := by |
| 869 | have hi := Complex.reCLM.intervalIntegral_comp_comm (μ := volume) |
| 870 | ((HarmonicFields.field_angular_continuous c k Φ kp x).intervalIntegrable (0 : ℝ) (2 * Real.pi)) |
| 871 | change (∫ θ in (0 : ℝ)..2 * Real.pi, (HarmonicFields.field c k Φ kp (x,θ)).re) = |
| 872 | (∫ θ in (0 : ℝ)..2 * Real.pi, HarmonicFields.field c k Φ kp (x,θ)).re at hi |
| 873 | rw [hi] |
| 874 | simp [HarmonicFields.angularMean, HarmonicFields.period, Complex.mul_re, div_eq_mul_inv, |
| 875 | ← Complex.ofReal_inv, mul_comm] |
| 876 | |
| 877 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 878 | /-- These are actual angular integrals of the real velocity and pressure. -/ |
| 879 | theorem coefficientBlock_mean_zero (k : ℕ → ℝ) (Φ : ℕ → D → ℝ) (kp : ℕ → ℤ) |
| 880 | (v : ℕ → D → ComplexVector) (p : ℕ → D → ℂ) (hkp : ∀ n, kp n ≠ 0) : |
| 881 | (∀ i, CorrectionState.angularAverage (fun n x => (coefficientBlock k Φ kp v p).oscillation n x i) = 0) ∧ |
| 882 | CorrectionState.angularAverage (coefficientBlock k Φ kp v p).oscillatoryPressure = 0 := by |
| 883 | constructor |
| 884 | · intro i |
| 885 | funext n x |
| 886 | change (∫ θ in (0 : ℝ)..2 * Real.pi, |
| 887 | (HarmonicFields.field ((coefficientBlock k Φ kp v p).velocity n i) (k n) (Φ n) (kp n) (x,θ)).re) / |
| 888 | (2 * Real.pi) = 0 |
| 889 | rw [angularAverage_re_field, HarmonicFields.angularMean_field _ _ _ (hkp n), |
| 890 | (coefficientBlock_zero_coefficient k Φ kp v p).1 n i] |
| 891 | rfl |
| 892 | · funext n x |
| 893 | change (∫ θ in (0 : ℝ)..2 * Real.pi, |
| 894 | (HarmonicFields.field ((coefficientBlock k Φ kp v p).pressure n) (k n) (Φ n) (kp n) (x,θ)).re) / |
| 895 | (2 * Real.pi) = 0 |
| 896 | rw [angularAverage_re_field, HarmonicFields.angularMean_field _ _ _ (hkp n), |
| 897 | (coefficientBlock_zero_coefficient k Φ kp v p).2 n] |
| 898 | rfl |
| 899 | |
| 900 | /-! ## Actual homogeneous ODE under the native clock -/ |
| 901 | |
| 902 | theorem normalizedPulse_along |
| 903 | {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 904 | (f : PrimaryODE.FrameData Q) (lam u : ℝ) {L : ℝ} (hL : 0 < L) |
| 905 | (U : Set Q) (hA : ContinuousOn (f.coefficient 1) (U ×ˢ Icc 0 L)) |
| 906 | (χ : D → Q × ℝ) (V : D → D) {x : D} |
| 907 | (hp : (χ x).1 ∈ U) (ht : (χ x).2 ∈ Ioo (0 : ℝ) 1) |
| 908 | (hk : f.Kinematics (χ x).1 (Icc 0 L)) |
| 909 | (hv : DifferentiableAt ℝ (fun y => PrimaryPulseBounds.normalizedPulse f lam u L (χ y)) x) |
| 910 | (hclock : ∀ t : ℝ, χ (x + t • V x) = ((χ x).1, (χ x).2 + t / L)) : |
| 911 | along V (fun y => PrimaryPulseBounds.normalizedPulse f lam u L (χ y)) x = |
| 912 | TangentProjection.projectedRhs (f.normal ((χ x).1,L*(χ x).2)) |
| 913 | (f.normalMotion ((χ x).1,L*(χ x).2)) (PrimaryPulseBounds.normalizedPulse f lam u L (χ x)) |
| 914 | (MovingFrameODE.baseAction (f.F ((χ x).1,L*(χ x).2)) (f.shear ((χ x).1,L*(χ x).2)) |
| 915 | (PrimaryPulseBounds.normalizedPulse f lam u L (χ x))) 0 (f.viscosity ((χ x).1,L*(χ x).2)) := by |
| 916 | have hd := PrimaryPulseBounds.normalizedPulse_hasDerivAt f lam u hL U hA hp hk ht |
| 917 | have ht' : HasDerivAt (fun t : ℝ => (χ x).2 + t / L) (1 / L) 0 := by |
| 918 | simpa using (((hasDerivAt_id (0 : ℝ)).div_const L).const_add (χ x).2) |
| 919 | have hd' : HasDerivAt (fun t : ℝ => PrimaryPulseBounds.normalizedPulse f lam u L |
| 920 | ((χ x).1, (χ x).2 + t / L)) ((1 / L) • (L • |
| 921 | TangentProjection.projectedRhs (f.normal ((χ x).1,L*(χ x).2)) |
| 922 | (f.normalMotion ((χ x).1,L*(χ x).2)) (PrimaryPulseBounds.normalizedPulse f lam u L (χ x)) |
| 923 | (MovingFrameODE.baseAction (f.F ((χ x).1,L*(χ x).2)) (f.shear ((χ x).1,L*(χ x).2)) |
| 924 | (PrimaryPulseBounds.normalizedPulse f lam u L (χ x))) 0 (f.viscosity ((χ x).1,L*(χ x).2)))) 0 := by |
| 925 | simpa only [Prod.mk.eta, Function.comp_def] using hd.scomp_of_eq (0 : ℝ) ht' (by simp) |
| 926 | have hl : HasDerivAt (fun t : ℝ => x + t • V x) (V x) 0 := by |
| 927 | simpa using ((hasDerivAt_id (0 : ℝ)).smul_const (V x)).const_add x |
| 928 | have hv' : HasDerivAt (fun t : ℝ => PrimaryPulseBounds.normalizedPulse f lam u L (χ (x+t•V x))) |
| 929 | (along V (fun y => PrimaryPulseBounds.normalizedPulse f lam u L (χ y)) x) 0 := by |
| 930 | simpa only [along, Function.comp_def] using hv.hasFDerivAt.comp_hasDerivAt_of_eq (0 : ℝ) hl (by simp) |
| 931 | simp only [hclock] at hv' |
| 932 | have he := hv'.unique hd' |
| 933 | simpa only [smul_smul, one_div, inv_mul_cancel₀ hL.ne', one_smul, Prod.mk.eta] using he |
| 934 | |
| 935 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 936 | theorem phaseFundamental_tangent {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 937 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) |
| 938 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (j : Fin 2) (n : ℕ) (x : D) : |
| 939 | ⟪((F j).frame n).normal ((χ n x).1, (F j).L n * (χ n x).2), phaseFundamental F χ j n x⟫_ℝ = 0 := by |
| 940 | exact ((F j).frame n).ambient_tangent _ _ |
| 941 | |
| 942 | theorem phase_coefficients_principal_zero |
| 943 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 944 | (a : LinearWaveBounds.WaveCoefficients D) |
| 945 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 946 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 947 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) {T R : ℕ → D → Vec2} {mask : ℕ → D → ℝ} |
| 948 | {Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 949 | (hscale : ∀ n, U.scale n = s.slow n) |
| 950 | (hχ : PhaseJetBounds.PolynomialJets (PrimaryPulseBounds.phaseDomain s) χ) |
| 951 | (hmap : ∀ n x, x ∈ s.domain → χ n x ∈ U.carrier n ×ˢ Ioo (0 : ℝ) 1) |
| 952 | (hcov : CovarianceControl s (phaseMatrix F pref χ) T) {β : ℝ} |
| 953 | (hR : ∀ i, MeanClass s β (fun n x => R n x i)) (hm : UnweightedClass s 0 mask) |
| 954 | (hHf : FrozenAlong d.fast (phaseMatrix F pref χ)) (hTf : FrozenAlong d.fast T) |
| 955 | (hRf : FrozenAlong d.fast R) (hmf : FrozenAlong d.fast mask) |
| 956 | (hK : ∀ n, a.frequency n ≠ 0) (j : Fin 2) |
| 957 | (hcoef : ∀ n, ContinuousOn (((F j).frame n).coefficient 1) (U.carrier n ×ˢ Icc 0 ((F j).L n))) |
| 958 | (hkin : ∀ n x, x ∈ s.domain → ((F j).frame n).Kinematics (χ n x).1 (Icc 0 ((F j).L n))) |
| 959 | (hclock : ∀ n x, x ∈ s.domain → ∀ t : ℝ, |
| 960 | χ n (x + t • d.fastField n x) = ((χ n x).1, (χ n x).2 + t / (F j).L n)) |
| 961 | (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) |
| 962 | (hmotion : ∀ n x, x ∈ s.domain → ((F j).frame n).normalMotion ((χ n x).1,(F j).L n*(χ n x).2) = Ndot n x) |
| 963 | (haction : ∀ n x, x ∈ s.domain → ∀ z : Space, |
| 964 | MovingFrameODE.baseAction (((F j).frame n).F ((χ n x).1,(F j).L n*(χ n x).2)) |
| 965 | (((F j).frame n).shear ((χ n x).1,(F j).L n*(χ n x).2)) z = A n x z) |
| 966 | (hdamp : ∀ n x, x ∈ s.domain → ((F j).frame n).viscosity ((χ n x).1,(F j).L n*(χ n x).2) = |
| 967 | s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2) |
| 968 | (hphysical : ∀ n x, x ∈ s.domain → CurlClassBounds.complexify (A n x (phaseFundamental F χ j n x)) = |
| 969 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) (d.radialField n) |
| 970 | (fun y => CurlClassBounds.complexify (phaseFundamental F χ j n y)) x) : |
| 971 | ∀ n x, x ∈ s.domain → |
| 972 | (coefficients a s d (phaseMatrix F pref χ) T R mask (phaseFundamental F χ j) Ndot A j).principal s d n x = 0 := by |
| 973 | have hv := phaseFundamental_class F χ hscale hχ hmap j |
| 974 | apply coefficients_principal_zero a hcov hR hm hv hHf hTf hRf hmf hK _ hphysical j |
| 975 | intro n x hx |
| 976 | have hd := normalizedPulse_along ((F j).frame n) ((F j).lam n) ((F j).u n) ((F j).L_pos n) |
| 977 | (U.carrier n) (hcoef n) (χ n) (d.fastField n) (hmap n x hx).1 (hmap n x hx).2 (hkin n x hx) |
| 978 | (((hv.smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx)).differentiableAt (by simp)) (hclock n x hx) |
| 979 | simp only [phaseFundamental, hnormal n x hx, hmotion n x hx, haction n x hx, hdamp n x hx] at hd ⊢ |
| 980 | exact hd |
| 981 | |
| 982 | /-! ## The constructed curl, pressure, and retained linear error -/ |
| 983 | |
| 984 | noncomputable def exactCoefficients (a : LinearWaveBounds.WaveCoefficients D) |
| 985 | (s : StripData D) (d : LinearWaveBounds.GraphDirections D) |
| 986 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 987 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 988 | (ψ : ℕ → D → ℝ) (j : Fin 2) : LinearWaveBounds.WaveCoefficients D := |
| 989 | (coefficients a s d H T R mask v Ndot A j).corrected s d ψ |
| 990 | |
| 991 | theorem signed_bounds |
| 992 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 993 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ B κ : ℝ} |
| 994 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) (hκ : κ ≤ 1 / 2) |
| 995 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask ψ : ℕ → D → ℝ} |
| 996 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 997 | (hcov : CovarianceControl s H T) |
| 998 | (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) |
| 999 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 1000 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 1001 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 1002 | {b M : ℝ} (hb : 0 < b) |
| 1003 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 1004 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 1005 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 1006 | {radius : D → ℝ} (hradius : a.radius = fun _ => radius) |
| 1007 | (hψ : UnweightedClass s 0 ψ) (j : Fin 2) : |
| 1008 | let z := coefficients a s d H T R mask v Ndot A j |
| 1009 | WaveClass s P (B - κ) (z.corrected s d ψ).amplitude ∧ |
| 1010 | WaveClass s P (B + 1 / 2 - κ) (z.corrected s d ψ).pressure ∧ |
| 1011 | WaveClass s P (B + 1 / 2 - 2 * κ) |
| 1012 | (fun n x => (z.corrected s d ψ).amplitude n x - (z.withCutoff ψ).amplitude n x) ∧ |
| 1013 | WaveClass s P (B + 1 / 2 - 4 * κ) (z.constructedGood s d ψ) := by |
| 1014 | let z := coefficients a s d H T R mask v Ndot A j |
| 1015 | have hi : LinearWaveBounds.InputBounds s P (B - κ) κ d z := by |
| 1016 | convert! coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j using 1 |
| 1017 | ring |
| 1018 | have hc := (hi.with_cutoff hψ).curlCorrection_class hradius hN hb hlo hhi hK |
| 1019 | have he := (hi.with_cutoff hψ).add_curl_amplitude hκ |
| 1020 | (fun i => CurlClassBounds.class_component hc i) |
| 1021 | have hdiff : WaveClass s P ((B - κ) + 1 / 2 - κ) |
| 1022 | (fun n x => (z.corrected s d ψ).amplitude n x - (z.withCutoff ψ).amplitude n x) := by |
| 1023 | apply LinearWaveBounds.class_congr hc |
| 1024 | intro n x hx |
| 1025 | simp only [LinearWaveBounds.WaveCoefficients.corrected, |
| 1026 | LinearWaveBounds.WaveCoefficients.addAmplitude, add_sub_cancel_left] |
| 1027 | refine ⟨LinearWaveBounds.component_classes he.amplitude, ?_, ?_, ?_⟩ |
| 1028 | · convert! he.pressure using 1 |
| 1029 | ring |
| 1030 | · convert! hdiff using 1 |
| 1031 | ring |
| 1032 | · convert! hi.constructed_goodCoefficient_class hκ hψ hradius hN hb hlo hhi hK using 1 |
| 1033 | ring |
| 1034 | |
| 1035 | theorem normalDot_complexify (N v : Space) : |
| 1036 | normalDot N (CurlClassBounds.complexify v) = (⟪N,v⟫_ℝ : ℂ) := by |
| 1037 | simp [normalDot, PiLp.inner_apply, Fin.sum_univ_three, mul_comm] |
| 1038 | |
| 1039 | theorem coefficients_tangent {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 1040 | (a : LinearWaveBounds.WaveCoefficients D) |
| 1041 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask : ℕ → D → ℝ) |
| 1042 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 1043 | (ht : ∀ n x, x ∈ s.domain → ⟪a.normal s d n x, v n x⟫_ℝ = 0) (j : Fin 2) |
| 1044 | (n : ℕ) {x : D} (hx : x ∈ s.domain) : |
| 1045 | normalDot ((coefficients a s d H T R mask v Ndot A j).normal s d n x) |
| 1046 | ((coefficients a s d H T R mask v Ndot A j).amplitude n x) = 0 := by |
| 1047 | change normalDot (a.normal s d n x) (CurlClassBounds.complexify (signedScalar s H T R mask j n x • v n x)) = 0 |
| 1048 | rw [normalDot_complexify, inner_smul_right, ht n x hx, mul_zero] |
| 1049 | rfl |
| 1050 | |
| 1051 | theorem signed_curl_realization |
| 1052 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 1053 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ β κ : ℝ} |
| 1054 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) |
| 1055 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask ψ : ℕ → D → ℝ} |
| 1056 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 1057 | (hcov : CovarianceControl s H T) (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 1058 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 1059 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 1060 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 1061 | {b M : ℝ} (hb : 0 < b) |
| 1062 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 1063 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 1064 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 1065 | (hψ : UnweightedClass s 0 ψ) (j : Fin 2) (n : ℕ) |
| 1066 | (G : CurlClassBounds.CylindricalGeometry s.domain (a.radius n) (d.radialField n) |
| 1067 | (fun _ => d.angular) (d.axialField s n)) |
| 1068 | (hfreq : a.frequency n ≠ 0) (hphase : ContDiffOn ℝ ∞ (a.phase n) s.domain) |
| 1069 | (ht : ∀ n x, x ∈ s.domain → ⟪a.normal s d n x, v n x⟫_ℝ = 0) : |
| 1070 | let z := coefficients a s d H T R mask v Ndot A j |
| 1071 | ∀ x ∈ s.domain, |
| 1072 | CurlClassBounds.cylindricalCurl (a.radius n) (d.radialField n) (fun _ => d.angular) |
| 1073 | (d.axialField s n) ((z.withCutoff ψ).curlPotential s d n) x = |
| 1074 | vectorMode (a.frequency n) (a.phase n) ((z.corrected s d ψ).amplitude n) x ∧ |
| 1075 | cylindricalDivergence (a.radius n) (d.radialField n) (fun _ => d.angular) (d.axialField s n) |
| 1076 | (vectorMode (a.frequency n) (a.phase n) ((z.corrected s d ψ).amplitude n)) x = 0 := by |
| 1077 | dsimp only |
| 1078 | have hi := coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j |
| 1079 | have hn : ∀ x ∈ s.domain, a.normal s d n x ≠ 0 := by |
| 1080 | intro x hx hz |
| 1081 | have h := hlo n x hx |
| 1082 | rw [hz, norm_zero] at h |
| 1083 | exact (not_le_of_gt hb) h |
| 1084 | intro x hx |
| 1085 | exact ⟨LinearWaveBounds.corrected_realizes_curl hi hψ n G hfreq hphase hn |
| 1086 | (fun x hx => coefficients_tangent a H T R mask v Ndot A ht j n hx) hx, |
| 1087 | LinearWaveBounds.corrected_divergence hi hψ n G hfreq hphase hn |
| 1088 | (fun x hx => coefficients_tangent a H T R mask v Ndot A ht j n hx) hx⟩ |
| 1089 | |
| 1090 | /-- Exact residual identity for the signed increment. The slot derivative |
| 1091 | is kept as a separate nonzero field and is not included in the good bound. -/ |
| 1092 | theorem signed_linear_identity |
| 1093 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 1094 | {a : LinearWaveBounds.WaveCoefficients D} {P₀ P : ℕ → D → ℝ} {α₀ β κ : ℝ} |
| 1095 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) (hκ : κ ≤ 1 / 2) |
| 1096 | {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} {mask ψ : ℕ → D → ℝ} |
| 1097 | {v Ndot : ℕ → D → Space} {A : ℕ → D → Space →L[ℝ] Space} |
| 1098 | (hcov : CovarianceControl s H T) (hR : ∀ i, MeanClass s β (fun n x => R n x i)) |
| 1099 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 1100 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 1101 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 1102 | {b M : ℝ} (hb : 0 < b) |
| 1103 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 1104 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 1105 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 1106 | {radius : D → ℝ} (hradius : a.radius = fun _ => radius) |
| 1107 | (hψ : UnweightedClass s 0 ψ) {m : ℕ → ℝ} |
| 1108 | (hangle : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 1109 | (hG : ∀ n, CurlClassBounds.CylindricalGeometry s.domain (a.radius n) (d.radialField n) |
| 1110 | (fun _ => d.angular) (d.axialField s n)) |
| 1111 | (hHf : FrozenAlong d.fast H) (hTf : FrozenAlong d.fast T) |
| 1112 | (hRf : FrozenAlong d.fast R) (hmf : FrozenAlong d.fast mask) |
| 1113 | (hfreq : ∀ n, a.frequency n ≠ 0) |
| 1114 | (hode : ∀ n x, x ∈ s.domain → along (d.fastField n) (v n) x = |
| 1115 | TangentProjection.projectedRhs (a.normal s d n x) (Ndot n x) (v n x) |
| 1116 | (A n x (v n x)) 0 (s.epsilon n * a.frequency n ^ 2 * ‖a.normal s d n x‖ ^ 2)) |
| 1117 | (haction : ∀ n x, x ∈ s.domain → CurlClassBounds.complexify (A n x (v n x)) = |
| 1118 | LinearWaveResidual.shear (a.radius n) (a.frequencyBase n) (a.axialBase n) |
| 1119 | (d.radialField n) (fun y => CurlClassBounds.complexify (v n y)) x) (j : Fin 2) : |
| 1120 | let z := coefficients a s d H T R mask v Ndot A j |
| 1121 | ∀ n x, x ∈ s.domain → |
| 1122 | (z.corrected s d ψ).harmonicResidual s d n x = |
| 1123 | (fun i => (z.constructedGood s d ψ n x i + |
| 1124 | LinearWaveBounds.excludedSlotError d ψ z.amplitude 0 n x i) * |
| 1125 | carrier (a.frequency n) (a.phase n) x) := by |
| 1126 | have hi := coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j |
| 1127 | have hs := coefficients_principal_zero a hcov hR hm hv hHf hTf hRf hmf hfreq hode haction j |
| 1128 | have hs' : ∀ n x, x ∈ s.domain → |
| 1129 | (coefficients a s d H T R mask v Ndot A j).principal s d n x = |
| 1130 | -(0 : ℕ → D → ComplexVector) n x := by simpa using hs |
| 1131 | have hg := hangle.exactConditions (fun n => (hG n).radius_ne) (fun n => (hG n).radial_radius) j |
| 1132 | have hres := (LinearWaveBounds.constructed_linear_wave_with_excluded |
| 1133 | hi hκ hψ hradius hN hb hlo hhi hK hs' hg).2 |
| 1134 | dsimp only |
| 1135 | intro n x hx |
| 1136 | ext i |
| 1137 | have hv := congrFun (hres n x hx) i |
| 1138 | simpa only [Pi.add_apply, Pi.zero_apply, zero_mul, add_zero, coefficients, homogeneousCoefficients] using hv |
| 1139 | |
| 1140 | /-! ## The same native pulse blocks in the exact covariance identity -/ |
| 1141 | |
| 1142 | section NativeBlocks |
| 1143 | |
| 1144 | open PartitionedCovariance |
| 1145 | |
| 1146 | noncomputable def nativeUnit {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1147 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 1148 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (j : Fin 2) (Y : TorusInverse.Plane) : Space := |
| 1149 | !₂[covered (SlotColoring.nativeIndex h U.1) (P.rawRadial hdet j) Y, |
| 1150 | covered (SlotColoring.nativeIndex h U.1) (P.rawTangent hdet j 0) Y, |
| 1151 | covered (SlotColoring.nativeIndex h U.1) (P.rawTangent hdet j 1) Y] |
| 1152 | |
| 1153 | noncomputable def nativeTangentBlock {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1154 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 1155 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : Vec2) |
| 1156 | (q : ℝ) (x : SlotColoring.Position) (j : Fin 2) : |
| 1157 | CorrectionState.HarmonicBlock TorusInverse.Plane := |
| 1158 | coefficientBlock (fun _ => 1) (fun _ => P.phases j) (fun _ => P.modes j) |
| 1159 | (fun _ Y => CurlClassBounds.complexify |
| 1160 | ((outer * (Real.sqrt ε * a j * mask D U q x)) • nativeUnit P hdet j Y)) 0 |
| 1161 | |
| 1162 | theorem real_character_one (a t : ℝ) : |
| 1163 | ((a : ℂ) * HarmonicFields.character 1 t).re = a * Real.cos t := by |
| 1164 | simp [HarmonicFields.character, Complex.mul_re, Complex.exp_re] |
| 1165 | |
| 1166 | theorem nativeTangentBlock_radial {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1167 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 1168 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : Vec2) |
| 1169 | (q : ℝ) (x : SlotColoring.Position) (j : Fin 2) (n : ℕ) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 1170 | (nativeTangentBlock P hdet outer ε a q x j).oscillation n (Y,θ) 0 = |
| 1171 | SignedCovariance.radialWith P hdet outer ε a q x j Y θ := by |
| 1172 | rw [nativeTangentBlock, coefficientBlock_velocity] |
| 1173 | change ((outer * (Real.sqrt ε * a j * mask D U q x) * |
| 1174 | covered (SlotColoring.nativeIndex h U.1) (P.rawRadial hdet j) Y : ℝ) * |
| 1175 | HarmonicFields.character 1 (1 * P.phases j Y + (P.modes j : ℝ) * θ)).re = _ |
| 1176 | rw [real_character_one] |
| 1177 | simp only [SignedCovariance.radialWith, wave, one_mul, add_comm] |
| 1178 | |
| 1179 | theorem nativeTangentBlock_tangent {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1180 | {sys : SlotSystem D h vr vt} {U : UnsignedLabel} (P : PairData sys U) |
| 1181 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : Vec2) |
| 1182 | (q : ℝ) (x : SlotColoring.Position) (j i : Fin 2) (n : ℕ) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 1183 | (nativeTangentBlock P hdet outer ε a q x j).oscillation n (Y,θ) i.succ = |
| 1184 | SignedCovariance.tangentWith P hdet outer ε a q x j i Y θ := by |
| 1185 | rw [nativeTangentBlock, coefficientBlock_velocity] |
| 1186 | have hv : nativeUnit P hdet j Y i.succ = |
| 1187 | covered (SlotColoring.nativeIndex h U.1) (P.rawTangent hdet j i) Y := by fin_cases i <;> rfl |
| 1188 | simp only [ CurlClassBounds.complexify_apply, PiLp.smul_apply, |
| 1189 | hv] |
| 1190 | rw [real_character_one] |
| 1191 | simp only [SignedCovariance.tangentWith, wave, one_mul, add_comm, smul_eq_mul] |
| 1192 | |
| 1193 | noncomputable def nativeAssembly {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1194 | {sys : SlotSystem D h vr vt} {N : ℕ} |
| 1195 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 1196 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 1197 | (a : UnsignedLabel → Vec2) (q : ℝ) (x : SlotColoring.Position) : |
| 1198 | TorusInverse.Plane → ℝ → Fin 3 → ℝ := fun Y θ i => |
| 1199 | ∑ᶠ v : UnsignedLabel × Fin 2, |
| 1200 | (nativeTangentBlock (P v.1) hdet (outer v.1) (ε v.1) (a v.1) q x v.2).oscillation 0 (Y,θ) i |
| 1201 | |
| 1202 | theorem nativeAssembly_radial {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1203 | {sys : SlotSystem D h vr vt} {N : ℕ} |
| 1204 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 1205 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 1206 | (a : UnsignedLabel → Vec2) (q : ℝ) (x : SlotColoring.Position) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 1207 | nativeAssembly P hdet outer ε a q x Y θ 0 = |
| 1208 | SignedCovariance.assembledRadialWith P hdet outer ε a q x Y θ := by |
| 1209 | simp only [nativeAssembly, nativeTangentBlock_radial, SignedCovariance.assembledRadialWith] |
| 1210 | |
| 1211 | theorem nativeAssembly_tangent {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1212 | {sys : SlotSystem D h vr vt} {N : ℕ} |
| 1213 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 1214 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 1215 | (a : UnsignedLabel → Vec2) (q : ℝ) (x : SlotColoring.Position) |
| 1216 | (i : Fin 2) (Y : TorusInverse.Plane) (θ : ℝ) : |
| 1217 | nativeAssembly P hdet outer ε a q x Y θ i.succ = |
| 1218 | SignedCovariance.assembledTangentWith P hdet outer ε a q x i Y θ := by |
| 1219 | simp only [nativeAssembly, nativeTangentBlock_tangent, SignedCovariance.assembledTangentWith] |
| 1220 | |
| 1221 | theorem nativeAssembly_requested_cross {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1222 | (sys : SlotSystem D h vr vt) (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 1223 | (N : ℕ) (hN : 1 ≤ N) (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 1224 | {q : ℝ} (hq : 0 < q) (hqN : q ≤ ChartScales.Q N) (x : SlotColoring.Position) |
| 1225 | (T0 : Vec2) (p : SignedStressPrimitive.Patch) |
| 1226 | (c : CorrectionState.Context (PressureStream.Lift E)) (u : CorrectionState.State (PressureStream.Lift E)) |
| 1227 | (n : ℕ) (z : ℝ × E) |
| 1228 | (hcone : ∀ U, mask D (tailLabel N U) q x ≠ 0 → |
| 1229 | SmoothCovariance.StrictCone (P U).matrix (chartTarget h q N T0 U)) (i : Fin 2) : |
| 1230 | let primary := nativeAssembly P hdet (physicalOuter h N) (physicalViscosity h N) |
| 1231 | (fun U => SmoothCovariance.amplitudes (P U).matrix (chartTarget h q N T0 U)) q x |
| 1232 | let signed := nativeAssembly P hdet (physicalOuter h N) (physicalViscosity h N) |
| 1233 | (fun U => SignedCovariance.increment (P U).matrix (chartTarget h q N T0 U) |
| 1234 | (SignedCovariance.chartStress h N (requestedStress p c u n z) U)) q x |
| 1235 | doubleAverage (fun Y θ => primary Y θ 0 * signed Y θ i.succ + signed Y θ 0 * primary Y θ i.succ) = |
| 1236 | requestedStress p c u n z i := by |
| 1237 | dsimp only |
| 1238 | simp_rw [nativeAssembly_radial, nativeAssembly_tangent] |
| 1239 | exact SignedCovariance.physical_signed_cross_covariance sys hdet N hN P hq hqN x T0 |
| 1240 | (requestedStress p c u n z) hcone i |
| 1241 | |
| 1242 | theorem nativeAssembly_signed_square {D h : ℝ} {vr vt : TorusInverse.Plane} |
| 1243 | (sys : SlotSystem D h vr vt) (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 1244 | (N : ℕ) (hN : 1 ≤ N) (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 1245 | (outer ε : UnsignedLabel → ℝ) (T R : UnsignedLabel → Vec2) |
| 1246 | {q : ℝ} (hq : 0 < q) (x : SlotColoring.Position) |
| 1247 | (hε : ∀ U, mask D (tailLabel N U) q x ≠ 0 → 0 ≤ ε U) (i : Fin 2) : |
| 1248 | let signed := nativeAssembly P hdet outer ε |
| 1249 | (fun U => SignedCovariance.increment (P U).matrix (T U) (R U)) q x |
| 1250 | doubleAverage (fun Y θ => signed Y θ 0 * signed Y θ i.succ) = |
| 1251 | ∑ᶠ U : UnsignedLabel, outer U ^ 2 * ε U * mask D (tailLabel N U) q x ^ 2 * |
| 1252 | SignedCovariance.squareColumn (P U).matrix (T U) (R U) i := by |
| 1253 | dsimp only |
| 1254 | simp_rw [nativeAssembly_radial, nativeAssembly_tangent] |
| 1255 | exact SignedCovariance.assembled_signed_square sys hdet N hN P outer ε T R hq x hε i |
| 1256 | |
| 1257 | end NativeBlocks |
| 1258 | |
| 1259 | theorem signed_square_class {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 1260 | (h : CovarianceControl s H T) (B κ : ℝ) |
| 1261 | (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) (i : Fin 2) : |
| 1262 | MeanClass s (2 * B - 2 * κ) |
| 1263 | (fun n x => s.epsilon n * SignedCovariance.squareColumn (H n x) (T n x) (R n x) i) := |
| 1264 | SignedCovariance.native_signed_square_class B κ i h.zeta_pos (fun n _ hx => h.cone n hx) |
| 1265 | (h.inverse_class h.target_jets) (h.inverse_class hR) h.inverse_control |
| 1266 | (fun j => PrimaryPulseBounds.polynomial_memClass s (h.matrix_jets i j)) |
| 1267 | |
| 1268 | /-! ## Canonical pulse binding for the matrix and the native blocks -/ |
| 1269 | |
| 1270 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 1271 | theorem phaseMatrix_eq_canonical_pair |
| 1272 | {U : PhaseJetBounds.Domain ℕ PhaseCalculus.Slow} |
| 1273 | (F : Fin 2 → PrimaryPulseBounds.PhaseConstruction U) (pref : Fin 2 → ℕ → ℝ) |
| 1274 | (χ : ℕ → D → PhaseCalculus.Slow × ℝ) (n : ℕ) (x : D) |
| 1275 | (hp : (χ n x).1 ∈ U.carrier n) |
| 1276 | (hA : ∀ j, ContinuousOn (((F j).frame n).coefficient 1) |
| 1277 | (U.carrier n ×ˢ Icc 0 ((F j).L n))) |
| 1278 | (hk : ∀ j, ((F j).frame n).Kinematics (χ n x).1 (Icc 0 ((F j).L n))) |
| 1279 | {D₀ h : ℝ} {vr vt : TorusInverse.Plane} {sys : PartitionedCovariance.SlotSystem D₀ h vr vt} |
| 1280 | {label : PartitionedCovariance.UnsignedLabel} (P : PartitionedCovariance.PairData sys label) |
| 1281 | (hpulse : ∀ j, P.pulses j = PrimaryPulseBounds.canonicalPrimaryPulse ((F j).frame n) |
| 1282 | ((F j).lam n) ((F j).u n) ((F j).L_pos n) (U.carrier n) (hA j) (χ n x).1 hp (hk j)) |
| 1283 | (hpref : ∀ j, pref j n = PartitionedCovariance.nativePrefactor vr vt sys.radius * P.ci j * (F j).L n) : |
| 1284 | phaseMatrix F pref χ n x = P.matrix := by |
| 1285 | have he := PrimaryPulseBounds.primaryCovariance_eq_canonicalPairMatrix pref |
| 1286 | (fun j => (F j).frame) (fun j => (F j).lam) (fun j => (F j).u) (fun j => (F j).L) |
| 1287 | n (U.carrier n) (χ n x).1 hp (fun j => (F j).L_pos n) hA hk vr vt sys.radius P.ci hpref |
| 1288 | have hps : P.pulses = fun j => PrimaryPulseBounds.canonicalPrimaryPulse ((F j).frame n) |
| 1289 | ((F j).lam n) ((F j).u n) ((F j).L_pos n) (U.carrier n) (hA j) (χ n x).1 hp (hk j) := funext hpulse |
| 1290 | simpa only [phaseMatrix, PrimaryPulseBounds.chartCovariance, PartitionedCovariance.PairData.matrix, |
| 1291 | hps] using he |
| 1292 | |
| 1293 | theorem nativeUnit_eq_canonical_pulse |
| 1294 | {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 1295 | {D₀ h : ℝ} {vr vt : TorusInverse.Plane} {sys : PartitionedCovariance.SlotSystem D₀ h vr vt} |
| 1296 | {label : PartitionedCovariance.UnsignedLabel} (P : PartitionedCovariance.PairData sys label) |
| 1297 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (j : Fin 2) |
| 1298 | (f : PrimaryODE.FrameData Q) (lam u : ℝ) {L : ℝ} (hL : 0 < L) |
| 1299 | (U : Set Q) (hA : ContinuousOn (f.coefficient 1) (U ×ˢ Icc 0 L)) |
| 1300 | (p : Q) (hp : p ∈ U) (hk : f.Kinematics p (Icc 0 L)) |
| 1301 | (hpulse : P.pulses j = PrimaryPulseBounds.canonicalPrimaryPulse f lam u hL U hA p hp hk) |
| 1302 | (Y : TorusInverse.Plane) (i : Fin 3) : |
| 1303 | nativeUnit P hdet j Y i = PartitionedCovariance.covered (SlotColoring.nativeIndex h label.1) |
| 1304 | (PartitionedCovariance.nativePulse vr vt (PartitionedCovariance.slotCenter h |
| 1305 | (PartitionedCovariance.signedLabel label j)) hdet (P.ci j) sys.radius |
| 1306 | (fun z => PrimaryPulseBounds.localPrimaryProfile f lam u L sys.radius p z i)) Y := by |
| 1307 | have hr : (P.pulses j).radialProfile sys.radius = |
| 1308 | fun z => PrimaryPulseBounds.localPrimaryProfile f lam u L sys.radius p z 0 := by |
| 1309 | funext z |
| 1310 | rw [hpulse] |
| 1311 | exact PrimaryPulseBounds.canonicalPrimaryPulse_radialProfile f lam u sys.radius hL U hA p hp hk z |
| 1312 | have ht (i : Fin 2) : (P.pulses j).tangentProfile sys.radius i = |
| 1313 | fun z => PrimaryPulseBounds.localPrimaryProfile f lam u L sys.radius p z i.succ := by |
| 1314 | funext z |
| 1315 | rw [hpulse] |
| 1316 | exact PrimaryPulseBounds.canonicalPrimaryPulse_tangentProfile f lam u sys.radius hL U hA p hp hk z i |
| 1317 | fin_cases i |
| 1318 | · change PartitionedCovariance.covered _ (P.rawRadial hdet j) _ = _ |
| 1319 | simp only [PartitionedCovariance.PairData.rawRadial, hr] |
| 1320 | rfl |
| 1321 | · change PartitionedCovariance.covered _ (P.rawTangent hdet j 0) _ = _ |
| 1322 | simp only [PartitionedCovariance.PairData.rawTangent, ht] |
| 1323 | rfl |
| 1324 | · change PartitionedCovariance.covered _ (P.rawTangent hdet j 1) _ = _ |
| 1325 | simp only [PartitionedCovariance.PairData.rawTangent, ht] |
| 1326 | rfl |
| 1327 | |
| 1328 | theorem masked_signed_square_class {s : StripData D} {H : ℕ → D → Mat2} {T R : ℕ → D → Vec2} |
| 1329 | (h : CovarianceControl s H T) (B κ : ℝ) |
| 1330 | (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) |
| 1331 | {mask : ℕ → D → ℝ} (hm : UnweightedClass s 0 mask) (i : Fin 2) : |
| 1332 | MeanClass s (2 * B - 2 * κ) |
| 1333 | (fun n x => mask n x ^ 2 * (s.epsilon n * SignedCovariance.squareColumn (H n x) (T n x) (R n x) i)) := by |
| 1334 | have hmm := LinearWaveBounds.unweighted_mul hm hm |
| 1335 | have hh := LinearWaveBounds.unweighted_smul hmm (signed_square_class h B κ hR i) |
| 1336 | simpa only [zero_add, smul_eq_mul, pow_two] using hh |
| 1337 | |
| 1338 | /-! ## Exported blocks for the correction state -/ |
| 1339 | |
| 1340 | noncomputable def signedBlock (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 1341 | (s : StripData (D × ℝ)) (d : LinearWaveBounds.GraphDirections (D × ℝ)) |
| 1342 | (H : ℕ → D × ℝ → Mat2) (T R : ℕ → D × ℝ → Vec2) (mask : ℕ → D × ℝ → ℝ) |
| 1343 | (v Ndot : ℕ → D × ℝ → Space) (A : ℕ → D × ℝ → Space →L[ℝ] Space) |
| 1344 | (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) (j : Fin 2) : CorrectionState.HarmonicBlock D := |
| 1345 | blockOfCoefficients (exactCoefficients a s d H T R mask v Ndot A ψ j) kp |
| 1346 | |
| 1347 | theorem signedBlock_bounds |
| 1348 | {s : StripData (D × ℝ)} {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 1349 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} {P₀ P : ℕ → D × ℝ → ℝ} {α₀ B κ : ℝ} |
| 1350 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) (hκ : κ ≤ 1 / 2) |
| 1351 | {H : ℕ → D × ℝ → Mat2} {T R : ℕ → D × ℝ → Vec2} {mask ψ : ℕ → D × ℝ → ℝ} |
| 1352 | {v Ndot : ℕ → D × ℝ → Space} {A : ℕ → D × ℝ → Space →L[ℝ] Space} |
| 1353 | (hcov : CovarianceControl s H T) |
| 1354 | (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) |
| 1355 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 1356 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 1357 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 1358 | {b M : ℝ} (hb : 0 < b) |
| 1359 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 1360 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 1361 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 1362 | {radius : D × ℝ → ℝ} (hradius : a.radius = fun _ => radius) |
| 1363 | (hψ : UnweightedClass s 0 ψ) (kp : ℕ → ℤ) (j : Fin 2) : |
| 1364 | (signedBlock a s d H T R mask v Ndot A ψ kp j).WaveBounds |
| 1365 | (sectionStrip s) (fun n x => P n (x,0)) (B - κ) ∧ |
| 1366 | (signedBlock a s d H T R mask v Ndot A ψ kp j).PressureBounds |
| 1367 | (sectionStrip s) (fun n x => P n (x,0)) (B + 1 / 2 - κ) := by |
| 1368 | have hs := signed_bounds hbase hκ hcov hR hm hv hN hNdot hA hb hlo hhi hK hradius hψ j |
| 1369 | exact blockOfCoefficients_classes _ kp hs.1 hs.2.1 |
| 1370 | |
| 1371 | theorem signedBlock_band |
| 1372 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 1373 | (s : StripData (D × ℝ)) (d : LinearWaveBounds.GraphDirections (D × ℝ)) |
| 1374 | (H : ℕ → D × ℝ → Mat2) (T R : ℕ → D × ℝ → Vec2) (mask : ℕ → D × ℝ → ℝ) |
| 1375 | (v Ndot : ℕ → D × ℝ → Space) (A : ℕ → D × ℝ → Space →L[ℝ] Space) |
| 1376 | (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) (j : Fin 2) : |
| 1377 | (signedBlock a s d H T R mask v Ndot A ψ kp j).BandLimited 1 := |
| 1378 | coefficientBlock_band _ _ _ _ _ |
| 1379 | |
| 1380 | noncomputable def gaussianBlock (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) |
| 1381 | (d : LinearWaveBounds.GraphDirections (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) |
| 1382 | (kp : ℕ → ℤ) : CorrectionState.HarmonicBlock D := |
| 1383 | ErrorHarmonics.gaussianBlock d ψ a.amplitude 0 1 a.frequency (fun n x => a.phase n (x,0)) kp |
| 1384 | |
| 1385 | /-- The error block is evaluated from the actual cutoff derivative and the |
| 1386 | same uncut signed coefficient. It has the original carrier and its conjugate. -/ |
| 1387 | theorem gaussianBlock_represents |
| 1388 | {s : StripData (D × ℝ)} {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 1389 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} |
| 1390 | {H : ℕ → D × ℝ → Mat2} {T R : ℕ → D × ℝ → Vec2} {mask : ℕ → D × ℝ → ℝ} |
| 1391 | {v Ndot : ℕ → D × ℝ → Space} {A : ℕ → D × ℝ → Space →L[ℝ] Space} |
| 1392 | {ψ : ℕ → D × ℝ → ℝ} {m : ℕ → ℝ} |
| 1393 | (h : AngularInputs s d a H T R mask v Ndot A ψ m) |
| 1394 | (hθ : d.angular = (0,1)) (hψ : ∀ n, ContDiff ℝ ∞ (ψ n)) |
| 1395 | (kp : ℕ → ℤ) (hkp : ∀ n, a.frequency n * m n = (kp n : ℝ)) (j : Fin 2) : |
| 1396 | let z := coefficients a s d H T R mask v Ndot A j |
| 1397 | (gaussianBlock z d ψ kp).oscillation = fun n x i => |
| 1398 | (LinearWaveBounds.excludedSlotError d ψ z.amplitude 0 n x i * |
| 1399 | carrier (a.frequency n) (a.phase n) x).re := by |
| 1400 | have hψa : ErrorHarmonics.AngleIndependent ψ := by |
| 1401 | intro n x t |
| 1402 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 1403 | have hc := h.cutoff n |
| 1404 | simp only [hθ] at hc |
| 1405 | exact hc |
| 1406 | have ha : ErrorHarmonics.AngleIndependent (coefficients a s d H T R mask v Ndot A j).amplitude := by |
| 1407 | intro n x t |
| 1408 | apply CopyAngularInvariance.invariant_eq_zeroSlice |
| 1409 | simpa only [hθ] using h.amplitude j n |
| 1410 | have hs : ErrorHarmonics.AngleIndependent (0 : ℕ → D × ℝ → ComplexVector) := by |
| 1411 | intro n x t |
| 1412 | rfl |
| 1413 | have hp : ∀ n x t, a.frequency n * a.phase n (x,t) = |
| 1414 | a.frequency n * a.phase n (x,0) + (kp n : ℝ) * t := by |
| 1415 | intro n x t |
| 1416 | rw [CopyAngularInvariance.affinePhase_eq_zeroSlice (Φ := a.phase n) (m := m n) |
| 1417 | (by simpa only [hθ] using h.phase n) x t, |
| 1418 | mul_add, ← mul_assoc, hkp] |
| 1419 | have he := ErrorHarmonics.gaussianBlock_represents d 1 a.frequency |
| 1420 | (fun n x => a.phase n (x,0)) a.phase kp hψ hψa ha hs hp |
| 1421 | dsimp only |
| 1422 | funext n x i |
| 1423 | have hi := congrFun (congrFun (congrFun he n) x) i |
| 1424 | simpa only [gaussianBlock, ErrorHarmonics.gaussianField, vectorMode, mode, |
| 1425 | Int.cast_one, mul_one, coefficients, homogeneousCoefficients] using hi |
| 1426 | |
| 1427 | /-! The realization hypothesis below concerns only the already constructed |
| 1428 | unit pulse and chart. It never identifies or bounds a signed output. The |
| 1429 | canonical unit pulse and its matrix are identified by the two preceding |
| 1430 | canonical-pulse theorems. -/ |
| 1431 | |
| 1432 | theorem signed_tangent_native_realization |
| 1433 | {s : StripData D} {d : LinearWaveBounds.GraphDirections D} |
| 1434 | (a : LinearWaveBounds.WaveCoefficients D) |
| 1435 | (H : ℕ → D → Mat2) (T R : ℕ → D → Vec2) (mask ψ : ℕ → D → ℝ) |
| 1436 | (v Ndot : ℕ → D → Space) (A : ℕ → D → Space →L[ℝ] Space) |
| 1437 | {D₀ h : ℝ} {vr vt : TorusInverse.Plane} {sys : PartitionedCovariance.SlotSystem D₀ h vr vt} |
| 1438 | {label : PartitionedCovariance.UnsignedLabel} (P : PartitionedCovariance.PairData sys label) |
| 1439 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 1440 | (outer q : ℝ) (position : SlotColoring.Position) (T₀ R₀ : Vec2) |
| 1441 | (j : Fin 2) (n : ℕ) (x : D) (Y : TorusInverse.Plane) (θ : ℝ) |
| 1442 | (hH : H n x = P.matrix) (hT : T n x = T₀) (hR : R n x = R₀) |
| 1443 | (hm : mask n x = PartitionedCovariance.mask D₀ label q position) |
| 1444 | (hpulse : ψ n x • v n x = nativeUnit P hdet j Y) |
| 1445 | (hphase : a.frequency n * a.phase n x = P.phases j Y + (P.modes j : ℝ) * θ) |
| 1446 | (i : Fin 3) : |
| 1447 | outer * (vectorMode (a.frequency n) (a.phase n) |
| 1448 | (((coefficients a s d H T R mask v Ndot A j).withCutoff ψ).amplitude n) x i).re = |
| 1449 | (nativeTangentBlock P hdet outer (s.epsilon n) |
| 1450 | (SignedCovariance.increment P.matrix T₀ R₀) q position j).oscillation 0 (Y,θ) i := by |
| 1451 | have hi := congrArg (fun z : Space => z i) hpulse |
| 1452 | change ψ n x * v n x i = nativeUnit P hdet j Y i at hi |
| 1453 | have hc : carrier (a.frequency n) (a.phase n) x = |
| 1454 | HarmonicFields.character 1 (P.phases j Y + (P.modes j : ℝ) * θ) := by |
| 1455 | rw [← hphase] |
| 1456 | simpa only [Int.cast_one, mul_one] using |
| 1457 | (HarmonicFields.character_eq_carrier 1 (a.frequency n) (a.phase n) x).symm |
| 1458 | rw [nativeTangentBlock, coefficientBlock_velocity] |
| 1459 | simp only [vectorMode, mode, coefficients, homogeneousCoefficients, |
| 1460 | LinearWaveBounds.WaveCoefficients.withCutoff, signedVector, signedScalar, |
| 1461 | Pi.smul_apply, PiLp.smul_apply, smul_eq_mul, CurlClassBounds.complexify_apply, |
| 1462 | Complex.real_smul, Complex.mul_re, Complex.mul_im, Complex.ofReal_mul, Complex.ofReal_re, |
| 1463 | Complex.ofReal_im, mul_zero, zero_mul, add_zero, sub_zero, hH, hT, hR, hm, hc, one_mul] |
| 1464 | rw [show ψ n x * (Real.sqrt (s.epsilon n) * SignedCovariance.increment P.matrix T₀ R₀ j * |
| 1465 | PartitionedCovariance.mask D₀ label q position * v n x i) = |
| 1466 | (Real.sqrt (s.epsilon n) * SignedCovariance.increment P.matrix T₀ R₀ j * |
| 1467 | PartitionedCovariance.mask D₀ label q position) * nativeUnit P hdet j Y i by |
| 1468 | rw [← hi] |
| 1469 | ring] |
| 1470 | ring |
| 1471 | |
| 1472 | end NavierStokes.SignedWaveUpdate |