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.LabelSupportPreservation |
| 2 | import NavierStokes.HarmonicStructurePreservation |
| 3 | import NavierStokes.LocalResidualGrouping |
| 4 | import NavierStokes.AxisymmetricResidualGrouping |
| 5 | import NavierStokes.MeanBoundsReindex |
| 6 | import NavierStokes.MeanStageRegularity |
| 7 | import NavierStokes.WaveStateRegularity |
| 8 | import NavierStokes.MeanStateRegularity |
| 9 | import NavierStokes.BandReindexedSignedMeanGain |
| 10 | import NavierStokes.PhysicalResidualNaturality |
| 11 | import NavierStokes.UniformBlockBounds |
| 12 | import NavierStokes.UniformHarmonicInteraction |
| 13 | import NavierStokes.LocalizedCurlRealization |
| 14 | import NavierStokes.LocalizedMeanInteraction |
| 15 | import NavierStokes.HarmonicSourceSupport |
| 16 | import NavierStokes.NativePrincipalEquations |
| 17 | import NavierStokes.ParticularCopyBounds |
| 18 | import NavierStokes.SignedCopyBounds |
| 19 | import NavierStokes.LocalizedWaveBounds |
| 20 | import NavierStokes.MovingMomentBounds |
| 21 | import NavierStokes.GaugeDebtIncrement |
| 22 | import NavierStokes.GaugeMassPreservation |
| 23 | import NavierStokes.RankStateBounds |
| 24 | import NavierStokes.SignedMeanGain |
| 25 | import NavierStokes.PeriodizedWaveBounds |
| 26 | import NavierStokes.MeanIncrementBounds |
| 27 | import NavierStokes.HarmonicFields |
| 28 | import NavierStokes.ExponentLedger |
| 29 | import NavierStokes.CorrectionState |
| 30 | import NavierStokes.LinearWaveResidual |
| 31 | import NavierStokes.DefectIncrementBounds |
| 32 | import NavierStokes.HarmonicResidual |
| 33 | import NavierStokes.LiftedMeanResidual |
| 34 | import NavierStokes.MeanChartCompatibility |
| 35 | import NavierStokes.HarmonicCovariance |
| 36 | import NavierStokes.HarmonicMeanInteraction |
| 37 | import NavierStokes.PhysicalMeanDomain |
| 38 | import NavierStokes.SignedWaveUpdate |
| 39 | import NavierStokes.VariableGaugeMean |
| 40 | import NavierStokes.PhysicalResidualBridge |
| 41 | import NavierStokes.LabelSumBounds |
| 42 | import NavierStokes.HarmonicWaveInteraction |
| 43 | import NavierStokes.LocalSignedRequest |
| 44 | import NavierStokes.ParticularWaveAssembly |
| 45 | import NavierStokes.LocalRankDefect |
| 46 | import NavierStokes.StateReindex |
| 47 | |
| 48 | /-! |
| 49 | # Exact field bookkeeping for one correction cycle |
| 50 | |
| 51 | The residuals in this file are the differentiated nonlinear fields in (32). |
| 52 | In particular, changing the wave covariance and changing a mean velocity are |
| 53 | not treated as independent black-box state transitions. Every old/new cross |
| 54 | term is retained in the displayed residual differences. |
| 55 | -/ |
| 56 | |
| 57 | noncomputable section |
| 58 | |
| 59 | namespace NavierStokes.CorrectionStep |
| 60 | |
| 61 | open Set WeightedClasses MeanIncrementBounds |
| 62 | open scoped ContDiff BigOperators |
| 63 | |
| 64 | variable {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 65 | |
| 66 | abbrev ScalarField (D : Type) := MeanIncrementBounds.Field D |
| 67 | abbrev Tensor (D : Type) := Fin 3 → Fin 3 → ScalarField D |
| 68 | |
| 69 | /-- These are changes of the literal covariance terms in (32). -/ |
| 70 | noncomputable def thetaCovarianceChange (o : Operators D) (X : Tensor D) : ScalarField D := |
| 71 | o.radialDiv 2 (X 0 1) + o.dz (X 2 1) |
| 72 | |
| 73 | noncomputable def axialCovarianceChange (o : Operators D) (X : Tensor D) : ScalarField D := |
| 74 | o.radialDiv 1 (X 0 2) + o.dz (X 2 2) |
| 75 | |
| 76 | noncomputable def radialCovarianceChange (o : Operators D) (X : Tensor D) : ScalarField D := |
| 77 | -o.radialDiv 1 (X 0 0) - o.dz (X 2 0) + o.invRadius * X 1 1 |
| 78 | |
| 79 | theorem smooth_updated {U : Set D} {m h : Triple D} |
| 80 | (hm : SmoothTriple U m) (hh : SmoothTriple U h) : SmoothTriple U (updated m h) := |
| 81 | ⟨hm.radial.add hh.radial, hm.angular.add hh.angular, hm.axial.add hh.axial⟩ |
| 82 | |
| 83 | section CovarianceChanges |
| 84 | |
| 85 | variable {U : Set D} (hU : IsOpen U) (o : Operators D) |
| 86 | {b m : Triple D} (hb : SmoothTriple U b) (hm : SmoothTriple U m) |
| 87 | (W X : Tensor D) (hW : ∀ i j, SmoothOn U (W i j)) |
| 88 | (hX : ∀ i j, SmoothOn U (X i j)) |
| 89 | |
| 90 | include hU hb hm hW hX in |
| 91 | theorem thetaResidual_covariance_change (T : ScalarField D) : |
| 92 | Agree U (thetaResidual o b m (W + X) T - thetaResidual o b m W T) |
| 93 | (thetaCovarianceChange o X) := by |
| 94 | have hr : thetaRadial b m + (W + X) 0 1 = (thetaRadial b m + W 0 1) + X 0 1 := by |
| 95 | funext n x |
| 96 | simp only [Pi.add_apply] |
| 97 | ring |
| 98 | have hz : thetaAxial b m + (W + X) 2 1 = (thetaAxial b m + W 2 1) + X 2 1 := by |
| 99 | funext n x |
| 100 | simp only [Pi.add_apply] |
| 101 | ring |
| 102 | simp only [Pi.add_apply] at hr hz |
| 103 | intro n x hx |
| 104 | simp only [thetaResidual, Pi.sub_apply, Pi.add_apply] |
| 105 | rw [hr, hz, o.radialDiv_add hU 2 ((hb.thetaRadial hm).add (hW 0 1)) (hX 0 1) n hx, |
| 106 | o.dz_add hU ((hb.thetaAxial hm).add (hW 2 1)) (hX 2 1) n hx] |
| 107 | simp only [thetaCovarianceChange, Pi.add_apply] |
| 108 | ring |
| 109 | |
| 110 | include hU hb hm hW hX in |
| 111 | theorem axialResidual_covariance_change (p T : ScalarField D) (hp : SmoothOn U p) : |
| 112 | Agree U (axialResidual o b m (W + X) p T - axialResidual o b m W p T) |
| 113 | (axialCovarianceChange o X) := by |
| 114 | have hr : axialRadial b m + (W + X) 0 2 = (axialRadial b m + W 0 2) + X 0 2 := by |
| 115 | funext n x |
| 116 | simp only [Pi.add_apply] |
| 117 | ring |
| 118 | have hz : axialAxial b m + (W + X) 2 2 + p = (axialAxial b m + W 2 2 + p) + X 2 2 := by |
| 119 | funext n x |
| 120 | simp only [Pi.add_apply] |
| 121 | ring |
| 122 | simp only [Pi.add_apply] at hr hz |
| 123 | intro n x hx |
| 124 | simp only [axialResidual, Pi.sub_apply, Pi.add_apply] |
| 125 | rw [hr, hz, o.radialDiv_add hU 1 ((hb.axialRadial hm).add (hW 0 2)) (hX 0 2) n hx, |
| 126 | o.dz_add hU (((hb.axialAxial hm).add (hW 2 2)).add hp) (hX 2 2) n hx] |
| 127 | simp only [axialCovarianceChange, Pi.add_apply] |
| 128 | ring |
| 129 | |
| 130 | include hU hb hm hW hX in |
| 131 | theorem gr_covariance_change : |
| 132 | Agree U (gr o b m (W + X) - gr o b m W) (radialCovarianceChange o X) := by |
| 133 | have hr : radialRadial b m + (W + X) 0 0 = (radialRadial b m + W 0 0) + X 0 0 := by |
| 134 | funext n x |
| 135 | simp only [Pi.add_apply] |
| 136 | ring |
| 137 | have hz : axialRadial b m + (W + X) 2 0 = (axialRadial b m + W 2 0) + X 2 0 := by |
| 138 | funext n x |
| 139 | simp only [Pi.add_apply] |
| 140 | ring |
| 141 | simp only [Pi.add_apply] at hr hz |
| 142 | intro n x hx |
| 143 | simp only [gr, Pi.sub_apply, Pi.add_apply, Pi.neg_apply, Pi.mul_apply] |
| 144 | rw [hr, hz, o.radialDiv_add hU 1 ((hb.radialRadial hm).add (hW 0 0)) (hX 0 0) n hx, |
| 145 | o.dz_add hU ((hb.axialRadial hm).add (hW 2 0)) (hX 2 0) n hx] |
| 146 | simp only [radialCovarianceChange, Pi.add_apply, Pi.sub_apply, Pi.neg_apply, Pi.mul_apply] |
| 147 | ring |
| 148 | |
| 149 | end CovarianceChanges |
| 150 | |
| 151 | section JointChanges |
| 152 | |
| 153 | variable {U : Set D} (hU : IsOpen U) (o : Operators D) |
| 154 | (ha : ContDiffOn ℝ ∞ o.radialProfile U) |
| 155 | {b m h : Triple D} (hb : SmoothTriple U b) (hm : SmoothTriple U m) |
| 156 | (hh : SmoothTriple U h) (W X : Tensor D) |
| 157 | (hW : ∀ i j, SmoothOn U (W i j)) (hX : ∀ i j, SmoothOn U (X i j)) |
| 158 | |
| 159 | include hU ha hb hm hh hW hX in |
| 160 | theorem thetaResidual_joint_change (T : ScalarField D) : |
| 161 | Agree U (thetaResidual o b (updated m h) (W + X) T - thetaResidual o b m W T) |
| 162 | (o.fastTime h.angular + thetaRemainder o b m h + thetaCovarianceChange o X) := by |
| 163 | intro n x hx |
| 164 | have hmean := thetaResidual_change hU o ha hb hm hh W hW T n hx |
| 165 | have hwave := thetaResidual_covariance_change hU o hb (smooth_updated hm hh) W X hW hX T n hx |
| 166 | simp only [Pi.add_apply, Pi.sub_apply] at * |
| 167 | linarith |
| 168 | |
| 169 | include hU ha hb hm hh hW hX in |
| 170 | theorem axialResidual_joint_change (p δp T : ScalarField D) |
| 171 | (hp : SmoothOn U p) (hδp : SmoothOn U δp) : |
| 172 | Agree U (axialResidual o b (updated m h) (W + X) (p + δp) T - |
| 173 | axialResidual o b m W p T) |
| 174 | (o.fastTime h.axial + axialRemainder o b m h δp + axialCovarianceChange o X) := by |
| 175 | intro n x hx |
| 176 | have hmean := axialResidual_change hU o ha hb hm hh W hW p δp T hp hδp n hx |
| 177 | have hwave := axialResidual_covariance_change hU o hb (smooth_updated hm hh) W X hW hX |
| 178 | (p + δp) T (hp.add hδp) n hx |
| 179 | simp only [Pi.add_apply, Pi.sub_apply] at * |
| 180 | linarith |
| 181 | |
| 182 | include hU ha hb hm hh hW hX in |
| 183 | theorem gr_joint_change : |
| 184 | Agree U (gr o b (updated m h) (W + X) - gr o b m W) |
| 185 | (leadingRadial o b h + radialRemainder o b m h + radialCovarianceChange o X) := by |
| 186 | intro n x hx |
| 187 | have hmean := gr_change hU o ha hb hm hh W hW n hx |
| 188 | have hwave := gr_covariance_change hU o hb (smooth_updated hm hh) W X hW hX n hx |
| 189 | simp only [Pi.add_apply, Pi.sub_apply] at * |
| 190 | linarith |
| 191 | |
| 192 | end JointChanges |
| 193 | |
| 194 | /-- A bound on each actual tensor entry. It is not a bound on the resulting |
| 195 | residual and contains no update-preservation assertion. -/ |
| 196 | def TensorClass (s : StripData D) (α : ℝ) (X : Tensor D) : Prop := |
| 197 | ∀ i j, MeanClass s α (X i j) |
| 198 | |
| 199 | section CovarianceBounds |
| 200 | |
| 201 | variable {s : StripData D} {o : Operators D} {κ α : ℝ} |
| 202 | (ho : OperatorBounds s o κ) {X : Tensor D} (hX : TensorClass s α X) |
| 203 | |
| 204 | include ho hX in |
| 205 | theorem thetaCovarianceChange_mem : |
| 206 | MeanClass s (α - κ) (thetaCovarianceChange o X) := by |
| 207 | exact (ho.radialDiv (hX 0 1) 2).add |
| 208 | ((ho.dz (hX 2 1)).mono_exponent (by linarith [ho.kappa_nonneg])) |
| 209 | |
| 210 | include ho hX in |
| 211 | theorem axialCovarianceChange_mem : |
| 212 | MeanClass s (α - κ) (axialCovarianceChange o X) := by |
| 213 | exact (ho.radialDiv (hX 0 2) 1).add |
| 214 | ((ho.dz (hX 2 2)).mono_exponent (by linarith [ho.kappa_nonneg])) |
| 215 | |
| 216 | include ho hX in |
| 217 | theorem radialCovarianceChange_mem : |
| 218 | MeanClass s (α - κ) (radialCovarianceChange o X) := by |
| 219 | exact (Class.sub (Class.neg (ho.radialDiv (hX 0 0) 1)) |
| 220 | ((ho.dz (hX 2 0)).mono_exponent (by linarith [ho.kappa_nonneg]))).add |
| 221 | ((ho.inv_mul (hX 1 1)).mono_exponent (by linarith [ho.kappa_nonneg])) |
| 222 | |
| 223 | end CovarianceBounds |
| 224 | |
| 225 | /-! ## The full differential residual, before angular averaging -/ |
| 226 | |
| 227 | section FullCalculus |
| 228 | |
| 229 | open HarmonicCalculus LinearWaveResidual |
| 230 | |
| 231 | theorem angularGenerator_add (a b : ComplexVector) : |
| 232 | angularGenerator (a + b) = angularGenerator a + angularGenerator b := by |
| 233 | ext i |
| 234 | fin_cases i <;> simp [angularGenerator] |
| 235 | abel |
| 236 | |
| 237 | theorem transport_add_left (R : D → ℝ) (Vr Vθ Vz : D → D) |
| 238 | (a b v : D → ComplexVector) (x : D) : |
| 239 | transport R Vr Vθ Vz (a + b) v x = |
| 240 | transport R Vr Vθ Vz a v x + transport R Vr Vθ Vz b v x := by |
| 241 | ext i |
| 242 | simp only [transport, Pi.add_apply] |
| 243 | ring |
| 244 | |
| 245 | theorem transport_add_right (R : D → ℝ) (Vr Vθ Vz : D → D) |
| 246 | (u a b : D → ComplexVector) {x : D} |
| 247 | (ha : ∀ i, DifferentiableAt ℝ (fun y => a y i) x) |
| 248 | (hb : ∀ i, DifferentiableAt ℝ (fun y => b y i) x) : |
| 249 | transport R Vr Vθ Vz u (a + b) x = |
| 250 | transport R Vr Vθ Vz u a x + transport R Vr Vθ Vz u b x := by |
| 251 | ext i |
| 252 | simp only [transport, Pi.add_apply, angularGenerator_add, |
| 253 | along_add _ (ha i) (hb i)] |
| 254 | ring |
| 255 | |
| 256 | theorem twiceAlong_add {U : Set D} (hU : IsOpen U) {V : D → D} |
| 257 | (hV : ContDiffOn ℝ ∞ V U) {f g : D → ℂ} |
| 258 | (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) |
| 259 | {x : D} (hx : x ∈ U) : |
| 260 | along V (along V (f + g)) x = along V (along V f) x + along V (along V g) x := by |
| 261 | have heq : EqOn (along V (f + g)) (along V f + along V g) U := by |
| 262 | intro y hy |
| 263 | exact along_add V ((hf.contDiffAt (hU.mem_nhds hy)).differentiableAt (by simp)) |
| 264 | ((hg.contDiffAt (hU.mem_nhds hy)).differentiableAt (by simp)) |
| 265 | rw [along_congr hU heq hx] |
| 266 | exact along_add V |
| 267 | (((contDiffOn_along hU hV hf).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 268 | (((contDiffOn_along hU hV hg).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 269 | |
| 270 | theorem cylindricalLaplacian_add {U : Set D} (hU : IsOpen U) (R : D → ℝ) |
| 271 | {Vr Vθ Vz : D → D} (hr : ContDiffOn ℝ ∞ Vr U) |
| 272 | (hθ : ContDiffOn ℝ ∞ Vθ U) (hz : ContDiffOn ℝ ∞ Vz U) |
| 273 | {f g : D → ℂ} (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) |
| 274 | {x : D} (hx : x ∈ U) : |
| 275 | cylindricalLaplacian R Vr Vθ Vz (f + g) x = |
| 276 | cylindricalLaplacian R Vr Vθ Vz f x + cylindricalLaplacian R Vr Vθ Vz g x := by |
| 277 | have df := (hf.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 278 | have dg := (hg.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 279 | have hfirst : along Vr (f + g) x = along Vr f x + along Vr g x := along_add Vr df dg |
| 280 | simp only [cylindricalLaplacian, twiceAlong_add hU hr hf hg hx, |
| 281 | twiceAlong_add hU hθ hf hg hx, twiceAlong_add hU hz hf hg hx, |
| 282 | hfirst, smul_add] |
| 283 | abel |
| 284 | |
| 285 | theorem cylindricalVectorLaplacian_add {U : Set D} (hU : IsOpen U) (R : D → ℝ) |
| 286 | {Vr Vθ Vz : D → D} (hr : ContDiffOn ℝ ∞ Vr U) |
| 287 | (hθ : ContDiffOn ℝ ∞ Vθ U) (hz : ContDiffOn ℝ ∞ Vz U) |
| 288 | {a b : D → ComplexVector} |
| 289 | (ha : ∀ i, ContDiffOn ℝ ∞ (fun y => a y i) U) |
| 290 | (hb : ∀ i, ContDiffOn ℝ ∞ (fun y => b y i) U) |
| 291 | {x : D} (hx : x ∈ U) : |
| 292 | cylindricalVectorLaplacian R Vr Vθ Vz (a + b) x = |
| 293 | cylindricalVectorLaplacian R Vr Vθ Vz a x + |
| 294 | cylindricalVectorLaplacian R Vr Vθ Vz b x := by |
| 295 | have hL i : cylindricalLaplacian R Vr Vθ Vz (fun y => a y i + b y i) x = |
| 296 | cylindricalLaplacian R Vr Vθ Vz (fun y => a y i) x + |
| 297 | cylindricalLaplacian R Vr Vθ Vz (fun y => b y i) x := |
| 298 | cylindricalLaplacian_add hU R hr hθ hz (ha i) (hb i) hx |
| 299 | have hD i := along_add Vθ |
| 300 | (((ha i).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 301 | (((hb i).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 302 | ext i |
| 303 | fin_cases i <;> |
| 304 | simp [cylindricalVectorLaplacian, angularGenerator, hL 0, hL 1, hL 2, |
| 305 | hD 0, hD 1, Complex.real_smul] <;> ring |
| 306 | |
| 307 | theorem gradient_add (R : D → ℝ) (Vr Vθ Vz : D → D) |
| 308 | {p q : D → ℂ} {x : D} (hp : DifferentiableAt ℝ p x) |
| 309 | (hq : DifferentiableAt ℝ q x) : |
| 310 | gradient R Vr Vθ Vz (p + q) x = gradient R Vr Vθ Vz p x + gradient R Vr Vθ Vz q x := by |
| 311 | have hd (V : D → D) : along V (p + q) x = along V p x + along V q x := along_add V hp hq |
| 312 | ext i |
| 313 | fin_cases i <;> simp [gradient, hd, smul_add] |
| 314 | |
| 315 | theorem linearResidual_add {U : Set D} (hU : IsOpen U) (ε : ℝ) (R : D → ℝ) |
| 316 | {Vr Vθ Vz : D → D} (Vt : D → D) (hr : ContDiffOn ℝ ∞ Vr U) |
| 317 | (hθ : ContDiffOn ℝ ∞ Vθ U) (hz : ContDiffOn ℝ ∞ Vz U) |
| 318 | (B a b : D → ComplexVector) (p q : D → ℂ) |
| 319 | (ha : ∀ i, ContDiffOn ℝ ∞ (fun y => a y i) U) |
| 320 | (hb : ∀ i, ContDiffOn ℝ ∞ (fun y => b y i) U) |
| 321 | (hp : ContDiffOn ℝ ∞ p U) (hq : ContDiffOn ℝ ∞ q U) |
| 322 | {x : D} (hx : x ∈ U) : |
| 323 | linearResidual ε R Vr Vθ Vz Vt B (a + b) (p + q) x = |
| 324 | linearResidual ε R Vr Vθ Vz Vt B a p x + linearResidual ε R Vr Vθ Vz Vt B b q x := by |
| 325 | have da i := ((ha i).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 326 | have db i := ((hb i).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 327 | have dp := (hp.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 328 | have dq := (hq.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 329 | have hL := cylindricalVectorLaplacian_add hU R hr hθ hz ha hb hx |
| 330 | ext i |
| 331 | simp only [linearResidual, Pi.add_apply, along_add _ (da i) (db i), |
| 332 | transport_add_left, transport_add_right R Vr Vθ Vz B a b da db, |
| 333 | gradient_add R Vr Vθ Vz dp dq, hL] |
| 334 | ring |
| 335 | |
| 336 | /-- Exact residual of a perturbation of a fixed base, before the virtual |
| 337 | stress and the separately retained base residual are added. -/ |
| 338 | noncomputable def nonlinearResidual (ε : ℝ) (R : D → ℝ) (Vr Vθ Vz Vt : D → D) |
| 339 | (B a : D → ComplexVector) (p : D → ℂ) (x : D) : ComplexVector := |
| 340 | linearResidual ε R Vr Vθ Vz Vt B a p x + transport R Vr Vθ Vz a a x |
| 341 | |
| 342 | theorem nonlinearResidual_add_sub {U : Set D} (hU : IsOpen U) (ε : ℝ) (R : D → ℝ) |
| 343 | {Vr Vθ Vz : D → D} (Vt : D → D) (hr : ContDiffOn ℝ ∞ Vr U) |
| 344 | (hθ : ContDiffOn ℝ ∞ Vθ U) (hz : ContDiffOn ℝ ∞ Vz U) |
| 345 | (B a b : D → ComplexVector) (p q : D → ℂ) |
| 346 | (ha : ∀ i, ContDiffOn ℝ ∞ (fun y => a y i) U) |
| 347 | (hb : ∀ i, ContDiffOn ℝ ∞ (fun y => b y i) U) |
| 348 | (hp : ContDiffOn ℝ ∞ p U) (hq : ContDiffOn ℝ ∞ q U) |
| 349 | {x : D} (hx : x ∈ U) : |
| 350 | nonlinearResidual ε R Vr Vθ Vz Vt B (a + b) (p + q) x - |
| 351 | nonlinearResidual ε R Vr Vθ Vz Vt B a p x = |
| 352 | linearResidual ε R Vr Vθ Vz Vt B b q x + transport R Vr Vθ Vz a b x + |
| 353 | transport R Vr Vθ Vz b a x + transport R Vr Vθ Vz b b x := by |
| 354 | have da i := ((ha i).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 355 | have db i := ((hb i).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 356 | rw [nonlinearResidual, linearResidual_add hU ε R Vt hr hθ hz B a b p q ha hb hp hq hx, |
| 357 | transport_add_left, transport_add_right R Vr Vθ Vz a a b da db, |
| 358 | transport_add_right R Vr Vθ Vz b a b da db, nonlinearResidual] |
| 359 | abel |
| 360 | |
| 361 | end FullCalculus |
| 362 | |
| 363 | section FullFields |
| 364 | |
| 365 | open CorrectionState HarmonicCalculus |
| 366 | |
| 367 | noncomputable def radialDirection (c : Context D) (n : ℕ) (x : D × ℝ) : D × ℝ := |
| 368 | (c.operators.eR + (c.operators.radialFrequency n * c.operators.radialProfile x.1) • |
| 369 | c.operators.vR, 0) |
| 370 | |
| 371 | noncomputable def axialDirection (c : Context D) (n : ℕ) (_x : D × ℝ) : D × ℝ := |
| 372 | (c.operators.epsilon n • c.operators.eZ, 0) |
| 373 | |
| 374 | noncomputable def angularDirection (_x : D × ℝ) : D × ℝ := (0, 1) |
| 375 | |
| 376 | noncomputable def timeDirection (c : Context D) (n : ℕ) (_x : D × ℝ) : D × ℝ := |
| 377 | (c.operators.fastCoefficient n • c.operators.vT - c.operators.epsilon n • c.operators.eT, 0) |
| 378 | |
| 379 | noncomputable def complexBase (c : Context D) (n : ℕ) (x : D × ℝ) : ComplexVector := |
| 380 | ![(c.base.radial n x.1 : ℂ), (c.base.angular n x.1 : ℂ), (c.base.axial n x.1 : ℂ)] |
| 381 | |
| 382 | noncomputable def complexPerturbation (u : State D) (n : ℕ) (x : D × ℝ) : ComplexVector := |
| 383 | ![(u.mean.radial n x.1 + u.oscillation n x 0 : ℝ), |
| 384 | (u.mean.angular n x.1 + u.oscillation n x 1 : ℝ), |
| 385 | (u.mean.axial n x.1 + u.oscillation n x 2 : ℝ)] |
| 386 | |
| 387 | noncomputable def complexPressure (u : State D) (n : ℕ) (x : D × ℝ) : ℂ := |
| 388 | (u.totalPressureIncrement n x : ℝ) |
| 389 | |
| 390 | noncomputable def virtualDivergence (c : Context D) (n : ℕ) (x : D × ℝ) : Fin 3 → ℝ := |
| 391 | ![0, -(c.operators.radialDiv 2 c.virtualTheta n x.1), |
| 392 | -(c.operators.radialDiv 1 c.virtualAxial n x.1)] |
| 393 | |
| 394 | /-- This field uses actual Fréchet derivatives. The base flat error is |
| 395 | restored once, alongside the negative virtual-stress divergence. -/ |
| 396 | noncomputable def fullResidual (c : Context D) (u : State D) : Oscillation D := fun n x i => |
| 397 | (nonlinearResidual (c.operators.epsilon n) (fun y : D × ℝ => c.operators.radius y.1) |
| 398 | (radialDirection c n) angularDirection (axialDirection c n) (timeDirection c n) |
| 399 | (complexBase c n) (complexPerturbation u n) (complexPressure u n) x i).re + |
| 400 | virtualDivergence c n x i + u.errors.base n x i |
| 401 | |
| 402 | noncomputable def fullGoodResidual (c : Context D) (u : State D) : Oscillation D := |
| 403 | fullResidual c u - u.errors.total |
| 404 | |
| 405 | noncomputable def angularMeanVector (f : Oscillation D) : MeanVector D := |
| 406 | fun n x i => angularAverage (fun k p => f k p i) n x |
| 407 | |
| 408 | noncomputable def angularNonconstant (f : Oscillation D) : Oscillation D := |
| 409 | fun n x i => f n x i - angularMeanVector f n x.1 i |
| 410 | |
| 411 | noncomputable def fullGoodWaveResidual (c : Context D) (u : State D) : Oscillation D := |
| 412 | angularNonconstant (fullGoodResidual c u) |
| 413 | |
| 414 | theorem fullResidual_eq_good_add_excluded (c : Context D) (u : State D) : |
| 415 | fullResidual c u = fullGoodResidual c u + u.errors.total := by |
| 416 | simp [fullGoodResidual] |
| 417 | |
| 418 | theorem fullResidual_decomposition (c : Context D) (u : State D) : |
| 419 | fullResidual c u = fun n x i => fullGoodWaveResidual c u n x i + |
| 420 | angularMeanVector (fullGoodResidual c u) n x.1 i + u.errors.total n x i := by |
| 421 | funext n x i |
| 422 | simp only [fullGoodWaveResidual, angularNonconstant, fullGoodResidual, |
| 423 | Pi.sub_apply] |
| 424 | ring |
| 425 | |
| 426 | end FullFields |
| 427 | |
| 428 | section ActualCovariance |
| 429 | |
| 430 | open CorrectionState MeasureTheory |
| 431 | |
| 432 | def AngularContinuous (u : Oscillation D) : Prop := |
| 433 | ∀ n x i, Continuous (fun θ : ℝ => u n (x, θ) i) |
| 434 | |
| 435 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 436 | theorem AngularContinuous.add {u v : Oscillation D} |
| 437 | (hu : AngularContinuous u) (hv : AngularContinuous v) : AngularContinuous (u + v) := |
| 438 | fun n x i => (hu n x i).add (hv n x i) |
| 439 | |
| 440 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 441 | theorem bilinearCovariance_add_left {u v w : Oscillation D} |
| 442 | (hu : AngularContinuous u) (hv : AngularContinuous v) (hw : AngularContinuous w) : |
| 443 | bilinearCovariance (u + v) w = bilinearCovariance u w + bilinearCovariance v w := by |
| 444 | funext i j n x |
| 445 | have he : (fun θ : ℝ => (u + v) n (x, θ) i * w n (x, θ) j) = |
| 446 | (fun θ => u n (x, θ) i * w n (x, θ) j + v n (x, θ) i * w n (x, θ) j) := by |
| 447 | funext θ |
| 448 | simp only [Pi.add_apply] |
| 449 | ring |
| 450 | change (∫ θ in (0 : ℝ)..2 * Real.pi, (u + v) n (x, θ) i * w n (x, θ) j) / |
| 451 | (2 * Real.pi) = _ |
| 452 | rw [he, intervalIntegral.integral_add (((hu n x i).fun_mul (hw n x j)).intervalIntegrable _ _) |
| 453 | (((hv n x i).fun_mul (hw n x j)).intervalIntegrable _ _), add_div] |
| 454 | rfl |
| 455 | |
| 456 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 457 | theorem bilinearCovariance_add_right {u v w : Oscillation D} |
| 458 | (hu : AngularContinuous u) (hv : AngularContinuous v) (hw : AngularContinuous w) : |
| 459 | bilinearCovariance u (v + w) = bilinearCovariance u v + bilinearCovariance u w := by |
| 460 | funext i j |
| 461 | rw [bilinearCovariance_comm u (v + w) i j, |
| 462 | congrFun (congrFun (bilinearCovariance_add_left hv hw hu) j) i] |
| 463 | simp only [Pi.add_apply, bilinearCovariance_comm v u j i, bilinearCovariance_comm w u j i] |
| 464 | |
| 465 | /-- The actual covariance increment contains both cross terms and the |
| 466 | entire square of the exact increment. -/ |
| 467 | noncomputable def covarianceIncrement (u v : Oscillation D) : Tensor D := |
| 468 | bilinearCovariance u v + bilinearCovariance v u + bilinearCovariance v v |
| 469 | |
| 470 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 471 | theorem covariance_add {u v : Oscillation D} |
| 472 | (hu : AngularContinuous u) (hv : AngularContinuous v) : |
| 473 | bilinearCovariance (u + v) (u + v) = |
| 474 | bilinearCovariance u u + covarianceIncrement u v := by |
| 475 | rw [bilinearCovariance_add_left hu hv (hu.add hv), |
| 476 | bilinearCovariance_add_right hu hu hv, bilinearCovariance_add_right hv hu hv] |
| 477 | unfold covarianceIncrement |
| 478 | abel |
| 479 | |
| 480 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 481 | theorem covariance_actual_update (s : State D) (m : Triple D) (p : ScalarField D) |
| 482 | (v : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) |
| 483 | (hu : AngularContinuous s.oscillation) (hv : AngularContinuous v) : |
| 484 | (s.addIncrement m p v q e).covariance = s.covariance + covarianceIncrement s.oscillation v := |
| 485 | covariance_add hu hv |
| 486 | |
| 487 | end ActualCovariance |
| 488 | |
| 489 | section ActualFullUpdate |
| 490 | |
| 491 | open CorrectionState HarmonicCalculus |
| 492 | |
| 493 | noncomputable def complexIncrement (m : Triple D) (v : Oscillation D) |
| 494 | (n : ℕ) (x : D × ℝ) : ComplexVector := |
| 495 | ![(m.radial n x.1 + v n x 0 : ℝ), (m.angular n x.1 + v n x 1 : ℝ), |
| 496 | (m.axial n x.1 + v n x 2 : ℝ)] |
| 497 | |
| 498 | noncomputable def complexPressureIncrement (p : ScalarField D) (q : OscillatoryScalar D) |
| 499 | (n : ℕ) (x : D × ℝ) : ℂ := (p n x.1 + q n x : ℝ) |
| 500 | |
| 501 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 502 | theorem complexPerturbation_actual_update (s : State D) (m : Triple D) (p : ScalarField D) |
| 503 | (v : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) (n : ℕ) : |
| 504 | complexPerturbation (s.addIncrement m p v q e) n = |
| 505 | complexPerturbation s n + complexIncrement m v n := by |
| 506 | funext x i |
| 507 | fin_cases i <;> simp [complexPerturbation, complexIncrement, State.addIncrement, updated] <;> ring |
| 508 | |
| 509 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 510 | theorem complexPressure_actual_update (s : State D) (m : Triple D) (p : ScalarField D) |
| 511 | (v : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) (n : ℕ) : |
| 512 | complexPressure (s.addIncrement m p v q e) n = |
| 513 | complexPressure s n + complexPressureIncrement p q n := by |
| 514 | funext x |
| 515 | simp [complexPressure, complexPressureIncrement, State.totalPressureIncrement, State.addIncrement] |
| 516 | ring |
| 517 | |
| 518 | /-- The differential increment uses the old *exact* perturbation in both |
| 519 | cross terms. The stored excluded residual is not multiplied into the PDE. -/ |
| 520 | noncomputable def fullDifferentialIncrement (c : Context D) (s : State D) |
| 521 | (m : Triple D) (p : ScalarField D) (v : Oscillation D) (q : OscillatoryScalar D) : |
| 522 | ℕ → D × ℝ → ComplexVector := fun n x => |
| 523 | let R : D × ℝ → ℝ := fun y => c.operators.radius y.1 |
| 524 | let a := complexPerturbation s n |
| 525 | let b := complexIncrement m v n |
| 526 | LinearWaveResidual.linearResidual (c.operators.epsilon n) R |
| 527 | (radialDirection c n) angularDirection (axialDirection c n) (timeDirection c n) |
| 528 | (complexBase c n) b (complexPressureIncrement p q n) x + |
| 529 | LinearWaveResidual.transport R (radialDirection c n) angularDirection (axialDirection c n) a b x + |
| 530 | LinearWaveResidual.transport R (radialDirection c n) angularDirection (axialDirection c n) b a x + |
| 531 | LinearWaveResidual.transport R (radialDirection c n) angularDirection (axialDirection c n) b b x |
| 532 | |
| 533 | theorem fullResidual_actual_update {U : Set (D × ℝ)} (hU : IsOpen U) |
| 534 | (c : Context D) (s : State D) (m : Triple D) (p : ScalarField D) |
| 535 | (v : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) (n : ℕ) |
| 536 | (hr : ContDiffOn ℝ ∞ (radialDirection c n) U) |
| 537 | (ha : ∀ i, ContDiffOn ℝ ∞ (fun x => complexPerturbation s n x i) U) |
| 538 | (hb : ∀ i, ContDiffOn ℝ ∞ (fun x => complexIncrement m v n x i) U) |
| 539 | (hp : ContDiffOn ℝ ∞ (complexPressure s n) U) |
| 540 | (hq : ContDiffOn ℝ ∞ (complexPressureIncrement p q n) U) |
| 541 | {x : D × ℝ} (hx : x ∈ U) (i : Fin 3) : |
| 542 | fullResidual c (s.addIncrement m p v q e) n x i - fullResidual c s n x i = |
| 543 | (fullDifferentialIncrement c s m p v q n x i).re + e.base n x i := by |
| 544 | have hd := nonlinearResidual_add_sub hU (c.operators.epsilon n) |
| 545 | (fun y : D × ℝ => c.operators.radius y.1) (timeDirection c n) hr |
| 546 | (show ContDiffOn ℝ ∞ (angularDirection : D × ℝ → D × ℝ) U from contDiffOn_const) |
| 547 | (show ContDiffOn ℝ ∞ (axialDirection c n) U from contDiffOn_const) |
| 548 | (complexBase c n) (complexPerturbation s n) (complexIncrement m v n) |
| 549 | (complexPressure s n) (complexPressureIncrement p q n) ha hb hp hq hx |
| 550 | have hdreal := congrArg Complex.re (congrFun hd i) |
| 551 | simp only [Pi.sub_apply, Pi.add_apply, Complex.sub_re, Complex.add_re] at hdreal |
| 552 | simp only [fullResidual] |
| 553 | rw [complexPerturbation_actual_update, complexPressure_actual_update] |
| 554 | simp only [State.addIncrement, ExcludedErrors.add, Pi.add_apply] |
| 555 | change _ = (fullDifferentialIncrement c s m p v q n x i).re + _ |
| 556 | unfold fullDifferentialIncrement |
| 557 | simp only [Pi.add_apply, Complex.add_re] |
| 558 | linarith |
| 559 | |
| 560 | theorem fullGoodResidual_actual_update {U : Set (D × ℝ)} (hU : IsOpen U) |
| 561 | (c : Context D) (s : State D) (m : Triple D) (p : ScalarField D) |
| 562 | (v : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) (n : ℕ) |
| 563 | (hr : ContDiffOn ℝ ∞ (radialDirection c n) U) |
| 564 | (ha : ∀ i, ContDiffOn ℝ ∞ (fun x => complexPerturbation s n x i) U) |
| 565 | (hb : ∀ i, ContDiffOn ℝ ∞ (fun x => complexIncrement m v n x i) U) |
| 566 | (hp : ContDiffOn ℝ ∞ (complexPressure s n) U) |
| 567 | (hq : ContDiffOn ℝ ∞ (complexPressureIncrement p q n) U) |
| 568 | {x : D × ℝ} (hx : x ∈ U) (i : Fin 3) : |
| 569 | fullGoodResidual c (s.addIncrement m p v q e) n x i - fullGoodResidual c s n x i = |
| 570 | (fullDifferentialIncrement c s m p v q n x i).re - |
| 571 | e.gaussian n x i - e.aliasError n x i := by |
| 572 | have hd := fullResidual_actual_update hU c s m p v q e n hr ha hb hp hq hx i |
| 573 | simp only [fullGoodResidual, State.addIncrement, ExcludedErrors.total, |
| 574 | ExcludedErrors.add, Pi.sub_apply, Pi.add_apply] at * |
| 575 | linarith |
| 576 | |
| 577 | end ActualFullUpdate |
| 578 | |
| 579 | section TemporalComposition |
| 580 | |
| 581 | open CorrectionState |
| 582 | |
| 583 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 584 | |
| 585 | noncomputable def meanBar (f : ScalarField (PressureStream.Lift S)) : |
| 586 | ScalarField (PressureStream.Lift S) := |
| 587 | fun n x => PressureStream.torusAverage (f n) (x.1, x.2.1) |
| 588 | |
| 589 | noncomputable def temporalPressureChange (r : ReconstructionData) (h : ℝ) |
| 590 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 591 | (u : State (PressureStream.Lift S)) : ScalarField (PressureStream.Lift S) := |
| 592 | (temporalStage r h axial c u).pressure - u.pressure |
| 593 | |
| 594 | theorem temporalIncrement_smooth (r : ReconstructionData) (h : ℝ) |
| 595 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 596 | (u : State (PressureStream.Lift S)) (U : Set (PressureStream.Lift S)) |
| 597 | (ha : 0 < r.inner) (hd : 0 < r.exponent) |
| 598 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 599 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 600 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 601 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 602 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) : |
| 603 | SmoothTriple U (temporalIncrement r h axial c u) := by |
| 604 | refine ⟨fun n => ?_, fun n => ?_, fun n => ?_⟩ |
| 605 | · exact (TemporalMeanUpdate.radialUpdate_smooth ha r.inner_lt_outer hd r.radialDirection |
| 606 | (c.operators.epsilon n • axial) h n (hz n) (hpz n) (hsz n)).contDiffOn |
| 607 | · exact (TemporalMeanUpdate.desiredIncrement_smooth h n (hθ n) (hpθ n)).contDiffOn |
| 608 | · exact (TemporalMeanUpdate.axialUpdate_smooth ha r.inner_lt_outer hd r.radialDirection |
| 609 | h n (hz n) (hpz n) (hsz n)).contDiffOn |
| 610 | |
| 611 | theorem temporalStage_theta_exact {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 612 | (r : ReconstructionData) (h : ℝ) (axial slow : S × PressureStream.Plane) |
| 613 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 614 | (ha : 0 < r.inner) (hd : 0 < r.exponent) |
| 615 | (hcompat : c.operators = graphOperators r c.operators.epsilon |
| 616 | (ChartScales.timeCoefficient h) axial slow (TorusInverse.vector .temporal)) |
| 617 | (hprofile : ContDiffOn ℝ ∞ c.operators.radialProfile U) |
| 618 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 619 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 620 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 621 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 622 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 623 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 624 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) : |
| 625 | Agree U ((temporalStage r h axial c u).thetaResidual c) |
| 626 | (meanBar (u.thetaResidual c) + thetaRemainder c.operators c.base u.mean |
| 627 | (temporalIncrement r h axial c u)) := by |
| 628 | have hi := temporalIncrement_smooth r h axial c u U ha hd hθ hz hpθ hpz hsz |
| 629 | have he := thetaResidual_change hU c.operators hprofile hb hm hi u.covariance hW c.virtualTheta |
| 630 | have hnew : (temporalStage r h axial c u).thetaResidual c = |
| 631 | MeanIncrementBounds.thetaResidual c.operators c.base |
| 632 | (updated u.mean (temporalIncrement r h axial c u)) u.covariance c.virtualTheta := by |
| 633 | simp [temporalStage, reconstructPressure, State.thetaResidual, State.addIncrement] |
| 634 | rfl |
| 635 | intro n x hx |
| 636 | have he' := he n hx |
| 637 | have hf := (temporal_fast_cancellation r h axial c u ha hd hθ hz hpθ hpz hsz n x).1 |
| 638 | have hfast : c.operators.fastTime (temporalIncrement r h axial c u).angular n x = |
| 639 | TemporalMeanUpdate.fastDerivative h n ((temporalIncrement r h axial c u).angular n) x := by |
| 640 | conv_lhs => rw [hcompat] |
| 641 | rfl |
| 642 | rw [hnew] |
| 643 | simp only [Pi.add_apply, Pi.sub_apply, hfast] at he' |
| 644 | simp only [TemporalMeanUpdate.centered] at hf |
| 645 | change _ = PressureStream.torusAverage (u.thetaResidual c n) (x.1, x.2.1) + _ |
| 646 | change _ + (u.thetaResidual c n x - _) = 0 at hf |
| 647 | change _ - u.thetaResidual c n x = _ at he' |
| 648 | linarith |
| 649 | |
| 650 | theorem temporalStage_axial_exact {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 651 | (r : ReconstructionData) (h : ℝ) (axial slow : S × PressureStream.Plane) |
| 652 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 653 | (ha : 0 < r.inner) (hd : 0 < r.exponent) |
| 654 | (hcompat : c.operators = graphOperators r c.operators.epsilon |
| 655 | (ChartScales.timeCoefficient h) axial slow (TorusInverse.vector .temporal)) |
| 656 | (hprofile : ContDiffOn ℝ ∞ c.operators.radialProfile U) |
| 657 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 658 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 659 | (hp : SmoothOn U u.pressure) (hnp : SmoothOn U (temporalStage r h axial c u).pressure) |
| 660 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 661 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 662 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 663 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 664 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) : |
| 665 | Agree U (fun n x => (temporalStage r h axial c u).axialResidual c n x - |
| 666 | temporalAlias r h c u n (x, 0) 2) |
| 667 | (meanBar (u.axialResidual c) + axialRemainder c.operators c.base u.mean |
| 668 | (temporalIncrement r h axial c u) (temporalPressureChange r h axial c u)) := by |
| 669 | have hi := temporalIncrement_smooth r h axial c u U ha hd hθ hz hpθ hpz hsz |
| 670 | have he := axialResidual_change hU c.operators hprofile hb hm hi u.covariance hW |
| 671 | u.pressure (temporalPressureChange r h axial c u) c.virtualAxial hp (hnp.sub hp) |
| 672 | have hpressure : u.pressure + temporalPressureChange r h axial c u = |
| 673 | (temporalStage r h axial c u).pressure := by |
| 674 | unfold temporalPressureChange |
| 675 | abel |
| 676 | have hnew : (temporalStage r h axial c u).axialResidual c = |
| 677 | MeanIncrementBounds.axialResidual c.operators c.base |
| 678 | (updated u.mean (temporalIncrement r h axial c u)) u.covariance |
| 679 | (u.pressure + temporalPressureChange r h axial c u) c.virtualAxial := by |
| 680 | rw [hpressure] |
| 681 | simp [temporalStage, reconstructPressure, State.axialResidual, State.addIncrement] |
| 682 | rfl |
| 683 | intro n x hx |
| 684 | have he' := he n hx |
| 685 | have hf := (temporal_fast_cancellation r h axial c u ha hd hθ hz hpθ hpz hsz n x).2 |
| 686 | have hfast : c.operators.fastTime (temporalIncrement r h axial c u).axial n x = |
| 687 | TemporalMeanUpdate.fastDerivative h n ((temporalIncrement r h axial c u).axial n) x := by |
| 688 | conv_lhs => rw [hcompat] |
| 689 | rfl |
| 690 | rw [hnew] |
| 691 | simp only [Pi.add_apply, Pi.sub_apply, hfast] at he' |
| 692 | simp only [TemporalMeanUpdate.centered] at hf |
| 693 | change _ = PressureStream.torusAverage (u.axialResidual c n) (x.1, x.2.1) + _ |
| 694 | change _ + (u.axialResidual c n x - _) = _ at hf |
| 695 | change _ - u.axialResidual c n x = _ at he' |
| 696 | dsimp only |
| 697 | linarith |
| 698 | |
| 699 | /-- The increment bound is proved for the actual inverse and stream, from |
| 700 | the current residual classes. No increment or updated-residual class is |
| 701 | assumed. The inverse-direction hypothesis is the concrete graph direction. -/ |
| 702 | theorem temporalIncrement_mem (r : ReconstructionData) (h : ℝ) |
| 703 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 704 | (u : State (PressureStream.Lift S)) {cL cR H : ℝ} |
| 705 | (ha : 0 < r.inner) (hd : 0 < r.exponent) (hcL : 0 < cL) (hcR : 0 < cR) (hh : 0 ≤ h) |
| 706 | (L : ℕ → ℝ) (hε : ∀ n, 0 < c.operators.epsilon n) |
| 707 | (hεone : ∀ n, c.operators.epsilon n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 708 | (hscale : ∀ n, ChartScales.S n ≤ L n) (hM : ∀ n, r.frequency n ≠ 0) |
| 709 | (hvr : r.radialDirection = TorusInverse.vector .radial) |
| 710 | (hθclass : MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 711 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (u.thetaResidual c)) |
| 712 | (hzclass : MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 713 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (u.axialResidual c)) |
| 714 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 715 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 716 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 717 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 718 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) : |
| 719 | IncrementBounds (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 720 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (temporalIncrement r h axial c u) := by |
| 721 | refine ⟨?_, ?_, ?_⟩ |
| 722 | · exact TemporalMeanUpdate.meanClass_scaledRadialUpdate ha r.inner_lt_outer hd hcL hcR hh |
| 723 | c.operators.epsilon L hε hεone hL hscale r.frequency (fun _ => r.radialDirection) axial |
| 724 | hzclass hz hpz hsz |
| 725 | · exact TemporalMeanUpdate.meanClass_desiredIncrement ha hcL hcR hh |
| 726 | c.operators.epsilon L hε hεone hL hscale hθclass hθ hpθ |
| 727 | · simpa only [temporalIncrement, hvr] using |
| 728 | (TemporalMeanUpdate.meanClass_axialUpdate ha r.inner_lt_outer hd hcL hcR hh |
| 729 | c.operators.epsilon L hε hεone hL hscale r.frequency hM hzclass hz hpz hsz) |
| 730 | |
| 731 | end TemporalComposition |
| 732 | |
| 733 | section TemporalAngularGain |
| 734 | |
| 735 | open CorrectionState |
| 736 | |
| 737 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 738 | |
| 739 | /-- An actual temporal stage preserves the improved bar exponent whenever |
| 740 | that exponent is below its proved differentiated remainder exponent. -/ |
| 741 | theorem temporalStage_theta_mem (r : ReconstructionData) (h : ℝ) |
| 742 | (axial slow : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 743 | (u : State (PressureStream.Lift S)) {cL cR H κ β : ℝ} |
| 744 | (ha : 0 < r.inner) (hd : 0 < r.exponent) (hcL : 0 < cL) (hcR : 0 < cR) (hh : 0 ≤ h) |
| 745 | (L : ℕ → ℝ) (hε : ∀ n, 0 < c.operators.epsilon n) |
| 746 | (hεone : ∀ n, c.operators.epsilon n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 747 | (hscale : ∀ n, ChartScales.S n ≤ L n) (hM : ∀ n, r.frequency n ≠ 0) |
| 748 | (hvr : r.radialDirection = TorusInverse.vector .radial) |
| 749 | (hcompat : c.operators = graphOperators r c.operators.epsilon |
| 750 | (ChartScales.timeCoefficient h) axial slow (TorusInverse.vector .temporal)) |
| 751 | (ho : OperatorBounds (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 752 | ha hcL hcR c.operators.epsilon L hε hεone hL) c.operators κ) |
| 753 | (hb : BaseBounds (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 754 | ha hcL hcR c.operators.epsilon L hε hεone hL) c.base) |
| 755 | (hm : MeanIncrementBounds.CumulativeBounds |
| 756 | (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 757 | ha hcL hcR c.operators.epsilon L hε hεone hL) u.mean) |
| 758 | (hW : ∀ i j, SmoothOn (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 759 | ha hcL hcR c.operators.epsilon L hε hεone hL).domain (u.covariance i j)) |
| 760 | (hθclass : MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 761 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (u.thetaResidual c)) |
| 762 | (hzclass : MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 763 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (u.axialResidual c)) |
| 764 | (hbar : MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 765 | ha hcL hcR c.operators.epsilon L hε hεone hL) β (meanBar (u.thetaResidual c))) |
| 766 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 767 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 768 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 769 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 770 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) |
| 771 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 772 | MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 773 | ha hcL hcR c.operators.epsilon L hε hεone hL) β |
| 774 | ((temporalStage r h axial c u).thetaResidual c) := by |
| 775 | have hi := temporalIncrement_mem r h axial c u ha hd hcL hcR hh L hε hεone hL |
| 776 | hscale hM hvr hθclass hzclass hθ hz hpθ hpz hsz |
| 777 | have herr := (thetaRemainder_mem ho hb hm hi hH).mono_exponent hβ |
| 778 | apply class_congr (hbar.add herr) |
| 779 | intro n x hx |
| 780 | exact temporalStage_theta_exact (S := S) (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 781 | ha hcL hcR c.operators.epsilon L hε hεone hL).isOpen_domain r h axial slow c u ha hd |
| 782 | hcompat (ho.radialProfile.smooth 0) hb.smooth hm.smooth hW hθ hz hpθ hpz hsz n hx |
| 783 | |
| 784 | end TemporalAngularGain |
| 785 | |
| 786 | section TemporalPressureAndAxial |
| 787 | |
| 788 | open CorrectionState |
| 789 | |
| 790 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 791 | |
| 792 | omit [FiniteDimensional ℝ S] in |
| 793 | theorem temporalStage_pressure_formula (r : ReconstructionData) (h : ℝ) |
| 794 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 795 | (u : State (PressureStream.Lift S)) : |
| 796 | (temporalStage r h axial c u).pressure = |
| 797 | reconstructedPressure r.exponent r.inner r.outer r.inner_lt_outer r.frequency |
| 798 | (fun _ => r.radialDirection) c.operators c.base |
| 799 | (updated u.mean (temporalIncrement r h axial c u)) u.covariance := by |
| 800 | simp [temporalStage, reconstructPressure, State.addIncrement, |
| 801 | State.gr] |
| 802 | rfl |
| 803 | |
| 804 | omit [FiniteDimensional ℝ S] in |
| 805 | /-- The pressure change is bounded by applying the actual compact inverse |
| 806 | to the actual change of `gr`, whose centrifugal term is retained. -/ |
| 807 | theorem temporalPressureChange_mem (r : ReconstructionData) (h : ℝ) |
| 808 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 809 | (u : State (PressureStream.Lift S)) {cL cR H κ : ℝ} |
| 810 | (ha : 0 < r.inner) (hd : 0 < r.exponent) (hcL : 0 < cL) (hcR : 0 < cR) |
| 811 | (L : ℕ → ℝ) (hε : ∀ n, 0 < c.operators.epsilon n) |
| 812 | (hεone : ∀ n, c.operators.epsilon n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 813 | (ho : OperatorBounds (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 814 | ha hcL hcR c.operators.epsilon L hε hεone hL) c.operators κ) |
| 815 | (hb : BaseBounds (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 816 | ha hcL hcR c.operators.epsilon L hε hεone hL) c.base) |
| 817 | (hm : MeanIncrementBounds.CumulativeBounds (WeightedRadialPrimitive.logStripData |
| 818 | r.inner r.outer cL cR ha hcL hcR c.operators.epsilon L hε hεone hL) u.mean) |
| 819 | (hi : IncrementBounds (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 820 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (temporalIncrement r h axial c u)) |
| 821 | (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) |
| 822 | (hW : ∀ i j, SmoothOn (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 823 | ha hcL hcR c.operators.epsilon L hε hεone hL).domain (u.covariance i j)) |
| 824 | (hf : ∀ n, ContDiff ℝ ∞ (MeanIncrementBounds.gr c.operators c.base |
| 825 | (updated u.mean (temporalIncrement r h axial c u)) u.covariance n)) |
| 826 | (hg : ∀ n, ContDiff ℝ ∞ (u.gr c n)) |
| 827 | (hsf : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (MeanIncrementBounds.gr |
| 828 | c.operators c.base (updated u.mean (temporalIncrement r h axial c u)) u.covariance n)) |
| 829 | (hsg : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.gr c n)) |
| 830 | (hpressure : u.pressure = (reconstructPressure r c u).pressure) : |
| 831 | MeanClass (WeightedRadialPrimitive.logStripData r.inner r.outer cL cR |
| 832 | ha hcL hcR c.operators.epsilon L hε hεone hL) H |
| 833 | (temporalPressureChange r h axial c u) := by |
| 834 | have hp := reconstructedPressure_change_mem ha r.inner_lt_outer hd hcL hcR |
| 835 | c.operators.epsilon L hε hεone hL ho hb hm hi hH hκ u.covariance hW hf hg hsf hsg |
| 836 | r.frequency (fun _ => r.radialDirection) |
| 837 | have hpressure' : u.pressure = reconstructedPressure r.exponent r.inner r.outer |
| 838 | r.inner_lt_outer r.frequency (fun _ => r.radialDirection) c.operators c.base |
| 839 | u.mean u.covariance := hpressure |
| 840 | unfold temporalPressureChange |
| 841 | rw [temporalStage_pressure_formula, hpressure'] |
| 842 | exact hp |
| 843 | |
| 844 | /-- The axial alias remains explicit in the conclusion. Its superflatness |
| 845 | is handled separately; it is not erased from the constructed velocity. -/ |
| 846 | theorem temporalStage_axial_mem {s : StripData (PressureStream.Lift S)} |
| 847 | (r : ReconstructionData) (h : ℝ) (axial slow : S × PressureStream.Plane) |
| 848 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 849 | {H κ β : ℝ} (ha : 0 < r.inner) (hd : 0 < r.exponent) |
| 850 | (hcompat : c.operators = graphOperators r c.operators.epsilon |
| 851 | (ChartScales.timeCoefficient h) axial slow (TorusInverse.vector .temporal)) |
| 852 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 853 | (hm : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 854 | (hi : IncrementBounds s H (temporalIncrement r h axial c u)) |
| 855 | (hp : SmoothOn s.domain u.pressure) |
| 856 | (hdp : MeanClass s H (temporalPressureChange r h axial c u)) |
| 857 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 858 | (hbar : MeanClass s β (meanBar (u.axialResidual c))) |
| 859 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 860 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 861 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 862 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 863 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) |
| 864 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 865 | MeanClass s β (fun n x => (temporalStage r h axial c u).axialResidual c n x - |
| 866 | temporalAlias r h c u n (x, 0) 2) := by |
| 867 | have hnp : SmoothOn s.domain (temporalStage r h axial c u).pressure := by |
| 868 | have he : (temporalStage r h axial c u).pressure = |
| 869 | u.pressure + temporalPressureChange r h axial c u := by |
| 870 | unfold temporalPressureChange |
| 871 | abel |
| 872 | rw [he] |
| 873 | exact hp.add hdp.smooth |
| 874 | have herr := (axialRemainder_mem ho hb hm hi hH hdp).mono_exponent hβ |
| 875 | apply class_congr (hbar.add herr) |
| 876 | intro n x hx |
| 877 | exact temporalStage_axial_exact (S := S) s.isOpen_domain r h axial slow c u ha hd hcompat |
| 878 | (ho.radialProfile.smooth 0) hb.smooth hm.smooth hW hp hnp hθ hz hpθ hpz hsz n hx |
| 879 | |
| 880 | omit [FiniteDimensional ℝ S] in |
| 881 | theorem temporalStage_cumulative {s : StripData (PressureStream.Lift S)} |
| 882 | (r : ReconstructionData) (h : ℝ) (axial : S × PressureStream.Plane) |
| 883 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {H : ℝ} |
| 884 | (hu : CorrectionState.CumulativeBounds s u) |
| 885 | (hi : IncrementBounds s H (temporalIncrement r h axial c u)) |
| 886 | (hp : MeanClass s H (temporalPressureChange r h axial c u)) (hH : 9 / 10 ≤ H) : |
| 887 | CorrectionState.CumulativeBounds s (temporalStage r h axial c u) := by |
| 888 | refine ⟨cumulative_updated hu.velocity hi hH, ?_⟩ |
| 889 | have he : (temporalStage r h axial c u).pressure = |
| 890 | u.pressure + temporalPressureChange r h axial c u := by |
| 891 | unfold temporalPressureChange |
| 892 | abel |
| 893 | rw [he] |
| 894 | exact hu.pressure.add (hp.mono_exponent hH) |
| 895 | |
| 896 | end TemporalPressureAndAxial |
| 897 | |
| 898 | /-! ## One physical field behind the chart family |
| 899 | |
| 900 | The predicate below is deliberately stronger than an indexed collection of |
| 901 | unrelated chart solutions. Every chart is tied to the same physical fields |
| 902 | by specified maps and the manuscript's velocity, pressure, and residual units. |
| 903 | Operator naturality and the concrete chart maps are separate obligations. |
| 904 | -/ |
| 905 | |
| 906 | section PhysicalRepresentation |
| 907 | |
| 908 | open CorrectionState |
| 909 | |
| 910 | variable {P : Type} |
| 911 | |
| 912 | structure PhysicalFields (P : Type) where |
| 913 | mean : P → Fin 3 → ℝ |
| 914 | pressure : P → ℝ |
| 915 | oscillation : P × ℝ → Fin 3 → ℝ |
| 916 | oscillatoryPressure : P × ℝ → ℝ |
| 917 | baseError : P × ℝ → Fin 3 → ℝ |
| 918 | gaussianError : P × ℝ → Fin 3 → ℝ |
| 919 | aliasError : P × ℝ → Fin 3 → ℝ |
| 920 | |
| 921 | noncomputable def PhysicalFields.add (u v : PhysicalFields P) : PhysicalFields P where |
| 922 | mean := u.mean + v.mean |
| 923 | pressure := u.pressure + v.pressure |
| 924 | oscillation := u.oscillation + v.oscillation |
| 925 | oscillatoryPressure := u.oscillatoryPressure + v.oscillatoryPressure |
| 926 | baseError := u.baseError + v.baseError |
| 927 | gaussianError := u.gaussianError + v.gaussianError |
| 928 | aliasError := u.aliasError + v.aliasError |
| 929 | |
| 930 | noncomputable def meanComponents (m : Triple D) (n : ℕ) (x : D) : Fin 3 → ℝ := |
| 931 | ![m.radial n x, m.angular n x, m.axial n x] |
| 932 | |
| 933 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 934 | theorem meanComponents_updated (m h : Triple D) (n : ℕ) (x : D) (i : Fin 3) : |
| 935 | meanComponents (updated m h) n x i = meanComponents m n x i + meanComponents h n x i := by |
| 936 | fin_cases i <;> rfl |
| 937 | |
| 938 | /-- `chart` includes the actual torus covering as well as spatial/time |
| 939 | rescaling. `domain n` specifies where that band is active. -/ |
| 940 | structure RepresentsPhysical (chart : ℕ → P → D) (domain : ℕ → Set P) |
| 941 | (Q : ℕ → ℝ) (A : ℝ) (u : State D) (v : PhysicalFields P) : Prop where |
| 942 | mean : ∀ n x, x ∈ domain n → ∀ i, |
| 943 | meanComponents u.mean n (chart n x) i = Q n ^ A * v.mean x i |
| 944 | pressure : ∀ n x, x ∈ domain n → u.pressure n (chart n x) = Q n ^ (2 * A) * v.pressure x |
| 945 | oscillation : ∀ n x, x ∈ domain n → ∀ θ i, |
| 946 | u.oscillation n (chart n x, θ) i = Q n ^ A * v.oscillation (x, θ) i |
| 947 | oscillatoryPressure : ∀ n x, x ∈ domain n → ∀ θ, |
| 948 | u.oscillatoryPressure n (chart n x, θ) = Q n ^ (2 * A) * v.oscillatoryPressure (x, θ) |
| 949 | baseError : ∀ n x, x ∈ domain n → ∀ θ i, |
| 950 | u.errors.base n (chart n x, θ) i = Q n ^ (2 * A + 1 / 2) * v.baseError (x, θ) i |
| 951 | gaussianError : ∀ n x, x ∈ domain n → ∀ θ i, |
| 952 | u.errors.gaussian n (chart n x, θ) i = Q n ^ (2 * A + 1 / 2) * v.gaussianError (x, θ) i |
| 953 | aliasError : ∀ n x, x ∈ domain n → ∀ θ i, |
| 954 | u.errors.aliasError n (chart n x, θ) i = Q n ^ (2 * A + 1 / 2) * v.aliasError (x, θ) i |
| 955 | |
| 956 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 957 | /-- Actual addition preserves the specified common physical realization. |
| 958 | This does not manufacture a realization for a separately solved chart. -/ |
| 959 | theorem RepresentsPhysical.addIncrement {chart : ℕ → P → D} {domain : ℕ → Set P} |
| 960 | {Q : ℕ → ℝ} {A : ℝ} {u : State D} {v w : PhysicalFields P} |
| 961 | (hu : RepresentsPhysical chart domain Q A u v) |
| 962 | (m : Triple D) (p : ScalarField D) (osc : Oscillation D) (pr : OscillatoryScalar D) |
| 963 | (e : ExcludedErrors D) |
| 964 | (hw : RepresentsPhysical chart domain Q A (⟨m, p, osc, pr, e⟩ : State D) w) : |
| 965 | RepresentsPhysical chart domain Q A (u.addIncrement m p osc pr e) (v.add w) := by |
| 966 | constructor |
| 967 | · intro n x hx i |
| 968 | simp only [State.addIncrement, meanComponents_updated, PhysicalFields.add, Pi.add_apply] |
| 969 | rw [hu.mean n x hx i, hw.mean n x hx i] |
| 970 | ring |
| 971 | · intro n x hx |
| 972 | have hi : p n (chart n x) = Q n ^ (2 * A) * w.pressure x := hw.pressure n x hx |
| 973 | simp only [State.addIncrement, PhysicalFields.add, Pi.add_apply] |
| 974 | rw [hu.pressure n x hx, hi] |
| 975 | ring |
| 976 | · intro n x hx θ i |
| 977 | have hi : osc n (chart n x, θ) i = Q n ^ A * w.oscillation (x, θ) i := |
| 978 | hw.oscillation n x hx θ i |
| 979 | simp only [State.addIncrement, PhysicalFields.add, Pi.add_apply] |
| 980 | rw [hu.oscillation n x hx θ i, hi] |
| 981 | ring |
| 982 | · intro n x hx θ |
| 983 | have hi : pr n (chart n x, θ) = Q n ^ (2 * A) * w.oscillatoryPressure (x, θ) := |
| 984 | hw.oscillatoryPressure n x hx θ |
| 985 | simp only [State.addIncrement, PhysicalFields.add, Pi.add_apply] |
| 986 | rw [hu.oscillatoryPressure n x hx θ, hi] |
| 987 | ring |
| 988 | · intro n x hx θ i |
| 989 | simp only [State.addIncrement, ExcludedErrors.add, PhysicalFields.add, Pi.add_apply] |
| 990 | rw [hu.baseError n x hx θ i, hw.baseError n x hx θ i] |
| 991 | ring |
| 992 | · intro n x hx θ i |
| 993 | simp only [State.addIncrement, ExcludedErrors.add, PhysicalFields.add, Pi.add_apply] |
| 994 | rw [hu.gaussianError n x hx θ i, hw.gaussianError n x hx θ i] |
| 995 | ring |
| 996 | · intro n x hx θ i |
| 997 | simp only [State.addIncrement, ExcludedErrors.add, PhysicalFields.add, Pi.add_apply] |
| 998 | rw [hu.aliasError n x hx θ i, hw.aliasError n x hx θ i] |
| 999 | ring |
| 1000 | |
| 1001 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 1002 | theorem RepresentsPhysical.mean_overlap {chart : ℕ → P → D} {domain : ℕ → Set P} |
| 1003 | {Q : ℕ → ℝ} {A : ℝ} {u : State D} {v : PhysicalFields P} |
| 1004 | (hu : RepresentsPhysical chart domain Q A u v) (hQ : ∀ n, 0 < Q n) |
| 1005 | (n m : ℕ) (x : P) (hn : x ∈ domain n) (hm : x ∈ domain m) (i : Fin 3) : |
| 1006 | meanComponents u.mean n (chart n x) i / Q n ^ A = |
| 1007 | meanComponents u.mean m (chart m x) i / Q m ^ A := by |
| 1008 | rw [hu.mean n x hn i, hu.mean m x hm i] |
| 1009 | rw [mul_div_cancel_left₀ _ (Real.rpow_pos_of_pos (hQ n) A).ne', |
| 1010 | mul_div_cancel_left₀ _ (Real.rpow_pos_of_pos (hQ m) A).ne'] |
| 1011 | |
| 1012 | end PhysicalRepresentation |
| 1013 | |
| 1014 | section RankMeanComposition |
| 1015 | |
| 1016 | open CorrectionState |
| 1017 | |
| 1018 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 1019 | |
| 1020 | noncomputable def rankPressureChange (p : ReconstructionData) (r : RankData S) |
| 1021 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1022 | (u : State (PressureStream.Lift S)) : ScalarField (PressureStream.Lift S) := |
| 1023 | (rankStage p r axial c u).pressure - u.pressure |
| 1024 | |
| 1025 | theorem slow_directional_zero {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 1026 | {f : ScalarField (PressureStream.Lift S)} (hf : SmoothOn U f) |
| 1027 | (hslow : DefectIncrementBounds.IsSlow f) (v : PressureStream.Plane) |
| 1028 | (n : ℕ) {x : PressureStream.Lift S} (hx : x ∈ U) : |
| 1029 | fderiv ℝ (f n) x (0, (0, v)) = 0 := by |
| 1030 | apply directional_zero_of_line_const ((hf.at_point hU n hx).differentiableAt (by simp)) |
| 1031 | intro t |
| 1032 | rcases x with ⟨R, s, Y⟩ |
| 1033 | simp only [Prod.smul_mk, smul_zero, Prod.mk_add_mk, add_zero] |
| 1034 | rw [hslow, hslow] |
| 1035 | |
| 1036 | theorem rankStage_theta_mem {s : StripData (PressureStream.Lift S)} |
| 1037 | (p : ReconstructionData) (r : RankData S) (axial : S × PressureStream.Plane) |
| 1038 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1039 | {H κ β : ℝ} (v : PressureStream.Plane) (hfast : c.operators.vT = (0, (0, v))) |
| 1040 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 1041 | (hm : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 1042 | (hi : IncrementBounds s H (rankIncrement p r axial c u)) |
| 1043 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 1044 | (hcurrent : MeanClass s β (u.thetaResidual c)) |
| 1045 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 1046 | MeanClass s β ((rankStage p r axial c u).thetaResidual c) := by |
| 1047 | have hz : ∀ n x, x ∈ s.domain → |
| 1048 | fderiv ℝ ((rankIncrement p r axial c u).angular n) x c.operators.vT = 0 := by |
| 1049 | intro n x hx |
| 1050 | rw [hfast] |
| 1051 | exact slow_directional_zero s.isOpen_domain hi.angular.smooth |
| 1052 | (DefectIncrementBounds.rankIncrement_angular_slow p r axial c u) v n hx |
| 1053 | have hdelta := thetaResidual_change_slow_mem ho hb hm hi hH u.covariance hW c.virtualTheta hz |
| 1054 | have hnew : (rankStage p r axial c u).thetaResidual c = |
| 1055 | MeanIncrementBounds.thetaResidual c.operators c.base |
| 1056 | (updated u.mean (rankIncrement p r axial c u)) u.covariance c.virtualTheta := by |
| 1057 | simp [rankStage, reconstructPressure, State.thetaResidual, State.addIncrement] |
| 1058 | rfl |
| 1059 | apply class_congr (hcurrent.add (hdelta.mono_exponent hβ)) |
| 1060 | intro n x hx |
| 1061 | rw [hnew] |
| 1062 | change _ = u.thetaResidual c n x + (_ - u.thetaResidual c n x) |
| 1063 | ring |
| 1064 | |
| 1065 | theorem rankStage_axial_mem {s : StripData (PressureStream.Lift S)} |
| 1066 | (p : ReconstructionData) (r : RankData S) (axial : S × PressureStream.Plane) |
| 1067 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1068 | (hg : DefectIncrementBounds.RankGeometry p r c u) |
| 1069 | {H κ β : ℝ} (v : PressureStream.Plane) (hfast : c.operators.vT = (0, (0, v))) |
| 1070 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 1071 | (hm : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 1072 | (hi : IncrementBounds s H (rankIncrement p r axial c u)) |
| 1073 | (hp : SmoothOn s.domain u.pressure) |
| 1074 | (hdp : MeanClass s H (rankPressureChange p r axial c u)) |
| 1075 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 1076 | (hcurrent : MeanClass s β (u.axialResidual c)) |
| 1077 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 1078 | MeanClass s β ((rankStage p r axial c u).axialResidual c) := by |
| 1079 | have hz : ∀ n x, x ∈ s.domain → |
| 1080 | fderiv ℝ ((rankIncrement p r axial c u).axial n) x c.operators.vT = 0 := by |
| 1081 | intro n x hx |
| 1082 | rw [hfast] |
| 1083 | exact slow_directional_zero s.isOpen_domain hi.axial.smooth (hg.axial_slow axial) v n hx |
| 1084 | have hdelta := axialResidual_change_slow_mem ho hb hm hi hH u.covariance hW |
| 1085 | u.pressure (rankPressureChange p r axial c u) c.virtualAxial hp hdp hz |
| 1086 | have hpressure : u.pressure + rankPressureChange p r axial c u = |
| 1087 | (rankStage p r axial c u).pressure := by |
| 1088 | unfold rankPressureChange |
| 1089 | abel |
| 1090 | have hnew : (rankStage p r axial c u).axialResidual c = |
| 1091 | MeanIncrementBounds.axialResidual c.operators c.base |
| 1092 | (updated u.mean (rankIncrement p r axial c u)) u.covariance |
| 1093 | (u.pressure + rankPressureChange p r axial c u) c.virtualAxial := by |
| 1094 | rw [hpressure] |
| 1095 | simp [rankStage, reconstructPressure, State.axialResidual, State.addIncrement] |
| 1096 | rfl |
| 1097 | apply class_congr (hcurrent.add (hdelta.mono_exponent hβ)) |
| 1098 | intro n x hx |
| 1099 | rw [hnew] |
| 1100 | change _ = u.axialResidual c n x + (_ - u.axialResidual c n x) |
| 1101 | ring |
| 1102 | |
| 1103 | theorem rankStage_cumulative {s : StripData (PressureStream.Lift S)} |
| 1104 | (p : ReconstructionData) (r : RankData S) (axial : S × PressureStream.Plane) |
| 1105 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {H : ℝ} |
| 1106 | (hu : CorrectionState.CumulativeBounds s u) |
| 1107 | (hi : IncrementBounds s H (rankIncrement p r axial c u)) |
| 1108 | (hp : MeanClass s H (rankPressureChange p r axial c u)) (hH : 9 / 10 ≤ H) : |
| 1109 | CorrectionState.CumulativeBounds s (rankStage p r axial c u) := by |
| 1110 | refine ⟨cumulative_updated hu.velocity hi hH, ?_⟩ |
| 1111 | have he : (rankStage p r axial c u).pressure = u.pressure + rankPressureChange p r axial c u := by |
| 1112 | unfold rankPressureChange |
| 1113 | abel |
| 1114 | rw [he] |
| 1115 | exact hu.pressure.add (hp.mono_exponent hH) |
| 1116 | |
| 1117 | end RankMeanComposition |
| 1118 | |
| 1119 | section ExcludedMeanErrors |
| 1120 | |
| 1121 | open CorrectionState MeasureTheory |
| 1122 | |
| 1123 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 1124 | theorem angularAverage_add {f g : OscillatoryScalar D} |
| 1125 | (hf : ∀ n x, Continuous (fun θ : ℝ => f n (x, θ))) |
| 1126 | (hg : ∀ n x, Continuous (fun θ : ℝ => g n (x, θ))) : |
| 1127 | angularAverage (f + g) = angularAverage f + angularAverage g := by |
| 1128 | funext n x |
| 1129 | change (∫ θ in (0 : ℝ)..2 * Real.pi, f n (x, θ) + g n (x, θ)) / (2 * Real.pi) = _ |
| 1130 | rw [intervalIntegral.integral_add ((hf n x).intervalIntegrable _ _) |
| 1131 | ((hg n x).intervalIntegrable _ _), add_div] |
| 1132 | rfl |
| 1133 | |
| 1134 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 1135 | theorem angularMeanVector_add {f g : Oscillation D} |
| 1136 | (hf : AngularContinuous f) (hg : AngularContinuous g) : |
| 1137 | angularMeanVector (f + g) = angularMeanVector f + angularMeanVector g := by |
| 1138 | funext n x i |
| 1139 | exact congrFun (congrFun (angularAverage_add (fun n x => hf n x i) (fun n x => hg n x i)) n) x |
| 1140 | |
| 1141 | /-- The base error is restored and subtracted exactly once. Gaussian and |
| 1142 | alias errors remain actual subtracted means, with no zero/flat substitution. -/ |
| 1143 | theorem meanGoodResidual_exact_errors (c : Context D) (u : State D) |
| 1144 | (hb : AngularContinuous u.errors.base) (hg : AngularContinuous u.errors.gaussian) |
| 1145 | (ha : AngularContinuous u.errors.aliasError) : |
| 1146 | u.meanGoodResidual c = u.reducedMeanResidual c - angularMeanVector u.errors.gaussian - |
| 1147 | angularMeanVector u.errors.aliasError := by |
| 1148 | change u.reducedMeanResidual c + angularMeanVector u.errors.base - |
| 1149 | angularMeanVector (u.errors.base + u.errors.gaussian + u.errors.aliasError) = _ |
| 1150 | rw [angularMeanVector_add (hb.add hg) ha, angularMeanVector_add hb hg] |
| 1151 | abel |
| 1152 | |
| 1153 | /-- The same cancellation only uses angular continuity on the selected |
| 1154 | fiber. No regularity outside the current physical domain is needed. -/ |
| 1155 | theorem meanGoodResidual_at (c : Context D) (u : State D) (n : ℕ) (x : D) (i : Fin 3) |
| 1156 | (hb : Continuous (fun θ : ℝ => u.errors.base n (x, θ) i)) |
| 1157 | (hg : Continuous (fun θ : ℝ => u.errors.gaussian n (x, θ) i)) |
| 1158 | (ha : Continuous (fun θ : ℝ => u.errors.aliasError n (x, θ) i)) : |
| 1159 | u.meanGoodResidual c n x i = u.reducedMeanResidual c n x i - |
| 1160 | angularMeanVector u.errors.gaussian n x i - angularMeanVector u.errors.aliasError n x i := by |
| 1161 | change u.reducedMeanResidual c n x i + |
| 1162 | HarmonicResidual.realAngularMean (fun θ => u.errors.base n (x, θ) i) - |
| 1163 | HarmonicResidual.realAngularMean (fun θ => |
| 1164 | u.errors.base n (x, θ) i + u.errors.gaussian n (x, θ) i + |
| 1165 | u.errors.aliasError n (x, θ) i) = _ |
| 1166 | rw [HarmonicResidual.realAngularMean_add (hb.fun_add hg) ha, |
| 1167 | HarmonicResidual.realAngularMean_add hb hg] |
| 1168 | dsimp only [angularMeanVector, angularAverage, HarmonicResidual.realAngularMean, |
| 1169 | HarmonicFields.period] |
| 1170 | ring |
| 1171 | |
| 1172 | theorem meanResidualBounds_of_explicit_errors {s : StripData D} {σ : ℝ} |
| 1173 | (c : Context D) (u : State D) |
| 1174 | (hb : AngularContinuous u.errors.base) (hg : AngularContinuous u.errors.gaussian) |
| 1175 | (ha : AngularContinuous u.errors.aliasError) |
| 1176 | (hθ : MeanClass s (1 + σ) (u.thetaResidual c)) |
| 1177 | (hz : MeanClass s (1 + σ) (u.axialResidual c)) |
| 1178 | (hgθ : MeanClass s (1 + σ) (fun n x => angularMeanVector u.errors.gaussian n x 1)) |
| 1179 | (hgz : MeanClass s (1 + σ) (fun n x => angularMeanVector u.errors.gaussian n x 2)) |
| 1180 | (haθ : MeanClass s (1 + σ) (fun n x => angularMeanVector u.errors.aliasError n x 1)) |
| 1181 | (haz : MeanClass s (1 + σ) (fun n x => angularMeanVector u.errors.aliasError n x 2)) : |
| 1182 | CorrectionState.MeanResidualBounds s σ c u := by |
| 1183 | have he := meanGoodResidual_exact_errors c u hb hg ha |
| 1184 | constructor |
| 1185 | · apply class_congr (Class.sub (Class.sub hθ hgθ) haθ) |
| 1186 | intro n x hx |
| 1187 | rw [he] |
| 1188 | rfl |
| 1189 | · apply class_congr (Class.sub (Class.sub hz hgz) haz) |
| 1190 | intro n x hx |
| 1191 | rw [he] |
| 1192 | rfl |
| 1193 | |
| 1194 | end ExcludedMeanErrors |
| 1195 | |
| 1196 | section ConcreteRankConstruction |
| 1197 | |
| 1198 | open CorrectionState |
| 1199 | |
| 1200 | /-- The concrete normalized five-row inverse uses the physical coordinate |
| 1201 | functions of the current slow point, with no dependence on the torus slot. -/ |
| 1202 | noncomputable def normalizedRankData (coord A B lam a b : ℝ) : |
| 1203 | RankData PressureStream.Plane where |
| 1204 | lambda := lam |
| 1205 | inner := a |
| 1206 | outer := b |
| 1207 | length := fun _ z => Real.sqrt (MeanRankUpdate.chartQ coord (0, z, 0)) |
| 1208 | velocity := fun _ z => MeanRankUpdate.chartQ coord (0, z, 0) ^ (-A) |
| 1209 | coefficient := fun _ z => MeanRankUpdate.shapedAmplitude B |
| 1210 | (MeanRankUpdate.chartEta coord (0, z, 0)) |
| 1211 | |
| 1212 | theorem normalizedRank_angular (coord A B lam a b : ℝ) |
| 1213 | (c : Context MeanRankUpdate.ChartPoint) (u : State MeanRankUpdate.ChartPoint) (n : ℕ) : |
| 1214 | MeanRankUpdate.slowLift (rankAngular (normalizedRankData coord A B lam a b) c u n) = |
| 1215 | MeanRankUpdate.chartAngular coord A B lam a b (fun z => debt c u n z.2.1) := by |
| 1216 | rfl |
| 1217 | |
| 1218 | theorem normalizedRank_desired (coord A B lam a b : ℝ) |
| 1219 | (c : Context MeanRankUpdate.ChartPoint) (u : State MeanRankUpdate.ChartPoint) (n : ℕ) : |
| 1220 | rankDesiredAxial (normalizedRankData coord A B lam a b) c u n = |
| 1221 | MeanRankUpdate.slowChartDesired coord A B lam a b (debt c u n) := by |
| 1222 | rfl |
| 1223 | |
| 1224 | theorem normalizedRank_potential (p : ReconstructionData) (coord A B lam a b : ℝ) |
| 1225 | (c : Context MeanRankUpdate.ChartPoint) (u : State MeanRankUpdate.ChartPoint) (n : ℕ) : |
| 1226 | rankPotential p (normalizedRankData coord A B lam a b) c u n = |
| 1227 | MeanRankUpdate.actualChartPotential coord A B lam a b p.exponent p.inner p.outer |
| 1228 | (p.frequency n) p.radialDirection (debt c u n) := by |
| 1229 | rfl |
| 1230 | |
| 1231 | theorem normalizedRank_radial (p : ReconstructionData) (coord A B lam a b : ℝ) |
| 1232 | (axial : PressureStream.Plane × PressureStream.Plane) |
| 1233 | (c : Context MeanRankUpdate.ChartPoint) (u : State MeanRankUpdate.ChartPoint) : |
| 1234 | (rankIncrement p (normalizedRankData coord A B lam a b) axial c u).radial = |
| 1235 | fun n x => c.operators.epsilon n * MeanRankUpdate.actualChartRadial coord A B lam a b |
| 1236 | p.exponent p.inner p.outer (p.frequency n) p.radialDirection axial (debt c u n) x := by |
| 1237 | funext n x |
| 1238 | change -(fderiv ℝ (rankPotential p (normalizedRankData coord A B lam a b) c u n) x |
| 1239 | (0, c.operators.epsilon n • axial)) = _ |
| 1240 | have hv : ((0 : ℝ), c.operators.epsilon n • axial) = |
| 1241 | c.operators.epsilon n • ((0 : ℝ), axial) := by simp |
| 1242 | rw [hv, map_smul] |
| 1243 | simp only [smul_eq_mul, normalizedRank_potential, |
| 1244 | MeanRankUpdate.actualChartRadial, PressureStream.streamBeta, PressureStream.graphDz, |
| 1245 | mul_neg] |
| 1246 | |
| 1247 | /-- All three classes of the actual rank increment follow from the measured |
| 1248 | debt. The radial factor is the literal epsilon in `rankIncrement`. -/ |
| 1249 | theorem normalizedRankIncrement_mem (s : StripData MeanRankUpdate.ChartPoint) |
| 1250 | (p : ReconstructionData) (c : Context MeanRankUpdate.ChartPoint) |
| 1251 | (u : State MeanRankUpdate.ChartPoint) |
| 1252 | {coord A B lam a b qlo qhi H : ℝ} |
| 1253 | (hc : 0 < coord) (hc1 : coord < 1) (hlam : 0 < lam) |
| 1254 | (ha : 0 < a) (hab : a < b) (hB : B ≠ 0) |
| 1255 | (hp : 0 < p.exponent) (hlo : 0 < p.inner) (hqlo : 0 < qlo) |
| 1256 | (hleft : p.inner ≤ Real.sqrt qlo * a) (hright : Real.sqrt qhi * b ≤ p.outer) |
| 1257 | (hT : ∀ x ∈ s.domain, MeanRankUpdate.chartInput x ∈ PhysicalCoordinateBounds.positiveTime) |
| 1258 | (hq : ∀ x ∈ s.domain, MeanRankUpdate.chartQ coord x ∈ Icc qlo qhi) |
| 1259 | (hR : ∀ x ∈ s.domain, x.1 ∈ Icc p.inner p.outer) |
| 1260 | (hz : ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ s.domain, |
| 1261 | x ∈ MeanRankUpdate.supportBand a b qlo qhi → δ ≤ s.zeta x) |
| 1262 | (axial : PressureStream.Plane × PressureStream.Plane) |
| 1263 | (hε : c.operators.epsilon = s.epsilon) |
| 1264 | (hd : UnweightedClass s H (fun n x => debt c u n x.2.1)) : |
| 1265 | IncrementBounds s H (rankIncrement p (normalizedRankData coord A B lam a b) axial c u) := by |
| 1266 | have hv := MeanRankUpdate.actual_rank_velocity_meanClass (A := A) s hc hc1 hlam ha hab hB hp hlo |
| 1267 | p.inner_lt_outer hqlo hleft hright hT hq hR hz p.frequency (fun _ => p.radialDirection) axial hd |
| 1268 | refine ⟨?_, ?_, ?_⟩ |
| 1269 | · rw [normalizedRank_radial, hε] |
| 1270 | exact MeanRankUpdate.radial_physical_scale_gain s hv.2.2 |
| 1271 | · exact hv.1 |
| 1272 | · exact hv.2.1 |
| 1273 | |
| 1274 | end ConcreteRankConstruction |
| 1275 | |
| 1276 | section RankPressureConstruction |
| 1277 | |
| 1278 | open CorrectionState |
| 1279 | |
| 1280 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 1281 | |
| 1282 | theorem rankStage_pressure_formula (p : ReconstructionData) (r : RankData S) |
| 1283 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1284 | (u : State (PressureStream.Lift S)) : |
| 1285 | (rankStage p r axial c u).pressure = |
| 1286 | reconstructedPressure p.exponent p.inner p.outer p.inner_lt_outer p.frequency |
| 1287 | (fun _ => p.radialDirection) c.operators c.base |
| 1288 | (updated u.mean (rankIncrement p r axial c u)) u.covariance := by |
| 1289 | simp [rankStage, reconstructPressure, State.addIncrement, |
| 1290 | State.gr] |
| 1291 | rfl |
| 1292 | |
| 1293 | /-- The pressure estimate is for the pressure actually recomputed after |
| 1294 | the rank correction. The input is the current radial source, not an assumed |
| 1295 | bound on the new pressure. -/ |
| 1296 | theorem rankPressureChange_mem (p : ReconstructionData) (r : RankData S) |
| 1297 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1298 | (u : State (PressureStream.Lift S)) {cL cR H κ : ℝ} |
| 1299 | (ha : 0 < p.inner) (hd : 0 < p.exponent) (hcL : 0 < cL) (hcR : 0 < cR) |
| 1300 | (L : ℕ → ℝ) (hε : ∀ n, 0 < c.operators.epsilon n) |
| 1301 | (hεone : ∀ n, c.operators.epsilon n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 1302 | (ho : OperatorBounds (WeightedRadialPrimitive.logStripData p.inner p.outer cL cR |
| 1303 | ha hcL hcR c.operators.epsilon L hε hεone hL) c.operators κ) |
| 1304 | (hb : BaseBounds (WeightedRadialPrimitive.logStripData p.inner p.outer cL cR |
| 1305 | ha hcL hcR c.operators.epsilon L hε hεone hL) c.base) |
| 1306 | (hm : MeanIncrementBounds.CumulativeBounds (WeightedRadialPrimitive.logStripData |
| 1307 | p.inner p.outer cL cR ha hcL hcR c.operators.epsilon L hε hεone hL) u.mean) |
| 1308 | (hi : IncrementBounds (WeightedRadialPrimitive.logStripData p.inner p.outer cL cR |
| 1309 | ha hcL hcR c.operators.epsilon L hε hεone hL) H (rankIncrement p r axial c u)) |
| 1310 | (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) |
| 1311 | (hW : ∀ i j, SmoothOn (WeightedRadialPrimitive.logStripData p.inner p.outer cL cR |
| 1312 | ha hcL hcR c.operators.epsilon L hε hεone hL).domain (u.covariance i j)) |
| 1313 | (hf : ∀ n, ContDiff ℝ ∞ (MeanIncrementBounds.gr c.operators c.base |
| 1314 | (updated u.mean (rankIncrement p r axial c u)) u.covariance n)) |
| 1315 | (hg : ∀ n, ContDiff ℝ ∞ (u.gr c n)) |
| 1316 | (hsf : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (MeanIncrementBounds.gr |
| 1317 | c.operators c.base (updated u.mean (rankIncrement p r axial c u)) u.covariance n)) |
| 1318 | (hsg : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.gr c n)) |
| 1319 | (hpressure : u.pressure = (reconstructPressure p c u).pressure) : |
| 1320 | MeanClass (WeightedRadialPrimitive.logStripData p.inner p.outer cL cR |
| 1321 | ha hcL hcR c.operators.epsilon L hε hεone hL) H |
| 1322 | (rankPressureChange p r axial c u) := by |
| 1323 | have hp := reconstructedPressure_change_mem ha p.inner_lt_outer hd hcL hcR |
| 1324 | c.operators.epsilon L hε hεone hL ho hb hm hi hH hκ u.covariance hW hf hg hsf hsg |
| 1325 | p.frequency (fun _ => p.radialDirection) |
| 1326 | have hpressure' : u.pressure = reconstructedPressure p.exponent p.inner p.outer |
| 1327 | p.inner_lt_outer p.frequency (fun _ => p.radialDirection) c.operators c.base |
| 1328 | u.mean u.covariance := hpressure |
| 1329 | unfold rankPressureChange |
| 1330 | rw [rankStage_pressure_formula, hpressure'] |
| 1331 | exact hp |
| 1332 | |
| 1333 | end RankPressureConstruction |
| 1334 | |
| 1335 | section PressureAliasBookkeeping |
| 1336 | |
| 1337 | open CorrectionState |
| 1338 | |
| 1339 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 1340 | |
| 1341 | /-- Replace precisely the obsolete radial alias when the pressure has been |
| 1342 | recomputed. All other accumulated aliases remain in the error field. -/ |
| 1343 | noncomputable def refreshPressureAlias (p : ReconstructionData) |
| 1344 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) : |
| 1345 | State (PressureStream.Lift S) := |
| 1346 | { current with errors := { current.errors with aliasError := |
| 1347 | current.errors.aliasError + (pressureAlias p c current - pressureAlias p c old) } } |
| 1348 | |
| 1349 | theorem refreshPressureAlias_separated (p : ReconstructionData) |
| 1350 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) |
| 1351 | (other : Oscillation (PressureStream.Lift S)) |
| 1352 | (he : current.errors.aliasError = other + pressureAlias p c old) : |
| 1353 | (refreshPressureAlias p c old current).errors.aliasError = |
| 1354 | other + pressureAlias p c current := by |
| 1355 | simp only [refreshPressureAlias, he] |
| 1356 | abel |
| 1357 | |
| 1358 | theorem refreshPressureAlias_fullResidual (p : ReconstructionData) |
| 1359 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) : |
| 1360 | fullResidual c (refreshPressureAlias p c old current) = fullResidual c current := rfl |
| 1361 | |
| 1362 | theorem refreshPressureAlias_fullGoodResidual (p : ReconstructionData) |
| 1363 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) : |
| 1364 | fullGoodResidual c (refreshPressureAlias p c old current) = fullGoodResidual c current - |
| 1365 | (pressureAlias p c current - pressureAlias p c old) := by |
| 1366 | unfold fullGoodResidual |
| 1367 | rw [refreshPressureAlias_fullResidual] |
| 1368 | simp only [refreshPressureAlias, ExcludedErrors.total] |
| 1369 | abel |
| 1370 | |
| 1371 | /-- The exact current radial alias cancels only the alias part of the |
| 1372 | reconstructed radial equation; the repaired pressure defect remains. -/ |
| 1373 | theorem reconstructed_radial_minus_alias (p : ReconstructionData) |
| 1374 | (ha : 0 < p.inner) (hd : 0 < p.exponent) (c : Context (PressureStream.Lift S)) |
| 1375 | (u : State (PressureStream.Lift S)) |
| 1376 | (hoperator : ∀ f : ScalarField (PressureStream.Lift S), ∀ n x, c.operators.dr f n x = |
| 1377 | PressureStream.graphDr (PressureStream.physicalSpeed p.exponent (p.frequency n)) |
| 1378 | (0, p.radialDirection) (f n) x) |
| 1379 | (hsmooth : ∀ n, ContDiff ℝ ∞ (u.gr c n)) |
| 1380 | (hsupport : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.gr c n)) |
| 1381 | (n : ℕ) (x : PressureStream.Lift S) : |
| 1382 | (reconstructPressure p c u).radialResidual c n x - pressureAlias p c u n (x, 0) 0 = |
| 1383 | -PressureStream.rho p.inner p.outer p.inner_lt_outer x.1 * pressureDefect c u n x.2.1 := by |
| 1384 | rw [CorrectionState.reconstructed_radial_residual p ha hd c u hoperator hsmooth hsupport] |
| 1385 | ring |
| 1386 | |
| 1387 | end PressureAliasBookkeeping |
| 1388 | |
| 1389 | section ActualHarmonicForcing |
| 1390 | |
| 1391 | open CorrectionState |
| 1392 | |
| 1393 | theorem fullResidual_eq_harmonicResidual (c : Context D) (u : State D) : |
| 1394 | fullResidual c u = HarmonicResidual.stateFullResidual c u := rfl |
| 1395 | |
| 1396 | theorem fullGoodResidual_eq_harmonicResidual (c : Context D) (u : State D) : |
| 1397 | fullGoodResidual c u = HarmonicResidual.stateGoodResidual c u := rfl |
| 1398 | |
| 1399 | theorem fullGoodWaveResidual_eq_harmonicResidual (c : Context D) (u : State D) : |
| 1400 | fullGoodWaveResidual c u = HarmonicResidual.stateGoodWaveResidual c u := rfl |
| 1401 | |
| 1402 | /-- The right-hand sides for the particular solves are obtained from the |
| 1403 | literal current nonlinear PDE residual, by differentiating and convolving |
| 1404 | its stored finite harmonics and then removing the zero harmonic. -/ |
| 1405 | theorem fullGoodWaveResidual_grouped {ι : Type*} {U : Set D} (hU : IsOpen U) |
| 1406 | {c : Context D} {u : State D} {labels : ℕ → Finset ι} |
| 1407 | {blocks : ι → HarmonicBlock D} |
| 1408 | {gaussian aliasError : ι → HarmonicResidual.BlockCoefficients D} |
| 1409 | (hrep : HarmonicResidual.BlockRepresentation labels blocks gaussian aliasError u) {n : ℕ} |
| 1410 | (h : HarmonicResidual.ExtractionRegular U c u labels blocks gaussian aliasError n) |
| 1411 | {x : D × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 1412 | fullGoodWaveResidual c u n x i = |
| 1413 | ∑ l ∈ labels n, |
| 1414 | (HarmonicResidual.residualBlock c u (blocks l) (gaussian l) (aliasError l)).oscillation n x i := |
| 1415 | HarmonicResidual.stateGoodWaveResidual_grouped hU hrep h hx i |
| 1416 | |
| 1417 | /-- Reconstruction retains the actual zero mode and every stored error. |
| 1418 | No mean equation or error-flatness assertion is hidden in this identity. -/ |
| 1419 | theorem fullResidual_harmonic_decomposition {ι : Type*} {U : Set D} (hU : IsOpen U) |
| 1420 | {c : Context D} {u : State D} {labels : ℕ → Finset ι} |
| 1421 | {blocks : ι → HarmonicBlock D} |
| 1422 | {gaussian aliasError : ι → HarmonicResidual.BlockCoefficients D} |
| 1423 | (hrep : HarmonicResidual.BlockRepresentation labels blocks gaussian aliasError u) {n : ℕ} |
| 1424 | (h : HarmonicResidual.ExtractionRegular U c u labels blocks gaussian aliasError n) |
| 1425 | {x : D × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 1426 | fullResidual c u n x i = |
| 1427 | (∑ l ∈ labels n, |
| 1428 | (HarmonicResidual.residualBlock c u (blocks l) (gaussian l) (aliasError l)).oscillation n x i) + |
| 1429 | HarmonicResidual.stateMeanCoefficientValue labels blocks gaussian aliasError c u n x.1 i + |
| 1430 | u.errors.total n x i := |
| 1431 | HarmonicResidual.stateFullResidual_reconstructed hU hrep h hx i |
| 1432 | |
| 1433 | end ActualHarmonicForcing |
| 1434 | |
| 1435 | section TemporalMasses |
| 1436 | |
| 1437 | open CorrectionState MeasureTheory |
| 1438 | |
| 1439 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 1440 | |
| 1441 | /-- The actual angular and reconstructed axial temporal increments have |
| 1442 | zero torus mean before taking either radial moment. -/ |
| 1443 | theorem temporalIncrement_torusMean (p : ReconstructionData) (h : ℝ) |
| 1444 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1445 | (u : State (PressureStream.Lift S)) |
| 1446 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1447 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1448 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1449 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1450 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1451 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) |
| 1452 | (n : ℕ) (x : ℝ × S) : |
| 1453 | PressureStream.torusAverage ((temporalIncrement p h axial c u).angular n) x = 0 ∧ |
| 1454 | PressureStream.torusAverage ((temporalIncrement p h axial c u).axial n) x = 0 := by |
| 1455 | exact ⟨TemporalMeanUpdate.desiredIncrement_zeroMean h n (hθ n) (hpθ n) x, |
| 1456 | TemporalMeanUpdate.axialUpdate_zeroMean ha p.inner_lt_outer hd p.radialDirection h n |
| 1457 | (hz n) (hpz n) (hsz n) x⟩ |
| 1458 | |
| 1459 | theorem temporalStage_preserve_masses (p : ReconstructionData) (h : ℝ) |
| 1460 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1461 | (u : State (PressureStream.Lift S)) |
| 1462 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1463 | (hmθ : ∀ n, Continuous (u.mean.angular n)) (hmz : ∀ n, Continuous (u.mean.axial n)) |
| 1464 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1465 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1466 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1467 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1468 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) : |
| 1469 | radialMoment 2 (temporalStage p h axial c u).mean.angular = radialMoment 2 u.mean.angular ∧ |
| 1470 | radialMoment 1 (temporalStage p h axial c u).mean.axial = radialMoment 1 u.mean.axial := by |
| 1471 | have hi := temporalIncrement_smooth p h axial c u Set.univ ha hd hθ hz hpθ hpz hsz |
| 1472 | have hiθ n : Continuous ((temporalIncrement p h axial c u).angular n) := |
| 1473 | (contDiffOn_univ.mp (hi.angular n)).continuous |
| 1474 | have hiz n : Continuous ((temporalIncrement p h axial c u).axial n) := |
| 1475 | (contDiffOn_univ.mp (hi.axial n)).continuous |
| 1476 | constructor |
| 1477 | · funext n z |
| 1478 | change DefectIncrementBounds.barMoment 2 |
| 1479 | (u.mean.angular + (temporalIncrement p h axial c u).angular) n z = |
| 1480 | DefectIncrementBounds.barMoment 2 u.mean.angular n z |
| 1481 | simp only [DefectIncrementBounds.barMoment_apply] |
| 1482 | apply integral_congr_ae |
| 1483 | exact Filter.Eventually.of_forall fun r => by |
| 1484 | change r ^ 2 * PressureStream.torusAverage |
| 1485 | (fun x => u.mean.angular n x + (temporalIncrement p h axial c u).angular n x) (r, z) = _ |
| 1486 | rw [DefectIncrementBounds.torusAverage_add (hmθ n) (hiθ n), |
| 1487 | (temporalIncrement_torusMean p h axial c u ha hd hθ hz hpθ hpz hsz n (r, z)).1, add_zero] |
| 1488 | · funext n z |
| 1489 | change DefectIncrementBounds.barMoment 1 |
| 1490 | (u.mean.axial + (temporalIncrement p h axial c u).axial) n z = |
| 1491 | DefectIncrementBounds.barMoment 1 u.mean.axial n z |
| 1492 | simp only [DefectIncrementBounds.barMoment_apply] |
| 1493 | apply integral_congr_ae |
| 1494 | exact Filter.Eventually.of_forall fun r => by |
| 1495 | change r ^ 1 * PressureStream.torusAverage |
| 1496 | (fun x => u.mean.axial n x + (temporalIncrement p h axial c u).axial n x) (r, z) = _ |
| 1497 | rw [DefectIncrementBounds.torusAverage_add (hmz n) (hiz n), |
| 1498 | (temporalIncrement_torusMean p h axial c u ha hd hθ hz hpθ hpz hsz n (r, z)).2, add_zero] |
| 1499 | |
| 1500 | end TemporalMasses |
| 1501 | |
| 1502 | section ActualMeanAndDivergence |
| 1503 | |
| 1504 | open CorrectionState |
| 1505 | |
| 1506 | theorem angularMean_fullGoodResidual {U : Set D} {c : Context D} {u : State D} |
| 1507 | (H : LiftedMeanResidual.MeanHypotheses U c u) (n : ℕ) {x : D} |
| 1508 | (hx : x ∈ U) (i : Fin 3) : |
| 1509 | angularMeanVector (fullGoodResidual c u) n x i = u.meanGoodResidual c n x i := |
| 1510 | LiftedMeanResidual.angularMean_fullGoodResidual H n hx i |
| 1511 | |
| 1512 | /-- The zero harmonic of the differentiated coefficient reconstruction is |
| 1513 | the actual mean equation, with its exact excluded-error subtraction. -/ |
| 1514 | theorem meanCoefficientValue_eq_meanResidual {ι : Type*} {U : Set D} |
| 1515 | {c : Context D} {u : State D} {labels : ℕ → Finset ι} |
| 1516 | {blocks : ι → HarmonicBlock D} |
| 1517 | {gaussian aliasError : ι → HarmonicResidual.BlockCoefficients D} |
| 1518 | (hrep : HarmonicResidual.BlockRepresentation labels blocks gaussian aliasError u) |
| 1519 | (H : LiftedMeanResidual.MeanHypotheses U c u) {n : ℕ} |
| 1520 | (h : HarmonicResidual.ExtractionRegular U c u labels blocks gaussian aliasError n) |
| 1521 | {x : D} (hx : x ∈ U) (i : Fin 3) : |
| 1522 | HarmonicResidual.stateMeanCoefficientValue labels blocks gaussian aliasError c u n x i = |
| 1523 | u.meanGoodResidual c n x i := by |
| 1524 | rw [HarmonicResidual.stateMeanCoefficientValue_eq_average H.isOpen hrep h hx i] |
| 1525 | exact angularMean_fullGoodResidual H n hx i |
| 1526 | |
| 1527 | theorem fullResidual_reconstructed_with_mean {ι : Type*} {U : Set D} |
| 1528 | {c : Context D} {u : State D} {labels : ℕ → Finset ι} |
| 1529 | {blocks : ι → HarmonicBlock D} |
| 1530 | {gaussian aliasError : ι → HarmonicResidual.BlockCoefficients D} |
| 1531 | (hrep : HarmonicResidual.BlockRepresentation labels blocks gaussian aliasError u) |
| 1532 | (H : LiftedMeanResidual.MeanHypotheses U c u) {n : ℕ} |
| 1533 | (h : HarmonicResidual.ExtractionRegular U c u labels blocks gaussian aliasError n) |
| 1534 | {x : D × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 1535 | fullResidual c u n x i = |
| 1536 | (∑ l ∈ labels n, |
| 1537 | (HarmonicResidual.residualBlock c u (blocks l) (gaussian l) (aliasError l)).oscillation n x i) + |
| 1538 | u.meanGoodResidual c n x.1 i + u.errors.total n x i := by |
| 1539 | rw [fullResidual_harmonic_decomposition H.isOpen hrep h hx i, |
| 1540 | meanCoefficientValue_eq_meanResidual hrep H h hx.1 i] |
| 1541 | |
| 1542 | noncomputable def meanLift (m : Triple D) : Oscillation D := |
| 1543 | fun n x => meanComponents m n x.1 |
| 1544 | |
| 1545 | noncomputable def meanDivergence (c : Context D) (m : Triple D) : ScalarField D := |
| 1546 | fun n x => c.operators.dr m.radial n x + m.radial n x / c.operators.radius x + |
| 1547 | c.operators.dz m.axial n x |
| 1548 | |
| 1549 | noncomputable def fullDivergence (c : Context D) (u : State D) : OscillatoryScalar D := |
| 1550 | fun n => LiftedMeanResidual.realDivergence (fun x => c.operators.radius x.1) |
| 1551 | (radialDirection c n) angularDirection (axialDirection c n) (u.totalVelocity c n) |
| 1552 | |
| 1553 | theorem meanLift_divergence {U : Set D} (hU : IsOpen U) |
| 1554 | (c : Context D) (m : Triple D) (hm : SmoothTriple U m) |
| 1555 | (n : ℕ) {x : D} (hx : x ∈ U) (θ : ℝ) : |
| 1556 | LiftedMeanResidual.realDivergence (fun y => c.operators.radius y.1) |
| 1557 | (radialDirection c n) angularDirection (axialDirection c n) (meanLift m n) (x, θ) = |
| 1558 | meanDivergence c m n x := by |
| 1559 | have hr := ((hm.radial n).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 1560 | have ht := ((hm.angular n).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 1561 | have hz := ((hm.axial n).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 1562 | change HarmonicCalculus.along (LiftedMeanResidual.liftDirection |
| 1563 | (fun y => c.operators.eR + (c.operators.radialFrequency n * c.operators.radialProfile y) • |
| 1564 | c.operators.vR)) (LiftedMeanResidual.liftScalar (m.radial n)) (x, θ) + |
| 1565 | m.radial n x / c.operators.radius x + |
| 1566 | HarmonicCalculus.along LiftedMeanResidual.angularDirection |
| 1567 | (LiftedMeanResidual.liftScalar (m.angular n)) (x, θ) / c.operators.radius x + |
| 1568 | HarmonicCalculus.along (LiftedMeanResidual.liftDirection |
| 1569 | (fun _ => c.operators.epsilon n • c.operators.eZ)) |
| 1570 | (LiftedMeanResidual.liftScalar (m.axial n)) (x, θ) = _ |
| 1571 | rw [LiftedMeanResidual.along_lift hr, LiftedMeanResidual.theta_lift_zero ht, |
| 1572 | LiftedMeanResidual.along_lift hz] |
| 1573 | simp only [HarmonicCalculus.along, meanDivergence, Operators.dr, graphDerivative, |
| 1574 | Operators.dz, map_add, map_smul, smul_eq_mul, zero_div, add_zero] |
| 1575 | ring |
| 1576 | |
| 1577 | /-- Addition preserves actual cylindrical divergence by the derivative |
| 1578 | sum rule. The correction's divergence is a separate explicit summand. -/ |
| 1579 | theorem fullDivergence_actual_update (c : Context D) (u : State D) |
| 1580 | (m : Triple D) (p : ScalarField D) (w : Oscillation D) (q : OscillatoryScalar D) |
| 1581 | (e : ExcludedErrors D) (n : ℕ) (x : D × ℝ) |
| 1582 | (hu : ∀ i, DifferentiableAt ℝ (fun y => u.totalVelocity c n y i) x) |
| 1583 | (hi : ∀ i, DifferentiableAt ℝ (fun y => meanLift m n y i + w n y i) x) : |
| 1584 | fullDivergence c (u.addIncrement m p w q e) n x = fullDivergence c u n x + |
| 1585 | LiftedMeanResidual.realDivergence (fun y => c.operators.radius y.1) |
| 1586 | (radialDirection c n) angularDirection (axialDirection c n) |
| 1587 | (fun y => meanLift m n y + w n y) x := by |
| 1588 | have hv : (u.addIncrement m p w q e).totalVelocity c n = |
| 1589 | fun y => u.totalVelocity c n y + (meanLift m n y + w n y) := by |
| 1590 | funext y i |
| 1591 | have ht := congrFun (congrFun (congrFun |
| 1592 | (State.totalVelocity_addIncrement u c m p w q e) n) y) i |
| 1593 | simpa only [Pi.add_apply, meanLift, meanComponents, add_assoc] using ht |
| 1594 | unfold fullDivergence |
| 1595 | rw [hv] |
| 1596 | exact LiftedMeanResidual.realDivergence_add _ _ _ _ hu hi |
| 1597 | |
| 1598 | end ActualMeanAndDivergence |
| 1599 | |
| 1600 | section MeanDivergencePreservation |
| 1601 | |
| 1602 | open CorrectionState |
| 1603 | |
| 1604 | theorem meanAddition_fullDivergence {U : Set D} (hU : IsOpen U) |
| 1605 | (c : Context D) (u : State D) (m : Triple D) (p : ScalarField D) |
| 1606 | (q : OscillatoryScalar D) (e : ExcludedErrors D) (hm : SmoothTriple U m) |
| 1607 | (n : ℕ) {x : D} (hx : x ∈ U) (θ : ℝ) |
| 1608 | (hu : ∀ i, DifferentiableAt ℝ (fun y => u.totalVelocity c n y i) (x, θ)) : |
| 1609 | fullDivergence c (u.addIncrement m p 0 q e) n (x, θ) = |
| 1610 | fullDivergence c u n (x, θ) + meanDivergence c m n x := by |
| 1611 | have hi (i : Fin 3) : DifferentiableAt ℝ (fun y => meanLift m n y i) (x, θ) := by |
| 1612 | have hs := LiftedMeanResidual.liftScalar_smooth |
| 1613 | (LiftedMeanResidual.tripleVector_smooth hm n i) |
| 1614 | exact (hs.contDiffAt ((LiftedMeanResidual.cylinder_open hU).mem_nhds |
| 1615 | ⟨hx, mem_univ θ⟩)).differentiableAt (by simp) |
| 1616 | have he := fullDivergence_actual_update c u m p 0 q e n (x, θ) hu |
| 1617 | (fun i => by simpa only [Pi.zero_apply, add_zero] using hi i) |
| 1618 | simp only [Pi.zero_apply, add_zero] at he |
| 1619 | rw [meanLift_divergence hU c m hm n hx θ] at he |
| 1620 | exact he |
| 1621 | |
| 1622 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 1623 | |
| 1624 | theorem fullDivergence_reconstructPressure (p : ReconstructionData) |
| 1625 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) : |
| 1626 | fullDivergence c (reconstructPressure p c u) = fullDivergence c u := rfl |
| 1627 | |
| 1628 | theorem meanDivergence_eq_graph (p : ReconstructionData) |
| 1629 | (epsilon fast : ℕ → ℝ) (axial slowTime : S × PressureStream.Plane) |
| 1630 | (temporal : PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1631 | (hcompat : c.operators = graphOperators p epsilon fast axial slowTime temporal) |
| 1632 | (m : Triple (PressureStream.Lift S)) (n : ℕ) (x : PressureStream.Lift S) : |
| 1633 | meanDivergence c m n x = |
| 1634 | PressureStream.graphDivergence (PressureStream.physicalSpeed p.exponent (p.frequency n)) |
| 1635 | (0, p.radialDirection) (epsilon n • axial) (m.radial n) (m.axial n) x := by |
| 1636 | unfold meanDivergence |
| 1637 | rw [hcompat, graphOperators_dr, graphOperators_dz] |
| 1638 | rfl |
| 1639 | |
| 1640 | variable [FiniteDimensional ℝ S] |
| 1641 | |
| 1642 | theorem temporalIncrement_meanDivergence_zero (p : ReconstructionData) (h : ℝ) |
| 1643 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) |
| 1644 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1645 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1646 | (hcompat : c.operators = graphOperators p c.operators.epsilon c.operators.fastCoefficient |
| 1647 | axial slowTime temporal) |
| 1648 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1649 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1650 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) |
| 1651 | (n : ℕ) (x : PressureStream.Lift S) : |
| 1652 | meanDivergence c (temporalIncrement p h axial c u) n x = 0 := by |
| 1653 | rw [meanDivergence_eq_graph p c.operators.epsilon c.operators.fastCoefficient |
| 1654 | axial slowTime temporal c hcompat] |
| 1655 | exact TemporalMeanUpdate.update_divergence_zero ha p.inner_lt_outer hd p.radialDirection |
| 1656 | (c.operators.epsilon n • axial) h n (hz n) (hpz n) (hsz n) x |
| 1657 | |
| 1658 | theorem temporalStage_fullDivergence (p : ReconstructionData) (h : ℝ) |
| 1659 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) |
| 1660 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1661 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1662 | (hcompat : c.operators = graphOperators p c.operators.epsilon c.operators.fastCoefficient |
| 1663 | axial slowTime temporal) |
| 1664 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1665 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1666 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1667 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1668 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) |
| 1669 | (n : ℕ) (x : PressureStream.Lift S × ℝ) |
| 1670 | (hu : ∀ i, DifferentiableAt ℝ (fun y => u.totalVelocity c n y i) x) : |
| 1671 | fullDivergence c (temporalStage p h axial c u) n x = fullDivergence c u n x := by |
| 1672 | rw [temporalStage, fullDivergence_reconstructPressure] |
| 1673 | have hi := temporalIncrement_smooth p h axial c u Set.univ ha hd hθ hz hpθ hpz hsz |
| 1674 | rw [meanAddition_fullDivergence isOpen_univ c u _ _ _ _ hi n (mem_univ x.1) x.2 hu, |
| 1675 | temporalIncrement_meanDivergence_zero p h axial slowTime temporal c u ha hd hcompat hz hpz hsz, |
| 1676 | add_zero] |
| 1677 | |
| 1678 | theorem temporalStage_zeroMasses (p : ReconstructionData) (h : ℝ) |
| 1679 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1680 | (u : State (PressureStream.Lift S)) |
| 1681 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1682 | (hmθ : ∀ n, Continuous (u.mean.angular n)) (hmz : ∀ n, Continuous (u.mean.axial n)) |
| 1683 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1684 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1685 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1686 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1687 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) |
| 1688 | (hzero : ZeroMasses u) : ZeroMasses (temporalStage p h axial c u) := by |
| 1689 | obtain ⟨ht, hz⟩ := temporalStage_preserve_masses p h axial c u ha hd hmθ hmz hθ hz hpθ hpz hsz |
| 1690 | exact ⟨ht.trans hzero.1, hz.trans hzero.2⟩ |
| 1691 | |
| 1692 | omit [FiniteDimensional ℝ S] in |
| 1693 | theorem rankIncrement_meanDivergence_zero (p : ReconstructionData) (r : RankData S) |
| 1694 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) |
| 1695 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1696 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1697 | (hcompat : c.operators = graphOperators p c.operators.epsilon c.operators.fastCoefficient |
| 1698 | axial slowTime temporal) |
| 1699 | (hf : ∀ n, ContDiff ℝ ∞ (rankDesiredAxial r c u n)) |
| 1700 | (hs : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (rankDesiredAxial r c u n)) |
| 1701 | (n : ℕ) (x : PressureStream.Lift S) : |
| 1702 | meanDivergence c (rankIncrement p r axial c u) n x = 0 := by |
| 1703 | rw [meanDivergence_eq_graph p c.operators.epsilon c.operators.fastCoefficient |
| 1704 | axial slowTime temporal c hcompat] |
| 1705 | exact rank_divergence_zero p r axial c u ha hd n (hf n) (hs n) x |
| 1706 | |
| 1707 | omit [FiniteDimensional ℝ S] in |
| 1708 | theorem rankStage_fullDivergence {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 1709 | (p : ReconstructionData) (r : RankData S) |
| 1710 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) |
| 1711 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1712 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1713 | (hcompat : c.operators = graphOperators p c.operators.epsilon c.operators.fastCoefficient |
| 1714 | axial slowTime temporal) |
| 1715 | (hm : SmoothTriple U (rankIncrement p r axial c u)) |
| 1716 | (hf : ∀ n, ContDiff ℝ ∞ (rankDesiredAxial r c u n)) |
| 1717 | (hs : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (rankDesiredAxial r c u n)) |
| 1718 | (n : ℕ) {x : PressureStream.Lift S × ℝ} (hx : x.1 ∈ U) |
| 1719 | (hu : ∀ i, DifferentiableAt ℝ (fun y => u.totalVelocity c n y i) x) : |
| 1720 | fullDivergence c (rankStage p r axial c u) n x = fullDivergence c u n x := by |
| 1721 | rw [rankStage, fullDivergence_reconstructPressure] |
| 1722 | rw [meanAddition_fullDivergence hU c u _ _ _ _ hm n hx x.2 hu, |
| 1723 | rankIncrement_meanDivergence_zero p r axial slowTime temporal c u ha hd hcompat hf hs, |
| 1724 | add_zero] |
| 1725 | |
| 1726 | end MeanDivergencePreservation |
| 1727 | |
| 1728 | section CommonTemporalConstruction |
| 1729 | |
| 1730 | open CorrectionState |
| 1731 | |
| 1732 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 1733 | |
| 1734 | /-- Pressure reconstruction with the prescribed transported radial data |
| 1735 | for each band. This is an actual field constructor. -/ |
| 1736 | noncomputable def reconstructPressureFamily (r : ℕ → ReconstructionData) |
| 1737 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) : |
| 1738 | State (PressureStream.Lift S) := |
| 1739 | { u with pressure := fun n => (reconstructPressure (r n) c u).pressure n } |
| 1740 | |
| 1741 | noncomputable def commonTemporalError (r : ℕ → ReconstructionData) (h : ℝ) |
| 1742 | (index : ℕ → ℕ) (c : Context (PressureStream.Lift S)) |
| 1743 | (u : State (PressureStream.Lift S)) : Oscillation (PressureStream.Lift S) := |
| 1744 | fun n x => ![0, 0, -MeanChartCompatibility.fastAtIndex h n (index n) |
| 1745 | (MeanChartCompatibility.commonTemporalAlias r h index (u.axialResidual c) n) x.1] |
| 1746 | |
| 1747 | noncomputable def commonTemporalStage (r : ℕ → ReconstructionData) (h : ℝ) |
| 1748 | (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 1749 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) : |
| 1750 | State (PressureStream.Lift S) := |
| 1751 | reconstructPressureFamily r c (u.addIncrement |
| 1752 | (MeanChartCompatibility.commonTemporalIncrement r h index axial c u) 0 0 0 |
| 1753 | ⟨0, 0, commonTemporalError r h index c u⟩) |
| 1754 | |
| 1755 | noncomputable def commonTemporalPressureChange (r : ℕ → ReconstructionData) (h : ℝ) |
| 1756 | (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 1757 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) : |
| 1758 | ScalarField (PressureStream.Lift S) := |
| 1759 | (commonTemporalStage r h index axial c u).pressure - u.pressure |
| 1760 | |
| 1761 | theorem common_fastTime (h : ℝ) (index : ℕ → ℕ) (c : Context (PressureStream.Lift S)) |
| 1762 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 1763 | (hf : ∀ n, c.operators.fastCoefficient n = |
| 1764 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 1765 | (f : ScalarField (PressureStream.Lift S)) (n : ℕ) (x : PressureStream.Lift S) : |
| 1766 | c.operators.fastTime f n x = MeanChartCompatibility.fastAtIndex h n (index n) (f n) x := by |
| 1767 | simp only [Operators.fastTime, hv, hf, MeanChartCompatibility.fastAtIndex, PressureStream.graphDz] |
| 1768 | |
| 1769 | variable [FiniteDimensional ℝ S] |
| 1770 | |
| 1771 | omit [FiniteDimensional ℝ S] in |
| 1772 | theorem commonTemporalStage_native (r : ReconstructionData) (h : ℝ) |
| 1773 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1774 | (u : State (PressureStream.Lift S)) : |
| 1775 | commonTemporalStage (fun _ => r) h (ChartScales.nativeIndex h) axial c u = |
| 1776 | temporalStage r h axial c u := by |
| 1777 | rfl |
| 1778 | |
| 1779 | theorem commonTemporalIncrement_smooth (r : ℕ → ReconstructionData) (h : ℝ) |
| 1780 | (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 1781 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1782 | (U : Set (PressureStream.Lift S)) |
| 1783 | (ha : ∀ n, 0 < (r n).inner) (hd : ∀ n, 0 < (r n).exponent) |
| 1784 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1785 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1786 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1787 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1788 | (hsz : ∀ n, RadialAlias.RadiallySupported (r n).inner (r n).outer (u.axialResidual c n)) : |
| 1789 | SmoothTriple U (MeanChartCompatibility.commonTemporalIncrement r h index axial c u) := by |
| 1790 | refine ⟨fun n => ?_, fun n => ?_, fun n => ?_⟩ |
| 1791 | · exact (PressureStream.streamBeta_contDiff (ha n) (r n).inner_lt_outer (hd n) |
| 1792 | (0, (r n).radialDirection) (c.operators.epsilon n • axial) |
| 1793 | (MeanChartCompatibility.temporalAtIndex_smooth h n (index n) (hz n) (hpz n)) |
| 1794 | (MeanChartCompatibility.temporalAtIndex_supported h n (index n) (hsz n))).contDiffOn |
| 1795 | · exact (MeanChartCompatibility.temporalAtIndex_smooth h n (index n) (hθ n) (hpθ n)).contDiffOn |
| 1796 | · exact (PressureStream.streamGamma_contDiff (ha n) (r n).inner_lt_outer (hd n) |
| 1797 | (0, (r n).radialDirection) |
| 1798 | (MeanChartCompatibility.temporalAtIndex_smooth h n (index n) (hz n) (hpz n)) |
| 1799 | (MeanChartCompatibility.temporalAtIndex_supported h n (index n) (hsz n))).contDiffOn |
| 1800 | |
| 1801 | /-- Fast cancellation is now performed at the chosen common index; the |
| 1802 | remaining angular mean is the original torus bar plus the exact remainder. -/ |
| 1803 | theorem commonTemporalStage_theta_exact {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 1804 | (r : ℕ → ReconstructionData) (h : ℝ) (index : ℕ → ℕ) |
| 1805 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1806 | (u : State (PressureStream.Lift S)) |
| 1807 | (ha : ∀ n, 0 < (r n).inner) (hd : ∀ n, 0 < (r n).exponent) |
| 1808 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 1809 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 1810 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 1811 | (hprofile : ContDiffOn ℝ ∞ c.operators.radialProfile U) |
| 1812 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 1813 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 1814 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1815 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1816 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1817 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1818 | (hsz : ∀ n, RadialAlias.RadiallySupported (r n).inner (r n).outer (u.axialResidual c n)) : |
| 1819 | Agree U ((commonTemporalStage r h index axial c u).thetaResidual c) |
| 1820 | (meanBar (u.thetaResidual c) + thetaRemainder c.operators c.base u.mean |
| 1821 | (MeanChartCompatibility.commonTemporalIncrement r h index axial c u)) := by |
| 1822 | have hi := commonTemporalIncrement_smooth r h index axial c u U ha hd hθ hz hpθ hpz hsz |
| 1823 | have he := thetaResidual_change hU c.operators hprofile hb hm hi u.covariance hW c.virtualTheta |
| 1824 | have hnew : (commonTemporalStage r h index axial c u).thetaResidual c = |
| 1825 | MeanIncrementBounds.thetaResidual c.operators c.base |
| 1826 | (updated u.mean (MeanChartCompatibility.commonTemporalIncrement r h index axial c u)) |
| 1827 | u.covariance c.virtualTheta := by |
| 1828 | simp [commonTemporalStage, reconstructPressureFamily, State.thetaResidual, State.addIncrement] |
| 1829 | rfl |
| 1830 | intro n x hx |
| 1831 | have he' := he n hx |
| 1832 | have hf := (MeanChartCompatibility.commonTemporalFields_fast_cancellation r h index |
| 1833 | c.operators.epsilon axial (u.thetaResidual c) (u.axialResidual c) n (ha n) (hd n) |
| 1834 | (hθ n) (hz n) (hpθ n) (hpz n) (hsz n) x).1 |
| 1835 | have ht := common_fastTime h index c hv hfast |
| 1836 | (MeanChartCompatibility.commonTemporalIncrement r h index axial c u).angular n x |
| 1837 | rw [hnew] |
| 1838 | simp only [Pi.add_apply, Pi.sub_apply, ht] at he' |
| 1839 | simp only [TemporalMeanUpdate.centered] at hf |
| 1840 | change _ = PressureStream.torusAverage (u.thetaResidual c n) (x.1, x.2.1) + _ |
| 1841 | change MeanChartCompatibility.fastAtIndex h n (index n) |
| 1842 | ((MeanChartCompatibility.commonTemporalIncrement r h index axial c u).angular n) x + |
| 1843 | (u.thetaResidual c n x - PressureStream.torusAverage (u.thetaResidual c n) (x.1, x.2.1)) = 0 at hf |
| 1844 | change _ - u.thetaResidual c n x = _ at he' |
| 1845 | linarith |
| 1846 | |
| 1847 | theorem commonTemporalStage_axial_exact {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 1848 | (r : ℕ → ReconstructionData) (h : ℝ) (index : ℕ → ℕ) |
| 1849 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 1850 | (u : State (PressureStream.Lift S)) |
| 1851 | (ha : ∀ n, 0 < (r n).inner) (hd : ∀ n, 0 < (r n).exponent) |
| 1852 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 1853 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 1854 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 1855 | (hprofile : ContDiffOn ℝ ∞ c.operators.radialProfile U) |
| 1856 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 1857 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 1858 | (hp : SmoothOn U u.pressure) |
| 1859 | (hnp : SmoothOn U (commonTemporalStage r h index axial c u).pressure) |
| 1860 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 1861 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1862 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 1863 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1864 | (hsz : ∀ n, RadialAlias.RadiallySupported (r n).inner (r n).outer (u.axialResidual c n)) : |
| 1865 | Agree U (fun n x => (commonTemporalStage r h index axial c u).axialResidual c n x - |
| 1866 | commonTemporalError r h index c u n (x, 0) 2) |
| 1867 | (meanBar (u.axialResidual c) + axialRemainder c.operators c.base u.mean |
| 1868 | (MeanChartCompatibility.commonTemporalIncrement r h index axial c u) |
| 1869 | (commonTemporalPressureChange r h index axial c u)) := by |
| 1870 | have hi := commonTemporalIncrement_smooth r h index axial c u U ha hd hθ hz hpθ hpz hsz |
| 1871 | have he := axialResidual_change hU c.operators hprofile hb hm hi u.covariance hW |
| 1872 | u.pressure (commonTemporalPressureChange r h index axial c u) c.virtualAxial hp (hnp.sub hp) |
| 1873 | have hpressure : u.pressure + commonTemporalPressureChange r h index axial c u = |
| 1874 | (commonTemporalStage r h index axial c u).pressure := by |
| 1875 | unfold commonTemporalPressureChange |
| 1876 | abel |
| 1877 | have hnew : (commonTemporalStage r h index axial c u).axialResidual c = |
| 1878 | MeanIncrementBounds.axialResidual c.operators c.base |
| 1879 | (updated u.mean (MeanChartCompatibility.commonTemporalIncrement r h index axial c u)) |
| 1880 | u.covariance (u.pressure + commonTemporalPressureChange r h index axial c u) c.virtualAxial := by |
| 1881 | rw [hpressure] |
| 1882 | simp [commonTemporalStage, reconstructPressureFamily, State.axialResidual, State.addIncrement] |
| 1883 | rfl |
| 1884 | intro n x hx |
| 1885 | have he' := he n hx |
| 1886 | have hf := (MeanChartCompatibility.commonTemporalFields_fast_cancellation r h index |
| 1887 | c.operators.epsilon axial (u.thetaResidual c) (u.axialResidual c) n (ha n) (hd n) |
| 1888 | (hθ n) (hz n) (hpθ n) (hpz n) (hsz n) x).2 |
| 1889 | have ht := common_fastTime h index c hv hfast |
| 1890 | (MeanChartCompatibility.commonTemporalIncrement r h index axial c u).axial n x |
| 1891 | rw [hnew] |
| 1892 | simp only [Pi.add_apply, Pi.sub_apply, ht] at he' |
| 1893 | simp only [TemporalMeanUpdate.centered] at hf |
| 1894 | change _ = PressureStream.torusAverage (u.axialResidual c n) (x.1, x.2.1) + _ |
| 1895 | change MeanChartCompatibility.fastAtIndex h n (index n) |
| 1896 | ((MeanChartCompatibility.commonTemporalIncrement r h index axial c u).axial n) x + |
| 1897 | (u.axialResidual c n x - PressureStream.torusAverage (u.axialResidual c n) (x.1, x.2.1)) = |
| 1898 | -MeanChartCompatibility.fastAtIndex h n (index n) |
| 1899 | (MeanChartCompatibility.commonTemporalAlias r h index (u.axialResidual c) n) x at hf |
| 1900 | change _ - u.axialResidual c n x = _ at he' |
| 1901 | change _ - -MeanChartCompatibility.fastAtIndex h n (index n) |
| 1902 | (MeanChartCompatibility.commonTemporalAlias r h index (u.axialResidual c) n) x = _ |
| 1903 | linarith |
| 1904 | |
| 1905 | end CommonTemporalConstruction |
| 1906 | |
| 1907 | section CommonTemporalScale |
| 1908 | |
| 1909 | open CorrectionState |
| 1910 | |
| 1911 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 1912 | |
| 1913 | theorem streamPotential_const_mul (d a b M c : ℝ) (v : S) (f : ℝ × S → ℝ) : |
| 1914 | PressureStream.streamPotential d a b M v (fun x => c * f x) = |
| 1915 | fun x => c * PressureStream.streamPotential d a b M v f x := by |
| 1916 | have he : RadialPullback.normalizeSource d a (PressureStream.weightedSource (fun x => c * f x)) = |
| 1917 | fun x => c • RadialPullback.normalizeSource d a (PressureStream.weightedSource f) x := by |
| 1918 | funext x |
| 1919 | simp only [RadialPullback.normalizeSource, PressureStream.weightedSource, smul_eq_mul] |
| 1920 | ring |
| 1921 | funext x |
| 1922 | simp only [PressureStream.streamPotential, PressureStream.divideRadius, |
| 1923 | RadialPullback.physicalCompact, RadialPullback.pullback, Function.comp_apply, he] |
| 1924 | rw [TransportPrimitive.compactIntegral_smul] |
| 1925 | simp only [smul_eq_mul] |
| 1926 | ring |
| 1927 | |
| 1928 | noncomputable def scaleTriple (a : ℕ → ℝ) (m : Triple D) : Triple D where |
| 1929 | radial := fun n x => a n * m.radial n x |
| 1930 | angular := fun n x => a n * m.angular n x |
| 1931 | axial := fun n x => a n * m.axial n x |
| 1932 | |
| 1933 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 1934 | theorem triple_ext {a b : Triple D} (hr : a.radial = b.radial) |
| 1935 | (ht : a.angular = b.angular) (hz : a.axial = b.axial) : a = b := by |
| 1936 | cases a |
| 1937 | cases b |
| 1938 | simp only [Triple.mk.injEq] at * |
| 1939 | exact ⟨hr, ht, hz⟩ |
| 1940 | |
| 1941 | theorem scaleTriple_mem {s : StripData D} {H : ℝ} {a : ℕ → ℝ} {m : Triple D} |
| 1942 | (ha : BandBound s 0 a) (hm : IncrementBounds s H m) : |
| 1943 | IncrementBounds s H (scaleTriple a m) := by |
| 1944 | constructor |
| 1945 | · simpa only [scaleTriple, smul_eq_mul, add_zero] using hm.radial.band_smul ha |
| 1946 | · simpa only [scaleTriple, smul_eq_mul, add_zero] using hm.angular.band_smul ha |
| 1947 | · simpa only [scaleTriple, smul_eq_mul, add_zero] using hm.axial.band_smul ha |
| 1948 | |
| 1949 | variable [FiniteDimensional ℝ S] |
| 1950 | |
| 1951 | /-- Changing the common clock multiplies the actual inverse and its |
| 1952 | actual stream realization by the same band scalar. -/ |
| 1953 | theorem commonTemporalIncrement_eq_scale (p : ReconstructionData) (h : ℝ) |
| 1954 | (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 1955 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 1956 | (ha : 0 < p.inner) (hd : 0 < p.exponent) |
| 1957 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 1958 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 1959 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) : |
| 1960 | MeanChartCompatibility.commonTemporalIncrement (fun _ => p) h index axial c u = |
| 1961 | scaleTriple (fun n => MeanChartCompatibility.commonRatio h n (index n)) |
| 1962 | (temporalIncrement p h axial c u) := by |
| 1963 | have hpot n : MeanChartCompatibility.commonTemporalPotential (fun _ => p) h index |
| 1964 | (u.axialResidual c) n = fun x => MeanChartCompatibility.commonRatio h n (index n) * |
| 1965 | TemporalMeanUpdate.axialPotential p.exponent p.inner p.outer (p.frequency n) |
| 1966 | p.radialDirection h n (u.axialResidual c n) x := by |
| 1967 | unfold MeanChartCompatibility.commonTemporalPotential |
| 1968 | rw [MeanChartCompatibility.temporalAtIndex_eq_native, streamPotential_const_mul] |
| 1969 | rfl |
| 1970 | have hdpot n x := ((TemporalMeanUpdate.axialPotential_smooth (M := p.frequency n) ha p.inner_lt_outer hd |
| 1971 | p.radialDirection h n (hz n) (hpz n) (hsz n)).differentiable (by simp) x).hasFDerivAt.fun_const_smul |
| 1972 | (MeanChartCompatibility.commonRatio h n (index n)) |
| 1973 | simp only [smul_eq_mul] at hdpot |
| 1974 | apply triple_ext |
| 1975 | · funext n x |
| 1976 | change PressureStream.streamBeta (c.operators.epsilon n • axial) |
| 1977 | (MeanChartCompatibility.commonTemporalPotential (fun _ => p) h index (u.axialResidual c) n) x = _ |
| 1978 | rw [hpot] |
| 1979 | simp only [PressureStream.streamBeta, PressureStream.graphDz, (hdpot n x).fderiv, |
| 1980 | _root_.smul_apply, smul_eq_mul, scaleTriple, temporalIncrement, |
| 1981 | TemporalMeanUpdate.radialUpdate] |
| 1982 | ring |
| 1983 | · funext n x |
| 1984 | exact congrFun (MeanChartCompatibility.temporalAtIndex_eq_native h n (index n) |
| 1985 | (u.thetaResidual c n)) x |
| 1986 | · funext n x |
| 1987 | change PressureStream.streamGamma (PressureStream.physicalSpeed p.exponent (p.frequency n)) |
| 1988 | (0, p.radialDirection) |
| 1989 | (MeanChartCompatibility.commonTemporalPotential (fun _ => p) h index (u.axialResidual c) n) x = _ |
| 1990 | rw [hpot] |
| 1991 | simp only [PressureStream.streamGamma, PressureStream.graphDr, PressureStream.divideRadius, |
| 1992 | (hdpot n x).fderiv, _root_.smul_apply, smul_eq_mul, scaleTriple, |
| 1993 | temporalIncrement, TemporalMeanUpdate.axialUpdate] |
| 1994 | ring |
| 1995 | |
| 1996 | /-- The common/native gap has no cost in the residual exponent. This |
| 1997 | statement works on any strip on which the native construction was proved. -/ |
| 1998 | theorem commonTemporalIncrement_mem_of_native {s : StripData (PressureStream.Lift S)} |
| 1999 | (p : ReconstructionData) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 2000 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {H : ℝ} |
| 2001 | (ha : 0 < p.inner) (hd : 0 < p.exponent) (gap : ℕ) |
| 2002 | (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) |
| 2003 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 2004 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 2005 | (hsz : ∀ n, RadialAlias.RadiallySupported p.inner p.outer (u.axialResidual c n)) |
| 2006 | (hi : IncrementBounds s H (temporalIncrement p h axial c u)) : |
| 2007 | IncrementBounds s H (MeanChartCompatibility.commonTemporalIncrement (fun _ => p) h index axial c u) := by |
| 2008 | rw [commonTemporalIncrement_eq_scale p h index axial c u ha hd hz hpz hsz] |
| 2009 | apply scaleTriple_mem (hm := hi) |
| 2010 | refine ⟨ChartScales.Tg ^ gap, (pow_pos ChartScales.Tg_pos gap).le, 0, ?_⟩ |
| 2011 | intro n |
| 2012 | simp only [Real.norm_eq_abs, abs_of_pos (MeanChartCompatibility.commonRatio_pos h n (index n)), |
| 2013 | Real.rpow_zero, pow_zero, mul_one] |
| 2014 | exact MeanChartCompatibility.commonRatio_le (hgap n) |
| 2015 | |
| 2016 | end CommonTemporalScale |
| 2017 | |
| 2018 | section HarmonicStateUpdates |
| 2019 | |
| 2020 | open CorrectionState |
| 2021 | |
| 2022 | /-- Add coefficient families on the same fixed label carrier. -/ |
| 2023 | noncomputable def addBlock (a b : HarmonicBlock D) : HarmonicBlock D := |
| 2024 | { a with velocity := fun n i => a.velocity n i + b.velocity n i |
| 2025 | pressure := fun n => a.pressure n + b.pressure n } |
| 2026 | |
| 2027 | structure SameCarrier (a b : HarmonicBlock D) : Prop where |
| 2028 | frequency : b.frequency = a.frequency |
| 2029 | phase : b.phase = a.phase |
| 2030 | angular : b.angularFrequency = a.angularFrequency |
| 2031 | |
| 2032 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2033 | theorem addBlock_oscillation (a b : HarmonicBlock D) (h : SameCarrier a b) : |
| 2034 | (addBlock a b).oscillation = a.oscillation + b.oscillation := by |
| 2035 | funext n x i |
| 2036 | simp only [addBlock, HarmonicBlock.oscillation, HarmonicFields.field, HarmonicFields.evaluate_add, |
| 2037 | Complex.add_re, Pi.add_apply, h.frequency, h.phase, h.angular] |
| 2038 | |
| 2039 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2040 | theorem addBlock_pressure (a b : HarmonicBlock D) (h : SameCarrier a b) : |
| 2041 | (addBlock a b).oscillatoryPressure = a.oscillatoryPressure + b.oscillatoryPressure := by |
| 2042 | funext n x |
| 2043 | simp only [addBlock, HarmonicBlock.oscillatoryPressure, HarmonicFields.field, HarmonicFields.evaluate_add, |
| 2044 | Complex.add_re, Pi.add_apply, h.frequency, h.phase, h.angular] |
| 2045 | |
| 2046 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2047 | theorem addBlock_band {a b : HarmonicBlock D} {N M : ℕ} |
| 2048 | (ha : a.BandLimited N) (hb : b.BandLimited M) : |
| 2049 | (addBlock a b).BandLimited (max N M) := |
| 2050 | ⟨fun n i => (ha.1 n i |>.mono (le_max_left _ _)).add (hb.1 n i |>.mono (le_max_right _ _)), |
| 2051 | fun n => (ha.2 n |>.mono (le_max_left _ _)).add (hb.2 n |>.mono (le_max_right _ _))⟩ |
| 2052 | |
| 2053 | theorem addBlock_waveBounds {s : StripData D} {P : ℕ → D → ℝ} {α β : ℝ} |
| 2054 | {a b : HarmonicBlock D} (ha : a.WaveBounds s P α) (hb : b.WaveBounds s P β) |
| 2055 | (hαβ : α ≤ β) : (addBlock a b).WaveBounds s P α := |
| 2056 | fun i j hj => (ha i j hj).add ((hb i j hj).mono_exponent hαβ) |
| 2057 | |
| 2058 | theorem addBlock_pressureBounds {s : StripData D} {P : ℕ → D → ℝ} {α β : ℝ} |
| 2059 | {a b : HarmonicBlock D} (ha : a.PressureBounds s P α) (hb : b.PressureBounds s P β) |
| 2060 | (hαβ : α ≤ β) : (addBlock a b).PressureBounds s P α := |
| 2061 | fun j hj => (ha j hj).add ((hb j hj).mono_exponent hαβ) |
| 2062 | |
| 2063 | /-- The cumulative difference is the literal coefficient difference from |
| 2064 | the same primary field, including all previous corrections. -/ |
| 2065 | theorem addBlock_differenceBounds {s : StripData D} {P : ℕ → D → ℝ} {α β : ℝ} |
| 2066 | (primary old increment : HarmonicBlock D) |
| 2067 | (hold : ∀ i j, j ≠ 0 → WaveClass s P α |
| 2068 | (fun n x => old.velocity n i j x - primary.velocity n i j x)) |
| 2069 | (hi : increment.WaveBounds s P β) (hαβ : α ≤ β) : |
| 2070 | ∀ i j, j ≠ 0 → WaveClass s P α |
| 2071 | (fun n x => (addBlock old increment).velocity n i j x - primary.velocity n i j x) := by |
| 2072 | intro i j hj |
| 2073 | apply WaveInteractionBounds.class_congr ((hold i j hj).add ((hi i j hj).mono_exponent hαβ)) |
| 2074 | intro n x hx |
| 2075 | change old.velocity n i j x - primary.velocity n i j x + increment.velocity n i j x = |
| 2076 | old.velocity n i j x + increment.velocity n i j x - primary.velocity n i j x |
| 2077 | ring |
| 2078 | |
| 2079 | theorem block_waveBounds_all {s : StripData D} {P : ℕ → D → ℝ} {α : ℝ} |
| 2080 | (b : HarmonicBlock D) (hb : b.WaveBounds s P α) |
| 2081 | (hzero : ∀ n i, b.velocity n i 0 = 0) |
| 2082 | (hP : ∀ n x, x ∈ s.domain → 0 ≤ P n x) : |
| 2083 | ∀ i j, WaveClass s P α (fun n x => b.velocity n i j x) := by |
| 2084 | intro i j |
| 2085 | by_cases hj : j = 0 |
| 2086 | · subst j |
| 2087 | have hz : WaveClass s P α (0 : ℕ → D → ℂ) := MemClass.zero (fun n x hx => |
| 2088 | mul_nonneg (Real.sqrt_nonneg (s.zeta x)) (hP n x hx)) |
| 2089 | apply WaveInteractionBounds.class_congr hz |
| 2090 | intro n x hx |
| 2091 | simp only [hzero, Pi.zero_apply] |
| 2092 | · exact hb i j hj |
| 2093 | |
| 2094 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2095 | theorem block_angularContinuous (b : HarmonicBlock D) : AngularContinuous b.oscillation := |
| 2096 | fun n x i => Complex.continuous_re.comp |
| 2097 | (HarmonicFields.field_angular_continuous (b.velocity n i) (b.frequency n) |
| 2098 | (b.phase n) (b.angularFrequency n) x) |
| 2099 | |
| 2100 | /-- Both old/new cross covariances and the entire new-wave square are |
| 2101 | estimated as actual angular integrals. There is no tensor-update premise. -/ |
| 2102 | theorem sameCarrier_covarianceIncrement_mem {s : StripData D} {P : ℕ → D → ℝ} {α β : ℝ} |
| 2103 | (a b : HarmonicBlock D) (hcarrier : SameCarrier a b) (N M : ℕ) |
| 2104 | (hNa : a.BandLimited N) (hMb : b.BandLimited M) |
| 2105 | (ha : a.WaveBounds s P α) (hb : b.WaveBounds s P β) |
| 2106 | (ha0 : ∀ n i, a.velocity n i 0 = 0) (hb0 : ∀ n i, b.velocity n i 0 = 0) |
| 2107 | (hαβ : α ≤ β) (hkp : ∀ n, a.angularFrequency n ≠ 0) |
| 2108 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2109 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) : |
| 2110 | TensorClass s (α + β) (covarianceIncrement a.oscillation b.oscillation) := by |
| 2111 | have hca := block_waveBounds_all a ha ha0 hP0 |
| 2112 | have hcb := block_waveBounds_all b hb hb0 hP0 |
| 2113 | intro i j |
| 2114 | have hcross := HarmonicCovariance.mixedBlockCovariance_mem a b N hNa |
| 2115 | hcarrier.frequency hcarrier.phase hcarrier.angular hca hcb hP0 hP1 hkp i j |
| 2116 | have hreverse : MeanClass s (α + β) (bilinearCovariance b.oscillation a.oscillation i j) := by |
| 2117 | rw [bilinearCovariance_comm] |
| 2118 | exact HarmonicCovariance.mixedBlockCovariance_mem a b N hNa |
| 2119 | hcarrier.frequency hcarrier.phase hcarrier.angular hca hcb hP0 hP1 hkp j i |
| 2120 | have hsquare : MeanClass s (α + β) (bilinearCovariance b.oscillation b.oscillation i j) := |
| 2121 | (HarmonicCovariance.blockCovariance_mem b M hMb hcb hP0 hP1 |
| 2122 | (fun n => by simpa only [hcarrier.angular] using hkp n) i j).mono_exponent (by linarith) |
| 2123 | exact (hcross.add hreverse).add hsquare |
| 2124 | |
| 2125 | /-- Substitution of the constructed field into the state's covariance is |
| 2126 | now paired with the tensor class of its exact change. -/ |
| 2127 | theorem oneLabel_stateCovariance_change {s : StripData D} {P : ℕ → D → ℝ} {α β : ℝ} |
| 2128 | (u : State D) (a b : HarmonicBlock D) (hu : u.oscillation = a.oscillation) |
| 2129 | (hcarrier : SameCarrier a b) (N M : ℕ) |
| 2130 | (hNa : a.BandLimited N) (hMb : b.BandLimited M) |
| 2131 | (ha : a.WaveBounds s P α) (hb : b.WaveBounds s P β) |
| 2132 | (ha0 : ∀ n i, a.velocity n i 0 = 0) (hb0 : ∀ n i, b.velocity n i 0 = 0) |
| 2133 | (hαβ : α ≤ β) (hkp : ∀ n, a.angularFrequency n ≠ 0) |
| 2134 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2135 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) |
| 2136 | (m : Triple D) (p : ScalarField D) (e : ExcludedErrors D) : |
| 2137 | TensorClass s (α + β) |
| 2138 | ((u.addIncrement m p b.oscillation b.oscillatoryPressure e).covariance - u.covariance) := by |
| 2139 | have hv : AngularContinuous u.oscillation := by rw [hu]; exact block_angularContinuous a |
| 2140 | rw [covariance_actual_update u m p b.oscillation b.oscillatoryPressure e hv |
| 2141 | (block_angularContinuous b)] |
| 2142 | have he : u.covariance + covarianceIncrement u.oscillation b.oscillation - u.covariance = |
| 2143 | covarianceIncrement a.oscillation b.oscillation := by rw [hu]; abel |
| 2144 | rw [he] |
| 2145 | exact sameCarrier_covarianceIncrement_mem a b hcarrier N M hNa hMb ha hb ha0 hb0 hαβ hkp hP0 hP1 |
| 2146 | |
| 2147 | end HarmonicStateUpdates |
| 2148 | |
| 2149 | section MeanWaveComposition |
| 2150 | |
| 2151 | open CorrectionState |
| 2152 | |
| 2153 | /-- The actual residual block retains a target exponent through a mean |
| 2154 | update. Its change is estimated by the two differentiated cross-advections. -/ |
| 2155 | theorem meanUpdate_residualBlock_mem {s : StripData D} {κ α H β : ℝ} {P : ℕ → D → ℝ} |
| 2156 | (c : Context D) (ho : OperatorBounds s c.operators κ) |
| 2157 | (hκ : κ ≤ 1 / 2) (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 2158 | (u v : State D) (m : Triple D) (he : v.mean = updated u.mean m) |
| 2159 | (hbase : SmoothTriple s.domain c.base) (hmean : SmoothTriple s.domain u.mean) |
| 2160 | (hm : IncrementBounds s H m) (b : HarmonicBlock D) (hb : b.WaveBounds s P α) |
| 2161 | (hN : ∀ i, UnweightedClass s 0 |
| 2162 | (fun n x => HarmonicMeanInteraction.slowNormal c ho hR b.phase n x i)) |
| 2163 | (hk : BandBound s (-(1 / 2)) b.frequency) |
| 2164 | (hkp : BandBound s (-(1 / 2)) (fun n => (b.angularFrequency n : ℝ))) |
| 2165 | (hP : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2166 | (G A₀ A₁ : HarmonicResidual.BlockCoefficients D) |
| 2167 | (hA : ∀ n i, HarmonicFields.BandLimited (A₁ n i - A₀ n i) 0) |
| 2168 | (hold : (HarmonicResidual.residualBlock c u b G A₀).WaveBounds s P β) |
| 2169 | (hβ : β ≤ α + H - 1 / 2) : |
| 2170 | (HarmonicResidual.residualBlock c v b G A₁).WaveBounds s P β := by |
| 2171 | have hchange := HarmonicMeanInteraction.residualDifferenceBlock_class c ho hκ hR |
| 2172 | u v m he hbase hmean hm b hb hN hk hkp hP G A₀ A₁ hA |
| 2173 | intro i j hj |
| 2174 | apply WaveInteractionBounds.class_congr ((hold i j hj).add ((hchange i j hj).mono_exponent hβ)) |
| 2175 | intro n x hx |
| 2176 | change (HarmonicResidual.residualBlock c u b G A₀).velocity n i j x + |
| 2177 | ((HarmonicResidual.residualBlock c v b G A₁).velocity n i j x - |
| 2178 | (HarmonicResidual.residualBlock c u b G A₀).velocity n i j x) = |
| 2179 | (HarmonicResidual.residualBlock c v b G A₁).velocity n i j x |
| 2180 | ring |
| 2181 | |
| 2182 | /-- With the cumulative wave exponent `1/2`, each actual temporal or rank |
| 2183 | mean increment has wave effect of exponent `H`. -/ |
| 2184 | theorem meanUpdate_residualBlock_next {s : StripData D} {κ σ : ℝ} {P : ℕ → D → ℝ} |
| 2185 | (c : Context D) (ho : OperatorBounds s c.operators κ) |
| 2186 | (hκ : κ ≤ 1 / 100000) (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 2187 | (u v : State D) (m : Triple D) (he : v.mean = updated u.mean m) |
| 2188 | (hbase : SmoothTriple s.domain c.base) (hmean : SmoothTriple s.domain u.mean) |
| 2189 | (hm : IncrementBounds s (ExponentLedger.meanUpdateExponent σ κ) m) |
| 2190 | (b : HarmonicBlock D) (hb : b.WaveBounds s P (1 / 2)) |
| 2191 | (hN : ∀ i, UnweightedClass s 0 |
| 2192 | (fun n x => HarmonicMeanInteraction.slowNormal c ho hR b.phase n x i)) |
| 2193 | (hk : BandBound s (-(1 / 2)) b.frequency) |
| 2194 | (hkp : BandBound s (-(1 / 2)) (fun n => (b.angularFrequency n : ℝ))) |
| 2195 | (hP : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2196 | (G A₀ A₁ : HarmonicResidual.BlockCoefficients D) |
| 2197 | (hA : ∀ n i, HarmonicFields.BandLimited (A₁ n i - A₀ n i) 0) |
| 2198 | (hold : (HarmonicResidual.residualBlock c u b G A₀).WaveBounds s P |
| 2199 | (ExponentLedger.waveExponent (σ + 1 / 10))) : |
| 2200 | (HarmonicResidual.residualBlock c v b G A₁).WaveBounds s P |
| 2201 | (ExponentLedger.waveExponent (σ + 1 / 10)) := by |
| 2202 | apply meanUpdate_residualBlock_mem c ho (by linarith) hR u v m he hbase hmean hm b hb |
| 2203 | hN hk hkp hP G A₀ A₁ hA hold |
| 2204 | have hg := ExponentLedger.mean_update_wave_margin (σ := σ) hκ |
| 2205 | linarith |
| 2206 | |
| 2207 | end MeanWaveComposition |
| 2208 | |
| 2209 | section RankRetainedAlias |
| 2210 | |
| 2211 | open CorrectionState |
| 2212 | |
| 2213 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 2214 | |
| 2215 | /-- A previously accumulated temporal alias remains subtracted through the |
| 2216 | rank stage. No size assumption on that unchanged alias is needed here. -/ |
| 2217 | theorem rankStage_axial_sub_mem {s : StripData (PressureStream.Lift S)} |
| 2218 | (p : ReconstructionData) (r : RankData S) (axial : S × PressureStream.Plane) |
| 2219 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 2220 | (hg : DefectIncrementBounds.RankGeometry p r c u) |
| 2221 | {H κ β : ℝ} (v : PressureStream.Plane) (hfast : c.operators.vT = (0, (0, v))) |
| 2222 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 2223 | (hm : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 2224 | (hi : IncrementBounds s H (rankIncrement p r axial c u)) |
| 2225 | (hp : SmoothOn s.domain u.pressure) |
| 2226 | (hdp : MeanClass s H (rankPressureChange p r axial c u)) |
| 2227 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 2228 | (A : ScalarField (PressureStream.Lift S)) |
| 2229 | (hcurrent : MeanClass s β (u.axialResidual c - A)) |
| 2230 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 2231 | MeanClass s β ((rankStage p r axial c u).axialResidual c - A) := by |
| 2232 | have hz : ∀ n x, x ∈ s.domain → |
| 2233 | fderiv ℝ ((rankIncrement p r axial c u).axial n) x c.operators.vT = 0 := by |
| 2234 | intro n x hx |
| 2235 | rw [hfast] |
| 2236 | exact slow_directional_zero s.isOpen_domain hi.axial.smooth (hg.axial_slow axial) v n hx |
| 2237 | have hdelta := axialResidual_change_slow_mem ho hb hm hi hH u.covariance hW |
| 2238 | u.pressure (rankPressureChange p r axial c u) c.virtualAxial hp hdp hz |
| 2239 | have hpressure : u.pressure + rankPressureChange p r axial c u = |
| 2240 | (rankStage p r axial c u).pressure := by |
| 2241 | unfold rankPressureChange |
| 2242 | abel |
| 2243 | have hnew : (rankStage p r axial c u).axialResidual c = |
| 2244 | MeanIncrementBounds.axialResidual c.operators c.base |
| 2245 | (updated u.mean (rankIncrement p r axial c u)) u.covariance |
| 2246 | (u.pressure + rankPressureChange p r axial c u) c.virtualAxial := by |
| 2247 | rw [hpressure] |
| 2248 | simp [rankStage, reconstructPressure, State.axialResidual, State.addIncrement] |
| 2249 | rfl |
| 2250 | apply class_congr (hcurrent.add (hdelta.mono_exponent hβ)) |
| 2251 | intro n x hx |
| 2252 | rw [hnew] |
| 2253 | change _ - _ = (_ - A n x) + (_ - _) |
| 2254 | simp only [State.axialResidual] |
| 2255 | ring |
| 2256 | |
| 2257 | end RankRetainedAlias |
| 2258 | |
| 2259 | section SignedTensorRemainder |
| 2260 | |
| 2261 | open CorrectionState MeasureTheory |
| 2262 | |
| 2263 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2264 | theorem AngularContinuous.neg {u : Oscillation D} (hu : AngularContinuous u) : |
| 2265 | AngularContinuous (-u) := fun n x i => (hu n x i).neg |
| 2266 | |
| 2267 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2268 | theorem AngularContinuous.sub {u v : Oscillation D} |
| 2269 | (hu : AngularContinuous u) (hv : AngularContinuous v) : AngularContinuous (u - v) := |
| 2270 | fun n x i => (hu n x i).sub (hv n x i) |
| 2271 | |
| 2272 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2273 | theorem bilinearCovariance_neg_left (u v : Oscillation D) : |
| 2274 | bilinearCovariance (-u) v = -bilinearCovariance u v := by |
| 2275 | funext i j n x |
| 2276 | change (∫ θ in (0 : ℝ)..2 * Real.pi, -u n (x, θ) i * v n (x, θ) j) / |
| 2277 | (2 * Real.pi) = -((∫ θ in (0 : ℝ)..2 * Real.pi, u n (x, θ) i * v n (x, θ) j) / |
| 2278 | (2 * Real.pi)) |
| 2279 | simp only [neg_mul, intervalIntegral.integral_neg, neg_div] |
| 2280 | |
| 2281 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2282 | theorem bilinearCovariance_neg_right (u v : Oscillation D) : |
| 2283 | bilinearCovariance u (-v) = -bilinearCovariance u v := by |
| 2284 | funext i j |
| 2285 | rw [bilinearCovariance_comm u (-v) i j, |
| 2286 | congrFun (congrFun (bilinearCovariance_neg_left v u) j) i] |
| 2287 | change -bilinearCovariance v u j i = -bilinearCovariance u v i j |
| 2288 | rw [bilinearCovariance_comm v u j i] |
| 2289 | |
| 2290 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2291 | theorem bilinearCovariance_sub_left {u v w : Oscillation D} |
| 2292 | (hu : AngularContinuous u) (hv : AngularContinuous v) (hw : AngularContinuous w) : |
| 2293 | bilinearCovariance (u - v) w = bilinearCovariance u w - bilinearCovariance v w := by |
| 2294 | rw [sub_eq_add_neg, bilinearCovariance_add_left hu hv.neg hw, |
| 2295 | bilinearCovariance_neg_left, sub_eq_add_neg] |
| 2296 | |
| 2297 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2298 | theorem bilinearCovariance_sub_right {u v w : Oscillation D} |
| 2299 | (hu : AngularContinuous u) (hv : AngularContinuous v) (hw : AngularContinuous w) : |
| 2300 | bilinearCovariance u (v - w) = bilinearCovariance u v - bilinearCovariance u w := by |
| 2301 | rw [sub_eq_add_neg, bilinearCovariance_add_right hu hv hw.neg, |
| 2302 | bilinearCovariance_neg_right, sub_eq_add_neg] |
| 2303 | |
| 2304 | noncomputable def symmetricCovariance (u v : Oscillation D) : Tensor D := |
| 2305 | bilinearCovariance u v + bilinearCovariance v u |
| 2306 | |
| 2307 | /-- The signed update is separated at the level of actual angular |
| 2308 | integrals. The square contains the entire tangent plus curl increment. -/ |
| 2309 | noncomputable def signedTensorRemainder (primary old tangent curl : Oscillation D) : Tensor D := |
| 2310 | covarianceIncrement old (tangent + curl) - symmetricCovariance primary tangent |
| 2311 | |
| 2312 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2313 | theorem signedTensorRemainder_exact (primary old tangent curl : Oscillation D) |
| 2314 | (hp : AngularContinuous primary) (ho : AngularContinuous old) |
| 2315 | (ht : AngularContinuous tangent) (hc : AngularContinuous curl) : |
| 2316 | signedTensorRemainder primary old tangent curl = |
| 2317 | symmetricCovariance (old - primary) tangent + symmetricCovariance old curl + |
| 2318 | bilinearCovariance (tangent + curl) (tangent + curl) := by |
| 2319 | unfold signedTensorRemainder covarianceIncrement symmetricCovariance |
| 2320 | rw [bilinearCovariance_add_right ho ht hc, bilinearCovariance_add_left ht hc ho, |
| 2321 | bilinearCovariance_sub_left ho hp ht, bilinearCovariance_sub_right ht ho hp] |
| 2322 | abel |
| 2323 | |
| 2324 | noncomputable def subBlock (a b : HarmonicBlock D) : HarmonicBlock D := |
| 2325 | { a with velocity := fun n i => a.velocity n i - b.velocity n i |
| 2326 | pressure := fun n => a.pressure n - b.pressure n } |
| 2327 | |
| 2328 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2329 | theorem subBlock_oscillation (a b : HarmonicBlock D) (h : SameCarrier a b) : |
| 2330 | (subBlock a b).oscillation = a.oscillation - b.oscillation := by |
| 2331 | funext n x i |
| 2332 | simp only [subBlock, HarmonicBlock.oscillation, HarmonicResidual.field_sub, |
| 2333 | Complex.sub_re, Pi.sub_apply, h.frequency, h.phase, h.angular] |
| 2334 | |
| 2335 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2336 | theorem subBlock_band {a b : HarmonicBlock D} {N M : ℕ} |
| 2337 | (ha : a.BandLimited N) (hb : b.BandLimited M) : |
| 2338 | (subBlock a b).BandLimited (max N M) := |
| 2339 | ⟨fun n i => HarmonicResidual.band_sub (ha.1 n i |>.mono (le_max_left _ _)) |
| 2340 | (hb.1 n i |>.mono (le_max_right _ _)), |
| 2341 | fun n => HarmonicResidual.band_sub (ha.2 n |>.mono (le_max_left _ _)) |
| 2342 | (hb.2 n |>.mono (le_max_right _ _))⟩ |
| 2343 | |
| 2344 | theorem symmetricCovariance_mem {s : StripData D} {P : ℕ → D → ℝ} {α β : ℝ} |
| 2345 | (a b : HarmonicBlock D) (hcarrier : SameCarrier a b) (N : ℕ) |
| 2346 | (hNa : a.BandLimited N) (ha : a.WaveBounds s P α) (hb : b.WaveBounds s P β) |
| 2347 | (ha0 : ∀ n i, a.velocity n i 0 = 0) (hb0 : ∀ n i, b.velocity n i 0 = 0) |
| 2348 | (hkp : ∀ n, a.angularFrequency n ≠ 0) |
| 2349 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2350 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) : |
| 2351 | TensorClass s (α + β) (symmetricCovariance a.oscillation b.oscillation) := by |
| 2352 | have hca := block_waveBounds_all a ha ha0 hP0 |
| 2353 | have hcb := block_waveBounds_all b hb hb0 hP0 |
| 2354 | intro i j |
| 2355 | have hcross := HarmonicCovariance.mixedBlockCovariance_mem a b N hNa |
| 2356 | hcarrier.frequency hcarrier.phase hcarrier.angular hca hcb hP0 hP1 hkp i j |
| 2357 | have hreverse : MeanClass s (α + β) (bilinearCovariance b.oscillation a.oscillation i j) := by |
| 2358 | rw [bilinearCovariance_comm] |
| 2359 | exact HarmonicCovariance.mixedBlockCovariance_mem a b N hNa |
| 2360 | hcarrier.frequency hcarrier.phase hcarrier.angular hca hcb hP0 hP1 hkp j i |
| 2361 | exact hcross.add hreverse |
| 2362 | |
| 2363 | /-- The three signed errors have exponents `δ+β`, `α+η`, and `2β`. |
| 2364 | The stronger bound on the old-minus-primary field is used only for the |
| 2365 | first term. No class of a resulting covariance is assumed. -/ |
| 2366 | theorem signedTensorRemainder_mem {s : StripData D} {P : ℕ → D → ℝ} |
| 2367 | {α δ β η γ : ℝ} (primary old tangent curl : HarmonicBlock D) (N : ℕ) |
| 2368 | (hop : SameCarrier old primary) (hot : SameCarrier old tangent) |
| 2369 | (hoc : SameCarrier old curl) |
| 2370 | (hpN : primary.BandLimited N) (hoN : old.BandLimited N) |
| 2371 | (htN : tangent.BandLimited N) (hcN : curl.BandLimited N) |
| 2372 | (ho : old.WaveBounds s P α) |
| 2373 | (hd : (subBlock old primary).WaveBounds s P δ) |
| 2374 | (ht : tangent.WaveBounds s P β) (hc : curl.WaveBounds s P η) |
| 2375 | (hp0 : ∀ n i, primary.velocity n i 0 = 0) (ho0 : ∀ n i, old.velocity n i 0 = 0) |
| 2376 | (ht0 : ∀ n i, tangent.velocity n i 0 = 0) (hc0 : ∀ n i, curl.velocity n i 0 = 0) |
| 2377 | (hβη : β ≤ η) (hγd : γ ≤ δ + β) (hγc : γ ≤ α + η) (hγs : γ ≤ 2 * β) |
| 2378 | (hkp : ∀ n, old.angularFrequency n ≠ 0) |
| 2379 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2380 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) : |
| 2381 | TensorClass s γ (signedTensorRemainder primary.oscillation old.oscillation |
| 2382 | tangent.oscillation curl.oscillation) := by |
| 2383 | have hdt : SameCarrier (subBlock old primary) tangent := |
| 2384 | ⟨hot.frequency, hot.phase, hot.angular⟩ |
| 2385 | have htc : SameCarrier tangent curl := |
| 2386 | ⟨hoc.frequency.trans hot.frequency.symm, hoc.phase.trans hot.phase.symm, |
| 2387 | hoc.angular.trans hot.angular.symm⟩ |
| 2388 | have hd0 : ∀ n i, (subBlock old primary).velocity n i 0 = 0 := by |
| 2389 | intro n i |
| 2390 | change old.velocity n i 0 - primary.velocity n i 0 = 0 |
| 2391 | rw [ho0, hp0, sub_self] |
| 2392 | have hsum0 : ∀ n i, (addBlock tangent curl).velocity n i 0 = 0 := by |
| 2393 | intro n i |
| 2394 | change tangent.velocity n i 0 + curl.velocity n i 0 = 0 |
| 2395 | rw [ht0, hc0, add_zero] |
| 2396 | have hdiff := symmetricCovariance_mem (subBlock old primary) tangent hdt (max N N) |
| 2397 | (subBlock_band hoN hpN) hd ht hd0 ht0 hkp hP0 hP1 |
| 2398 | have hcurl := symmetricCovariance_mem old curl hoc N hoN ho hc ho0 hc0 hkp hP0 hP1 |
| 2399 | have hsum := block_waveBounds_all (addBlock tangent curl) |
| 2400 | (addBlock_waveBounds ht hc hβη) hsum0 hP0 |
| 2401 | have hsquare := HarmonicCovariance.blockCovariance_mem (addBlock tangent curl) (max N N) |
| 2402 | (addBlock_band htN hcN) hsum hP0 hP1 |
| 2403 | (fun n => by simpa only [addBlock, hot.angular] using hkp n) |
| 2404 | rw [subBlock_oscillation old primary hop] at hdiff |
| 2405 | simp only [addBlock_oscillation tangent curl htc] at hsquare |
| 2406 | rw [signedTensorRemainder_exact _ _ _ _ (block_angularContinuous primary) |
| 2407 | (block_angularContinuous old) (block_angularContinuous tangent) (block_angularContinuous curl)] |
| 2408 | intro i j |
| 2409 | exact ((hdiff i j).mono_exponent hγd |>.add ((hcurl i j).mono_exponent hγc)).add |
| 2410 | ((hsquare i j).mono_exponent (by linarith)) |
| 2411 | |
| 2412 | /-- Applying the fixed radial derivative loss still leaves the signed |
| 2413 | tensor error at the manuscript's `.17` improvement. -/ |
| 2414 | theorem signedTensorRemainder_divergence_mem {s : StripData D} {P : ℕ → D → ℝ} |
| 2415 | {σ κ : ℝ} (c : Context D) (hops : OperatorBounds s c.operators κ) |
| 2416 | (hσ : 1 / 5 ≤ σ) (hκ : κ ≤ 1 / 100000) |
| 2417 | (primary old tangent curl : HarmonicBlock D) (N : ℕ) |
| 2418 | (hop : SameCarrier old primary) (hot : SameCarrier old tangent) |
| 2419 | (hoc : SameCarrier old curl) |
| 2420 | (hpN : primary.BandLimited N) (hoN : old.BandLimited N) |
| 2421 | (htN : tangent.BandLimited N) (hcN : curl.BandLimited N) |
| 2422 | (ho : old.WaveBounds s P (1 / 2)) |
| 2423 | (hd : (subBlock old primary).WaveBounds s P (17 / 25)) |
| 2424 | (ht : tangent.WaveBounds s P (ExponentLedger.waveExponent σ - κ)) |
| 2425 | (hc : curl.WaveBounds s P (ExponentLedger.waveExponent σ + 1 / 2 - 2 * κ)) |
| 2426 | (hp0 : ∀ n i, primary.velocity n i 0 = 0) (ho0 : ∀ n i, old.velocity n i 0 = 0) |
| 2427 | (ht0 : ∀ n i, tangent.velocity n i 0 = 0) (hc0 : ∀ n i, curl.velocity n i 0 = 0) |
| 2428 | (hkp : ∀ n, old.angularFrequency n ≠ 0) |
| 2429 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 2430 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) : |
| 2431 | let E := signedTensorRemainder primary.oscillation old.oscillation tangent.oscillation curl.oscillation |
| 2432 | MeanClass s (ExponentLedger.meanExponent σ + 17 / 100) (thetaCovarianceChange c.operators E) ∧ |
| 2433 | MeanClass s (ExponentLedger.meanExponent σ + 17 / 100) (axialCovarianceChange c.operators E) ∧ |
| 2434 | MeanClass s (ExponentLedger.meanExponent σ + 17 / 100) (radialCovarianceChange c.operators E) := by |
| 2435 | have he := signedTensorRemainder_mem (γ := ExponentLedger.meanExponent σ + 17 / 100 + κ) |
| 2436 | primary old tangent curl N hop hot hoc hpN hoN htN hcN ho hd ht hc hp0 ho0 ht0 hc0 |
| 2437 | (by linarith) (by unfold ExponentLedger.waveExponent ExponentLedger.meanExponent; linarith) |
| 2438 | (by unfold ExponentLedger.waveExponent ExponentLedger.meanExponent; linarith) |
| 2439 | (by unfold ExponentLedger.waveExponent ExponentLedger.meanExponent; linarith) |
| 2440 | hkp hP0 hP1 |
| 2441 | simpa only [add_sub_cancel_right] using |
| 2442 | And.intro (thetaCovarianceChange_mem hops he) |
| 2443 | (And.intro (axialCovarianceChange_mem hops he) (radialCovarianceChange_mem hops he)) |
| 2444 | |
| 2445 | end SignedTensorRemainder |
| 2446 | |
| 2447 | section LocalMeanConstruction |
| 2448 | |
| 2449 | open CorrectionState PhysicalMeanDomain |
| 2450 | |
| 2451 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 2452 | |
| 2453 | /-- The native temporal construction is bounded on a genuine open slow |
| 2454 | domain. The source need not satisfy estimates at nonpositive slow time. -/ |
| 2455 | theorem temporalIncrement_local_mem (r : ReconstructionData) (h : ℝ) |
| 2456 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 2457 | (u : State (PressureStream.Lift S)) {cL cR H : ℝ} |
| 2458 | (ha : 0 < r.inner) (hd : 0 < r.exponent) (hcL : 0 < cL) (hcR : 0 < cR) (hh : 0 ≤ h) |
| 2459 | (L : ℕ → ℝ) (hε : ∀ n, 0 < c.operators.epsilon n) |
| 2460 | (hεone : ∀ n, c.operators.epsilon n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 2461 | (hscale : ∀ n, ChartScales.S n ≤ L n) (U : Set S) (hU : IsOpen U) |
| 2462 | (hθclass : MeanClass (localStripData r.inner r.outer cL cR |
| 2463 | ha hcL hcR c.operators.epsilon L hε hεone hL U hU) H (u.thetaResidual c)) |
| 2464 | (hzclass : MeanClass (localStripData r.inner r.outer cL cR |
| 2465 | ha hcL hcR c.operators.epsilon L hε hεone hL U hU) H (u.axialResidual c)) |
| 2466 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain U)) |
| 2467 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain U)) |
| 2468 | (hpθ : ∀ n, PeriodicOn U (u.thetaResidual c n)) |
| 2469 | (hpz : ∀ n, PeriodicOn U (u.axialResidual c n)) |
| 2470 | (hsz : ∀ n, SupportedOn r.inner r.outer U (u.axialResidual c n)) : |
| 2471 | IncrementBounds (localStripData r.inner r.outer cL cR |
| 2472 | ha hcL hcR c.operators.epsilon L hε hεone hL U hU) H (temporalIncrement r h axial c u) := by |
| 2473 | refine ⟨?_, ?_, ?_⟩ |
| 2474 | · exact PhysicalMeanDomain.meanClass_scaledRadialUpdate ha r.inner_lt_outer hd hcL hcR hh |
| 2475 | c.operators.epsilon L hε hεone hL hscale U hU hz hpz hsz hzclass |
| 2476 | r.frequency (fun _ => r.radialDirection) axial |
| 2477 | · exact PhysicalMeanDomain.meanClass_desiredIncrement ha hcL hcR hh |
| 2478 | c.operators.epsilon L hε hεone hL hscale U hU hθ hpθ hθclass |
| 2479 | · exact PhysicalMeanDomain.meanClass_axialUpdate ha r.inner_lt_outer hd hcL hcR hh |
| 2480 | c.operators.epsilon L hε hεone hL hscale U hU hz hpz hsz hzclass |
| 2481 | r.frequency (fun _ => r.radialDirection) |
| 2482 | |
| 2483 | theorem commonRatio_bandBound {s : StripData D} (h : ℝ) (index : ℕ → ℕ) (gap : ℕ) |
| 2484 | (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) : |
| 2485 | BandBound s 0 (fun n => MeanChartCompatibility.commonRatio h n (index n)) := by |
| 2486 | refine ⟨ChartScales.Tg ^ gap, (pow_pos ChartScales.Tg_pos gap).le, 0, ?_⟩ |
| 2487 | intro n |
| 2488 | simp only [Real.norm_eq_abs, abs_of_pos (MeanChartCompatibility.commonRatio_pos h n (index n)), |
| 2489 | Real.rpow_zero, pow_zero, mul_one] |
| 2490 | exact MeanChartCompatibility.commonRatio_le (hgap n) |
| 2491 | |
| 2492 | /-- A local source estimate is transported through the actual common-clock |
| 2493 | inverse and then through the actual stream. No output estimate or global |
| 2494 | slow-domain extension is a hypothesis. -/ |
| 2495 | theorem commonTemporalIncrement_local_mem (r : ReconstructionData) (h : ℝ) |
| 2496 | (index : ℕ → ℕ) (gap : ℕ) (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) |
| 2497 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 2498 | (u : State (PressureStream.Lift S)) {cL cR H : ℝ} |
| 2499 | (ha : 0 < r.inner) (hd : 0 < r.exponent) (hcL : 0 < cL) (hcR : 0 < cR) (hh : 0 ≤ h) |
| 2500 | (L : ℕ → ℝ) (hε : ∀ n, 0 < c.operators.epsilon n) |
| 2501 | (hεone : ∀ n, c.operators.epsilon n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 2502 | (hscale : ∀ n, ChartScales.S n ≤ L n) (U : Set S) (hU : IsOpen U) |
| 2503 | (hθclass : MeanClass (localStripData r.inner r.outer cL cR |
| 2504 | ha hcL hcR c.operators.epsilon L hε hεone hL U hU) H (u.thetaResidual c)) |
| 2505 | (hzclass : MeanClass (localStripData r.inner r.outer cL cR |
| 2506 | ha hcL hcR c.operators.epsilon L hε hεone hL U hU) H (u.axialResidual c)) |
| 2507 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain U)) |
| 2508 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain U)) |
| 2509 | (hpθ : ∀ n, PeriodicOn U (u.thetaResidual c n)) |
| 2510 | (hpz : ∀ n, PeriodicOn U (u.axialResidual c n)) |
| 2511 | (hsz : ∀ n, SupportedOn r.inner r.outer U (u.axialResidual c n)) : |
| 2512 | IncrementBounds (localStripData r.inner r.outer cL cR |
| 2513 | ha hcL hcR c.operators.epsilon L hε hεone hL U hU) H |
| 2514 | (MeanChartCompatibility.commonTemporalIncrement (fun _ => r) h index axial c u) := by |
| 2515 | let s := localStripData r.inner r.outer cL cR ha hcL hcR c.operators.epsilon L hε hεone hL U hU |
| 2516 | let z : ScalarField (PressureStream.Lift S) := fun n => |
| 2517 | MeanChartCompatibility.temporalAtIndex h n (index n) (u.axialResidual c n) |
| 2518 | have hratio := commonRatio_bandBound (s := s) h index gap hgap |
| 2519 | have hzt : MeanClass s H z := by |
| 2520 | have hh' := (PhysicalMeanDomain.meanClass_desiredIncrement ha hcL hcR hh |
| 2521 | c.operators.epsilon L hε hεone hL hscale U hU hz hpz hzclass).band_smul hratio |
| 2522 | simpa only [z, MeanChartCompatibility.temporalAtIndex_eq_native, smul_eq_mul, add_zero] using hh' |
| 2523 | have hzs : ∀ n, ContDiffOn ℝ ∞ (z n) (slowDomain U) := by |
| 2524 | intro n |
| 2525 | simpa only [z, MeanChartCompatibility.temporalAtIndex_eq_native] using |
| 2526 | (contDiffOn_const (c := MeanChartCompatibility.commonRatio h n (index n))).mul |
| 2527 | (PhysicalMeanDomain.desiredIncrement_contDiffOn h n hU (hz n) (hpz n)) |
| 2528 | have hzsupport : ∀ n, SupportedOn r.inner r.outer U (z n) := by |
| 2529 | intro n x hx hn |
| 2530 | have hs := PhysicalMeanDomain.desiredIncrement_supportedOn h n hU (hz n) (hsz n) |
| 2531 | apply hs x hx |
| 2532 | have hn' : MeanChartCompatibility.commonRatio h n (index n) * |
| 2533 | TemporalMeanUpdate.desiredIncrement h n (u.axialResidual c n) x ≠ 0 := by |
| 2534 | simpa only [z, MeanChartCompatibility.temporalAtIndex_eq_native] using hn |
| 2535 | exact right_ne_zero_of_mul hn' |
| 2536 | refine ⟨?_, ?_, ?_⟩ |
| 2537 | · have hi := PhysicalMeanDomain.meanClass_streamBeta ha r.inner_lt_outer hd hcL hcR |
| 2538 | c.operators.epsilon L hε hεone hL U hU hzs hzsupport hzt |
| 2539 | r.frequency (fun _ => r.radialDirection) axial |
| 2540 | have heps : BandBound s 1 c.operators.epsilon := by |
| 2541 | have he := bandBound_rpow s 1 |
| 2542 | simp only [Real.rpow_one] at he |
| 2543 | exact he |
| 2544 | apply class_congr (hi.band_smul heps) |
| 2545 | intro n x hx |
| 2546 | simp only [MeanChartCompatibility.commonTemporalIncrement, MeanChartCompatibility.commonTemporalFields, |
| 2547 | MeanChartCompatibility.commonTemporalPotential, PressureStream.streamBeta, |
| 2548 | PressureStream.graphDz, smul_eq_mul] |
| 2549 | rw [show ((0 : ℝ), c.operators.epsilon n • axial) = |
| 2550 | c.operators.epsilon n • ((0 : ℝ), axial) by simp] |
| 2551 | simp only [map_smul, smul_eq_mul, mul_neg] |
| 2552 | rfl |
| 2553 | · have hi := (PhysicalMeanDomain.meanClass_desiredIncrement ha hcL hcR hh |
| 2554 | c.operators.epsilon L hε hεone hL hscale U hU hθ hpθ hθclass).band_smul hratio |
| 2555 | simpa only [MeanChartCompatibility.commonTemporalIncrement, MeanChartCompatibility.commonTemporalFields, |
| 2556 | MeanChartCompatibility.temporalAtIndex_eq_native, smul_eq_mul, add_zero] using hi |
| 2557 | · exact PhysicalMeanDomain.meanClass_streamGamma ha r.inner_lt_outer hd hcL hcR |
| 2558 | c.operators.epsilon L hε hεone hL U hU hzs hzsupport hzt |
| 2559 | r.frequency (fun _ => r.radialDirection) |
| 2560 | |
| 2561 | /-- Recomputed pressure on the same local slow domain. The source change |
| 2562 | class is derived from the exact nonlinear radial equation. -/ |
| 2563 | theorem reconstructedPressure_local_change_mem |
| 2564 | {a b d cL cR : ℝ} (ha : 0 < a) (hab : a < b) (hd : 0 < d) |
| 2565 | (hcL : 0 < cL) (hcR : 0 < cR) |
| 2566 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) |
| 2567 | (hL : ∀ n, 1 ≤ L n) (U : Set S) (hU : IsOpen U) {κ H : ℝ} |
| 2568 | {o : Operators (PressureStream.Lift S)} {base mean inc : Triple (PressureStream.Lift S)} |
| 2569 | (ho : OperatorBounds (localStripData a b cL cR ha hcL hcR ε L hε hεone hL U hU) o κ) |
| 2570 | (hb : BaseBounds (localStripData a b cL cR ha hcL hcR ε L hε hεone hL U hU) base) |
| 2571 | (hm : MeanIncrementBounds.CumulativeBounds |
| 2572 | (localStripData a b cL cR ha hcL hcR ε L hε hεone hL U hU) mean) |
| 2573 | (hi : IncrementBounds (localStripData a b cL cR ha hcL hcR ε L hε hεone hL U hU) H inc) |
| 2574 | (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) |
| 2575 | (W : Tensor (PressureStream.Lift S)) |
| 2576 | (hW : ∀ i j, SmoothOn (localStripData a b cL cR ha hcL hcR ε L hε hεone hL U hU).domain (W i j)) |
| 2577 | (hf : ∀ n, ContDiffOn ℝ ∞ (gr o base (updated mean inc) W n) (slowDomain U)) |
| 2578 | (hg : ∀ n, ContDiffOn ℝ ∞ (gr o base mean W n) (slowDomain U)) |
| 2579 | (hsf : ∀ n, SupportedOn a b U (gr o base (updated mean inc) W n)) |
| 2580 | (hsg : ∀ n, SupportedOn a b U (gr o base mean W n)) |
| 2581 | (M : ℕ → ℝ) (v : ℕ → PressureStream.Plane) : |
| 2582 | MeanClass (localStripData a b cL cR ha hcL hcR ε L hε hεone hL U hU) H |
| 2583 | (reconstructedPressure d a b hab M v o base (updated mean inc) W - |
| 2584 | reconstructedPressure d a b hab M v o base mean W) := by |
| 2585 | exact PhysicalMeanDomain.meanClass_meanPressure_change ha hab hd hcL hcR ε L hε hεone hL |
| 2586 | U hU hf hg hsf hsg (gr_change_mem ho hb hm hi hH W hW hκ) M v |
| 2587 | |
| 2588 | end LocalMeanConstruction |
| 2589 | |
| 2590 | section ConstructedSignedBlocks |
| 2591 | |
| 2592 | open CorrectionState SignedWaveUpdate |
| 2593 | |
| 2594 | /-- The class of a literal coefficient difference is transported from the |
| 2595 | full cylindrical coefficient domain to the actual harmonic blocks. -/ |
| 2596 | theorem blockOfCoefficients_difference_mem |
| 2597 | {s : StripData (D × ℝ)} {P : ℕ → D × ℝ → ℝ} {α : ℝ} |
| 2598 | (a b : LinearWaveBounds.WaveCoefficients (D × ℝ)) (kp : ℕ → ℤ) |
| 2599 | (hab : WaveClass s P α (fun n x => a.amplitude n x - b.amplitude n x)) : |
| 2600 | (subBlock (blockOfCoefficients a kp) (blockOfCoefficients b kp)).WaveBounds |
| 2601 | (sectionStrip s) (fun n x => P n (x, 0)) α := by |
| 2602 | have hsection := class_zeroSection hab |
| 2603 | intro i j hj |
| 2604 | have hh := conjugatePair_class (CurlClassBounds.class_component hsection i) j |
| 2605 | apply WaveInteractionBounds.class_congr hh |
| 2606 | intro n x hx |
| 2607 | change ErrorHarmonics.conjugatePair 1 (fun x => a.amplitude n (x,0) i - b.amplitude n (x,0) i) j x = |
| 2608 | ErrorHarmonics.conjugatePair 1 (fun x => a.amplitude n (x,0) i) j x - |
| 2609 | ErrorHarmonics.conjugatePair 1 (fun x => b.amplitude n (x,0) i) j x |
| 2610 | simp only [conjugatePair_apply] |
| 2611 | split_ifs <;> simp only [map_sub, map_zero, sub_div] <;> ring |
| 2612 | |
| 2613 | theorem correctedBlock_sameCarrier |
| 2614 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (s : StripData (D × ℝ)) |
| 2615 | (d : LinearWaveBounds.GraphDirections (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) : |
| 2616 | SameCarrier (blockOfCoefficients (a.withCutoff ψ) kp) |
| 2617 | (blockOfCoefficients (a.corrected s d ψ) kp) := ⟨rfl, rfl, rfl⟩ |
| 2618 | |
| 2619 | theorem correctedBlock_split |
| 2620 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (s : StripData (D × ℝ)) |
| 2621 | (d : LinearWaveBounds.GraphDirections (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) : |
| 2622 | (blockOfCoefficients (a.corrected s d ψ) kp).oscillation = |
| 2623 | (blockOfCoefficients (a.withCutoff ψ) kp).oscillation + |
| 2624 | (subBlock (blockOfCoefficients (a.corrected s d ψ) kp) |
| 2625 | (blockOfCoefficients (a.withCutoff ψ) kp)).oscillation := by |
| 2626 | have h : SameCarrier (blockOfCoefficients (a.corrected s d ψ) kp) |
| 2627 | (blockOfCoefficients (a.withCutoff ψ) kp) := ⟨rfl, rfl, rfl⟩ |
| 2628 | rw [subBlock_oscillation _ _ h] |
| 2629 | abel |
| 2630 | |
| 2631 | /-- The tangent and curl-difference blocks used by the tensor estimate are |
| 2632 | the blocks of the actual signed quotient, homogeneous pressure, cutoff, |
| 2633 | and curl construction. Their classes are conclusions from primitive data. -/ |
| 2634 | theorem constructedSignedBlock_bounds |
| 2635 | {s : StripData (D × ℝ)} {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 2636 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} {P₀ P : ℕ → D × ℝ → ℝ} {α₀ B κ : ℝ} |
| 2637 | (hbase : LinearWaveBounds.InputBounds s P₀ α₀ κ d a) (hκ : κ ≤ 1 / 2) |
| 2638 | {H : ℕ → D × ℝ → Mat2} {T R : ℕ → D × ℝ → Vec2} {mask ψ : ℕ → D × ℝ → ℝ} |
| 2639 | {v Ndot : ℕ → D × ℝ → Space} {A : ℕ → D × ℝ → Space →L[ℝ] Space} |
| 2640 | (hcov : CovarianceControl s H T) |
| 2641 | (hR : ∀ i, MeanClass s (B - 1 / 2 - κ) (fun n x => R n x i)) |
| 2642 | (hm : UnweightedClass s 0 mask) (hv : MemClass s P 0 v) |
| 2643 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain s) (a.normal s d)) |
| 2644 | (hNdot : UnweightedClass s 0 Ndot) (hA : UnweightedClass s 0 A) |
| 2645 | {b M : ℝ} (hb : 0 < b) |
| 2646 | (hlo : ∀ n x, x ∈ s.domain → b ≤ ‖a.normal s d n x‖) |
| 2647 | (hhi : ∀ n x, x ∈ s.domain → ‖a.normal s d n x‖ ≤ M) |
| 2648 | (hK : BandBound s (1 / 2) (fun n => 1 / a.frequency n)) |
| 2649 | {radius : D × ℝ → ℝ} (hradius : a.radius = fun _ => radius) |
| 2650 | (hψ : UnweightedClass s 0 ψ) (kp : ℕ → ℤ) (j : Fin 2) : |
| 2651 | let z := SignedWaveUpdate.coefficients a s d H T R mask v Ndot A j |
| 2652 | let tangent := blockOfCoefficients (z.withCutoff ψ) kp |
| 2653 | let exactBlock := blockOfCoefficients (z.corrected s d ψ) kp |
| 2654 | tangent.WaveBounds (sectionStrip s) (fun n x => P n (x,0)) (B - κ) ∧ |
| 2655 | exactBlock.WaveBounds (sectionStrip s) (fun n x => P n (x,0)) (B - κ) ∧ |
| 2656 | exactBlock.PressureBounds (sectionStrip s) (fun n x => P n (x,0)) (B + 1 / 2 - κ) ∧ |
| 2657 | (subBlock exactBlock tangent).WaveBounds (sectionStrip s) (fun n x => P n (x,0)) |
| 2658 | (B + 1 / 2 - 2 * κ) := by |
| 2659 | let z := SignedWaveUpdate.coefficients a s d H T R mask v Ndot A j |
| 2660 | have hi : LinearWaveBounds.InputBounds s P (B - κ) κ d z := by |
| 2661 | convert! coefficients_inputBounds hbase hcov hR hm hv hN hNdot hA hb hlo hhi hK j using 1 |
| 2662 | ring |
| 2663 | have ht := blockOfCoefficients_classes (z.withCutoff ψ) kp |
| 2664 | (LinearWaveBounds.component_classes (hi.with_cutoff hψ).amplitude) (hi.with_cutoff hψ).pressure |
| 2665 | have he := signed_bounds hbase hκ hcov hR hm hv hN hNdot hA hb hlo hhi hK hradius hψ j |
| 2666 | have hex := blockOfCoefficients_classes (z.corrected s d ψ) kp he.1 he.2.1 |
| 2667 | exact ⟨ht.1, hex.1, hex.2, |
| 2668 | blockOfCoefficients_difference_mem (z.corrected s d ψ) (z.withCutoff ψ) kp he.2.2.1⟩ |
| 2669 | |
| 2670 | end ConstructedSignedBlocks |
| 2671 | |
| 2672 | section CumulativeWaveUpdates |
| 2673 | |
| 2674 | open CorrectionState |
| 2675 | |
| 2676 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2677 | /-- Both wave insertions retain their original carrier. This equality is |
| 2678 | about the actual evaluated fields, not only their coefficient arrays. -/ |
| 2679 | theorem twoWaveUpdates_oscillation (old particular signed : HarmonicBlock D) |
| 2680 | (hp : SameCarrier old particular) (hs : SameCarrier old signed) : |
| 2681 | (addBlock (addBlock old particular) signed).oscillation = |
| 2682 | old.oscillation + particular.oscillation + signed.oscillation := by |
| 2683 | have hs' : SameCarrier (addBlock old particular) signed := |
| 2684 | ⟨hs.frequency, hs.phase, hs.angular⟩ |
| 2685 | rw [addBlock_oscillation _ _ hs', addBlock_oscillation _ _ hp] |
| 2686 | |
| 2687 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 2688 | theorem twoWaveUpdates_band {old particular signed : HarmonicBlock D} {N M K : ℕ} |
| 2689 | (ho : old.BandLimited N) (hp : particular.BandLimited M) (hs : signed.BandLimited K) : |
| 2690 | (addBlock (addBlock old particular) signed).BandLimited (max (max N M) K) := |
| 2691 | addBlock_band (addBlock_band ho hp) hs |
| 2692 | |
| 2693 | /-- Cumulative bounds after the actual two coefficient additions. The |
| 2694 | reference field in the difference is the same primary tangent throughout. -/ |
| 2695 | theorem twoWaveUpdates_cumulative {s : StripData D} {P : ℕ → D → ℝ} {σ κ : ℝ} |
| 2696 | (hσ : 1 / 5 ≤ σ) (hκ : κ ≤ 1 / 100000) |
| 2697 | (primary old particular signed : HarmonicBlock D) |
| 2698 | (ho : old.WaveBounds s P (1 / 2)) |
| 2699 | (hod : ∀ i j, j ≠ 0 → WaveClass s P (17 / 25) |
| 2700 | (fun n x => old.velocity n i j x - primary.velocity n i j x)) |
| 2701 | (hop : old.PressureBounds s P 1) |
| 2702 | (hp : particular.WaveBounds s P (ExponentLedger.waveExponent σ)) |
| 2703 | (hpp : particular.PressureBounds s P (ExponentLedger.waveExponent σ + 1 / 2)) |
| 2704 | (hs : signed.WaveBounds s P (ExponentLedger.waveExponent σ - κ)) |
| 2705 | (hsp : signed.PressureBounds s P (ExponentLedger.waveExponent σ + 1 / 2 - κ)) : |
| 2706 | let finalBlock := addBlock (addBlock old particular) signed |
| 2707 | finalBlock.WaveBounds s P (1 / 2) ∧ |
| 2708 | (∀ i j, j ≠ 0 → WaveClass s P (17 / 25) |
| 2709 | (fun n x => finalBlock.velocity n i j x - primary.velocity n i j x)) ∧ |
| 2710 | finalBlock.PressureBounds s P 1 := by |
| 2711 | have hpbound := ExponentLedger.particular_increment_above_cumulative_difference hσ |
| 2712 | have hsbound := ExponentLedger.signed_increment_above_cumulative_difference hσ hκ |
| 2713 | refine ⟨addBlock_waveBounds (addBlock_waveBounds ho hp (by linarith)) hs (by linarith), ?_, ?_⟩ |
| 2714 | · exact addBlock_differenceBounds primary (addBlock old particular) signed |
| 2715 | (addBlock_differenceBounds primary old particular hod hp hpbound.le) hs hsbound.le |
| 2716 | · exact addBlock_pressureBounds (addBlock_pressureBounds hop hpp (by linarith)) hsp (by linarith) |
| 2717 | |
| 2718 | end CumulativeWaveUpdates |
| 2719 | |
| 2720 | section LocalCommonClock |
| 2721 | |
| 2722 | open CorrectionState PhysicalMeanDomain |
| 2723 | |
| 2724 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 2725 | |
| 2726 | theorem temporalAtIndex_local_smooth (h : ℝ) (n i : ℕ) {V : Set S} (hV : IsOpen V) |
| 2727 | {f : PressureStream.Lift S → ℝ} (hf : ContDiffOn ℝ ∞ f (slowDomain V)) |
| 2728 | (hp : PeriodicOn V f) : |
| 2729 | ContDiffOn ℝ ∞ (MeanChartCompatibility.temporalAtIndex h n i f) (slowDomain V) := by |
| 2730 | rw [MeanChartCompatibility.temporalAtIndex_eq_native] |
| 2731 | exact contDiffOn_const.mul (PhysicalMeanDomain.desiredIncrement_contDiffOn h n hV hf hp) |
| 2732 | |
| 2733 | /-- The common clock cancels the actual local residual. Localization is |
| 2734 | used only to prove a germ identity for the same torus inverse. -/ |
| 2735 | theorem temporalAtIndex_local_fast (h : ℝ) (n i : ℕ) {V : Set S} (hV : IsOpen V) |
| 2736 | {f : PressureStream.Lift S → ℝ} (hf : ContDiffOn ℝ ∞ f (slowDomain V)) |
| 2737 | (hp : PeriodicOn V f) {x : PressureStream.Lift S} (hx : x.2.1 ∈ V) : |
| 2738 | MeanChartCompatibility.fastAtIndex h n i (MeanChartCompatibility.temporalAtIndex h n i f) x = |
| 2739 | -TemporalMeanUpdate.centered f x := by |
| 2740 | obtain ⟨cutoff, _, hsupport, hglobal, he⟩ := exists_fiber_localization hV hx hf |
| 2741 | have hd := ((desiredIncrement_fiberLocal h n).germ he).eventuallyEq x.1 x.2.2 |
| 2742 | have hc := ((centered_fiberLocal.germ he).eventuallyEq x.1 x.2.2).self_of_nhds |
| 2743 | have hi : MeanChartCompatibility.temporalAtIndex h n i (localize cutoff f) =ᶠ[nhds x] |
| 2744 | MeanChartCompatibility.temporalAtIndex h n i f := by |
| 2745 | rw [MeanChartCompatibility.temporalAtIndex_eq_native, |
| 2746 | MeanChartCompatibility.temporalAtIndex_eq_native] |
| 2747 | exact hd.mono fun y hy => congrArg (MeanChartCompatibility.commonRatio h n i * ·) hy |
| 2748 | have hsolve := MeanChartCompatibility.temporalAtIndex_fast_cancellation h n i hglobal |
| 2749 | (localize_periodic hsupport hp) x |
| 2750 | simpa only [MeanChartCompatibility.fastAtIndex, PressureStream.graphDz, hi.fderiv_eq, hc] using hsolve |
| 2751 | |
| 2752 | end LocalCommonClock |
| 2753 | |
| 2754 | section GaugeMeanBookkeeping |
| 2755 | |
| 2756 | open CorrectionState VariableGaugeMean |
| 2757 | |
| 2758 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 2759 | |
| 2760 | noncomputable def gaugeTemporalPressureChange (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) |
| 2761 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 2762 | (u : State (PressureStream.Lift S)) : ScalarField (PressureStream.Lift S) := |
| 2763 | (temporalStageState g h index axial c u).pressure - u.pressure |
| 2764 | |
| 2765 | noncomputable def gaugeRankPressureChange (g : GaugeData S) (r : RankData S) |
| 2766 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 2767 | (u : State (PressureStream.Lift S)) : ScalarField (PressureStream.Lift S) := |
| 2768 | (rankStageState g r axial c u).pressure - u.pressure |
| 2769 | |
| 2770 | theorem gaugeTemporalStage_covariance (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) |
| 2771 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 2772 | (u : State (PressureStream.Lift S)) : |
| 2773 | (temporalStageState g h index axial c u).covariance = u.covariance := by |
| 2774 | simp only [temporalStageState, reconstructState, State.addIncrement, add_zero] |
| 2775 | rfl |
| 2776 | |
| 2777 | theorem gaugeRankStage_covariance (g : GaugeData S) (r : RankData S) |
| 2778 | (axial : S × PressureStream.Plane) (c : Context (PressureStream.Lift S)) |
| 2779 | (u : State (PressureStream.Lift S)) : |
| 2780 | (rankStageState g r axial c u).covariance = u.covariance := by |
| 2781 | simp only [rankStageState, reconstructState, State.addIncrement, add_zero] |
| 2782 | rfl |
| 2783 | |
| 2784 | theorem gaugeTemporalStage_cumulative {s : StripData (PressureStream.Lift S)} |
| 2785 | (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 2786 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {H : ℝ} |
| 2787 | (hu : CorrectionState.CumulativeBounds s u) |
| 2788 | (hi : IncrementBounds s H (temporalIncrementState g h index axial c u)) |
| 2789 | (hp : MeanClass s H (gaugeTemporalPressureChange g h index axial c u)) (hH : 9 / 10 ≤ H) : |
| 2790 | CorrectionState.CumulativeBounds s (temporalStageState g h index axial c u) := by |
| 2791 | refine ⟨cumulative_updated hu.velocity hi hH, ?_⟩ |
| 2792 | have he : (temporalStageState g h index axial c u).pressure = |
| 2793 | u.pressure + gaugeTemporalPressureChange g h index axial c u := by |
| 2794 | unfold gaugeTemporalPressureChange |
| 2795 | abel |
| 2796 | rw [he] |
| 2797 | exact hu.pressure.add (hp.mono_exponent hH) |
| 2798 | |
| 2799 | theorem gaugeRankStage_cumulative {s : StripData (PressureStream.Lift S)} |
| 2800 | (g : GaugeData S) (r : RankData S) (axial : S × PressureStream.Plane) |
| 2801 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {H : ℝ} |
| 2802 | (hu : CorrectionState.CumulativeBounds s u) |
| 2803 | (hi : IncrementBounds s H (rankIncrementState g r axial c u)) |
| 2804 | (hp : MeanClass s H (gaugeRankPressureChange g r axial c u)) (hH : 9 / 10 ≤ H) : |
| 2805 | CorrectionState.CumulativeBounds s (rankStageState g r axial c u) := by |
| 2806 | refine ⟨cumulative_updated hu.velocity hi hH, ?_⟩ |
| 2807 | have he : (rankStageState g r axial c u).pressure = |
| 2808 | u.pressure + gaugeRankPressureChange g r axial c u := by |
| 2809 | unfold gaugeRankPressureChange |
| 2810 | abel |
| 2811 | rw [he] |
| 2812 | exact hu.pressure.add (hp.mono_exponent hH) |
| 2813 | |
| 2814 | end GaugeMeanBookkeeping |
| 2815 | |
| 2816 | section GaugeTemporalResidual |
| 2817 | |
| 2818 | open CorrectionState VariableGaugeMean PhysicalMeanDomain |
| 2819 | |
| 2820 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 2821 | |
| 2822 | /-- The actual gauge stream may differ from the desired axial inverse; |
| 2823 | its entire fast derivative is retained as the named axial alias. -/ |
| 2824 | theorem gaugeTemporal_fastCancellation {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 2825 | {V : Set S} (hV : IsOpen V) (hUV : ∀ x ∈ U, x.2.1 ∈ V) |
| 2826 | (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 2827 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 2828 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 2829 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 2830 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 2831 | (hi : SmoothTriple U (temporalIncrementState g h index axial c u)) |
| 2832 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain V)) |
| 2833 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain V)) |
| 2834 | (hpθ : ∀ n, PeriodicOn V (u.thetaResidual c n)) |
| 2835 | (hpz : ∀ n, PeriodicOn V (u.axialResidual c n)) |
| 2836 | (n : ℕ) {x : PressureStream.Lift S} (hx : x ∈ U) : |
| 2837 | c.operators.fastTime (temporalIncrementState g h index axial c u).angular n x + |
| 2838 | (u.thetaResidual c n x - meanBar (u.thetaResidual c) n x) = 0 ∧ |
| 2839 | c.operators.fastTime (temporalIncrementState g h index axial c u).axial n x + |
| 2840 | (u.axialResidual c n x - meanBar (u.axialResidual c) n x) = |
| 2841 | temporalAliasState g h index c u n (x, 0) 2 := by |
| 2842 | have hθf := temporalAtIndex_local_fast h n (index n) hV (hθ n) (hpθ n) (hUV x hx) |
| 2843 | have hzf := temporalAtIndex_local_fast h n (index n) hV (hz n) (hpz n) (hUV x hx) |
| 2844 | let desired : ScalarField (PressureStream.Lift S) := fun m => |
| 2845 | MeanChartCompatibility.temporalAtIndex h m (index m) (u.axialResidual c m) |
| 2846 | have hdes : DifferentiableAt ℝ (desired n) x := |
| 2847 | ((temporalAtIndex_local_smooth h n (index n) hV (hz n) (hpz n)).contDiffAt |
| 2848 | ((slowDomain_open hV).mem_nhds (hUV x hx))).differentiableAt (by simp) |
| 2849 | have hinc : DifferentiableAt ℝ ((temporalIncrementState g h index axial c u).axial n) x := |
| 2850 | ((hi.axial n).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp) |
| 2851 | have hd : HasFDerivAt (temporalAxialDifference g h index c u n) |
| 2852 | (fderiv ℝ (desired n) x - |
| 2853 | fderiv ℝ ((temporalIncrementState g h index axial c u).axial n) x) x := |
| 2854 | hdes.hasFDerivAt.sub hinc.hasFDerivAt |
| 2855 | have he : c.operators.fastTime (temporalAxialDifference g h index c u) n x = |
| 2856 | c.operators.fastTime desired n x - |
| 2857 | c.operators.fastTime (temporalIncrementState g h index axial c u).axial n x := by |
| 2858 | simp only [Operators.fastTime, hd.fderiv, _root_.sub_apply, mul_sub] |
| 2859 | constructor |
| 2860 | · rw [common_fastTime h index c hv hfast] |
| 2861 | change MeanChartCompatibility.fastAtIndex h n (index n) |
| 2862 | (MeanChartCompatibility.temporalAtIndex h n (index n) (u.thetaResidual c n)) x + _ = 0 |
| 2863 | rw [hθf] |
| 2864 | simp only [TemporalMeanUpdate.centered, meanBar] |
| 2865 | ring |
| 2866 | · have hdesired : c.operators.fastTime desired n x = |
| 2867 | -(u.axialResidual c n x - meanBar (u.axialResidual c) n x) := by |
| 2868 | rw [common_fastTime h index c hv hfast] |
| 2869 | exact hzf |
| 2870 | change _ = -c.operators.fastTime (temporalAxialDifference g h index c u) n x |
| 2871 | rw [he, hdesired] |
| 2872 | ring |
| 2873 | |
| 2874 | theorem gaugeTemporalStage_theta_exact {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 2875 | {V : Set S} (hV : IsOpen V) (hUV : ∀ x ∈ U, x.2.1 ∈ V) |
| 2876 | (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 2877 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 2878 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 2879 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 2880 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 2881 | (hprofile : ContDiffOn ℝ ∞ c.operators.radialProfile U) |
| 2882 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 2883 | (hi : SmoothTriple U (temporalIncrementState g h index axial c u)) |
| 2884 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 2885 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain V)) |
| 2886 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain V)) |
| 2887 | (hpθ : ∀ n, PeriodicOn V (u.thetaResidual c n)) |
| 2888 | (hpz : ∀ n, PeriodicOn V (u.axialResidual c n)) : |
| 2889 | Agree U ((temporalStageState g h index axial c u).thetaResidual c) |
| 2890 | (meanBar (u.thetaResidual c) + thetaRemainder c.operators c.base u.mean |
| 2891 | (temporalIncrementState g h index axial c u)) := by |
| 2892 | have he := thetaResidual_change hU c.operators hprofile hb hm hi u.covariance hW c.virtualTheta |
| 2893 | have hnew : (temporalStageState g h index axial c u).thetaResidual c = |
| 2894 | MeanIncrementBounds.thetaResidual c.operators c.base |
| 2895 | (updated u.mean (temporalIncrementState g h index axial c u)) u.covariance c.virtualTheta := by |
| 2896 | simp [State.thetaResidual, temporalStageState, |
| 2897 | reconstructState, State.addIncrement] |
| 2898 | rfl |
| 2899 | intro n x hx |
| 2900 | have hc := (gaugeTemporal_fastCancellation hU hV hUV g h index axial c u hv hfast |
| 2901 | hi hθ hz hpθ hpz n hx).1 |
| 2902 | have he' := he n hx |
| 2903 | rw [hnew] |
| 2904 | simp only [Pi.add_apply, Pi.sub_apply] at he' ⊢ |
| 2905 | change _ - u.thetaResidual c n x = _ at he' |
| 2906 | linarith |
| 2907 | |
| 2908 | theorem gaugeTemporalStage_axial_exact {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 2909 | {V : Set S} (hV : IsOpen V) (hUV : ∀ x ∈ U, x.2.1 ∈ V) |
| 2910 | (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 2911 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 2912 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 2913 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 2914 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 2915 | (hprofile : ContDiffOn ℝ ∞ c.operators.radialProfile U) |
| 2916 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 2917 | (hi : SmoothTriple U (temporalIncrementState g h index axial c u)) |
| 2918 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 2919 | (hp : SmoothOn U u.pressure) |
| 2920 | (hnp : SmoothOn U (temporalStageState g h index axial c u).pressure) |
| 2921 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain V)) |
| 2922 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain V)) |
| 2923 | (hpθ : ∀ n, PeriodicOn V (u.thetaResidual c n)) |
| 2924 | (hpz : ∀ n, PeriodicOn V (u.axialResidual c n)) : |
| 2925 | Agree U (fun n x => (temporalStageState g h index axial c u).axialResidual c n x - |
| 2926 | temporalAliasState g h index c u n (x, 0) 2) |
| 2927 | (meanBar (u.axialResidual c) + axialRemainder c.operators c.base u.mean |
| 2928 | (temporalIncrementState g h index axial c u) (gaugeTemporalPressureChange g h index axial c u)) := by |
| 2929 | have he := axialResidual_change hU c.operators hprofile hb hm hi u.covariance hW u.pressure |
| 2930 | (gaugeTemporalPressureChange g h index axial c u) c.virtualAxial hp (hnp.sub hp) |
| 2931 | have hpressure : u.pressure + gaugeTemporalPressureChange g h index axial c u = |
| 2932 | (temporalStageState g h index axial c u).pressure := by |
| 2933 | unfold gaugeTemporalPressureChange |
| 2934 | abel |
| 2935 | have hnew : (temporalStageState g h index axial c u).axialResidual c = |
| 2936 | MeanIncrementBounds.axialResidual c.operators c.base |
| 2937 | (updated u.mean (temporalIncrementState g h index axial c u)) u.covariance |
| 2938 | (u.pressure + gaugeTemporalPressureChange g h index axial c u) c.virtualAxial := by |
| 2939 | rw [hpressure] |
| 2940 | simp [State.axialResidual, temporalStageState, |
| 2941 | reconstructState, State.addIncrement] |
| 2942 | rfl |
| 2943 | intro n x hx |
| 2944 | have hc := (gaugeTemporal_fastCancellation hU hV hUV g h index axial c u hv hfast |
| 2945 | hi hθ hz hpθ hpz n hx).2 |
| 2946 | have he' := he n hx |
| 2947 | rw [hnew] |
| 2948 | simp only [Pi.add_apply, Pi.sub_apply] at he' ⊢ |
| 2949 | change _ - u.axialResidual c n x = _ at he' |
| 2950 | linarith |
| 2951 | |
| 2952 | end GaugeTemporalResidual |
| 2953 | |
| 2954 | section GaugeTemporalGain |
| 2955 | |
| 2956 | open CorrectionState VariableGaugeMean PhysicalMeanDomain |
| 2957 | |
| 2958 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 2959 | |
| 2960 | /-- The actual variable-gauge temporal update has the same differentiated |
| 2961 | mean remainder as the fixed-gauge update. Its axial alias remains explicit. -/ |
| 2962 | theorem gaugeTemporalStage_mean_gain {s : StripData (PressureStream.Lift S)} |
| 2963 | {V : Set S} (hV : IsOpen V) (hUV : ∀ x ∈ s.domain, x.2.1 ∈ V) |
| 2964 | (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 2965 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {H κ β : ℝ} |
| 2966 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 2967 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 2968 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 2969 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 2970 | (hu : CorrectionState.CumulativeBounds s u) |
| 2971 | (hi : IncrementBounds s H (temporalIncrementState g h index axial c u)) |
| 2972 | (hdp : MeanClass s H (gaugeTemporalPressureChange g h index axial c u)) |
| 2973 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 2974 | (hbarθ : MeanClass s β (meanBar (u.thetaResidual c))) |
| 2975 | (hbarz : MeanClass s β (meanBar (u.axialResidual c))) |
| 2976 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain V)) |
| 2977 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain V)) |
| 2978 | (hpθ : ∀ n, PeriodicOn V (u.thetaResidual c n)) |
| 2979 | (hpz : ∀ n, PeriodicOn V (u.axialResidual c n)) |
| 2980 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 2981 | MeanClass s β ((temporalStageState g h index axial c u).thetaResidual c) ∧ |
| 2982 | MeanClass s β (fun n x => (temporalStageState g h index axial c u).axialResidual c n x - |
| 2983 | temporalAliasState g h index c u n (x, 0) 2) := by |
| 2984 | have hnp : SmoothOn s.domain (temporalStageState g h index axial c u).pressure := by |
| 2985 | have he : (temporalStageState g h index axial c u).pressure = |
| 2986 | u.pressure + gaugeTemporalPressureChange g h index axial c u := by |
| 2987 | unfold gaugeTemporalPressureChange |
| 2988 | abel |
| 2989 | rw [he] |
| 2990 | exact fun n => (hu.pressure.smooth n).add (hdp.smooth n) |
| 2991 | constructor |
| 2992 | · apply class_congr (hbarθ.add ((thetaRemainder_mem ho hb hu.velocity hi hH).mono_exponent hβ)) |
| 2993 | exact gaugeTemporalStage_theta_exact s.isOpen_domain hV hUV g h index axial c u hv hfast |
| 2994 | (ho.radialProfile.smooth 0) hb.smooth hu.velocity.smooth hi.smooth hW hθ hz hpθ hpz |
| 2995 | · apply class_congr (hbarz.add ((axialRemainder_mem ho hb hu.velocity hi hH hdp).mono_exponent hβ)) |
| 2996 | exact gaugeTemporalStage_axial_exact s.isOpen_domain hV hUV g h index axial c u hv hfast |
| 2997 | (ho.radialProfile.smooth 0) hb.smooth hu.velocity.smooth hi.smooth hW hu.pressure.smooth hnp |
| 2998 | hθ hz hpθ hpz |
| 2999 | |
| 3000 | theorem gaugeTemporalStage_next_mean {s : StripData (PressureStream.Lift S)} |
| 3001 | {V : Set S} (hV : IsOpen V) (hUV : ∀ x ∈ s.domain, x.2.1 ∈ V) |
| 3002 | (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) (axial : S × PressureStream.Plane) |
| 3003 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) {σ κ : ℝ} |
| 3004 | (hσ : 1 / 5 ≤ σ) (hκ : κ ≤ 1 / 100000) |
| 3005 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 3006 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 3007 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 3008 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 3009 | (hu : CorrectionState.CumulativeBounds s u) |
| 3010 | (hi : IncrementBounds s (ExponentLedger.meanUpdateExponent σ κ) |
| 3011 | (temporalIncrementState g h index axial c u)) |
| 3012 | (hdp : MeanClass s (ExponentLedger.meanUpdateExponent σ κ) |
| 3013 | (gaugeTemporalPressureChange g h index axial c u)) |
| 3014 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 3015 | (hbarθ : MeanClass s (ExponentLedger.meanExponent σ + 17 / 100) (meanBar (u.thetaResidual c))) |
| 3016 | (hbarz : MeanClass s (ExponentLedger.meanExponent σ + 17 / 100) (meanBar (u.axialResidual c))) |
| 3017 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (slowDomain V)) |
| 3018 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (slowDomain V)) |
| 3019 | (hpθ : ∀ n, PeriodicOn V (u.thetaResidual c n)) |
| 3020 | (hpz : ∀ n, PeriodicOn V (u.axialResidual c n)) : |
| 3021 | MeanClass s (ExponentLedger.meanExponent (σ + 1 / 10)) |
| 3022 | ((temporalStageState g h index axial c u).thetaResidual c) ∧ |
| 3023 | MeanClass s (ExponentLedger.meanExponent (σ + 1 / 10)) |
| 3024 | (fun n x => (temporalStageState g h index axial c u).axialResidual c n x - |
| 3025 | temporalAliasState g h index c u n (x, 0) 2) := by |
| 3026 | apply gaugeTemporalStage_mean_gain hV hUV g h index axial c u hv hfast ho hb hu hi hdp hW |
| 3027 | (hbarθ.mono_exponent (by unfold ExponentLedger.meanExponent; linarith)) |
| 3028 | (hbarz.mono_exponent (by unfold ExponentLedger.meanExponent; linarith)) |
| 3029 | hθ hz hpθ hpz |
| 3030 | · exact (ExponentLedger.mean_increment_above_cumulative_mean hσ hκ).le |
| 3031 | · simp only [ExponentLedger.meanUpdateExponent, ExponentLedger.meanExponent] |
| 3032 | linarith |
| 3033 | |
| 3034 | end GaugeTemporalGain |
| 3035 | |
| 3036 | section GaugeAliasBookkeeping |
| 3037 | |
| 3038 | open CorrectionState VariableGaugeMean |
| 3039 | |
| 3040 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 3041 | |
| 3042 | noncomputable def gaugeRefreshPressureAlias (g : GaugeData S) |
| 3043 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) : |
| 3044 | State (PressureStream.Lift S) := |
| 3045 | { current with errors := { current.errors with aliasError := |
| 3046 | current.errors.aliasError + (pressureAliasState g c current - pressureAliasState g c old) } } |
| 3047 | |
| 3048 | theorem gaugeRefreshPressureAlias_separated (g : GaugeData S) |
| 3049 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) |
| 3050 | (other : Oscillation (PressureStream.Lift S)) |
| 3051 | (he : current.errors.aliasError = other + pressureAliasState g c old) : |
| 3052 | (gaugeRefreshPressureAlias g c old current).errors.aliasError = |
| 3053 | other + pressureAliasState g c current := by |
| 3054 | simp only [gaugeRefreshPressureAlias, he] |
| 3055 | abel |
| 3056 | |
| 3057 | theorem gaugeRefreshPressureAlias_fullResidual (g : GaugeData S) |
| 3058 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) : |
| 3059 | fullResidual c (gaugeRefreshPressureAlias g c old current) = fullResidual c current := rfl |
| 3060 | |
| 3061 | theorem gaugeRefreshPressureAlias_fullGoodResidual (g : GaugeData S) |
| 3062 | (c : Context (PressureStream.Lift S)) (old current : State (PressureStream.Lift S)) : |
| 3063 | fullGoodResidual c (gaugeRefreshPressureAlias g c old current) = fullGoodResidual c current - |
| 3064 | (pressureAliasState g c current - pressureAliasState g c old) := by |
| 3065 | unfold fullGoodResidual |
| 3066 | rw [gaugeRefreshPressureAlias_fullResidual] |
| 3067 | simp only [gaugeRefreshPressureAlias, ExcludedErrors.total] |
| 3068 | abel |
| 3069 | |
| 3070 | noncomputable def gaugePressureAliasBlock (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3071 | (u : State (PressureStream.Lift S)) (b : HarmonicBlock (PressureStream.Lift S)) : |
| 3072 | HarmonicBlock (PressureStream.Lift S) := |
| 3073 | ErrorHarmonics.zeroBlock b.frequency b.phase b.angularFrequency |
| 3074 | (fun n x => pressureAliasState g c u n (x, 0)) |
| 3075 | |
| 3076 | noncomputable def gaugeTemporalAliasBlock (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) |
| 3077 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 3078 | (b : HarmonicBlock (PressureStream.Lift S)) : HarmonicBlock (PressureStream.Lift S) := |
| 3079 | ErrorHarmonics.zeroBlock b.frequency b.phase b.angularFrequency |
| 3080 | (fun n x => temporalAliasState g h index c u n (x, 0)) |
| 3081 | |
| 3082 | theorem gaugePressureAliasBlock_represents (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3083 | (u : State (PressureStream.Lift S)) (b : HarmonicBlock (PressureStream.Lift S)) : |
| 3084 | (gaugePressureAliasBlock g c u b).oscillation = pressureAliasState g c u := by |
| 3085 | funext n x i |
| 3086 | rw [gaugePressureAliasBlock, ErrorHarmonics.zeroBlock_evaluation] |
| 3087 | rfl |
| 3088 | |
| 3089 | theorem gaugeTemporalAliasBlock_represents (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) |
| 3090 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 3091 | (b : HarmonicBlock (PressureStream.Lift S)) : |
| 3092 | (gaugeTemporalAliasBlock g h index c u b).oscillation = temporalAliasState g h index c u := by |
| 3093 | funext n x i |
| 3094 | rw [gaugeTemporalAliasBlock, ErrorHarmonics.zeroBlock_evaluation] |
| 3095 | rfl |
| 3096 | |
| 3097 | theorem gaugePressureAliasBlock_band (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3098 | (u : State (PressureStream.Lift S)) (b : HarmonicBlock (PressureStream.Lift S)) : |
| 3099 | (gaugePressureAliasBlock g c u b).BandLimited 0 := ErrorHarmonics.zeroBlock_band _ _ _ _ |
| 3100 | |
| 3101 | theorem gaugeTemporalAliasBlock_band (g : GaugeData S) (h : ℝ) (index : ℕ → ℕ) |
| 3102 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 3103 | (b : HarmonicBlock (PressureStream.Lift S)) : |
| 3104 | (gaugeTemporalAliasBlock g h index c u b).BandLimited 0 := ErrorHarmonics.zeroBlock_band _ _ _ _ |
| 3105 | |
| 3106 | end GaugeAliasBookkeeping |
| 3107 | |
| 3108 | section PhysicalResidualDecomposition |
| 3109 | |
| 3110 | open CorrectionState PhysicalResidualBridge ProblemStatement Filter |
| 3111 | open scoped Topology |
| 3112 | |
| 3113 | /-- The coefficient/mean/error decomposition is a decomposition of the |
| 3114 | actual viscosity-one Cartesian residual after the proved graph scaling. -/ |
| 3115 | theorem physicalResidual_decomposition {ι : Type*} {Q : ℝ} (hQ : 0 < Q) |
| 3116 | (h : ℝ) (k n : ℕ) (c : Context Lift) (s : State Lift) |
| 3117 | (hop : MatchesAt c.operators (commonGraph Q h k) n) |
| 3118 | {V : Set Lift} (hmean : LiftedMeanResidual.MeanHypotheses V c s) |
| 3119 | {labels : ℕ → Finset ι} {blocks : ι → HarmonicBlock Lift} |
| 3120 | {gaussian aliasError : ι → HarmonicResidual.BlockCoefficients Lift} |
| 3121 | (hrep : HarmonicResidual.BlockRepresentation labels blocks gaussian aliasError s) |
| 3122 | (hregular : HarmonicResidual.ExtractionRegular V c s labels blocks gaussian aliasError n) |
| 3123 | (hR : ∀ x ∈ HarmonicResidual.liftDomain V, x.1.1 ≠ 0) |
| 3124 | {p₀ : Cylinder → ℝ} |
| 3125 | (hB : ∀ i, ContDiffOn ℝ ∞ (fun x => baseComponents c n x i) (HarmonicResidual.liftDomain V)) |
| 3126 | (ha : ∀ i, ContDiffOn ℝ ∞ (fun x => incrementComponents s n x i) (HarmonicResidual.liftDomain V)) |
| 3127 | (hp₀ : ContDiffOn ℝ ∞ p₀ (HarmonicResidual.liftDomain V)) |
| 3128 | (hp : ContDiffOn ℝ ∞ (s.totalPressureIncrement n) (HarmonicResidual.liftDomain V)) |
| 3129 | {t : ℝ} {q : Space} |
| 3130 | (hz : (t, q) ∈ (commonGraph Q h k).source (HarmonicResidual.liftDomain V)) |
| 3131 | (hbase : ∀ i, graphResidual (Q ^ h) ScaledGraph.radius (commonGraph Q h k).radial |
| 3132 | ScaledGraph.angular (commonGraph Q h k).axial (commonGraph Q h k).temporal |
| 3133 | (baseComponents c n) p₀ ((commonGraph Q h k).map (t, q)) i = |
| 3134 | LiftedMeanResidual.virtualDivergence c n ((commonGraph Q h k).map (t, q)) i + |
| 3135 | s.errors.base n ((commonGraph Q h k).map (t, q)) i) |
| 3136 | {u : VelocityField} {P : PressureField} |
| 3137 | (hu : ContDiffAt ℝ 2 u (t, CylindricalResidual.chart q)) |
| 3138 | (hP : DifferentiableAt ℝ P (t, CylindricalResidual.chart q)) |
| 3139 | (huRep : (fun z : SpaceTime => u (z.1, CylindricalResidual.chart z.2)) =ᶠ[𝓝 (t, q)] |
| 3140 | (fun z => CylindricalResidual.frame (z.2 1) ((commonGraph Q h k).velocity |
| 3141 | (fun y j => baseComponents c n y j + incrementComponents s n y j) z))) |
| 3142 | (hpRep : CylindricalResidual.pressurePullback P =ᶠ[𝓝 (t, q)] (commonGraph Q h k).pressure |
| 3143 | (fun y => p₀ y + s.totalPressureIncrement n y)) (i : Fin 3) : |
| 3144 | Q ^ (2 * CoordinateAlgebra.A h + 1 / 2) * |
| 3145 | CylindricalResidual.frame (-(q 1)) |
| 3146 | (navierStokesResidual u P t (CylindricalResidual.chart q)) i = |
| 3147 | (∑ l ∈ labels n, |
| 3148 | (HarmonicResidual.residualBlock c s (blocks l) (gaussian l) (aliasError l)).oscillation |
| 3149 | n ((commonGraph Q h k).map (t, q)) i) + |
| 3150 | s.meanGoodResidual c n ((commonGraph Q h k).map (t, q)).1 i + |
| 3151 | s.errors.total n ((commonGraph Q h k).map (t, q)) i := by |
| 3152 | have he := context_fullResidual_physical hQ h k n c s hop |
| 3153 | (HarmonicResidual.liftDomain_open hmean.isOpen) hR hB ha hp₀ hp hz hbase hu hP huRep hpRep i |
| 3154 | exact he.symm.trans (fullResidual_reconstructed_with_mean hrep hmean hregular hz.2 i) |
| 3155 | |
| 3156 | end PhysicalResidualDecomposition |
| 3157 | |
| 3158 | section SourceCoefficientCompatibility |
| 3159 | |
| 3160 | open CorrectionState HarmonicFields MeasureTheory |
| 3161 | |
| 3162 | theorem angularMean_const_mul (a : ℂ) (f : ℝ → ℂ) : |
| 3163 | angularMean (fun θ => a * f θ) = a * angularMean f := by |
| 3164 | simp only [angularMean, intervalIntegral.integral_const_mul] |
| 3165 | ring |
| 3166 | |
| 3167 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 3168 | /-- Equality of actual real block fields, together with the literal |
| 3169 | carrier transformation, determines the transformed source coefficients. |
| 3170 | Conjugacy is used explicitly to recover the full complex field. -/ |
| 3171 | theorem block_velocity_pullback_at (a b : HarmonicBlock D) (n m : ℕ) |
| 3172 | (φ : D → D) (scale : ℝ) (x : D) (i : Fin 3) (j : ℤ) |
| 3173 | (ha : ConjugateSymmetric (a.velocity n i)) (hb : ConjugateSymmetric (b.velocity m i)) |
| 3174 | (hkp : a.angularFrequency n = b.angularFrequency m) |
| 3175 | (hkn : a.angularFrequency n ≠ 0) |
| 3176 | (hphase : a.frequency n * a.phase n x = b.frequency m * b.phase m (φ x)) |
| 3177 | (hfield : ∀ θ : ℝ, a.oscillation n (x, θ) i = scale * b.oscillation m (φ x, θ) i) : |
| 3178 | a.velocity n i j x = (scale : ℂ) * b.velocity m i j (φ x) := by |
| 3179 | have hkb : b.angularFrequency m ≠ 0 := by rw [← hkp]; exact hkn |
| 3180 | have hf θ : field (a.velocity n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ) = |
| 3181 | (scale : ℂ) * field (b.velocity m i) (b.frequency m) (b.phase m) (b.angularFrequency m) (φ x, θ) := by |
| 3182 | rw [← field_real ha, ← field_real hb] |
| 3183 | change (a.oscillation n (x, θ) i : ℂ) = (scale : ℂ) * (b.oscillation m (φ x, θ) i : ℂ) |
| 3184 | rw [hfield] |
| 3185 | exact Complex.ofReal_mul _ _ |
| 3186 | have hcarrier θ : field (AddMonoidAlgebra.single (-j) (fun _ : D => (1 : ℂ))) |
| 3187 | (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ) = |
| 3188 | field (AddMonoidAlgebra.single (-j) (fun _ : D => (1 : ℂ))) |
| 3189 | (b.frequency m) (b.phase m) (b.angularFrequency m) (φ x, θ) := by |
| 3190 | simp only [field, evaluate_single, hphase, hkp] |
| 3191 | rw [← HarmonicResidual.extract_field (a.velocity n i) (a.frequency n) (a.phase n) hkn j x, |
| 3192 | ← HarmonicResidual.extract_field (b.velocity m i) (b.frequency m) (b.phase m) hkb j (φ x)] |
| 3193 | unfold HarmonicResidual.extract |
| 3194 | have he : (fun θ => field (a.velocity n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ) * |
| 3195 | field (AddMonoidAlgebra.single (-j) (fun _ : D => (1 : ℂ))) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ)) = |
| 3196 | fun θ => (scale : ℂ) * |
| 3197 | (field (b.velocity m i) (b.frequency m) (b.phase m) (b.angularFrequency m) (φ x, θ) * |
| 3198 | field (AddMonoidAlgebra.single (-j) (fun _ : D => (1 : ℂ))) |
| 3199 | (b.frequency m) (b.phase m) (b.angularFrequency m) (φ x, θ)) := by |
| 3200 | funext θ |
| 3201 | rw [hf θ, hcarrier θ, mul_assoc] |
| 3202 | rw [he, angularMean_const_mul] |
| 3203 | |
| 3204 | end SourceCoefficientCompatibility |
| 3205 | |
| 3206 | section AssembledSignedTensor |
| 3207 | |
| 3208 | open CorrectionState |
| 3209 | |
| 3210 | variable {ι : Type} |
| 3211 | |
| 3212 | /-- Uniform label bounds and the proved slot overlap bound control the |
| 3213 | actual state covariance after adding every signed tangent and curl. -/ |
| 3214 | theorem assembledSigned_stateTensor_mem {s : StripData D} {P : ι → ℕ → D → ℝ} |
| 3215 | {α δ β η γ : ℝ} (f : LabelSumBounds.SignedFamily s P α δ β η) |
| 3216 | (hβη : β ≤ η) (hγd : γ ≤ δ + β) (hγc : γ ≤ α + η) (hγs : γ ≤ 2 * β) |
| 3217 | {d h : ℝ} {vr vt : TorusInverse.Plane} {sys : PartitionedCovariance.SlotSystem d h vr vt} |
| 3218 | (labels : ℕ → Finset ι) (label : ℕ → ι → SlotColoring.Label) |
| 3219 | (hinj : ∀ n, Set.InjOn (label n) (labels n : Set ι)) |
| 3220 | (hlevel : ∀ n l, l ∈ labels n → 1 ≤ (label n l).1) |
| 3221 | (χ : ℕ → D → LabelSumBounds.WindowPoint) (hχ : ∀ n, ContinuousOn (χ n) s.domain) |
| 3222 | (Y : ℕ → D → TorusInverse.Plane) |
| 3223 | (hp : LabelSumBounds.SupportedOscillations sys label χ Y s.domain (fun l => (f.primary l).oscillation)) |
| 3224 | (ho : LabelSumBounds.SupportedOscillations sys label χ Y s.domain (fun l => (f.old l).oscillation)) |
| 3225 | (ht : LabelSumBounds.SupportedOscillations sys label χ Y s.domain (fun l => (f.tangent l).oscillation)) |
| 3226 | (hc : LabelSumBounds.SupportedOscillations sys label χ Y s.domain (fun l => (f.curl l).oscillation)) |
| 3227 | (u : State D) (hu : u.oscillation = LabelSumBounds.fieldSum labels (fun l => (f.old l).oscillation)) |
| 3228 | (m : Triple D) (p : ScalarField D) (q : OscillatoryScalar D) (e : ExcludedErrors D) : |
| 3229 | let primary := LabelSumBounds.fieldSum labels (fun l => (f.primary l).oscillation) |
| 3230 | let tangent := LabelSumBounds.fieldSum labels (fun l => (f.tangent l).oscillation) |
| 3231 | let curl := LabelSumBounds.fieldSum labels (fun l => (f.curl l).oscillation) |
| 3232 | TensorClass s γ ((u.addIncrement m p (tangent + curl) q e).covariance - u.covariance - |
| 3233 | symmetricCovariance primary tangent) := by |
| 3234 | let primary := LabelSumBounds.fieldSum labels (fun l => (f.primary l).oscillation) |
| 3235 | let old := LabelSumBounds.fieldSum labels (fun l => (f.old l).oscillation) |
| 3236 | let tangent := LabelSumBounds.fieldSum labels (fun l => (f.tangent l).oscillation) |
| 3237 | let curl := LabelSumBounds.fieldSum labels (fun l => (f.curl l).oscillation) |
| 3238 | have hcont (a : ι → HarmonicBlock D) : |
| 3239 | AngularContinuous (LabelSumBounds.fieldSum labels (fun l => (a l).oscillation)) := |
| 3240 | LabelSumBounds.fieldSum_angularContinuous labels _ (fun l => LabelSumBounds.block_angularContinuous (a l)) |
| 3241 | have hucont : AngularContinuous u.oscillation := by rw [hu]; exact hcont f.old |
| 3242 | have he : (u.addIncrement m p (tangent + curl) q e).covariance - u.covariance - |
| 3243 | symmetricCovariance primary tangent = signedTensorRemainder primary old tangent curl := by |
| 3244 | rw [covariance_actual_update u m p (tangent + curl) q e hucont ((hcont f.tangent).add (hcont f.curl))] |
| 3245 | unfold signedTensorRemainder |
| 3246 | rw [hu] |
| 3247 | change u.covariance + covarianceIncrement old (tangent + curl) - u.covariance - _ = _ |
| 3248 | abel |
| 3249 | change TensorClass s γ ((u.addIncrement m p (tangent + curl) q e).covariance - u.covariance - |
| 3250 | symmetricCovariance primary tangent) |
| 3251 | rw [he] |
| 3252 | exact fun i j => f.remainder_sum_mem hβη hγd hγc hγs labels label hinj hlevel χ hχ Y hp ho ht hc i j |
| 3253 | |
| 3254 | end AssembledSignedTensor |
| 3255 | |
| 3256 | section WaveStageGain |
| 3257 | |
| 3258 | open CorrectionState |
| 3259 | |
| 3260 | /-- The only linear input is a bound on the literal old residual plus |
| 3261 | the literal linear increment after its Gaussian subtraction. All nonlinear |
| 3262 | terms of the actual new residual are derived by the harmonic calculus. -/ |
| 3263 | theorem waveStage_residual_mem {s : StripData D} {P : ℕ → D → ℝ} {κ α β H γ : ℝ} |
| 3264 | (c : Context D) (ho : OperatorBounds s c.operators κ) (hκ : κ ≤ 1 / 2) |
| 3265 | (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 3266 | (u v : State D) (hmean : v.mean = u.mean) |
| 3267 | (hm : IncrementBounds s H u.mean) |
| 3268 | (hbase : SmoothTriple s.domain c.base) |
| 3269 | (a b : HarmonicBlock D) {M N : ℕ} |
| 3270 | (ha : a.WaveBounds s P α) (hb : b.WaveBounds s P β) |
| 3271 | (ha0 : HarmonicWaveInteraction.ZeroMode a) (hb0 : HarmonicWaveInteraction.ZeroMode b) |
| 3272 | (hM : a.BandLimited M) (hN : b.BandLimited N) |
| 3273 | (hΦ : ∀ n, ContDiffOn ℝ ∞ (a.phase n) s.domain) |
| 3274 | (hk : ∀ n, a.frequency n ≠ 0) (hkp : ∀ n, a.angularFrequency n ≠ 0) |
| 3275 | (hda : HarmonicWaveInteraction.ModeSolenoidal s c a) |
| 3276 | (hdb : HarmonicWaveInteraction.ModeSolenoidal s c (HarmonicWaveInteraction.withCarrier a b)) |
| 3277 | (hNormal : ∀ i, UnweightedClass s 0 |
| 3278 | (fun n x => HarmonicMeanInteraction.slowNormal c ho hR a.phase n x i)) |
| 3279 | (hFreq : BandBound s (-(1 / 2)) a.frequency) |
| 3280 | (hAng : BandBound s (-(1 / 2)) (fun n => (a.angularFrequency n : ℝ))) |
| 3281 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 3282 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) |
| 3283 | (hpa : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (a.pressure n)) |
| 3284 | (hpb : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (b.pressure n)) |
| 3285 | (G g A₀ A₁ : HarmonicResidual.BlockCoefficients D) |
| 3286 | (hA : ∀ n i, HarmonicFields.BandLimited (A₁ n i - A₀ n i) 0) |
| 3287 | (hlinear : ∀ i j, j ≠ 0 → WaveClass s P γ (fun n x => |
| 3288 | (HarmonicResidual.residualBlock c u a G A₀).velocity n i j x + |
| 3289 | (HarmonicWaveInteraction.linearGoodBlock c a b g).velocity n i j x)) |
| 3290 | (hγm : γ ≤ β + H - 1 / 2) (hγc : γ ≤ α + β - κ) (hγs : γ ≤ β + β - κ) : |
| 3291 | (HarmonicResidual.residualBlock c v (HarmonicWaveInteraction.addBlock a b) (G + g) A₁).WaveBounds |
| 3292 | s P γ := by |
| 3293 | have hnon := HarmonicWaveInteraction.interactionBlock_class c ho hκ hR hm ha hb ha0 hb0 hM hN |
| 3294 | hΦ hk hda hdb hNormal hFreq hAng hP0 hP1 |
| 3295 | have hca := block_waveBounds_all a ha ha0 hP0 |
| 3296 | have hcb := block_waveBounds_all b hb hb0 hP0 |
| 3297 | intro i j hj |
| 3298 | apply WaveInteractionBounds.class_congr |
| 3299 | ((hlinear i j hj).add ((hnon i j hj).mono_exponent (le_min hγm (le_min hγc hγs)))) |
| 3300 | intro n x hx |
| 3301 | have hr : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain := |
| 3302 | contDiffOn_const.add ((contDiffOn_const.mul (ho.radialProfile.smooth 0)).smul contDiffOn_const) |
| 3303 | have he := HarmonicWaveInteraction.residualBlock_wave_update_split s.isOpen_domain c u v hmean |
| 3304 | a b G g A₀ A₁ hA n hr |
| 3305 | contDiffOn_const (hΦ n) (hkp n) |
| 3306 | (fun l => (HarmonicMeanInteraction.tripleField_smooth hbase n l)) |
| 3307 | (fun l => (HarmonicMeanInteraction.tripleField_smooth hm.smooth n l)) |
| 3308 | (fun l k => (hca l k).smooth n) (fun l k => (hcb l k).smooth n) (hpa n) (hpb n) hx j i |
| 3309 | change _ = _ at he |
| 3310 | linear_combination -he |
| 3311 | |
| 3312 | end WaveStageGain |
| 3313 | |
| 3314 | section WaveMeanResidual |
| 3315 | |
| 3316 | open CorrectionState VariableGaugeMean |
| 3317 | |
| 3318 | noncomputable def zeroTriple : Triple D := ⟨0, 0, 0⟩ |
| 3319 | |
| 3320 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 3321 | theorem updated_zeroTriple (m : Triple D) : updated m zeroTriple = m := by |
| 3322 | apply triple_ext <;> simp only [updated, zeroTriple, add_zero] |
| 3323 | |
| 3324 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 3325 | |
| 3326 | /-- Insert the actual oscillation and its actual excluded error, then |
| 3327 | reconstruct pressure from the resulting literal covariance. -/ |
| 3328 | noncomputable def gaugeWaveStage (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3329 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3330 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) : |
| 3331 | State (PressureStream.Lift S) := |
| 3332 | reconstructState g c (u.addIncrement zeroTriple 0 w q e) |
| 3333 | |
| 3334 | noncomputable def gaugeWavePressureChange (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3335 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3336 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) : |
| 3337 | ScalarField (PressureStream.Lift S) := (gaugeWaveStage g c u w q e).pressure - u.pressure |
| 3338 | |
| 3339 | theorem gaugeWaveStage_mean (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3340 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3341 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) : |
| 3342 | (gaugeWaveStage g c u w q e).mean = u.mean := updated_zeroTriple u.mean |
| 3343 | |
| 3344 | theorem gaugeWaveStage_covariance (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3345 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3346 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) |
| 3347 | (hu : AngularContinuous u.oscillation) (hw : AngularContinuous w) : |
| 3348 | (gaugeWaveStage g c u w q e).covariance = u.covariance + covarianceIncrement u.oscillation w := |
| 3349 | covariance_add hu hw |
| 3350 | |
| 3351 | theorem gaugeWaveStage_theta_change {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 3352 | (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3353 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3354 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) |
| 3355 | (hu : AngularContinuous u.oscillation) (hw : AngularContinuous w) |
| 3356 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 3357 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 3358 | (hX : ∀ i j, SmoothOn U (covarianceIncrement u.oscillation w i j)) : |
| 3359 | Agree U ((gaugeWaveStage g c u w q e).thetaResidual c - u.thetaResidual c) |
| 3360 | (thetaCovarianceChange c.operators (covarianceIncrement u.oscillation w)) := by |
| 3361 | change Agree U (MeanIncrementBounds.thetaResidual c.operators c.base |
| 3362 | (gaugeWaveStage g c u w q e).mean (gaugeWaveStage g c u w q e).covariance c.virtualTheta - _ ) _ |
| 3363 | rw [gaugeWaveStage_mean, gaugeWaveStage_covariance g c u w q e hu hw] |
| 3364 | exact thetaResidual_covariance_change hU c.operators hb hm u.covariance |
| 3365 | (covarianceIncrement u.oscillation w) hW hX c.virtualTheta |
| 3366 | |
| 3367 | theorem gaugeWaveStage_gr_change {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 3368 | (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3369 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3370 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) |
| 3371 | (hu : AngularContinuous u.oscillation) (hw : AngularContinuous w) |
| 3372 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 3373 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 3374 | (hX : ∀ i j, SmoothOn U (covarianceIncrement u.oscillation w i j)) : |
| 3375 | Agree U ((gaugeWaveStage g c u w q e).gr c - u.gr c) |
| 3376 | (radialCovarianceChange c.operators (covarianceIncrement u.oscillation w)) := by |
| 3377 | change Agree U (MeanIncrementBounds.gr c.operators c.base |
| 3378 | (gaugeWaveStage g c u w q e).mean (gaugeWaveStage g c u w q e).covariance - _) _ |
| 3379 | rw [gaugeWaveStage_mean, gaugeWaveStage_covariance g c u w q e hu hw] |
| 3380 | exact gr_covariance_change hU c.operators hb hm u.covariance |
| 3381 | (covarianceIncrement u.oscillation w) hW hX |
| 3382 | |
| 3383 | theorem axialResidual_pressure_change {U : Set D} (hU : IsOpen U) (o : Operators D) |
| 3384 | {b m : Triple D} (hb : SmoothTriple U b) (hm : SmoothTriple U m) |
| 3385 | (W : Tensor D) (hW : ∀ i j, SmoothOn U (W i j)) |
| 3386 | (p q T : ScalarField D) (hp : SmoothOn U p) (hq : SmoothOn U q) : |
| 3387 | Agree U (MeanIncrementBounds.axialResidual o b m W (p + q) T - |
| 3388 | MeanIncrementBounds.axialResidual o b m W p T) (o.dz q) := by |
| 3389 | have he : axialAxial b m + W 2 2 + (p + q) = (axialAxial b m + W 2 2 + p) + q := by abel |
| 3390 | intro n x hx |
| 3391 | simp only [MeanIncrementBounds.axialResidual, Pi.sub_apply, Pi.add_apply] |
| 3392 | rw [he, o.dz_add hU (((hb.axialAxial hm).add (hW 2 2)).add hp) hq n hx] |
| 3393 | simp only [Pi.add_apply] |
| 3394 | ring |
| 3395 | |
| 3396 | theorem gaugeWaveStage_axial_change {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 3397 | (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3398 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3399 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) |
| 3400 | (hu : AngularContinuous u.oscillation) (hw : AngularContinuous w) |
| 3401 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 3402 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 3403 | (hX : ∀ i j, SmoothOn U (covarianceIncrement u.oscillation w i j)) |
| 3404 | (hp : SmoothOn U u.pressure) (hδp : SmoothOn U (gaugeWavePressureChange g c u w q e)) : |
| 3405 | Agree U ((gaugeWaveStage g c u w q e).axialResidual c - u.axialResidual c) |
| 3406 | (axialCovarianceChange c.operators (covarianceIncrement u.oscillation w) + |
| 3407 | c.operators.dz (gaugeWavePressureChange g c u w q e)) := by |
| 3408 | have hpressure : (gaugeWaveStage g c u w q e).pressure = |
| 3409 | u.pressure + gaugeWavePressureChange g c u w q e := by unfold gaugeWavePressureChange; abel |
| 3410 | have hc := axialResidual_covariance_change hU c.operators hb hm u.covariance |
| 3411 | (covarianceIncrement u.oscillation w) hW hX |
| 3412 | (u.pressure + gaugeWavePressureChange g c u w q e) c.virtualAxial (hp.add hδp) |
| 3413 | have hd := axialResidual_pressure_change hU c.operators hb hm u.covariance hW |
| 3414 | u.pressure (gaugeWavePressureChange g c u w q e) c.virtualAxial hp hδp |
| 3415 | intro n x hx |
| 3416 | have hc' := hc n hx |
| 3417 | have hd' := hd n hx |
| 3418 | change MeanIncrementBounds.axialResidual c.operators c.base (gaugeWaveStage g c u w q e).mean |
| 3419 | (gaugeWaveStage g c u w q e).covariance (gaugeWaveStage g c u w q e).pressure c.virtualAxial n x - _ = _ |
| 3420 | rw [gaugeWaveStage_mean, gaugeWaveStage_covariance g c u w q e hu hw, hpressure] |
| 3421 | simp only [Pi.add_apply, Pi.sub_apply] at hc' hd' ⊢ |
| 3422 | change _ - MeanIncrementBounds.axialResidual c.operators c.base u.mean u.covariance |
| 3423 | u.pressure c.virtualAxial n x = _ |
| 3424 | linarith |
| 3425 | |
| 3426 | theorem gaugeWaveStage_mean_changes_mem {s : StripData (PressureStream.Lift S)} {α κ : ℝ} |
| 3427 | (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3428 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3429 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) |
| 3430 | (hu : AngularContinuous u.oscillation) (hw : AngularContinuous w) |
| 3431 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 3432 | (hm : CorrectionState.CumulativeBounds s u) |
| 3433 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 3434 | (hX : TensorClass s α (covarianceIncrement u.oscillation w)) |
| 3435 | (hδp : MeanClass s (α - κ) (gaugeWavePressureChange g c u w q e)) : |
| 3436 | MeanClass s (α - κ) ((gaugeWaveStage g c u w q e).thetaResidual c - u.thetaResidual c) ∧ |
| 3437 | MeanClass s (α - κ) ((gaugeWaveStage g c u w q e).axialResidual c - u.axialResidual c) ∧ |
| 3438 | MeanClass s (α - κ) ((gaugeWaveStage g c u w q e).gr c - u.gr c) := by |
| 3439 | have hXs := fun i j => (hX i j).smooth |
| 3440 | refine ⟨?_, ?_, ?_⟩ |
| 3441 | · apply class_congr (thetaCovarianceChange_mem ho hX) |
| 3442 | exact gaugeWaveStage_theta_change s.isOpen_domain g c u w q e hu hw |
| 3443 | hb.smooth hm.velocity.smooth hW hXs |
| 3444 | · apply class_congr ((axialCovarianceChange_mem ho hX).add |
| 3445 | ((ho.dz hδp).mono_exponent (by linarith))) |
| 3446 | exact gaugeWaveStage_axial_change s.isOpen_domain g c u w q e hu hw |
| 3447 | hb.smooth hm.velocity.smooth hW hXs hm.pressure.smooth hδp.smooth |
| 3448 | · apply class_congr (radialCovarianceChange_mem ho hX) |
| 3449 | exact gaugeWaveStage_gr_change s.isOpen_domain g c u w q e hu hw |
| 3450 | hb.smooth hm.velocity.smooth hW hXs |
| 3451 | |
| 3452 | theorem gaugeWaveStage_cumulative {s : StripData (PressureStream.Lift S)} {α : ℝ} |
| 3453 | (g : GaugeData S) (c : Context (PressureStream.Lift S)) |
| 3454 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 3455 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : ExcludedErrors (PressureStream.Lift S)) |
| 3456 | (hm : CorrectionState.CumulativeBounds s u) |
| 3457 | (hδp : MeanClass s α (gaugeWavePressureChange g c u w q e)) (hα : 9 / 10 ≤ α) : |
| 3458 | CorrectionState.CumulativeBounds s (gaugeWaveStage g c u w q e) := by |
| 3459 | constructor |
| 3460 | · rw [gaugeWaveStage_mean] |
| 3461 | exact hm.velocity |
| 3462 | · have he : (gaugeWaveStage g c u w q e).pressure = |
| 3463 | u.pressure + gaugeWavePressureChange g c u w q e := by unfold gaugeWavePressureChange; abel |
| 3464 | rw [he] |
| 3465 | exact hm.pressure.add (hδp.mono_exponent hα) |
| 3466 | |
| 3467 | end WaveMeanResidual |
| 3468 | |
| 3469 | section SignedParameters |
| 3470 | |
| 3471 | open CorrectionState |
| 3472 | |
| 3473 | /-- Fixed primitive data of one primary signed slot. No output field, |
| 3474 | output estimate, or state transition is stored in this record. -/ |
| 3475 | structure SignedParameters (D : Type) [NormedAddCommGroup D] [NormedSpace ℝ D] where |
| 3476 | base : LinearWaveBounds.WaveCoefficients (D × ℝ) |
| 3477 | directions : LinearWaveBounds.GraphDirections (D × ℝ) |
| 3478 | matrix : ℕ → D × ℝ → SignedWaveUpdate.Mat2 |
| 3479 | target : ℕ → D × ℝ → SignedWaveUpdate.Vec2 |
| 3480 | mask : ℕ → D × ℝ → ℝ |
| 3481 | fundamental : ℕ → D × ℝ → ProblemStatement.Space |
| 3482 | normalMotion : ℕ → D × ℝ → ProblemStatement.Space |
| 3483 | action : ℕ → D × ℝ → ProblemStatement.Space →L[ℝ] ProblemStatement.Space |
| 3484 | cutoff : ℕ → D × ℝ → ℝ |
| 3485 | angularFrequency : ℕ → ℤ |
| 3486 | column : Fin 2 |
| 3487 | |
| 3488 | noncomputable def SignedParameters.coefficients (p : SignedParameters D) (s : StripData D) |
| 3489 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : LinearWaveBounds.WaveCoefficients (D × ℝ) := |
| 3490 | SignedWaveUpdate.coefficients p.base (HarmonicWaveInteraction.productStrip s) p.directions |
| 3491 | p.matrix p.target request p.mask p.fundamental p.normalMotion p.action p.column |
| 3492 | |
| 3493 | noncomputable def SignedParameters.exactBlock (p : SignedParameters D) (s : StripData D) |
| 3494 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : HarmonicBlock D := |
| 3495 | SignedWaveUpdate.blockOfCoefficients |
| 3496 | ((p.coefficients s request).corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff) |
| 3497 | p.angularFrequency |
| 3498 | |
| 3499 | noncomputable def SignedParameters.tangentBlock (p : SignedParameters D) (s : StripData D) |
| 3500 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : HarmonicBlock D := |
| 3501 | SignedWaveUpdate.blockOfCoefficients ((p.coefficients s request).withCutoff p.cutoff) p.angularFrequency |
| 3502 | |
| 3503 | noncomputable def SignedParameters.curlBlock (p : SignedParameters D) (s : StripData D) |
| 3504 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : HarmonicBlock D := |
| 3505 | subBlock (p.exactBlock s request) (p.tangentBlock s request) |
| 3506 | |
| 3507 | theorem SignedParameters.exactBlock_split (p : SignedParameters D) (s : StripData D) |
| 3508 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 3509 | (p.exactBlock s request).oscillation = |
| 3510 | (p.tangentBlock s request).oscillation + (p.curlBlock s request).oscillation := |
| 3511 | correctedBlock_split (p.coefficients s request) (HarmonicWaveInteraction.productStrip s) |
| 3512 | p.directions p.cutoff p.angularFrequency |
| 3513 | |
| 3514 | theorem sectionStrip_productStrip (s : StripData D) : |
| 3515 | SignedWaveUpdate.sectionStrip (HarmonicWaveInteraction.productStrip s) = s := by |
| 3516 | cases s |
| 3517 | rfl |
| 3518 | |
| 3519 | theorem SignedParameters.exactBlock_band (p : SignedParameters D) (s : StripData D) |
| 3520 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : (p.exactBlock s request).BandLimited 1 := |
| 3521 | SignedWaveUpdate.coefficientBlock_band _ _ _ _ _ |
| 3522 | |
| 3523 | theorem SignedParameters.tangentBlock_band (p : SignedParameters D) (s : StripData D) |
| 3524 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : (p.tangentBlock s request).BandLimited 1 := |
| 3525 | SignedWaveUpdate.coefficientBlock_band _ _ _ _ _ |
| 3526 | |
| 3527 | theorem SignedParameters.curlBlock_band (p : SignedParameters D) (s : StripData D) |
| 3528 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : (p.curlBlock s request).BandLimited 1 := |
| 3529 | subBlock_band (p.exactBlock_band s request) (p.tangentBlock_band s request) |
| 3530 | |
| 3531 | theorem SignedParameters.exactBlock_zero (p : SignedParameters D) (s : StripData D) |
| 3532 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 3533 | ∀ n i, (p.exactBlock s request).velocity n i 0 = 0 := |
| 3534 | (SignedWaveUpdate.coefficientBlock_zero_coefficient _ _ _ _ _).1 |
| 3535 | |
| 3536 | theorem SignedParameters.tangentBlock_zero (p : SignedParameters D) (s : StripData D) |
| 3537 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 3538 | ∀ n i, (p.tangentBlock s request).velocity n i 0 = 0 := |
| 3539 | (SignedWaveUpdate.coefficientBlock_zero_coefficient _ _ _ _ _).1 |
| 3540 | |
| 3541 | /-- Every output bound here is derived from the same explicit signed |
| 3542 | quotient and curl, on the exact product strip used by the current state. -/ |
| 3543 | theorem SignedParameters.block_bounds (p : SignedParameters D) (s : StripData D) |
| 3544 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 3545 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ B κ : ℝ} |
| 3546 | (hbase : LinearWaveBounds.InputBounds (HarmonicWaveInteraction.productStrip s) P₀ α₀ κ |
| 3547 | p.directions p.base) (hκ : κ ≤ 1 / 2) |
| 3548 | (hcov : SignedWaveUpdate.CovarianceControl (HarmonicWaveInteraction.productStrip s) p.matrix p.target) |
| 3549 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 3550 | (fun n x => request n x i)) |
| 3551 | (hm : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.mask) |
| 3552 | (hv : MemClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) 0 p.fundamental) |
| 3553 | (hN : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain (HarmonicWaveInteraction.productStrip s)) |
| 3554 | (p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions)) |
| 3555 | (hNdot : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.normalMotion) |
| 3556 | (hA : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.action) |
| 3557 | {b M : ℝ} (hb : 0 < b) |
| 3558 | (hlo : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 3559 | b ≤ ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖) |
| 3560 | (hhi : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 3561 | ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ ≤ M) |
| 3562 | (hK : BandBound (HarmonicWaveInteraction.productStrip s) (1 / 2) (fun n => 1 / p.base.frequency n)) |
| 3563 | {radius : D × ℝ → ℝ} (hradius : p.base.radius = fun _ => radius) |
| 3564 | (hψ : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.cutoff) : |
| 3565 | (p.tangentBlock s request).WaveBounds s P (B - κ) ∧ |
| 3566 | (p.exactBlock s request).WaveBounds s P (B - κ) ∧ |
| 3567 | (p.exactBlock s request).PressureBounds s P (B + 1 / 2 - κ) ∧ |
| 3568 | (p.curlBlock s request).WaveBounds s P (B + 1 / 2 - 2 * κ) := by |
| 3569 | have he := constructedSignedBlock_bounds hbase hκ hcov hR hm hv hN hNdot hA hb hlo hhi hK |
| 3570 | hradius hψ p.angularFrequency p.column |
| 3571 | simpa only [SignedParameters.tangentBlock, SignedParameters.exactBlock, SignedParameters.curlBlock, |
| 3572 | SignedParameters.coefficients, sectionStrip_productStrip] using he |
| 3573 | |
| 3574 | structure SignedParameters.Control (p : SignedParameters D) (s : StripData D) |
| 3575 | (P₀ : ℕ → D × ℝ → ℝ) (P : ℕ → D → ℝ) (α₀ κ : ℝ) where |
| 3576 | baseBounds : LinearWaveBounds.InputBounds (HarmonicWaveInteraction.productStrip s) P₀ α₀ κ |
| 3577 | p.directions p.base |
| 3578 | kappa_le_half : κ ≤ 1 / 2 |
| 3579 | covariance : SignedWaveUpdate.CovarianceControl (HarmonicWaveInteraction.productStrip s) p.matrix p.target |
| 3580 | mask : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.mask |
| 3581 | fundamental : MemClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) 0 p.fundamental |
| 3582 | normal : PhaseJetBounds.PolynomialJets (CurlClassBounds.phaseDomain (HarmonicWaveInteraction.productStrip s)) |
| 3583 | (p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions) |
| 3584 | normalMotion : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.normalMotion |
| 3585 | action : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.action |
| 3586 | lower : ℝ |
| 3587 | upper : ℝ |
| 3588 | lower_pos : 0 < lower |
| 3589 | norm_lower : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 3590 | lower ≤ ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ |
| 3591 | norm_upper : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 3592 | ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ ≤ upper |
| 3593 | inverseFrequency : BandBound (HarmonicWaveInteraction.productStrip s) (1 / 2) |
| 3594 | (fun n => 1 / p.base.frequency n) |
| 3595 | radius : D × ℝ → ℝ |
| 3596 | radius_eq : p.base.radius = fun _ => radius |
| 3597 | cutoff : UnweightedClass (HarmonicWaveInteraction.productStrip s) 0 p.cutoff |
| 3598 | |
| 3599 | theorem SignedParameters.Control.bounds {p : SignedParameters D} {s : StripData D} |
| 3600 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 3601 | (h : p.Control s P₀ P α₀ κ) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 3602 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 3603 | (fun n x => request n x i)) : |
| 3604 | (p.tangentBlock s request).WaveBounds s P (B - κ) ∧ |
| 3605 | (p.exactBlock s request).WaveBounds s P (B - κ) ∧ |
| 3606 | (p.exactBlock s request).PressureBounds s P (B + 1 / 2 - κ) ∧ |
| 3607 | (p.curlBlock s request).WaveBounds s P (B + 1 / 2 - 2 * κ) := |
| 3608 | p.block_bounds s request h.baseBounds h.kappa_le_half h.covariance hR h.mask h.fundamental |
| 3609 | h.normal h.normalMotion h.action h.lower_pos h.norm_lower h.norm_upper h.inverseFrequency |
| 3610 | h.radius_eq h.cutoff |
| 3611 | |
| 3612 | end SignedParameters |
| 3613 | |
| 3614 | section ActualSignedStage |
| 3615 | |
| 3616 | open CorrectionState |
| 3617 | |
| 3618 | noncomputable def stateSignedBlock (p : SignedParameters LocalSignedRequest.Point) |
| 3619 | (s : StripData LocalSignedRequest.Point) (patch : SignedStressPrimitive.Patch) (coord : ℝ) |
| 3620 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) : |
| 3621 | HarmonicBlock LocalSignedRequest.Point := |
| 3622 | p.exactBlock s (LocalSignedRequest.fullRequest s patch coord c u) |
| 3623 | |
| 3624 | noncomputable def stateSignedTangent (p : SignedParameters LocalSignedRequest.Point) |
| 3625 | (s : StripData LocalSignedRequest.Point) (patch : SignedStressPrimitive.Patch) (coord : ℝ) |
| 3626 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) : |
| 3627 | HarmonicBlock LocalSignedRequest.Point := |
| 3628 | p.tangentBlock s (LocalSignedRequest.fullRequest s patch coord c u) |
| 3629 | |
| 3630 | noncomputable def stateSignedCurl (p : SignedParameters LocalSignedRequest.Point) |
| 3631 | (s : StripData LocalSignedRequest.Point) (patch : SignedStressPrimitive.Patch) (coord : ℝ) |
| 3632 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) : |
| 3633 | HarmonicBlock LocalSignedRequest.Point := |
| 3634 | p.curlBlock s (LocalSignedRequest.fullRequest s patch coord c u) |
| 3635 | |
| 3636 | noncomputable def stateSignedGaussian (p : SignedParameters LocalSignedRequest.Point) |
| 3637 | (s : StripData LocalSignedRequest.Point) (patch : SignedStressPrimitive.Patch) (coord : ℝ) |
| 3638 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) : |
| 3639 | HarmonicBlock LocalSignedRequest.Point := |
| 3640 | SignedWaveUpdate.gaussianBlock (p.coefficients s (LocalSignedRequest.fullRequest s patch coord c u)) |
| 3641 | p.directions p.cutoff p.angularFrequency |
| 3642 | |
| 3643 | /-- Every signed block and Gaussian field is computed from the actual |
| 3644 | current residual. The pressure is then recomputed from the updated field. -/ |
| 3645 | noncomputable def signedWaveStage {ι : Type} |
| 3646 | (g : VariableGaugeMean.GaugeData PressureStream.Plane) |
| 3647 | (parameters : ι → SignedParameters LocalSignedRequest.Point) (labels : ℕ → Finset ι) |
| 3648 | (s : StripData LocalSignedRequest.Point) (patch : SignedStressPrimitive.Patch) (coord : ℝ) |
| 3649 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) : State LocalSignedRequest.Point := |
| 3650 | gaugeWaveStage g c u |
| 3651 | (LabelSumBounds.fieldSum labels (fun l => (stateSignedBlock (parameters l) s patch coord c u).oscillation)) |
| 3652 | (fun n x => ∑ l ∈ labels n, (stateSignedBlock (parameters l) s patch coord c u).oscillatoryPressure n x) |
| 3653 | ⟨0, LabelSumBounds.fieldSum labels |
| 3654 | (fun l => (stateSignedGaussian (parameters l) s patch coord c u).oscillation), 0⟩ |
| 3655 | |
| 3656 | /-- The requested tensor is not supplied as an arbitrary input: these |
| 3657 | classes start from the current state's two actual mean residuals. -/ |
| 3658 | theorem stateSignedBlock_bounds {coord : ℝ} (U : LocalSignedRequest.SlowRegion coord) |
| 3659 | (patch : SignedStressPrimitive.Patch) {cL cR : ℝ} (hcL : 0 < cL) (hcR : 0 < cR) |
| 3660 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 3661 | (s : StripData LocalSignedRequest.Point) |
| 3662 | (hs : s = LocalSignedRequest.movingStripData U patch.a patch.b cL cR patch.a_pos hcL hcR |
| 3663 | ε L hε hεone hL) |
| 3664 | (p : SignedParameters LocalSignedRequest.Point) |
| 3665 | {P₀ : ℕ → LocalSignedRequest.Point × ℝ → ℝ} {P : ℕ → LocalSignedRequest.Point → ℝ} |
| 3666 | {α₀ κ B : ℝ} (hcontrol : p.Control s P₀ P α₀ κ) |
| 3667 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) |
| 3668 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 3669 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 3670 | (hsθ : ∀ n, LocalSignedRequest.MovingSupport patch.a patch.b coord U.carrier (u.thetaResidual c n)) |
| 3671 | (hsz : ∀ n, LocalSignedRequest.MovingSupport patch.a patch.b coord U.carrier (u.axialResidual c n)) |
| 3672 | (hcθ : MeanClass s (B + 1 / 2 - κ) (u.thetaResidual c)) |
| 3673 | (hcz : MeanClass s (B + 1 / 2 - κ) (u.axialResidual c)) : |
| 3674 | (stateSignedTangent p s patch coord c u).WaveBounds s P (B - κ) ∧ |
| 3675 | (stateSignedBlock p s patch coord c u).WaveBounds s P (B - κ) ∧ |
| 3676 | (stateSignedBlock p s patch coord c u).PressureBounds s P (B + 1 / 2 - κ) ∧ |
| 3677 | (stateSignedCurl p s patch coord c u).WaveBounds s P (B + 1 / 2 - 2 * κ) := by |
| 3678 | have hnorm : ∀ i, MeanClass s ((B + 1 / 2 - κ) - 1) |
| 3679 | (fun n x => LocalSignedRequest.normalizedRequest s patch coord c u n x i) := by |
| 3680 | subst s |
| 3681 | exact LocalSignedRequest.normalizedRequest_class U patch hcL hcR ε L hε hεone hL |
| 3682 | c u (B + 1 / 2 - κ) hθ hz hsθ hsz hcθ hcz |
| 3683 | have hfull := LocalSignedRequest.fullRequest_class s patch coord c u hnorm |
| 3684 | apply hcontrol.bounds (LocalSignedRequest.fullRequest s patch coord c u) |
| 3685 | intro i |
| 3686 | convert! hfull i using 1 |
| 3687 | ring |
| 3688 | |
| 3689 | end ActualSignedStage |
| 3690 | |
| 3691 | section LinearCoefficientBridge |
| 3692 | |
| 3693 | open CorrectionState |
| 3694 | |
| 3695 | /-- The actual real linearized cylindrical residual of a block, evaluated |
| 3696 | with the carrier of the old spatial label. -/ |
| 3697 | noncomputable def linearBlockField (c : Context D) (a b : HarmonicBlock D) : Oscillation D := |
| 3698 | fun n x i => (LinearWaveResidual.linearResidual (c.operators.epsilon n) |
| 3699 | (fun y : D × ℝ => c.operators.radius y.1) (radialDirection c n) angularDirection |
| 3700 | (axialDirection c n) (timeDirection c n) (complexBase c n) |
| 3701 | (LinearWaveResidual.realLift ((HarmonicWaveInteraction.withCarrier a b).oscillation n)) |
| 3702 | (fun y => ((HarmonicWaveInteraction.withCarrier a b).oscillatoryPressure n y : ℂ)) x i).re |
| 3703 | |
| 3704 | theorem linearCoefficients_field {U : Set D} (hU : IsOpen U) |
| 3705 | (c : Context D) (a b : HarmonicBlock D) (n : ℕ) |
| 3706 | (hr : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial U) |
| 3707 | (hz : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).axial U) |
| 3708 | (hB : ∀ i, ContDiffOn ℝ ∞ (fun y => HarmonicResidual.contextBase c n y i) U) |
| 3709 | (hb : ∀ i, HarmonicResidual.SmoothCoefficients U (b.velocity n i)) |
| 3710 | (hp : HarmonicResidual.SmoothCoefficients U (b.pressure n)) |
| 3711 | (hΦ : ContDiffOn ℝ ∞ (a.phase n) U) {x : D × ℝ} |
| 3712 | (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 3713 | (HarmonicFields.field (HarmonicWaveInteraction.linearCoefficients c a b n i) |
| 3714 | (a.frequency n) (a.phase n) (a.angularFrequency n) x).re = linearBlockField c a b n x i := by |
| 3715 | have he := HarmonicResidual.field_linearResidual hU (HarmonicResidual.contextFrame c n) |
| 3716 | hr hz (fun l => HarmonicResidual.smoothCoefficients_constant (hB l)) |
| 3717 | (fun l => (hb l).realCoefficients) hp.realCoefficients hΦ |
| 3718 | (a.frequency n) (a.angularFrequency n) hx |
| 3719 | change HarmonicResidual.vectorField |
| 3720 | (HarmonicWaveInteraction.linearCoefficients c a b n) |
| 3721 | (a.frequency n) (a.phase n) (a.angularFrequency n) x = _ at he |
| 3722 | have hbase : HarmonicResidual.vectorField |
| 3723 | (fun l => HarmonicFields.constantCoefficient (fun y => HarmonicResidual.contextBase c n y l)) |
| 3724 | (a.frequency n) (a.phase n) (a.angularFrequency n) = complexBase c n := by |
| 3725 | funext y l |
| 3726 | exact HarmonicResidual.field_constant _ _ _ _ y |
| 3727 | have hamp : HarmonicResidual.vectorField |
| 3728 | (fun l => HarmonicResidual.realCoefficients (b.velocity n l)) |
| 3729 | (a.frequency n) (a.phase n) (a.angularFrequency n) = |
| 3730 | LinearWaveResidual.realLift ((HarmonicWaveInteraction.withCarrier a b).oscillation n) := by |
| 3731 | funext y l |
| 3732 | exact HarmonicResidual.field_realCoefficients _ _ _ _ y |
| 3733 | have hpress : HarmonicFields.field (HarmonicResidual.realCoefficients (b.pressure n)) |
| 3734 | (a.frequency n) (a.phase n) (a.angularFrequency n) = |
| 3735 | fun y => ((HarmonicWaveInteraction.withCarrier a b).oscillatoryPressure n y : ℂ) := by |
| 3736 | funext y |
| 3737 | exact HarmonicResidual.field_realCoefficients _ _ _ _ y |
| 3738 | rw [hbase, hamp, hpress] at he |
| 3739 | exact congrArg Complex.re (congrFun he i) |
| 3740 | |
| 3741 | /-- An actual field cancellation determines every nonzero coefficient. |
| 3742 | The Gaussian is subtracted only after its full field is retained in the |
| 3743 | identity. The conclusion uses the literal `linearGoodBlock`. -/ |
| 3744 | theorem linearGoodBlock_cancel {U : Set D} (hU : IsOpen U) |
| 3745 | (c : Context D) (a b source good : HarmonicBlock D) |
| 3746 | (g : HarmonicResidual.BlockCoefficients D) (n : ℕ) |
| 3747 | (hr : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial U) |
| 3748 | (hz : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).axial U) |
| 3749 | (hB : ∀ i, ContDiffOn ℝ ∞ (fun y => HarmonicResidual.contextBase c n y i) U) |
| 3750 | (hb : ∀ i, HarmonicResidual.SmoothCoefficients U (b.velocity n i)) |
| 3751 | (hp : HarmonicResidual.SmoothCoefficients U (b.pressure n)) |
| 3752 | (hΦ : ContDiffOn ℝ ∞ (a.phase n) U) (hkp : a.angularFrequency n ≠ 0) |
| 3753 | (hs : ∀ i, HarmonicFields.ConjugateSymmetric (source.velocity n i)) |
| 3754 | (hg : ∀ i, HarmonicFields.ConjugateSymmetric (good.velocity n i)) |
| 3755 | {x : D} (hx : x ∈ U) (j : ℤ) (hj : j ≠ 0) (i : Fin 3) |
| 3756 | (hcancel : ∀ θ, linearBlockField c a b n (x, θ) i + |
| 3757 | (HarmonicWaveInteraction.withCarrier a source).oscillation n (x, θ) i = |
| 3758 | (HarmonicWaveInteraction.withCarrier a good).oscillation n (x, θ) i + |
| 3759 | (HarmonicFields.field (g n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ)).re) : |
| 3760 | source.velocity n i j x + (HarmonicWaveInteraction.linearGoodBlock c a b g).velocity n i j x = |
| 3761 | good.velocity n i j x := by |
| 3762 | have he : (source.velocity n i + HarmonicResidual.realCoefficients |
| 3763 | (HarmonicWaveInteraction.linearCoefficients c a b n i - g n i)) j x = |
| 3764 | good.velocity n i j x := by |
| 3765 | apply HarmonicWaveInteraction.coefficient_eq_of_field_eq_at _ _ |
| 3766 | (a.frequency n) (a.phase n) hkp j x |
| 3767 | intro θ |
| 3768 | rw [HarmonicResidual.field_add, HarmonicResidual.field_realCoefficients, |
| 3769 | HarmonicResidual.field_sub, Complex.sub_re, |
| 3770 | linearCoefficients_field hU c a b n hr hz hB hb hp hΦ ⟨hx, trivial⟩ i, |
| 3771 | ← HarmonicFields.field_real (hs i), ← HarmonicFields.field_real (hg i)] |
| 3772 | have hc := hcancel θ |
| 3773 | change linearBlockField c a b n (x, θ) i + |
| 3774 | (HarmonicFields.field (source.velocity n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ)).re = |
| 3775 | (HarmonicFields.field (good.velocity n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ)).re + _ at hc |
| 3776 | have hh : (HarmonicFields.field (source.velocity n i) (a.frequency n) (a.phase n) |
| 3777 | (a.angularFrequency n) (x, θ)).re + |
| 3778 | (linearBlockField c a b n (x, θ) i - |
| 3779 | (HarmonicFields.field (g n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ)).re) = |
| 3780 | (HarmonicFields.field (good.velocity n i) (a.frequency n) (a.phase n) |
| 3781 | (a.angularFrequency n) (x, θ)).re := by linarith |
| 3782 | exact_mod_cast hh |
| 3783 | simpa only [HarmonicWaveInteraction.linearGoodBlock, |
| 3784 | HarmonicMeanInteraction.nonconstant_apply_of_ne _ hj, AddMonoidAlgebra.coeff_add, |
| 3785 | Finsupp.add_apply, Pi.add_apply] using he |
| 3786 | |
| 3787 | theorem linearGoodBlock_cancel_mem {s : StripData D} {P : ℕ → D → ℝ} {γ : ℝ} |
| 3788 | (c : Context D) (a b source good : HarmonicBlock D) |
| 3789 | (g : HarmonicResidual.BlockCoefficients D) |
| 3790 | (hr : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 3791 | (hz : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).axial s.domain) |
| 3792 | (hB : SmoothTriple s.domain c.base) |
| 3793 | (hb : ∀ n i, HarmonicResidual.SmoothCoefficients s.domain (b.velocity n i)) |
| 3794 | (hp : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (b.pressure n)) |
| 3795 | (hΦ : ∀ n, ContDiffOn ℝ ∞ (a.phase n) s.domain) (hkp : ∀ n, a.angularFrequency n ≠ 0) |
| 3796 | (hs : ∀ n i, HarmonicFields.ConjugateSymmetric (source.velocity n i)) |
| 3797 | (hg : ∀ n i, HarmonicFields.ConjugateSymmetric (good.velocity n i)) |
| 3798 | (hgood : good.WaveBounds s P γ) |
| 3799 | (hcancel : ∀ n x, x ∈ s.domain → ∀ θ i, linearBlockField c a b n (x, θ) i + |
| 3800 | (HarmonicWaveInteraction.withCarrier a source).oscillation n (x, θ) i = |
| 3801 | (HarmonicWaveInteraction.withCarrier a good).oscillation n (x, θ) i + |
| 3802 | (HarmonicFields.field (g n i) (a.frequency n) (a.phase n) (a.angularFrequency n) (x, θ)).re) : |
| 3803 | ∀ i j, j ≠ 0 → WaveClass s P γ (fun n x => source.velocity n i j x + |
| 3804 | (HarmonicWaveInteraction.linearGoodBlock c a b g).velocity n i j x) := by |
| 3805 | intro i j hj |
| 3806 | apply WaveInteractionBounds.class_congr (hgood i j hj) |
| 3807 | intro n x hx |
| 3808 | exact (linearGoodBlock_cancel s.isOpen_domain c a b source good g n (hr n) (hz n) |
| 3809 | (fun l => HarmonicMeanInteraction.tripleField_smooth hB n l) (hb n) (hp n) |
| 3810 | (hΦ n) (hkp n) (hs n) (hg n) hx j hj i (fun θ => hcancel n x hx θ i)).symm |
| 3811 | |
| 3812 | end LinearCoefficientBridge |
| 3813 | |
| 3814 | section ConstructedSignedLinear |
| 3815 | |
| 3816 | open CorrectionState |
| 3817 | |
| 3818 | noncomputable def contextRealBase (c : Context D) (n : ℕ) (x : D × ℝ) : Fin 3 → ℝ := |
| 3819 | ![c.base.radial n x.1, c.base.angular n x.1, c.base.axial n x.1] |
| 3820 | |
| 3821 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 3822 | theorem complexBase_eq_realLift (c : Context D) (n : ℕ) : |
| 3823 | complexBase c n = LinearWaveResidual.realLift (contextRealBase c n) := by |
| 3824 | funext x i |
| 3825 | fin_cases i <;> rfl |
| 3826 | |
| 3827 | theorem contextRealBase_smooth {U : Set D} {c : Context D} |
| 3828 | (hB : SmoothTriple U c.base) (n : ℕ) (i : Fin 3) : |
| 3829 | ContDiffOn ℝ ∞ (fun x => contextRealBase c n x i) (HarmonicResidual.liftDomain U) := by |
| 3830 | fin_cases i |
| 3831 | · exact (hB.radial n).comp contDiff_fst.contDiffOn (fun _ hx => hx.1) |
| 3832 | · exact (hB.angular n).comp contDiff_fst.contDiffOn (fun _ hx => hx.1) |
| 3833 | · exact (hB.axial n).comp contDiff_fst.contDiffOn (fun _ hx => hx.1) |
| 3834 | |
| 3835 | theorem linearBlockField_eq_real {U : Set D} (hU : IsOpen U) |
| 3836 | (c : Context D) (a b : HarmonicBlock D) (n : ℕ) |
| 3837 | (hr : ContDiffOn ℝ ∞ (radialDirection c n) (HarmonicResidual.liftDomain U)) |
| 3838 | (hz : ContDiffOn ℝ ∞ (axialDirection c n) (HarmonicResidual.liftDomain U)) |
| 3839 | (hB : SmoothTriple U c.base) |
| 3840 | (hb : ∀ i, ContDiffOn ℝ ∞ |
| 3841 | (fun x => (HarmonicWaveInteraction.withCarrier a b).oscillation n x i) |
| 3842 | (HarmonicResidual.liftDomain U)) |
| 3843 | (hp : ContDiffOn ℝ ∞ ((HarmonicWaveInteraction.withCarrier a b).oscillatoryPressure n) |
| 3844 | (HarmonicResidual.liftDomain U)) |
| 3845 | {x : D × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) : |
| 3846 | linearBlockField c a b n x = |
| 3847 | LinearWaveResidual.realComponentLinearResidual (c.operators.epsilon n) |
| 3848 | (fun y : D × ℝ => c.operators.radius y.1) (radialDirection c n) angularDirection |
| 3849 | (axialDirection c n) (timeDirection c n) (contextRealBase c n) |
| 3850 | ((HarmonicWaveInteraction.withCarrier a b).oscillation n) |
| 3851 | ((HarmonicWaveInteraction.withCarrier a b).oscillatoryPressure n) x := by |
| 3852 | have hU' := HarmonicResidual.liftDomain_open hU |
| 3853 | have he := LinearWaveResidual.realMap_linearResidual Complex.reCLM |
| 3854 | (c.operators.epsilon n) (fun y : D × ℝ => c.operators.radius y.1) (timeDirection c n) |
| 3855 | (Vθ := angularDirection) |
| 3856 | (B := contextRealBase c n) |
| 3857 | (a := LinearWaveResidual.realLift ((HarmonicWaveInteraction.withCarrier a b).oscillation n)) |
| 3858 | (p := fun y => ((HarmonicWaveInteraction.withCarrier a b).oscillatoryPressure n y : ℂ)) |
| 3859 | hU' hr contDiffOn_const hz |
| 3860 | (fun i => Complex.ofRealCLM.contDiff.comp_contDiffOn (hb i)) |
| 3861 | (fun i => ((contextRealBase_smooth hB n i).contDiffAt (hU'.mem_nhds hx)).differentiableAt (by simp)) |
| 3862 | (((Complex.ofRealCLM.contDiff.comp_contDiffOn hp).contDiffAt |
| 3863 | (hU'.mem_nhds hx)).differentiableAt (by simp)) hx |
| 3864 | rw [← complexBase_eq_realLift] at he |
| 3865 | simp only [ LinearWaveResidual.realLift, Complex.reCLM_apply, |
| 3866 | Complex.ofReal_re] at he ⊢ |
| 3867 | exact he |
| 3868 | |
| 3869 | /-- Primitive equality of the direction and background data. This record |
| 3870 | contains no residual identity and no statement about a corrected field. -/ |
| 3871 | structure WaveFrameMatch (c : Context D) (s : StripData (D × ℝ)) |
| 3872 | (d : LinearWaveBounds.GraphDirections (D × ℝ)) |
| 3873 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) : Prop where |
| 3874 | epsilon : ∀ n, s.epsilon n = c.operators.epsilon n |
| 3875 | radius : ∀ n, a.radius n = fun y : D × ℝ => c.operators.radius y.1 |
| 3876 | radial : ∀ n, d.radialField n = radialDirection c n |
| 3877 | angular : d.angular = (0,1) |
| 3878 | axial : ∀ n, d.axialField s n = axialDirection c n |
| 3879 | time : ∀ n, LinearWaveResidual.timeDirection (s.epsilon n) (d.fastField n) (fun _ => d.slow) = |
| 3880 | timeDirection c n |
| 3881 | radialBase : ∀ n x, a.radialBase n x = c.base.radial n x.1 |
| 3882 | angularBase : ∀ n x, a.radius n x * a.frequencyBase n x = c.base.angular n x.1 |
| 3883 | axialBase : ∀ n x, a.axialBase n x = c.base.axial n x.1 |
| 3884 | |
| 3885 | theorem WaveFrameMatch.base {c : Context D} {s : StripData (D × ℝ)} |
| 3886 | {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 3887 | {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} (h : WaveFrameMatch c s d a) (n : ℕ) : |
| 3888 | LinearWaveResidual.complexBase (a.radius n) (a.radialBase n) (a.frequencyBase n) (a.axialBase n) = |
| 3889 | complexBase c n := by |
| 3890 | funext x i |
| 3891 | fin_cases i <;> simp [LinearWaveResidual.complexBase, LinearWaveResidual.base, complexBase, |
| 3892 | h.radialBase n x, h.angularBase n x, h.axialBase n x] |
| 3893 | |
| 3894 | theorem WaveFrameMatch.harmonicResidual {c : Context D} {s : StripData (D × ℝ)} |
| 3895 | {d : LinearWaveBounds.GraphDirections (D × ℝ)} |
| 3896 | {z : LinearWaveBounds.WaveCoefficients (D × ℝ)} (h : WaveFrameMatch c s d z) (n : ℕ) : |
| 3897 | z.harmonicResidual s d n = |
| 3898 | LinearWaveResidual.linearResidual (c.operators.epsilon n) |
| 3899 | (fun y : D × ℝ => c.operators.radius y.1) (radialDirection c n) angularDirection |
| 3900 | (axialDirection c n) (timeDirection c n) (complexBase c n) |
| 3901 | (HarmonicCalculus.vectorMode (z.frequency n) (z.phase n) (z.amplitude n)) |
| 3902 | (HarmonicCalculus.mode (z.frequency n) (z.phase n) (z.pressure n)) := by |
| 3903 | unfold LinearWaveBounds.WaveCoefficients.harmonicResidual |
| 3904 | rw [h.base, h.time, h.epsilon, h.radius, h.radial, h.axial, h.angular] |
| 3905 | rfl |
| 3906 | |
| 3907 | theorem linearBlockField_eq_modeResidual {U : Set D} (hU : IsOpen U) |
| 3908 | (c : Context D) (a b : HarmonicBlock D) (s : StripData (D × ℝ)) |
| 3909 | (d : LinearWaveBounds.GraphDirections (D × ℝ)) |
| 3910 | (z : LinearWaveBounds.WaveCoefficients (D × ℝ)) (hm : WaveFrameMatch c s d z) |
| 3911 | (n : ℕ) (hB : SmoothTriple U c.base) |
| 3912 | (hr : ContDiffOn ℝ ∞ (radialDirection c n) (HarmonicResidual.liftDomain U)) |
| 3913 | (hz : ContDiffOn ℝ ∞ (axialDirection c n) (HarmonicResidual.liftDomain U)) |
| 3914 | (hphase : ContDiffOn ℝ ∞ (z.phase n) (HarmonicResidual.liftDomain U)) |
| 3915 | (hv : ∀ i, ContDiffOn ℝ ∞ (fun x => z.amplitude n x i) (HarmonicResidual.liftDomain U)) |
| 3916 | (hp : ContDiffOn ℝ ∞ (z.pressure n) (HarmonicResidual.liftDomain U)) |
| 3917 | (hvel : (HarmonicWaveInteraction.withCarrier a b).oscillation n = |
| 3918 | fun x i => (HarmonicCalculus.vectorMode (z.frequency n) (z.phase n) (z.amplitude n) x i).re) |
| 3919 | (hpress : (HarmonicWaveInteraction.withCarrier a b).oscillatoryPressure n = |
| 3920 | fun x => (HarmonicCalculus.mode (z.frequency n) (z.phase n) (z.pressure n) x).re) |
| 3921 | {x : D × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) : |
| 3922 | linearBlockField c a b n x = fun i => (z.harmonicResidual s d n x i).re := by |
| 3923 | have hU' := HarmonicResidual.liftDomain_open hU |
| 3924 | have hv' i : ContDiffOn ℝ ∞ |
| 3925 | (fun y => HarmonicCalculus.vectorMode (z.frequency n) (z.phase n) (z.amplitude n) y i) |
| 3926 | (HarmonicResidual.liftDomain U) := HarmonicCalculus.contDiffOn_mode _ hphase (hv i) |
| 3927 | have hp' := HarmonicCalculus.contDiffOn_mode (z.frequency n) hphase hp |
| 3928 | have he := LinearWaveResidual.realMap_linearResidual Complex.reCLM |
| 3929 | (c.operators.epsilon n) (fun y : D × ℝ => c.operators.radius y.1) (timeDirection c n) |
| 3930 | (Vθ := angularDirection) |
| 3931 | (B := contextRealBase c n) |
| 3932 | hU' hr contDiffOn_const hz hv' |
| 3933 | (fun i => ((contextRealBase_smooth hB n i).contDiffAt (hU'.mem_nhds hx)).differentiableAt (by simp)) |
| 3934 | ((hp'.contDiffAt (hU'.mem_nhds hx)).differentiableAt (by simp)) hx |
| 3935 | rw [← complexBase_eq_realLift, ← hm.harmonicResidual] at he |
| 3936 | simp only [Complex.reCLM_apply] at he |
| 3937 | rw [← hvel, ← hpress] at he |
| 3938 | rw [linearBlockField_eq_real hU c a b n hr hz hB |
| 3939 | (fun i => by rw [hvel]; exact Complex.reCLM.contDiff.comp_contDiffOn (hv' i)) |
| 3940 | (by rw [hpress]; exact Complex.reCLM.contDiff.comp_contDiffOn hp') hx] |
| 3941 | exact he.symm |
| 3942 | |
| 3943 | theorem SignedParameters.Control.full_bounds {p : SignedParameters D} {s : StripData D} |
| 3944 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 3945 | (h : p.Control s P₀ P α₀ κ) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 3946 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 3947 | (fun n x => request n x i)) : |
| 3948 | let z := p.coefficients s request |
| 3949 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (B - κ) |
| 3950 | (z.corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff).amplitude ∧ |
| 3951 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (B + 1 / 2 - κ) |
| 3952 | (z.corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff).pressure ∧ |
| 3953 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (B + 1 / 2 - 2 * κ) |
| 3954 | (fun n x => (z.corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff).amplitude n x - |
| 3955 | (z.withCutoff p.cutoff).amplitude n x) ∧ |
| 3956 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (B + 1 / 2 - 4 * κ) |
| 3957 | (z.constructedGood (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff) := |
| 3958 | SignedWaveUpdate.signed_bounds h.baseBounds h.kappa_le_half h.covariance hR h.mask h.fundamental |
| 3959 | h.normal h.normalMotion h.action h.lower_pos h.norm_lower h.norm_upper h.inverseFrequency |
| 3960 | h.radius_eq h.cutoff p.column |
| 3961 | |
| 3962 | noncomputable def SignedParameters.goodBlock (p : SignedParameters D) (s : StripData D) |
| 3963 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : HarmonicBlock D := |
| 3964 | SignedWaveUpdate.coefficientBlock p.base.frequency (fun n x => p.base.phase n (x,0)) p.angularFrequency |
| 3965 | (fun n x => (p.coefficients s request).constructedGood |
| 3966 | (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff n (x,0)) 0 |
| 3967 | |
| 3968 | theorem SignedParameters.Control.good_bounds {p : SignedParameters D} {s : StripData D} |
| 3969 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 3970 | (h : p.Control s P₀ P α₀ κ) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 3971 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 3972 | (fun n x => request n x i)) : |
| 3973 | (p.goodBlock s request).WaveBounds s P (B + 1 / 2 - 4 * κ) := by |
| 3974 | have hg := SignedWaveUpdate.class_zeroSection (h.full_bounds request hR).2.2.2 |
| 3975 | rw [sectionStrip_productStrip] at hg |
| 3976 | exact (SignedWaveUpdate.coefficientBlock_classes p.base.frequency |
| 3977 | (fun n x => p.base.phase n (x,0)) p.angularFrequency hg |
| 3978 | (MemClass.zero (α := (0 : ℝ)) hg.weight_nonneg)).1 |
| 3979 | |
| 3980 | /-- The ODE and phase data of the fixed primary column, before performing |
| 3981 | any signed update. All equalities concern primitive inputs. -/ |
| 3982 | structure SignedParameters.Dynamics (p : SignedParameters D) (s : StripData D) |
| 3983 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) where |
| 3984 | slope : ℕ → ℝ |
| 3985 | angular : SignedWaveUpdate.AngularInputs (HarmonicWaveInteraction.productStrip s) p.directions |
| 3986 | p.base p.matrix p.target request p.mask p.fundamental p.normalMotion p.action p.cutoff slope |
| 3987 | angular_direction : p.directions.angular = (0,1) |
| 3988 | angular_frequency : ∀ n, p.base.frequency n * slope n = (p.angularFrequency n : ℝ) |
| 3989 | angular_nonzero : ∀ n, p.angularFrequency n ≠ 0 |
| 3990 | geometry : ∀ n, CurlClassBounds.CylindricalGeometry (HarmonicWaveInteraction.productStrip s).domain |
| 3991 | (p.base.radius n) (p.directions.radialField n) (fun _ => p.directions.angular) |
| 3992 | (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n) |
| 3993 | matrix_frozen : SignedWaveUpdate.FrozenAlong p.directions.fast p.matrix |
| 3994 | target_frozen : SignedWaveUpdate.FrozenAlong p.directions.fast p.target |
| 3995 | request_frozen : SignedWaveUpdate.FrozenAlong p.directions.fast request |
| 3996 | mask_frozen : SignedWaveUpdate.FrozenAlong p.directions.fast p.mask |
| 3997 | frequency_nonzero : ∀ n, p.base.frequency n ≠ 0 |
| 3998 | ode : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 3999 | HarmonicCalculus.along (p.directions.fastField n) (p.fundamental n) x = |
| 4000 | TangentProjection.projectedRhs (p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x) |
| 4001 | (p.normalMotion n x) (p.fundamental n x) (p.action n x (p.fundamental n x)) 0 |
| 4002 | (s.epsilon n * p.base.frequency n ^ 2 * |
| 4003 | ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ ^ 2) |
| 4004 | action_eq : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 4005 | CurlClassBounds.complexify (p.action n x (p.fundamental n x)) = |
| 4006 | LinearWaveResidual.shear (p.base.radius n) (p.base.frequencyBase n) (p.base.axialBase n) |
| 4007 | (p.directions.radialField n) (fun y => CurlClassBounds.complexify (p.fundamental n y)) x |
| 4008 | cutoff_smooth : ∀ n, ContDiff ℝ ∞ (p.cutoff n) |
| 4009 | |
| 4010 | theorem SignedParameters.Dynamics.phase_eq {p : SignedParameters D} {s : StripData D} |
| 4011 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} (h : p.Dynamics s request) |
| 4012 | (n : ℕ) (x : D) (θ : ℝ) : |
| 4013 | p.base.frequency n * p.base.phase n (x,θ) = |
| 4014 | p.base.frequency n * p.base.phase n (x,0) + (p.angularFrequency n : ℝ) * θ := by |
| 4015 | rw [CopyAngularInvariance.affinePhase_eq_zeroSlice |
| 4016 | (Φ := p.base.phase n) (m := h.slope n) |
| 4017 | (by simpa only [h.angular_direction] using h.angular.phase n) x θ, |
| 4018 | mul_add, ← mul_assoc, h.angular_frequency] |
| 4019 | |
| 4020 | theorem SignedParameters.Dynamics.good_represents {p : SignedParameters D} {s : StripData D} |
| 4021 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} (h : p.Dynamics s request) : |
| 4022 | (p.goodBlock s request).oscillation = fun n x i => |
| 4023 | ((p.coefficients s request).constructedGood (HarmonicWaveInteraction.productStrip s) |
| 4024 | p.directions p.cutoff n x i * HarmonicCalculus.carrier (p.base.frequency n) (p.base.phase n) x).re := by |
| 4025 | have hi (n : ℕ) : CopyAngularInvariance.Invariant p.directions.angular |
| 4026 | ((p.coefficients s request).constructedGood (HarmonicWaveInteraction.productStrip s) |
| 4027 | p.directions p.cutoff n) := |
| 4028 | ParticularWaveAssembly.constructedGood_invariant (a := p.coefficients s request) |
| 4029 | p.cutoff h.angular.radius h.angular.radial_base h.angular.frequency_base h.angular.axial_base |
| 4030 | h.angular.radialField (fun _ => CopyAngularInvariance.Invariant.const _) |
| 4031 | (fun n => ⟨h.slope n, h.angular.phase n⟩) |
| 4032 | (h.angular.amplitude p.column) (h.angular.pressure p.column) h.angular.cutoff n |
| 4033 | let z : LinearWaveBounds.WaveCoefficients (D × ℝ) := |
| 4034 | {p.base with amplitude := ((p.coefficients s request).constructedGood |
| 4035 | (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff), pressure := 0} |
| 4036 | have he := (SignedWaveUpdate.blockOfCoefficients_represents z p.angularFrequency |
| 4037 | (fun n x θ => CopyAngularInvariance.invariant_eq_zeroSlice |
| 4038 | (by simpa only [h.angular_direction] using hi n) x θ) |
| 4039 | (fun _ _ _ => rfl) h.phase_eq).1 |
| 4040 | exact he |
| 4041 | |
| 4042 | theorem SignedParameters.Dynamics.exact_represents {p : SignedParameters D} {s : StripData D} |
| 4043 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} (h : p.Dynamics s request) : |
| 4044 | let z := (p.coefficients s request).corrected (HarmonicWaveInteraction.productStrip s) |
| 4045 | p.directions p.cutoff |
| 4046 | (p.exactBlock s request).oscillation = |
| 4047 | (fun n x i => (HarmonicCalculus.vectorMode (p.base.frequency n) (p.base.phase n) (z.amplitude n) x i).re) ∧ |
| 4048 | (p.exactBlock s request).oscillatoryPressure = |
| 4049 | (fun n x => (HarmonicCalculus.mode (p.base.frequency n) (p.base.phase n) (z.pressure n) x).re) := |
| 4050 | SignedWaveUpdate.signedBlock_represents h.angular h.angular_direction p.angularFrequency |
| 4051 | h.angular_frequency p.column |
| 4052 | |
| 4053 | theorem SignedParameters.Dynamics.linear_identity {p : SignedParameters D} {s : StripData D} |
| 4054 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4055 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4056 | (h : p.Dynamics s request) (hc : p.Control s P₀ P α₀ κ) |
| 4057 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4058 | (fun n x => request n x i)) : |
| 4059 | let z := p.coefficients s request |
| 4060 | ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 4061 | (z.corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff).harmonicResidual |
| 4062 | (HarmonicWaveInteraction.productStrip s) p.directions n x = |
| 4063 | (fun i => (z.constructedGood (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff n x i + |
| 4064 | LinearWaveBounds.excludedSlotError p.directions p.cutoff z.amplitude 0 n x i) * |
| 4065 | HarmonicCalculus.carrier (p.base.frequency n) (p.base.phase n) x) := |
| 4066 | SignedWaveUpdate.signed_linear_identity hc.baseBounds hc.kappa_le_half hc.covariance hR |
| 4067 | hc.mask hc.fundamental hc.normal hc.normalMotion hc.action hc.lower_pos hc.norm_lower hc.norm_upper |
| 4068 | hc.inverseFrequency hc.radius_eq hc.cutoff h.angular h.geometry h.matrix_frozen h.target_frozen |
| 4069 | h.request_frozen h.mask_frozen h.frequency_nonzero h.ode h.action_eq p.column |
| 4070 | |
| 4071 | theorem productStrip_domain (s : StripData D) : |
| 4072 | (HarmonicWaveInteraction.productStrip s).domain = HarmonicResidual.liftDomain s.domain := by |
| 4073 | ext x |
| 4074 | simp [HarmonicWaveInteraction.productStrip, HarmonicWaveInteraction.pullbackStrip, |
| 4075 | HarmonicWaveInteraction.projection, HarmonicResidual.liftDomain] |
| 4076 | |
| 4077 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 4078 | theorem withCarrier_of_same {a b : HarmonicBlock D} (h : SameCarrier a b) : |
| 4079 | HarmonicWaveInteraction.withCarrier a b = b := by |
| 4080 | rcases a with ⟨av,ap,ak,aΦ,akp⟩ |
| 4081 | rcases b with ⟨bv,bp,bk,bΦ,bkp⟩ |
| 4082 | rcases h with ⟨hk,hΦ,hkp⟩ |
| 4083 | simp only at hk hΦ hkp |
| 4084 | subst bk |
| 4085 | subst bΦ |
| 4086 | subst bkp |
| 4087 | rfl |
| 4088 | |
| 4089 | theorem SignedParameters.frame_corrected (p : SignedParameters D) (s : StripData D) |
| 4090 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) {c : Context D} |
| 4091 | (h : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) : |
| 4092 | WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions |
| 4093 | ((p.coefficients s request).corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff) := |
| 4094 | ⟨h.epsilon, h.radius, h.radial, h.angular, h.axial, h.time, h.radialBase, h.angularBase, h.axialBase⟩ |
| 4095 | |
| 4096 | noncomputable def SignedParameters.gaussianBlock (p : SignedParameters D) (s : StripData D) |
| 4097 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : HarmonicBlock D := |
| 4098 | SignedWaveUpdate.gaussianBlock (p.coefficients s request) p.directions p.cutoff p.angularFrequency |
| 4099 | |
| 4100 | theorem SignedParameters.exactBlock_pressure_zero (p : SignedParameters D) (s : StripData D) |
| 4101 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4102 | ∀ n, (p.exactBlock s request).pressure n 0 = 0 := |
| 4103 | (SignedWaveUpdate.coefficientBlock_zero_coefficient _ _ _ _ _).2 |
| 4104 | |
| 4105 | theorem SignedParameters.Dynamics.gaussian_represents {p : SignedParameters D} {s : StripData D} |
| 4106 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} (h : p.Dynamics s request) : |
| 4107 | (p.gaussianBlock s request).oscillation = fun n x i => |
| 4108 | (LinearWaveBounds.excludedSlotError p.directions p.cutoff (p.coefficients s request).amplitude 0 n x i * |
| 4109 | HarmonicCalculus.carrier (p.base.frequency n) (p.base.phase n) x).re := |
| 4110 | SignedWaveUpdate.gaussianBlock_represents h.angular h.angular_direction h.cutoff_smooth |
| 4111 | p.angularFrequency h.angular_frequency p.column |
| 4112 | |
| 4113 | /-- The actual signed field, with the literal `Context` operators, has the |
| 4114 | computed good residual plus its computed Gaussian error. -/ |
| 4115 | theorem SignedParameters.Dynamics.context_linear_identity |
| 4116 | {p : SignedParameters D} {s : StripData D} |
| 4117 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4118 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4119 | (h : p.Dynamics s request) (hc : p.Control s P₀ P α₀ κ) |
| 4120 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4121 | (fun n x => request n x i)) |
| 4122 | (c : Context D) (hB : SmoothTriple s.domain c.base) |
| 4123 | (hmatch : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 4124 | (a : HarmonicBlock D) (hcarrier : SameCarrier a (p.exactBlock s request)) |
| 4125 | (n : ℕ) (x : D × ℝ) (hx : x.1 ∈ s.domain) : |
| 4126 | linearBlockField c a (p.exactBlock s request) n x = |
| 4127 | (p.goodBlock s request).oscillation n x + (p.gaussianBlock s request).oscillation n x := by |
| 4128 | let z := (p.coefficients s request).corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff |
| 4129 | have hb := hc.full_bounds request hR |
| 4130 | have hr := (h.geometry n).radial_smooth |
| 4131 | have hz := (h.geometry n).axial_smooth |
| 4132 | rw [productStrip_domain, hmatch.radial] at hr |
| 4133 | rw [productStrip_domain, hmatch.axial] at hz |
| 4134 | have hp := h.angular.phase_smooth n |
| 4135 | rw [productStrip_domain] at hp |
| 4136 | have hv (i : Fin 3) : ContDiffOn ℝ ∞ (fun y => z.amplitude n y i) |
| 4137 | (HarmonicResidual.liftDomain s.domain) := by |
| 4138 | simpa only [productStrip_domain] using (CurlClassBounds.class_component hb.1 i).smooth n |
| 4139 | have hpressure : ContDiffOn ℝ ∞ (z.pressure n) (HarmonicResidual.liftDomain s.domain) := by |
| 4140 | simpa only [productStrip_domain] using hb.2.1.smooth n |
| 4141 | have hvrep : (HarmonicWaveInteraction.withCarrier a (p.exactBlock s request)).oscillation n = |
| 4142 | fun y i => (HarmonicCalculus.vectorMode (z.frequency n) (z.phase n) (z.amplitude n) y i).re := by |
| 4143 | rw [withCarrier_of_same hcarrier] |
| 4144 | exact congrFun h.exact_represents.1 n |
| 4145 | have hprep : (HarmonicWaveInteraction.withCarrier a (p.exactBlock s request)).oscillatoryPressure n = |
| 4146 | fun y => (HarmonicCalculus.mode (z.frequency n) (z.phase n) (z.pressure n) y).re := by |
| 4147 | rw [withCarrier_of_same hcarrier] |
| 4148 | exact congrFun h.exact_represents.2 n |
| 4149 | rw [linearBlockField_eq_modeResidual s.isOpen_domain c a (p.exactBlock s request) |
| 4150 | (HarmonicWaveInteraction.productStrip s) p.directions z (p.frame_corrected s request hmatch) |
| 4151 | n hB hr hz hp hv hpressure hvrep hprep ⟨hx, trivial⟩] |
| 4152 | rw [h.good_represents, h.gaussian_represents] |
| 4153 | funext i |
| 4154 | have he := congrArg Complex.re (congrFun (h.linear_identity hc hR n x hx) i) |
| 4155 | simpa only [add_mul, Complex.add_re, Pi.add_apply] using he |
| 4156 | |
| 4157 | /-- The literal harmonic linear remainder has the gain proved for the |
| 4158 | constructed signed coefficient. No output residual class is an input. -/ |
| 4159 | theorem SignedParameters.Dynamics.linearGood_bounds |
| 4160 | {p : SignedParameters D} {s : StripData D} |
| 4161 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4162 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4163 | (h : p.Dynamics s request) (hc : p.Control s P₀ P α₀ κ) |
| 4164 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4165 | (fun n x => request n x i)) |
| 4166 | (c : Context D) (hB : SmoothTriple s.domain c.base) |
| 4167 | (hmatch : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 4168 | (a : HarmonicBlock D) (hcarrier : SameCarrier a (p.exactBlock s request)) : |
| 4169 | (HarmonicWaveInteraction.linearGoodBlock c a (p.exactBlock s request) |
| 4170 | (p.gaussianBlock s request).velocity).WaveBounds s P (B + 1 / 2 - 4 * κ) := by |
| 4171 | let zero : HarmonicBlock D := ErrorHarmonics.zeroBlock a.frequency a.phase a.angularFrequency 0 |
| 4172 | have hbounds := hc.bounds request hR |
| 4173 | have hbs := HarmonicWaveInteraction.waveBounds_smooth hbounds.2.1 (p.exactBlock_zero s request) |
| 4174 | have hps (n : ℕ) : HarmonicResidual.SmoothCoefficients s.domain ((p.exactBlock s request).pressure n) := by |
| 4175 | intro j |
| 4176 | by_cases hj : j = 0 |
| 4177 | · subst j |
| 4178 | rw [p.exactBlock_pressure_zero s request n] |
| 4179 | exact contDiffOn_const |
| 4180 | exact (hbounds.2.2.1 j hj).smooth n |
| 4181 | have hphase (n : ℕ) : ContDiffOn ℝ ∞ (a.phase n) s.domain := by |
| 4182 | rw [← hcarrier.phase] |
| 4183 | exact (h.angular.phase_smooth n).comp (SignedWaveUpdate.zeroSection (D := D)).contDiff.contDiffOn |
| 4184 | (fun x hx => hx) |
| 4185 | have hkp (n : ℕ) : a.angularFrequency n ≠ 0 := by |
| 4186 | rw [← hcarrier.angular] |
| 4187 | exact h.angular_nonzero n |
| 4188 | have hrad (n : ℕ) : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain := by |
| 4189 | have he := (h.geometry n).radial_smooth |
| 4190 | rw [hmatch.radial] at he |
| 4191 | have hh := (contDiff_fst.comp_contDiffOn he).comp |
| 4192 | (SignedWaveUpdate.zeroSection (D := D)).contDiff.contDiffOn (fun x hx => hx) |
| 4193 | exact hh |
| 4194 | have hgcarrier : SameCarrier a (p.goodBlock s request) := |
| 4195 | ⟨hcarrier.frequency, hcarrier.phase, hcarrier.angular⟩ |
| 4196 | have hecarrier : SameCarrier a (p.gaussianBlock s request) := |
| 4197 | ⟨hcarrier.frequency, hcarrier.phase, hcarrier.angular⟩ |
| 4198 | have hcancel := linearGoodBlock_cancel_mem c a (p.exactBlock s request) zero |
| 4199 | (p.goodBlock s request) (p.gaussianBlock s request).velocity hrad |
| 4200 | (fun _ => contDiffOn_const) hB hbs hps hphase hkp |
| 4201 | (fun n i => ErrorHarmonics.zeroBlock_symmetric _ _ _ _ n i) |
| 4202 | (SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _).1 |
| 4203 | (hc.good_bounds request hR) ?_ |
| 4204 | · intro i j hj |
| 4205 | simpa [zero, ErrorHarmonics.zeroBlock, HarmonicFields.constantCoefficient, |
| 4206 | Finsupp.single_apply, hj, Ne.symm hj] using hcancel i j hj |
| 4207 | · intro n x hx θ i |
| 4208 | have he := congrFun (h.context_linear_identity hc hR c hB hmatch a hcarrier n (x,θ) hx) i |
| 4209 | rw [withCarrier_of_same hgcarrier] |
| 4210 | have heval : (HarmonicFields.field ((p.gaussianBlock s request).velocity n i) |
| 4211 | (a.frequency n) (a.phase n) (a.angularFrequency n) (x,θ)).re = |
| 4212 | (p.gaussianBlock s request).oscillation n (x,θ) i := by |
| 4213 | simp only [HarmonicBlock.oscillation, hecarrier.frequency, hecarrier.phase, hecarrier.angular] |
| 4214 | rw [heval] |
| 4215 | simpa only [zero, HarmonicWaveInteraction.withCarrier, ErrorHarmonics.zeroBlock, |
| 4216 | HarmonicBlock.oscillation, HarmonicResidual.field_constant, Pi.zero_apply, Complex.ofReal_zero, |
| 4217 | Complex.zero_re, Pi.add_apply, add_zero] using he |
| 4218 | |
| 4219 | end ConstructedSignedLinear |
| 4220 | |
| 4221 | section ConstructedSignedInvariants |
| 4222 | |
| 4223 | open CorrectionState |
| 4224 | open scoped InnerProductSpace |
| 4225 | |
| 4226 | /-- Primitive localization data for the already chosen signed cutoff. -/ |
| 4227 | structure SignedParameters.GaussianControl (p : SignedParameters D) (s : StripData D) |
| 4228 | (P : ℕ → D → ℝ) where |
| 4229 | slot : GaussianTailFlat.SlotFamily (HarmonicWaveInteraction.productStrip s) |
| 4230 | cutoff : p.cutoff = slot.cutoff |
| 4231 | fast : ∀ n, slot.linear n (p.directions.fastScale n • p.directions.fast) = (slot.length n)⁻¹ |
| 4232 | edges : GaussianTailFlat.FlatEdges (HarmonicWaveInteraction.productStrip s) |
| 4233 | scales : GaussianTailFlat.BandScaleControl (HarmonicWaveInteraction.productStrip s) |
| 4234 | rate : ℝ |
| 4235 | rate_pos : 0 < rate |
| 4236 | envelope : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 4237 | P n x.1 ≤ Real.exp (-rate * (slot.coordinate n x - 1 / 2) ^ 2 * slot.length n) |
| 4238 | |
| 4239 | theorem SignedParameters.GaussianControl.coefficient_flat |
| 4240 | {p : SignedParameters D} {s : StripData D} |
| 4241 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4242 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4243 | (h : p.GaussianControl s P) (hc : p.Control s P₀ P α₀ κ) |
| 4244 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4245 | (fun n x => request n x i)) (N : ℝ) : |
| 4246 | UnweightedClass (HarmonicWaveInteraction.productStrip s) N |
| 4247 | (LinearWaveBounds.excludedSlotError p.directions p.cutoff (p.coefficients s request).amplitude 0) := by |
| 4248 | have hi := SignedWaveUpdate.coefficients_inputBounds hc.baseBounds hc.covariance hR hc.mask hc.fundamental |
| 4249 | hc.normal hc.normalMotion hc.action hc.lower_pos hc.norm_lower hc.norm_upper hc.inverseFrequency p.column |
| 4250 | have ha := LinearWaveBounds.component_classes hi.amplitude |
| 4251 | rw [h.cutoff] |
| 4252 | exact LinearWaveBounds.excludedSlotError_all_gains h.slot p.directions h.fast h.edges h.scales |
| 4253 | ha (MemClass.zero ha.weight_nonneg) h.rate_pos h.envelope N |
| 4254 | |
| 4255 | theorem SignedParameters.GaussianControl.block_flat |
| 4256 | {p : SignedParameters D} {s : StripData D} |
| 4257 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4258 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4259 | (h : p.GaussianControl s P) (hc : p.Control s P₀ P α₀ κ) |
| 4260 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4261 | (fun n x => request n x i)) (N : ℝ) (i : Fin 3) (j : ℤ) : |
| 4262 | UnweightedClass s N (fun n x => (p.gaussianBlock s request).velocity n i j x) := by |
| 4263 | have he := HarmonicWaveInteraction.class_slice (s := s) (w := fun _ _ => 1) |
| 4264 | (h.coefficient_flat hc hR N) |
| 4265 | exact SignedWaveUpdate.conjugatePair_class (CurlClassBounds.class_component he i) j |
| 4266 | |
| 4267 | theorem SignedParameters.Dynamics.full_divergence_zero |
| 4268 | {p : SignedParameters D} {s : StripData D} |
| 4269 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4270 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4271 | (h : p.Dynamics s request) (hc : p.Control s P₀ P α₀ κ) |
| 4272 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4273 | (fun n x => request n x i)) |
| 4274 | (ht : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 4275 | ⟪p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x, p.fundamental n x⟫_ℝ = 0) |
| 4276 | (c : Context D) |
| 4277 | (hmatch : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 4278 | (n : ℕ) (x : D × ℝ) (hx : x.1 ∈ s.domain) : |
| 4279 | HarmonicCalculus.cylindricalDivergence (fun q => c.operators.radius q.1) |
| 4280 | (radialDirection c n) angularDirection (axialDirection c n) |
| 4281 | (fun q i => ((p.exactBlock s request).oscillation n q i : ℂ)) x = 0 := by |
| 4282 | let z := (p.coefficients s request).corrected (HarmonicWaveInteraction.productStrip s) p.directions p.cutoff |
| 4283 | have hb := hc.full_bounds request hR |
| 4284 | have hdiff (i : Fin 3) : DifferentiableAt ℝ |
| 4285 | (fun y => HarmonicCalculus.vectorMode (p.base.frequency n) (p.base.phase n) (z.amplitude n) y i) x := by |
| 4286 | exact ((HarmonicCalculus.contDiffOn_mode (p.base.frequency n) (h.angular.phase_smooth n) |
| 4287 | ((CurlClassBounds.class_component hb.1 i).smooth n)).contDiffAt |
| 4288 | ((HarmonicWaveInteraction.productStrip s).isOpen_domain.mem_nhds hx)).differentiableAt (by simp) |
| 4289 | have hd := (SignedWaveUpdate.signed_curl_realization hc.baseBounds hc.covariance hR |
| 4290 | hc.mask hc.fundamental hc.normal hc.normalMotion hc.action hc.lower_pos hc.norm_lower hc.norm_upper |
| 4291 | hc.inverseFrequency hc.cutoff p.column n (h.geometry n) (h.frequency_nonzero n) |
| 4292 | (h.angular.phase_smooth n) ht x hx).2 |
| 4293 | change HarmonicCalculus.cylindricalDivergence (p.base.radius n) (p.directions.radialField n) |
| 4294 | (fun _ => p.directions.angular) (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n) |
| 4295 | (HarmonicCalculus.vectorMode (p.base.frequency n) (p.base.phase n) (z.amplitude n)) x = 0 at hd |
| 4296 | let L : ℂ →L[ℝ] ℂ := Complex.ofRealCLM.comp Complex.reCLM |
| 4297 | have he := ParticularWaveAssembly.divergence_map L (p.base.radius n) (p.directions.radialField n) |
| 4298 | (fun _ => p.directions.angular) (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n) hdiff |
| 4299 | rw [hd] at he |
| 4300 | have ha : angularDirection (D := D) = fun _ => p.directions.angular := by |
| 4301 | rw [h.angular_direction] |
| 4302 | rfl |
| 4303 | rw [h.exact_represents.1, ← hmatch.radius, ← hmatch.radial, ← hmatch.axial, ha] |
| 4304 | simp only [L, ContinuousLinearMap.comp_apply, Complex.ofRealCLM_apply, Complex.reCLM_apply, |
| 4305 | map_zero] at he |
| 4306 | exact he |
| 4307 | |
| 4308 | theorem SignedParameters.Dynamics.modeSolenoidal |
| 4309 | {p : SignedParameters D} {s : StripData D} |
| 4310 | {P₀ : ℕ → D × ℝ → ℝ} {P : ℕ → D → ℝ} {α₀ κ B : ℝ} |
| 4311 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 4312 | (h : p.Dynamics s request) (hc : p.Control s P₀ P α₀ κ) |
| 4313 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) (B - 1 / 2 - κ) |
| 4314 | (fun n x => request n x i)) |
| 4315 | (ht : ∀ n x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 4316 | ⟪p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x, p.fundamental n x⟫_ℝ = 0) |
| 4317 | (c : Context D) |
| 4318 | (hmatch : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) : |
| 4319 | HarmonicWaveInteraction.ModeSolenoidal s c (p.exactBlock s request) := by |
| 4320 | apply HarmonicWaveInteraction.modeSolenoidal_of_full c (p.exactBlock s request) |
| 4321 | · intro n |
| 4322 | exact (h.angular.phase_smooth n).comp (SignedWaveUpdate.zeroSection (D := D)).contDiff.contDiffOn |
| 4323 | (fun x hx => hx) |
| 4324 | · exact h.angular_nonzero |
| 4325 | · exact HarmonicWaveInteraction.waveBounds_smooth (hc.bounds request hR).2.1 (p.exactBlock_zero s request) |
| 4326 | · exact h.full_divergence_zero hc hR ht c hmatch |
| 4327 | |
| 4328 | end ConstructedSignedInvariants |
| 4329 | |
| 4330 | section GaugeRankMean |
| 4331 | |
| 4332 | open CorrectionState VariableGaugeMean |
| 4333 | |
| 4334 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 4335 | |
| 4336 | omit [FiniteDimensional ℝ S] in |
| 4337 | theorem slow_directional_zero_on {s : StripData (PressureStream.Lift S)} {U : Set S} |
| 4338 | (hU : ∀ x ∈ s.domain, x.2.1 ∈ U) |
| 4339 | {f : ScalarField (PressureStream.Lift S)} (hf : SmoothOn s.domain f) |
| 4340 | (hslow : LocalRankDefect.IsSlowOn U f) (v : PressureStream.Plane) |
| 4341 | (n : ℕ) {x : PressureStream.Lift S} (hx : x ∈ s.domain) : |
| 4342 | fderiv ℝ (f n) x (0, (0, v)) = 0 := by |
| 4343 | apply directional_zero_of_line_const ((hf.at_point s.isOpen_domain n hx).differentiableAt (by simp)) |
| 4344 | intro t |
| 4345 | rcases x with ⟨R, p, Y⟩ |
| 4346 | simp only [Prod.smul_mk, smul_zero, Prod.mk_add_mk, add_zero] |
| 4347 | rw [hslow n R p (hU _ hx), hslow n R p (hU _ hx)] |
| 4348 | |
| 4349 | /-- Slow rank increments preserve an already subtracted temporal alias. |
| 4350 | The slow axial identity comes from the constructed zero-mass stream. -/ |
| 4351 | theorem gaugeRankStage_mean_gain {s : StripData (PressureStream.Lift S)} |
| 4352 | {U : Set S} (hU : IsOpen U) (hSU : ∀ x ∈ s.domain, x.2.1 ∈ U) |
| 4353 | (g : GaugeData S) (r : RankData S) (axial : S × PressureStream.Plane) |
| 4354 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 4355 | (hg : LocalRankDefect.RankGeometry g r U c u) |
| 4356 | {a b : ℝ} (ha : 0 < a) (hab : a < b) |
| 4357 | (hleft : ∀ n p, p ∈ U → a ≤ r.length n p * r.inner) |
| 4358 | (hright : ∀ n p, p ∈ U → r.length n p * r.outer ≤ b) |
| 4359 | {H κ β : ℝ} (v : PressureStream.Plane) (hfast : c.operators.vT = (0, (0, v))) |
| 4360 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 4361 | (hu : CorrectionState.CumulativeBounds s u) |
| 4362 | (hi : IncrementBounds s H (rankIncrementState g r axial c u)) |
| 4363 | (hdp : MeanClass s H (gaugeRankPressureChange g r axial c u)) |
| 4364 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 4365 | (A : ScalarField (PressureStream.Lift S)) |
| 4366 | (hθ : MeanClass s β (u.thetaResidual c)) |
| 4367 | (hz : MeanClass s β (u.axialResidual c - A)) |
| 4368 | (hH : 9 / 10 ≤ H) (hβ : β ≤ H + 1 - 2 * κ) : |
| 4369 | MeanClass s β ((rankStageState g r axial c u).thetaResidual c) ∧ |
| 4370 | MeanClass s β ((rankStageState g r axial c u).axialResidual c - A) := by |
| 4371 | have hslowθ : ∀ n x, x ∈ s.domain → |
| 4372 | fderiv ℝ ((rankIncrementState g r axial c u).angular n) x c.operators.vT = 0 := by |
| 4373 | intro n x hx |
| 4374 | rw [hfast] |
| 4375 | exact slow_directional_zero_on hSU hi.angular.smooth |
| 4376 | (LocalRankDefect.rank_angular_slow g r axial U c u) v n hx |
| 4377 | have hslowz : ∀ n x, x ∈ s.domain → |
| 4378 | fderiv ℝ ((rankIncrementState g r axial c u).axial n) x c.operators.vT = 0 := by |
| 4379 | intro n x hx |
| 4380 | rw [hfast] |
| 4381 | exact slow_directional_zero_on hSU hi.axial.smooth |
| 4382 | (hg.axial_slow ha hab hU hleft hright axial) v n hx |
| 4383 | have hδθ := thetaResidual_change_slow_mem ho hb hu.velocity hi hH |
| 4384 | u.covariance hW c.virtualTheta hslowθ |
| 4385 | have hδz := axialResidual_change_slow_mem ho hb hu.velocity hi hH |
| 4386 | u.covariance hW u.pressure (gaugeRankPressureChange g r axial c u) |
| 4387 | c.virtualAxial hu.pressure.smooth hdp hslowz |
| 4388 | have hpressure : u.pressure + gaugeRankPressureChange g r axial c u = |
| 4389 | (rankStageState g r axial c u).pressure := by |
| 4390 | unfold gaugeRankPressureChange |
| 4391 | abel |
| 4392 | have hnewθ : (rankStageState g r axial c u).thetaResidual c = |
| 4393 | MeanIncrementBounds.thetaResidual c.operators c.base (updated u.mean (rankIncrementState g r axial c u)) |
| 4394 | u.covariance c.virtualTheta := by |
| 4395 | change MeanIncrementBounds.thetaResidual c.operators c.base _ _ _ = _ |
| 4396 | rw [gaugeRankStage_covariance] |
| 4397 | rfl |
| 4398 | have hnewz : (rankStageState g r axial c u).axialResidual c = |
| 4399 | MeanIncrementBounds.axialResidual c.operators c.base (updated u.mean (rankIncrementState g r axial c u)) |
| 4400 | u.covariance (u.pressure + gaugeRankPressureChange g r axial c u) c.virtualAxial := by |
| 4401 | rw [hpressure] |
| 4402 | change MeanIncrementBounds.axialResidual c.operators c.base _ _ _ _ = _ |
| 4403 | rw [gaugeRankStage_covariance] |
| 4404 | rfl |
| 4405 | constructor |
| 4406 | · apply class_congr (hθ.add (hδθ.mono_exponent hβ)) |
| 4407 | intro n x hx |
| 4408 | rw [hnewθ] |
| 4409 | change _ = u.thetaResidual c n x + (_ - u.thetaResidual c n x) |
| 4410 | ring |
| 4411 | · apply class_congr (hz.add (hδz.mono_exponent hβ)) |
| 4412 | intro n x hx |
| 4413 | rw [hnewz] |
| 4414 | change _ - _ = (u.axialResidual c n x - A n x) + (_ - u.axialResidual c n x) |
| 4415 | ring |
| 4416 | |
| 4417 | theorem gaugeRankStage_next_mean {s : StripData (PressureStream.Lift S)} |
| 4418 | {U : Set S} (hU : IsOpen U) (hSU : ∀ x ∈ s.domain, x.2.1 ∈ U) |
| 4419 | (g : GaugeData S) (r : RankData S) (axial : S × PressureStream.Plane) |
| 4420 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 4421 | (hg : LocalRankDefect.RankGeometry g r U c u) |
| 4422 | {a b : ℝ} (ha : 0 < a) (hab : a < b) |
| 4423 | (hleft : ∀ n p, p ∈ U → a ≤ r.length n p * r.inner) |
| 4424 | (hright : ∀ n p, p ∈ U → r.length n p * r.outer ≤ b) |
| 4425 | {σ κ : ℝ} (hσ : 1 / 5 ≤ σ) (hκ : κ ≤ 1 / 100000) |
| 4426 | (v : PressureStream.Plane) (hfast : c.operators.vT = (0, (0, v))) |
| 4427 | (ho : OperatorBounds s c.operators κ) (hb : BaseBounds s c.base) |
| 4428 | (hu : CorrectionState.CumulativeBounds s u) |
| 4429 | (hi : IncrementBounds s (ExponentLedger.meanUpdateExponent σ κ) (rankIncrementState g r axial c u)) |
| 4430 | (hdp : MeanClass s (ExponentLedger.meanUpdateExponent σ κ) (gaugeRankPressureChange g r axial c u)) |
| 4431 | (hW : ∀ i j, SmoothOn s.domain (u.covariance i j)) |
| 4432 | (A : ScalarField (PressureStream.Lift S)) |
| 4433 | (hθ : MeanClass s (ExponentLedger.meanExponent (σ + 1 / 10)) (u.thetaResidual c)) |
| 4434 | (hz : MeanClass s (ExponentLedger.meanExponent (σ + 1 / 10)) (u.axialResidual c - A)) : |
| 4435 | MeanClass s (ExponentLedger.meanExponent (σ + 1 / 10)) ((rankStageState g r axial c u).thetaResidual c) ∧ |
| 4436 | MeanClass s (ExponentLedger.meanExponent (σ + 1 / 10)) ((rankStageState g r axial c u).axialResidual c - A) := by |
| 4437 | apply gaugeRankStage_mean_gain hU hSU g r axial c u hg ha hab hleft hright v hfast |
| 4438 | ho hb hu hi hdp hW A hθ hz |
| 4439 | · unfold ExponentLedger.meanUpdateExponent ExponentLedger.meanExponent |
| 4440 | linarith |
| 4441 | · unfold ExponentLedger.meanUpdateExponent ExponentLedger.meanExponent |
| 4442 | linarith |
| 4443 | |
| 4444 | end GaugeRankMean |
| 4445 | |
| 4446 | |
| 4447 | section MovingSupport |
| 4448 | |
| 4449 | open CorrectionState VariableGaugeMean |
| 4450 | |
| 4451 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 4452 | |
| 4453 | def GaugeSupported (a b : ℝ) (ell : S → ℝ) (U : Set S) |
| 4454 | (f : ScalarField (PressureStream.Lift S)) : Prop := |
| 4455 | ∀ n, SupportedGauge a b ell U (f n) |
| 4456 | |
| 4457 | namespace GaugeSupported |
| 4458 | |
| 4459 | variable {a b : ℝ} {ell : S → ℝ} {U : Set S} |
| 4460 | {f g : ScalarField (PressureStream.Lift S)} |
| 4461 | |
| 4462 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4463 | theorem zero : GaugeSupported a b ell U (0 : ScalarField (PressureStream.Lift S)) := by |
| 4464 | intro n x hx hn |
| 4465 | exact (hn rfl).elim |
| 4466 | |
| 4467 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4468 | theorem add (hf : GaugeSupported a b ell U f) (hg : GaugeSupported a b ell U g) : |
| 4469 | GaugeSupported a b ell U (f + g) := by |
| 4470 | intro n x hx hn |
| 4471 | by_cases hzero : f n x = 0 |
| 4472 | · exact hg n x hx (by simpa only [Pi.add_apply, hzero, zero_add] using hn) |
| 4473 | · exact hf n x hx hzero |
| 4474 | |
| 4475 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4476 | theorem neg (hf : GaugeSupported a b ell U f) : GaugeSupported a b ell U (-f) := by |
| 4477 | intro n x hx hn |
| 4478 | exact hf n x hx (neg_ne_zero.mp hn) |
| 4479 | |
| 4480 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4481 | theorem sub (hf : GaugeSupported a b ell U f) (hg : GaugeSupported a b ell U g) : |
| 4482 | GaugeSupported a b ell U (f - g) := by |
| 4483 | simpa only [sub_eq_add_neg] using hf.add hg.neg |
| 4484 | |
| 4485 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4486 | theorem mul_right (hf : GaugeSupported a b ell U f) (g : ScalarField (PressureStream.Lift S)) : |
| 4487 | GaugeSupported a b ell U (f * g) := by |
| 4488 | intro n x hx hn |
| 4489 | exact hf n x hx (left_ne_zero_of_mul hn) |
| 4490 | |
| 4491 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4492 | theorem mul_left (hf : GaugeSupported a b ell U f) (g : ScalarField (PressureStream.Lift S)) : |
| 4493 | GaugeSupported a b ell U (g * f) := by |
| 4494 | intro n x hx hn |
| 4495 | exact hf n x hx (right_ne_zero_of_mul hn) |
| 4496 | |
| 4497 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4498 | theorem smul (hf : GaugeSupported a b ell U f) (t : ℝ) : |
| 4499 | GaugeSupported a b ell U (t • f) := by |
| 4500 | intro n x hx hn |
| 4501 | exact hf n x hx (right_ne_zero_of_mul hn) |
| 4502 | |
| 4503 | theorem directional (hf : GaugeSupported a b ell U f) (hU : IsOpen U) |
| 4504 | (hell : ContinuousOn ell U) (v : PressureStream.Lift S) : |
| 4505 | GaugeSupported a b ell U (fun n x => fderiv ℝ (f n) x v) := |
| 4506 | fun n => fderiv_apply_supportedGauge hU hell (hf n) (fun _ => v) |
| 4507 | |
| 4508 | theorem dr (hf : GaugeSupported a b ell U f) (hU : IsOpen U) |
| 4509 | (hell : ContinuousOn ell U) (o : Operators (PressureStream.Lift S)) : |
| 4510 | GaugeSupported a b ell U (o.dr f) := by |
| 4511 | have he := (hf.directional hU hell o.eR).add |
| 4512 | ((hf.directional hU hell o.vR).mul_left (fun n x => o.radialFrequency n * o.radialProfile x)) |
| 4513 | convert! he using 1 |
| 4514 | funext n x |
| 4515 | simp only [Operators.dr, graphDerivative, Pi.add_apply, Pi.mul_apply, smul_eq_mul] |
| 4516 | ring |
| 4517 | |
| 4518 | theorem dz (hf : GaugeSupported a b ell U f) (hU : IsOpen U) |
| 4519 | (hell : ContinuousOn ell U) (o : Operators (PressureStream.Lift S)) : |
| 4520 | GaugeSupported a b ell U (o.dz f) := |
| 4521 | (hf.directional hU hell o.eZ).mul_left (fun n _ => o.epsilon n) |
| 4522 | |
| 4523 | theorem time (hf : GaugeSupported a b ell U f) (hU : IsOpen U) |
| 4524 | (hell : ContinuousOn ell U) (o : Operators (PressureStream.Lift S)) : |
| 4525 | GaugeSupported a b ell U (o.time f) := |
| 4526 | ((hf.directional hU hell o.eT).mul_left (fun n _ => o.epsilon n)).neg.add |
| 4527 | ((hf.directional hU hell o.vT).mul_left (fun n _ => o.fastCoefficient n)) |
| 4528 | |
| 4529 | theorem radialDiv (hf : GaugeSupported a b ell U f) (hU : IsOpen U) |
| 4530 | (hell : ContinuousOn ell U) (o : Operators (PressureStream.Lift S)) (t : ℝ) : |
| 4531 | GaugeSupported a b ell U (o.radialDiv t f) := |
| 4532 | (hf.dr hU hell o).add ((hf.mul_left o.invRadius).smul t) |
| 4533 | |
| 4534 | theorem viscosity (hf : GaugeSupported a b ell U f) (hU : IsOpen U) |
| 4535 | (hell : ContinuousOn ell U) (o : Operators (PressureStream.Lift S)) (t : ℝ) : |
| 4536 | GaugeSupported a b ell U (o.viscosity t f) := |
| 4537 | (((((hf.dr hU hell o).dr hU hell o).add ((hf.dr hU hell o).mul_left o.invRadius)).add |
| 4538 | ((hf.dz hU hell o).dz hU hell o)).sub |
| 4539 | (((hf.mul_left o.invRadius).mul_left o.invRadius).smul t)).mul_left (fun n _ => o.epsilon n) |
| 4540 | |
| 4541 | end GaugeSupported |
| 4542 | |
| 4543 | structure GaugeSupportedTriple (a b : ℝ) (ell : S → ℝ) (U : Set S) |
| 4544 | (m : Triple (PressureStream.Lift S)) : Prop where |
| 4545 | radial : GaugeSupported a b ell U m.radial |
| 4546 | angular : GaugeSupported a b ell U m.angular |
| 4547 | axial : GaugeSupported a b ell U m.axial |
| 4548 | |
| 4549 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 4550 | theorem GaugeSupportedTriple.updated {a b : ℝ} {ell : S → ℝ} {U : Set S} |
| 4551 | {m h : Triple (PressureStream.Lift S)} (hm : GaugeSupportedTriple a b ell U m) |
| 4552 | (hh : GaugeSupportedTriple a b ell U h) : GaugeSupportedTriple a b ell U (updated m h) := |
| 4553 | ⟨hm.radial.add hh.radial, hm.angular.add hh.angular, hm.axial.add hh.axial⟩ |
| 4554 | |
| 4555 | theorem gr_supportedGauge {a b : ℝ} {ell : S → ℝ} {U : Set S} |
| 4556 | (hU : IsOpen U) (hell : ContinuousOn ell U) |
| 4557 | (o : Operators (PressureStream.Lift S)) (base m : Triple (PressureStream.Lift S)) |
| 4558 | (W : Tensor (PressureStream.Lift S)) (hm : GaugeSupportedTriple a b ell U m) |
| 4559 | (hW : ∀ i j, GaugeSupported a b ell U (W i j)) : |
| 4560 | GaugeSupported a b ell U (MeanIncrementBounds.gr o base m W) := by |
| 4561 | have hrr : GaugeSupported a b ell U (radialRadial base m) := |
| 4562 | ((hm.radial.mul_left base.radial).smul 2).add (hm.radial.mul_right m.radial) |
| 4563 | have hzr : GaugeSupported a b ell U (axialRadial base m) := |
| 4564 | ((hm.axial.mul_left base.radial).add (hm.radial.mul_right base.axial)).add |
| 4565 | (hm.radial.mul_right m.axial) |
| 4566 | have htt : GaugeSupported a b ell U (radialAngular base m) := |
| 4567 | ((hm.angular.mul_left base.angular).smul 2).add (hm.angular.mul_right m.angular) |
| 4568 | exact (((((hm.radial.time hU hell o).add ((hrr.add (hW 0 0)).radialDiv hU hell o 1)).add |
| 4569 | ((hzr.add (hW 2 0)).dz hU hell o)).sub ((htt.add (hW 1 1)).mul_left o.invRadius)).sub |
| 4570 | (hm.radial.viscosity hU hell o 1)).neg |
| 4571 | |
| 4572 | /-- The containing fixed annulus supplies smoothness only. The precise |
| 4573 | support conclusion retains the same moving physical edges. -/ |
| 4574 | theorem state_gr_moving_regular {coord a b : ℝ} (U : LocalSignedRequest.SlowRegion coord) |
| 4575 | (ha : 0 < a) (hab : a < b) |
| 4576 | (c : Context LocalSignedRequest.Point) (u : State LocalSignedRequest.Point) |
| 4577 | (ho : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 4578 | (hb : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 4579 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 4580 | (hms : GaugeSupportedTriple a b (qLength coord) U.carrier u.mean) |
| 4581 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.covariance i j)) |
| 4582 | (hWs : ∀ i j, GaugeSupported a b (qLength coord) U.carrier (u.covariance i j)) : |
| 4583 | SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.gr c) ∧ |
| 4584 | GaugeSupported a b (qLength coord) U.carrier (u.gr c) := by |
| 4585 | obtain ⟨a₀, b₀, L, ha₀, _, _, _, hleft, hright, _⟩ := qLength_reference_bounds U ha hab |
| 4586 | have contain {f : ScalarField LocalSignedRequest.Point} |
| 4587 | (hf : GaugeSupported a b (qLength coord) U.carrier f) : |
| 4588 | ∀ n, PhysicalMeanDomain.SupportedOn a₀ b₀ U.carrier (f n) := by |
| 4589 | intro n x hx hn |
| 4590 | exact ⟨(hleft _ hx).trans (hf n x hx hn).1, (hf n x hx hn).2.trans (hright _ hx)⟩ |
| 4591 | have hml : LocalRankDefect.LocalTriple a₀ b₀ U.carrier u.mean := |
| 4592 | ⟨⟨hm.radial, contain hms.radial⟩, ⟨hm.angular, contain hms.angular⟩, ⟨hm.axial, contain hms.axial⟩⟩ |
| 4593 | have hWl (i j) : LocalRankDefect.LocalShell a₀ b₀ U.carrier (u.covariance i j) := |
| 4594 | ⟨hW i j, contain (hWs i j)⟩ |
| 4595 | refine ⟨(LocalRankDefect.gr_localShell ha₀ U.isOpen hb hml ho u.covariance hWl).smooth, ?_⟩ |
| 4596 | exact gr_supportedGauge U.isOpen |
| 4597 | (((qLength_contDiffOn U.coord_pos U.coord_lt_one).mono (fun p hp => U.time_pos p hp)).continuousOn) |
| 4598 | c.operators c.base u.mean u.covariance hms hWs |
| 4599 | |
| 4600 | |
| 4601 | end MovingSupport |
| 4602 | |
| 4603 | |
| 4604 | section MovingMeanPressure |
| 4605 | |
| 4606 | open CorrectionState VariableGaugeMean LocalSignedRequest |
| 4607 | |
| 4608 | variable {coord cL cR : ℝ} (U : SlowRegion coord) (g : GaugeData PressureStream.Plane) |
| 4609 | (ha : 0 < g.radial.inner) (hd : 0 < g.radial.exponent) (hcL : 0 < cL) (hcR : 0 < cR) |
| 4610 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 4611 | (hell : ∀ n, g.length n = qLength coord) |
| 4612 | |
| 4613 | include hd hell |
| 4614 | |
| 4615 | local notation "stageStrip" => movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL |
| 4616 | |
| 4617 | /-- The pressure difference is computed by the same variable-gauge integral. |
| 4618 | Both radial-source regularity statements and its class follow from the |
| 4619 | actual updated mean and unchanged covariance. -/ |
| 4620 | theorem reconstructedMeanStage_pressure_change_mem |
| 4621 | (c : Context Point) (u v : State Point) (inc : Triple Point) |
| 4622 | (hme : v.mean = updated u.mean inc) (hce : v.covariance = u.covariance) |
| 4623 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 4624 | {H κ : ℝ} (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) |
| 4625 | (ho : OperatorBounds stageStrip c.operators κ) |
| 4626 | (hb : BaseBounds stageStrip c.base) |
| 4627 | (hu : CorrectionState.CumulativeBounds stageStrip u) |
| 4628 | (hi : IncrementBounds stageStrip H inc) |
| 4629 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 4630 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 4631 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 4632 | (him : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) inc) |
| 4633 | (hms : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier u.mean) |
| 4634 | (his : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier inc) |
| 4635 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.covariance i j)) |
| 4636 | (hWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.covariance i j)) : |
| 4637 | MeanClass stageStrip H ((reconstructState g c v).pressure - u.pressure) := by |
| 4638 | have huReg := state_gr_moving_regular U ha g.radial.inner_lt_outer c u hop hbase hm hms hW hWs |
| 4639 | have hvReg := state_gr_moving_regular U ha g.radial.inner_lt_outer c v hop hbase |
| 4640 | (by rw [hme]; exact smooth_updated hm him) |
| 4641 | (by rw [hme]; exact hms.updated his) |
| 4642 | (by simpa only [hce] using hW) (by simpa only [hce] using hWs) |
| 4643 | have hcov : ∀ i j, SmoothOn (stageStrip).domain (u.covariance i j) := |
| 4644 | fun i j n => (hW i j n).mono (fun _ hx => hx.1) |
| 4645 | have hgr : MeanClass stageStrip H (v.gr c - u.gr c) := by |
| 4646 | simpa only [State.gr, hme, hce] using gr_change_mem ho hb hu.velocity hi hH u.covariance hcov hκ |
| 4647 | have hp := reconstructState_pressure_change_class U g ha hd hcL hcR ε L hε hεone hL hell |
| 4648 | c v u hvReg.1 huReg.1 hvReg.2 huReg.2 hgr |
| 4649 | simp only [hfixed] at hp |
| 4650 | exact hp |
| 4651 | |
| 4652 | /-- Direct pressure bound for the literal temporal stage. No class of a |
| 4653 | pressure source or pressure output is supplied as a hypothesis. -/ |
| 4654 | theorem gaugeTemporalStage_pressure_change_mem |
| 4655 | (h : ℝ) (index : ℕ → ℕ) (axial : PressureStream.Plane × PressureStream.Plane) |
| 4656 | (c : Context Point) (u : State Point) |
| 4657 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 4658 | {H κ : ℝ} (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) |
| 4659 | (ho : OperatorBounds stageStrip c.operators κ) |
| 4660 | (hb : BaseBounds stageStrip c.base) |
| 4661 | (hu : CorrectionState.CumulativeBounds stageStrip u) |
| 4662 | (hi : IncrementBounds stageStrip H (temporalIncrementState g h index axial c u)) |
| 4663 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 4664 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 4665 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 4666 | (him : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (temporalIncrementState g h index axial c u)) |
| 4667 | (hms : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier u.mean) |
| 4668 | (his : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 4669 | (temporalIncrementState g h index axial c u)) |
| 4670 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.covariance i j)) |
| 4671 | (hWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.covariance i j)) : |
| 4672 | MeanClass stageStrip H (gaugeTemporalPressureChange g h index axial c u) := by |
| 4673 | let v := u.addIncrement (temporalIncrementState g h index axial c u) 0 0 0 |
| 4674 | ⟨0, 0, temporalAliasState g h index c u⟩ |
| 4675 | exact reconstructedMeanStage_pressure_change_mem U g ha hd hcL hcR ε L hε hεone hL hell c u v |
| 4676 | (temporalIncrementState g h index axial c u) rfl |
| 4677 | (by simp only [v, State.addIncrement, add_zero]; rfl) |
| 4678 | hfixed hH hκ ho hb hu hi hop hbase hm him hms his hW hWs |
| 4679 | |
| 4680 | /-- The same integral update for the literal rank stage, with its full |
| 4681 | centrifugal source change derived by the nonlinear mean identity. -/ |
| 4682 | theorem gaugeRankStage_pressure_change_mem |
| 4683 | (r : RankData PressureStream.Plane) (axial : PressureStream.Plane × PressureStream.Plane) |
| 4684 | (c : Context Point) (u : State Point) |
| 4685 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 4686 | {H κ : ℝ} (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) |
| 4687 | (ho : OperatorBounds stageStrip c.operators κ) |
| 4688 | (hb : BaseBounds stageStrip c.base) |
| 4689 | (hu : CorrectionState.CumulativeBounds stageStrip u) |
| 4690 | (hi : IncrementBounds stageStrip H (rankIncrementState g r axial c u)) |
| 4691 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 4692 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 4693 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 4694 | (him : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (rankIncrementState g r axial c u)) |
| 4695 | (hms : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier u.mean) |
| 4696 | (his : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 4697 | (rankIncrementState g r axial c u)) |
| 4698 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.covariance i j)) |
| 4699 | (hWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.covariance i j)) : |
| 4700 | MeanClass stageStrip H (gaugeRankPressureChange g r axial c u) := by |
| 4701 | let v := u.addIncrement (rankIncrementState g r axial c u) 0 0 0 ExcludedErrors.zero |
| 4702 | exact reconstructedMeanStage_pressure_change_mem U g ha hd hcL hcR ε L hε hεone hL hell c u v |
| 4703 | (rankIncrementState g r axial c u) rfl |
| 4704 | (by simp only [v, State.addIncrement, add_zero]; rfl) |
| 4705 | hfixed hH hκ ho hb hu hi hop hbase hm him hms his hW hWs |
| 4706 | |
| 4707 | end MovingMeanPressure |
| 4708 | |
| 4709 | |
| 4710 | section TemporalRegularity |
| 4711 | |
| 4712 | open CorrectionState VariableGaugeMean LocalSignedRequest |
| 4713 | |
| 4714 | variable {coord : ℝ} (U : SlowRegion coord) (g : GaugeData PressureStream.Plane) |
| 4715 | (ha : 0 < g.radial.inner) (hd : 0 < g.radial.exponent) |
| 4716 | (hell : ∀ n, g.length n = qLength coord) |
| 4717 | (h : ℝ) (index : ℕ → ℕ) (axial : PressureStream.Plane × PressureStream.Plane) |
| 4718 | (c : Context Point) (u : State Point) |
| 4719 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 4720 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 4721 | (hpθ : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier (u.thetaResidual c n)) |
| 4722 | (hpz : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier (u.axialResidual c n)) |
| 4723 | (hsz : GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.axialResidual c)) |
| 4724 | |
| 4725 | include ha hd hell hθ hz hpθ hpz hsz in |
| 4726 | /-- Full local smoothness of the actual temporal stream components, |
| 4727 | including the axis where the annular support makes the quotients zero. -/ |
| 4728 | theorem gaugeTemporalIncrement_smooth : |
| 4729 | SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (temporalIncrementState g h index axial c u) := by |
| 4730 | let pot := temporalPotential g h index c u |
| 4731 | have hf : SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) pot := by |
| 4732 | intro n |
| 4733 | simpa only [pot, temporalPotential, hell] using |
| 4734 | streamPotential_q_contDiffOn U ha g.radial.inner_lt_outer hd (g.radial.frequency n) |
| 4735 | g.radial.radialDirection |
| 4736 | (temporalAtIndex_contDiffOn h n (index n) U.isOpen (hz n) (hpz n)) |
| 4737 | (temporalAtIndex_supportedGauge h n (index n) (hsz n)) |
| 4738 | have hs : GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier pot := by |
| 4739 | intro n |
| 4740 | simpa only [pot, temporalPotential, hell] using |
| 4741 | streamPotential_supportedGauge (M := g.radial.frequency n) ha g.radial.inner_lt_outer hd |
| 4742 | (qLength coord) g.radial.radialDirection U.isOpen |
| 4743 | (fun s hs => qLength_pos U.coord_pos U.coord_lt_one (U.time_pos s hs)) |
| 4744 | (temporalAtIndex_contDiffOn h n (index n) U.isOpen (hz n) (hpz n)) |
| 4745 | (temporalAtIndex_supportedGauge h n (index n) (hsz n)) |
| 4746 | obtain ⟨a, b, L, ha₀, _, _, _, hleft, hright, _⟩ := qLength_reference_bounds U ha g.radial.inner_lt_outer |
| 4747 | have hfShell : LocalRankDefect.LocalShell a b U.carrier pot := |
| 4748 | ⟨hf, fun n x hx hn => ⟨(hleft _ hx).trans (hs n x hx hn).1, |
| 4749 | (hs n x hx hn).2.trans (hright _ hx)⟩⟩ |
| 4750 | constructor |
| 4751 | · intro n |
| 4752 | exact (((contDiffOn_infty_iff_fderiv_of_isOpen (PhysicalMeanDomain.slowDomain_open U.isOpen)).mp |
| 4753 | (hf n)).2.clm_apply contDiffOn_const).neg |
| 4754 | · intro n |
| 4755 | exact temporalAtIndex_contDiffOn h n (index n) U.isOpen (hθ n) (hpθ n) |
| 4756 | · have hrad := hfShell.directional U.isOpen (1, 0) |
| 4757 | have htor := hfShell.directional U.isOpen (0, (0, g.radial.radialDirection)) |
| 4758 | have hspeed : SmoothOn (LocalRankDefect.positiveDomain U.carrier) |
| 4759 | (fun n (x : Point) => PressureStream.physicalSpeed g.radial.exponent (g.radial.frequency n) x.1) := by |
| 4760 | intro n x hx |
| 4761 | exact ((PressureStream.physicalSpeed_smooth g.radial.exponent (g.radial.frequency n) |
| 4762 | hx.1.ne').comp x contDiffAt_fst).contDiffWithinAt |
| 4763 | have hprod := htor.coefficient_mul ha₀ U.isOpen hspeed |
| 4764 | have hgraph : SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) |
| 4765 | (fun n => PressureStream.graphDr (PressureStream.physicalSpeed g.radial.exponent (g.radial.frequency n)) |
| 4766 | (0, g.radial.radialDirection) (pot n)) := by |
| 4767 | have he : (fun n => PressureStream.graphDr (PressureStream.physicalSpeed g.radial.exponent (g.radial.frequency n)) |
| 4768 | (0, g.radial.radialDirection) (pot n)) = |
| 4769 | (fun n x => fderiv ℝ (pot n) x (1, 0)) + |
| 4770 | (fun n (x : Point) => PressureStream.physicalSpeed g.radial.exponent (g.radial.frequency n) x.1) * |
| 4771 | (fun n x => fderiv ℝ (pot n) x (0, (0, g.radial.radialDirection))) := by |
| 4772 | funext n x |
| 4773 | change fderiv ℝ (pot n) x (1, _ • (0, g.radial.radialDirection)) = _ |
| 4774 | rw [show (((1 : ℝ), PressureStream.physicalSpeed g.radial.exponent (g.radial.frequency n) x.1 • |
| 4775 | ((0 : PressureStream.Plane), g.radial.radialDirection)) : Point) = |
| 4776 | ((1, (0, (0 : PressureStream.Plane))) : Point) + |
| 4777 | PressureStream.physicalSpeed g.radial.exponent (g.radial.frequency n) x.1 • |
| 4778 | ((0, (0, g.radial.radialDirection)) : Point) by simp] |
| 4779 | simp only [map_add, map_smul, smul_eq_mul, Pi.add_apply, Pi.mul_apply] |
| 4780 | rfl |
| 4781 | rw [he] |
| 4782 | exact hrad.smooth.add hprod.smooth |
| 4783 | intro n |
| 4784 | exact (hgraph n).add (VariableGaugeMean.divideRadius_contDiffOn ha₀ U.isOpen (hf n) (hfShell.supported n)) |
| 4785 | |
| 4786 | end TemporalRegularity |
| 4787 | |
| 4788 | |
| 4789 | section PeriodizedSignedConstruction |
| 4790 | |
| 4791 | open CorrectionState VariableGaugeMean LocalSignedRequest |
| 4792 | |
| 4793 | variable {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] {I : Type} |
| 4794 | |
| 4795 | /-- The primitive native data of one signed spatial label. Every copy |
| 4796 | uses the same carrier, base, and graph directions. -/ |
| 4797 | structure PeriodizedSignedParameters (D I : Type) [NormedAddCommGroup D] [NormedSpace ℝ D] where |
| 4798 | base : LinearWaveBounds.WaveCoefficients (D × ℝ) |
| 4799 | directions : LinearWaveBounds.GraphDirections (D × ℝ) |
| 4800 | matrix : I → ℕ → D × ℝ → SignedWaveUpdate.Mat2 |
| 4801 | target : I → ℕ → D × ℝ → SignedWaveUpdate.Vec2 |
| 4802 | mask : I → ℕ → D × ℝ → ℝ |
| 4803 | fundamental : I → ℕ → D × ℝ → ProblemStatement.Space |
| 4804 | normalMotion : I → ℕ → D × ℝ → ProblemStatement.Space |
| 4805 | action : I → ℕ → D × ℝ → ProblemStatement.Space →L[ℝ] ProblemStatement.Space |
| 4806 | cutoff : I → ℕ → D × ℝ → ℝ |
| 4807 | angularFrequency : ℕ → ℤ |
| 4808 | column : Fin 2 |
| 4809 | |
| 4810 | namespace PeriodizedSignedParameters |
| 4811 | variable (p : PeriodizedSignedParameters D I) |
| 4812 | |
| 4813 | noncomputable def native (i : I) : SignedParameters D where |
| 4814 | base := p.base |
| 4815 | directions := p.directions |
| 4816 | matrix := p.matrix i |
| 4817 | target := p.target i |
| 4818 | mask := p.mask i |
| 4819 | fundamental := p.fundamental i |
| 4820 | normalMotion := p.normalMotion i |
| 4821 | action := p.action i |
| 4822 | cutoff := p.cutoff i |
| 4823 | angularFrequency := p.angularFrequency |
| 4824 | column := p.column |
| 4825 | |
| 4826 | /-- The native fields are evaluated from the signed quotient and projected |
| 4827 | homogeneous pressure before the one native cutoff is applied. -/ |
| 4828 | noncomputable def copyData (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4829 | PeriodizedWaveBounds.CopyData (D × ℝ) I where |
| 4830 | background := p.base |
| 4831 | amplitude n i := ((p.native i).coefficients s request).amplitude n |
| 4832 | pressure n i := ((p.native i).coefficients s request).pressure n |
| 4833 | cutoff n i := p.cutoff i n |
| 4834 | source := fun _ _ => 0 |
| 4835 | |
| 4836 | theorem copyData_raw (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) (i : I) : |
| 4837 | (p.copyData s request).raw i = (p.native i).coefficients s request := rfl |
| 4838 | |
| 4839 | noncomputable def exactBlock (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4840 | HarmonicBlock D := |
| 4841 | SignedWaveUpdate.blockOfCoefficients |
| 4842 | ((p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions) |
| 4843 | p.angularFrequency |
| 4844 | |
| 4845 | noncomputable def tangentBlock (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4846 | HarmonicBlock D := |
| 4847 | SignedWaveUpdate.blockOfCoefficients (p.copyData s request).common p.angularFrequency |
| 4848 | |
| 4849 | noncomputable def curlBlock (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4850 | HarmonicBlock D := subBlock (p.exactBlock s request) (p.tangentBlock s request) |
| 4851 | |
| 4852 | noncomputable def goodBlock (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4853 | HarmonicBlock D := |
| 4854 | SignedWaveUpdate.coefficientBlock p.base.frequency (fun n x => p.base.phase n (x,0)) p.angularFrequency |
| 4855 | (fun n x => (p.copyData s request).globalGood (HarmonicWaveInteraction.productStrip s) p.directions n (x,0)) |
| 4856 | (fun _ _ => 0) |
| 4857 | |
| 4858 | noncomputable def gaussianBlock (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4859 | HarmonicBlock D := |
| 4860 | SignedWaveUpdate.coefficientBlock p.base.frequency (fun n x => p.base.phase n (x,0)) p.angularFrequency |
| 4861 | (fun n x => (p.copyData s request).globalGaussian p.directions n (x,0)) (fun _ _ => 0) |
| 4862 | |
| 4863 | theorem exact_tangent_carrier (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4864 | SameCarrier (p.exactBlock s request) (p.tangentBlock s request) := ⟨rfl, rfl, rfl⟩ |
| 4865 | |
| 4866 | theorem exactBlock_split (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4867 | (p.exactBlock s request).oscillation = |
| 4868 | (p.tangentBlock s request).oscillation + (p.curlBlock s request).oscillation := by |
| 4869 | rw [curlBlock, subBlock_oscillation _ _ (p.exact_tangent_carrier s request)] |
| 4870 | abel |
| 4871 | |
| 4872 | theorem exactBlock_band (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4873 | (p.exactBlock s request).BandLimited 1 := SignedWaveUpdate.coefficientBlock_band _ _ _ _ _ |
| 4874 | |
| 4875 | theorem tangentBlock_band (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4876 | (p.tangentBlock s request).BandLimited 1 := SignedWaveUpdate.coefficientBlock_band _ _ _ _ _ |
| 4877 | |
| 4878 | theorem gaussianBlock_band (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4879 | (p.gaussianBlock s request).BandLimited 1 := SignedWaveUpdate.coefficientBlock_band _ _ _ _ _ |
| 4880 | |
| 4881 | theorem gaussian_source_zero (s : StripData D) (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 4882 | (p.copyData s request).globalGaussian p.directions = (p.copyData s request).globalTail p.directions := |
| 4883 | (p.copyData s request).globalGaussian_of_source_zero p.directions rfl |
| 4884 | |
| 4885 | end PeriodizedSignedParameters |
| 4886 | end PeriodizedSignedConstruction |
| 4887 | |
| 4888 | section ParticularConstruction |
| 4889 | |
| 4890 | open CorrectionState VariableGaugeMean |
| 4891 | |
| 4892 | variable {P : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 4893 | |
| 4894 | /-- Primitive per-band data of the actual complex Volterra inverse. The |
| 4895 | interval may vary with the physical clock. No solved field is stored. -/ |
| 4896 | structure ParticularParameters (P : Type) [NormedAddCommGroup P] [NormedSpace ℝ P] where |
| 4897 | tangent : ℤ → ℕ → CommonCoverSolve.TangentData P ProblemStatement.Space |
| 4898 | geometry : ℕ → CommonCoverSolve.Geometry |
| 4899 | length : ℕ → ℝ |
| 4900 | length_pos : ∀ n, 0 < length n |
| 4901 | cutoff : ℕ → TorusInverse.Plane → ℝ |
| 4902 | background : LinearWaveBounds.WaveCoefficients ((P × ℝ) × TorusInverse.Plane) |
| 4903 | directions : LinearWaveBounds.GraphDirections ((P × ℝ) × TorusInverse.Plane) |
| 4904 | |
| 4905 | namespace ParticularParameters |
| 4906 | variable (p : ParticularParameters P) |
| 4907 | |
| 4908 | noncomputable def copyData (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4909 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4910 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (j : ℤ) : |
| 4911 | PeriodizedWaveBounds.CopyData ((P × ℝ) × TorusInverse.Plane) TorusInverse.Frequency where |
| 4912 | background := ParticularWaveAssembly.actualCarrier p.background b j |
| 4913 | amplitude n k := (ParticularWaveBounds.complexCopyCoefficients |
| 4914 | (ParticularWaveAssembly.actualCarrier p.background b j) |
| 4915 | (fun n => ParticularWaveAssembly.angleTangent (p.tangent j n)) |
| 4916 | (ParticularWaveAssembly.sourceFamily c u b G A j) p.geometry (fun _ => k) p.length p.length_pos).amplitude n |
| 4917 | pressure n k := (ParticularWaveBounds.complexCopyCoefficients |
| 4918 | (ParticularWaveAssembly.actualCarrier p.background b j) |
| 4919 | (fun n => ParticularWaveAssembly.angleTangent (p.tangent j n)) |
| 4920 | (ParticularWaveAssembly.sourceFamily c u b G A j) p.geometry (fun _ => k) p.length p.length_pos).pressure n |
| 4921 | cutoff n k x := p.cutoff n ((p.geometry n).coordinates k x.2) |
| 4922 | source := ParticularWaveAssembly.sourceFamily c u b G A j |
| 4923 | |
| 4924 | noncomputable def nativeStrip (s : StripData (P × TorusInverse.Plane)) : |
| 4925 | StripData ((P × ℝ) × TorusInverse.Plane) := |
| 4926 | ParticularWaveBounds.reindexStrip ParticularWaveAssembly.angleShuffle.symm (HarmonicWaveInteraction.productStrip s) |
| 4927 | |
| 4928 | noncomputable def wave (s : StripData (P × TorusInverse.Plane)) |
| 4929 | (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4930 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4931 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (j : ℤ) : |
| 4932 | LinearWaveBounds.WaveCoefficients ((P × ℝ) × TorusInverse.Plane) := |
| 4933 | (p.copyData c u b G A j).commonCorrected (nativeStrip s) p.directions |
| 4934 | |
| 4935 | noncomputable def updateBlock (s : StripData (P × TorusInverse.Plane)) |
| 4936 | (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4937 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4938 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (N : ℕ) : HarmonicBlock (P × TorusInverse.Plane) := |
| 4939 | ParticularWaveAssembly.assembledBlock N b.frequency b.phase b.angularFrequency |
| 4940 | (fun j n x => (p.wave s c u b G A j).amplitude n (ParticularWaveAssembly.angleShuffle (x,0))) |
| 4941 | (fun j n x => (p.wave s c u b G A j).pressure n (ParticularWaveAssembly.angleShuffle (x,0))) |
| 4942 | |
| 4943 | noncomputable def goodBlock (s : StripData (P × TorusInverse.Plane)) |
| 4944 | (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4945 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4946 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (N : ℕ) : HarmonicBlock (P × TorusInverse.Plane) := |
| 4947 | ParticularWaveAssembly.assembledBlock N b.frequency b.phase b.angularFrequency |
| 4948 | (fun j n x => (p.copyData c u b G A j).globalGood (nativeStrip s) p.directions n |
| 4949 | (ParticularWaveAssembly.angleShuffle (x,0))) (fun _ _ _ => 0) |
| 4950 | |
| 4951 | noncomputable def gaussianBlock |
| 4952 | (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4953 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4954 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (N : ℕ) : HarmonicBlock (P × TorusInverse.Plane) := |
| 4955 | ParticularWaveAssembly.assembledBlock N b.frequency b.phase b.angularFrequency |
| 4956 | (fun j n x => (p.copyData c u b G A j).globalGaussian p.directions n |
| 4957 | (ParticularWaveAssembly.angleShuffle (x,0))) (fun _ _ _ => 0) |
| 4958 | |
| 4959 | theorem updateBlock_band (s : StripData (P × TorusInverse.Plane)) |
| 4960 | (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4961 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4962 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (N : ℕ) : |
| 4963 | (p.updateBlock s c u b G A N).BandLimited N := ParticularWaveAssembly.assembledBlock_band _ _ _ _ _ _ |
| 4964 | |
| 4965 | theorem gaussianBlock_band |
| 4966 | (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4967 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4968 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (N : ℕ) : |
| 4969 | (p.gaussianBlock c u b G A N).BandLimited N := ParticularWaveAssembly.assembledBlock_band _ _ _ _ _ _ |
| 4970 | |
| 4971 | theorem source_eq_residual (c : Context (P × TorusInverse.Plane)) (u : State (P × TorusInverse.Plane)) |
| 4972 | (b : HarmonicBlock (P × TorusInverse.Plane)) |
| 4973 | (G A : HarmonicResidual.BlockCoefficients (P × TorusInverse.Plane)) (j : ℤ) (n : ℕ) |
| 4974 | (x : (P × ℝ) × TorusInverse.Plane) (i : Fin 3) : |
| 4975 | (p.copyData c u b G A j).source n x i = |
| 4976 | (HarmonicResidual.residualBlock c u b G A).velocity n i j (x.1.1,x.2) := rfl |
| 4977 | |
| 4978 | end ParticularParameters |
| 4979 | end ParticularConstruction |
| 4980 | |
| 4981 | section ActualCycle |
| 4982 | |
| 4983 | open CorrectionState VariableGaugeMean |
| 4984 | |
| 4985 | abbrev CyclePoint := LocalSignedRequest.Point |
| 4986 | abbrev CycleSlow := ℝ × PressureStream.Plane |
| 4987 | |
| 4988 | noncomputable def cycleAssoc : CyclePoint ≃ₗᵢ[ℝ] (CycleSlow × TorusInverse.Plane) := |
| 4989 | ParticularWaveBounds.liftAssoc PressureStream.Plane |
| 4990 | |
| 4991 | /-- Finite labeled coefficient data of the current fields. Correct |
| 4992 | representation is a separate invariant, not part of the construction. -/ |
| 4993 | structure CycleCoefficients (ι : Type) where |
| 4994 | labels : ℕ → Finset ι |
| 4995 | blocks : ι → HarmonicBlock CyclePoint |
| 4996 | gaussian : ι → HarmonicResidual.BlockCoefficients CyclePoint |
| 4997 | aliasCoefficients : ι → HarmonicResidual.BlockCoefficients CyclePoint |
| 4998 | residualBand : ℕ |
| 4999 | |
| 5000 | /-- Fixed geometric and primitive solver data for an actual correction |
| 5001 | cycle. The only state-dependent source is computed inside the stages. -/ |
| 5002 | structure CycleParameters (ι : Type) where |
| 5003 | gauge : GaugeData PressureStream.Plane |
| 5004 | strip : StripData CyclePoint |
| 5005 | patch : SignedStressPrimitive.Patch |
| 5006 | coordinate : ℝ |
| 5007 | timeExponent : ℝ |
| 5008 | commonIndex : ℕ → ℕ |
| 5009 | axial : PressureStream.Plane × PressureStream.Plane |
| 5010 | particular : ι → ParticularParameters CycleSlow |
| 5011 | signed : ι → PeriodizedSignedParameters CyclePoint TorusInverse.Frequency |
| 5012 | rank : RankData PressureStream.Plane |
| 5013 | |
| 5014 | namespace CycleParameters |
| 5015 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 5016 | (c : Context CyclePoint) (u : State CyclePoint) |
| 5017 | |
| 5018 | noncomputable def particularBlock (l : ι) : HarmonicBlock CyclePoint := |
| 5019 | StateReindex.block cycleAssoc ((p.particular l).updateBlock |
| 5020 | (ParticularWaveBounds.reindexStrip cycleAssoc.symm p.strip) |
| 5021 | (StateReindex.context cycleAssoc.symm c) (StateReindex.state cycleAssoc.symm u) |
| 5022 | (StateReindex.block cycleAssoc.symm (v.blocks l)) |
| 5023 | (StateReindex.blockCoefficients cycleAssoc.symm (v.gaussian l)) |
| 5024 | (StateReindex.blockCoefficients cycleAssoc.symm (v.aliasCoefficients l)) v.residualBand) |
| 5025 | |
| 5026 | noncomputable def particularGaussianBlock (l : ι) : HarmonicBlock CyclePoint := |
| 5027 | StateReindex.block cycleAssoc ((p.particular l).gaussianBlock |
| 5028 | (StateReindex.context cycleAssoc.symm c) (StateReindex.state cycleAssoc.symm u) |
| 5029 | (StateReindex.block cycleAssoc.symm (v.blocks l)) |
| 5030 | (StateReindex.blockCoefficients cycleAssoc.symm (v.gaussian l)) |
| 5031 | (StateReindex.blockCoefficients cycleAssoc.symm (v.aliasCoefficients l)) v.residualBand) |
| 5032 | |
| 5033 | noncomputable def particularVelocity : Oscillation CyclePoint := |
| 5034 | LabelSumBounds.fieldSum v.labels (fun l => (p.particularBlock v c u l).oscillation) |
| 5035 | |
| 5036 | noncomputable def particularPressure : OscillatoryScalar CyclePoint := |
| 5037 | fun n x => ∑ l ∈ v.labels n, (p.particularBlock v c u l).oscillatoryPressure n x |
| 5038 | |
| 5039 | noncomputable def particularGaussian : Oscillation CyclePoint := |
| 5040 | LabelSumBounds.fieldSum v.labels (fun l => (p.particularGaussianBlock v c u l).oscillation) |
| 5041 | |
| 5042 | noncomputable def afterParticular : State CyclePoint := |
| 5043 | gaugeWaveStage p.gauge c u (p.particularVelocity v c u) (p.particularPressure v c u) |
| 5044 | ⟨0, p.particularGaussian v c u, 0⟩ |
| 5045 | |
| 5046 | /-- The signed request is recomputed from the actual state after the |
| 5047 | particular solve; it is not supplied independently. -/ |
| 5048 | noncomputable def signedRequest : ℕ → CyclePoint × ℝ → SignedWaveUpdate.Vec2 := |
| 5049 | LocalSignedRequest.fullRequest p.strip p.patch p.coordinate c (p.afterParticular v c u) |
| 5050 | |
| 5051 | noncomputable def signedBlock (l : ι) : HarmonicBlock CyclePoint := |
| 5052 | (p.signed l).exactBlock p.strip (p.signedRequest v c u) |
| 5053 | |
| 5054 | noncomputable def signedGaussianBlock (l : ι) : HarmonicBlock CyclePoint := |
| 5055 | (p.signed l).gaussianBlock p.strip (p.signedRequest v c u) |
| 5056 | |
| 5057 | noncomputable def signedVelocity : Oscillation CyclePoint := |
| 5058 | LabelSumBounds.fieldSum v.labels (fun l => (p.signedBlock v c u l).oscillation) |
| 5059 | |
| 5060 | noncomputable def signedPressure : OscillatoryScalar CyclePoint := |
| 5061 | fun n x => ∑ l ∈ v.labels n, (p.signedBlock v c u l).oscillatoryPressure n x |
| 5062 | |
| 5063 | noncomputable def signedGaussian : Oscillation CyclePoint := |
| 5064 | LabelSumBounds.fieldSum v.labels (fun l => (p.signedGaussianBlock v c u l).oscillation) |
| 5065 | |
| 5066 | noncomputable def afterSigned : State CyclePoint := |
| 5067 | gaugeWaveStage p.gauge c (p.afterParticular v c u) |
| 5068 | (p.signedVelocity v c u) (p.signedPressure v c u) ⟨0, p.signedGaussian v c u, 0⟩ |
| 5069 | |
| 5070 | noncomputable def temporalIncrement : Triple CyclePoint := |
| 5071 | temporalIncrementState p.gauge p.timeExponent p.commonIndex p.axial c (p.afterSigned v c u) |
| 5072 | |
| 5073 | noncomputable def afterTemporal : State CyclePoint := |
| 5074 | temporalStageState p.gauge p.timeExponent p.commonIndex p.axial c (p.afterSigned v c u) |
| 5075 | |
| 5076 | noncomputable def rankIncrement : Triple CyclePoint := |
| 5077 | rankIncrementState p.gauge p.rank p.axial c (p.afterTemporal v c u) |
| 5078 | |
| 5079 | noncomputable def afterRank : State CyclePoint := |
| 5080 | rankStageState p.gauge p.rank p.axial c (p.afterTemporal v c u) |
| 5081 | |
| 5082 | /-- Four literal updates followed by replacement of the obsolete radial |
| 5083 | pressure alias. The current radial alias is recorded exactly once. -/ |
| 5084 | noncomputable def next : State CyclePoint := |
| 5085 | gaugeRefreshPressureAlias p.gauge c u (p.afterRank v c u) |
| 5086 | |
| 5087 | noncomputable def finalBlock (l : ι) : HarmonicBlock CyclePoint := |
| 5088 | addBlock (addBlock (v.blocks l) (p.particularBlock v c u l)) (p.signedBlock v c u l) |
| 5089 | |
| 5090 | theorem particularBlock_band (l : ι) : (p.particularBlock v c u l).BandLimited v.residualBand := |
| 5091 | StateReindex.block_bandLimited cycleAssoc ((p.particular l).updateBlock_band _ _ _ _ _ _ _) |
| 5092 | |
| 5093 | theorem particularGaussianBlock_band (l : ι) : |
| 5094 | (p.particularGaussianBlock v c u l).BandLimited v.residualBand := |
| 5095 | StateReindex.block_bandLimited cycleAssoc ((p.particular l).gaussianBlock_band _ _ _ _ _ _) |
| 5096 | |
| 5097 | theorem finalBlock_band {N : ℕ} (hb : ∀ l, (v.blocks l).BandLimited N) (l : ι) : |
| 5098 | (p.finalBlock v c u l).BandLimited (max (max N v.residualBand) 1) := |
| 5099 | twoWaveUpdates_band (hb l) (p.particularBlock_band v c u l) |
| 5100 | ((p.signed l).exactBlock_band p.strip (p.signedRequest v c u)) |
| 5101 | |
| 5102 | theorem next_oscillation : |
| 5103 | (p.next v c u).oscillation = u.oscillation + p.particularVelocity v c u + p.signedVelocity v c u := by |
| 5104 | simp only [next, gaugeRefreshPressureAlias, afterRank, rankStageState, afterTemporal, |
| 5105 | temporalStageState, afterSigned, afterParticular, gaugeWaveStage, reconstructState, |
| 5106 | State.addIncrement, add_zero] |
| 5107 | |
| 5108 | theorem next_oscillatoryPressure : |
| 5109 | (p.next v c u).oscillatoryPressure = |
| 5110 | u.oscillatoryPressure + p.particularPressure v c u + p.signedPressure v c u := by |
| 5111 | simp only [next, gaugeRefreshPressureAlias, afterRank, rankStageState, afterTemporal, |
| 5112 | temporalStageState, afterSigned, afterParticular, gaugeWaveStage, reconstructState, |
| 5113 | State.addIncrement, add_zero] |
| 5114 | |
| 5115 | theorem next_mean : |
| 5116 | (p.next v c u).mean = updated (updated u.mean (p.temporalIncrement v c u)) (p.rankIncrement v c u) := by |
| 5117 | change updated (updated (p.afterSigned v c u).mean (p.temporalIncrement v c u)) |
| 5118 | (p.rankIncrement v c u) = _ |
| 5119 | have he : (p.afterSigned v c u).mean = u.mean := by |
| 5120 | simp only [afterSigned, afterParticular, gaugeWaveStage, reconstructState, State.addIncrement, |
| 5121 | updated_zeroTriple] |
| 5122 | rw [he] |
| 5123 | |
| 5124 | theorem next_base_error : (p.next v c u).errors.base = u.errors.base := by |
| 5125 | simp only [next, gaugeRefreshPressureAlias, afterRank, rankStageState, afterTemporal, |
| 5126 | temporalStageState, afterSigned, afterParticular, gaugeWaveStage, reconstructState, |
| 5127 | State.addIncrement, ExcludedErrors.add, ExcludedErrors.zero, add_zero] |
| 5128 | |
| 5129 | theorem next_gaussian_error : |
| 5130 | (p.next v c u).errors.gaussian = |
| 5131 | u.errors.gaussian + p.particularGaussian v c u + p.signedGaussian v c u := by |
| 5132 | simp only [next, gaugeRefreshPressureAlias, afterRank, rankStageState, afterTemporal, |
| 5133 | temporalStageState, afterSigned, afterParticular, gaugeWaveStage, reconstructState, |
| 5134 | State.addIncrement, ExcludedErrors.add, ExcludedErrors.zero, add_zero] |
| 5135 | |
| 5136 | theorem next_alias_error : |
| 5137 | (p.next v c u).errors.aliasError = u.errors.aliasError + |
| 5138 | temporalAliasState p.gauge p.timeExponent p.commonIndex c (p.afterSigned v c u) + |
| 5139 | (pressureAliasState p.gauge c (p.afterRank v c u) - pressureAliasState p.gauge c u) := by |
| 5140 | change (p.afterRank v c u).errors.aliasError + _ = _ |
| 5141 | have he : (p.afterRank v c u).errors.aliasError = u.errors.aliasError + |
| 5142 | temporalAliasState p.gauge p.timeExponent p.commonIndex c (p.afterSigned v c u) := by |
| 5143 | simp only [afterRank, rankStageState, afterTemporal, temporalStageState, afterSigned, afterParticular, |
| 5144 | gaugeWaveStage, reconstructState, State.addIncrement, ExcludedErrors.add, ExcludedErrors.zero, add_zero] |
| 5145 | rw [he] |
| 5146 | |
| 5147 | theorem next_reconstructed : |
| 5148 | (reconstructState p.gauge c (p.next v c u)).pressure = (p.next v c u).pressure := rfl |
| 5149 | |
| 5150 | end CycleParameters |
| 5151 | end ActualCycle |
| 5152 | |
| 5153 | |
| 5154 | |
| 5155 | section ConstructedTemporalStage |
| 5156 | |
| 5157 | open CorrectionState VariableGaugeMean LocalSignedRequest |
| 5158 | |
| 5159 | variable {coord cL cR : ℝ} (U : SlowRegion coord) (g : GaugeData PressureStream.Plane) |
| 5160 | (ha : 0 < g.radial.inner) (hd : 0 < g.radial.exponent) (hcL : 0 < cL) (hcR : 0 < cR) |
| 5161 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 5162 | (hell : ∀ n, g.length n = qLength coord) |
| 5163 | |
| 5164 | include hd hell |
| 5165 | local notation "stageStrip" => movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL |
| 5166 | |
| 5167 | /-- Full mean-step bound for the constructed temporal inverse and stream. |
| 5168 | The increment and pressure-change classes are conclusions. -/ |
| 5169 | theorem gaugeTemporalStage_constructed |
| 5170 | {h H κ β : ℝ} (hh : 0 ≤ h) (hscale : ∀ n, ChartScales.S n ≤ L n) |
| 5171 | (index : ℕ → ℕ) (gap : ℕ) (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) |
| 5172 | (axial : PressureStream.Plane × PressureStream.Plane) (c : Context Point) (u : State Point) |
| 5173 | (heps : c.operators.epsilon = ε) |
| 5174 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 5175 | (hfast : ∀ n, c.operators.fastCoefficient n = ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 5176 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 5177 | (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) (hβ : β ≤ H + 1 - 2 * κ) |
| 5178 | (ho : OperatorBounds stageStrip c.operators κ) (hb : BaseBounds stageStrip c.base) |
| 5179 | (hu : CorrectionState.CumulativeBounds stageStrip u) |
| 5180 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 5181 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 5182 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 5183 | (hms : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier u.mean) |
| 5184 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.covariance i j)) |
| 5185 | (hWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.covariance i j)) |
| 5186 | (hθ : ∀ n, ContDiffOn ℝ ∞ (u.thetaResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 5187 | (hz : ∀ n, ContDiffOn ℝ ∞ (u.axialResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 5188 | (hpθ : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier (u.thetaResidual c n)) |
| 5189 | (hpz : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier (u.axialResidual c n)) |
| 5190 | (hsθ : GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.thetaResidual c)) |
| 5191 | (hsz : GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.axialResidual c)) |
| 5192 | (hcθ : MeanClass stageStrip H (u.thetaResidual c)) |
| 5193 | (hcz : MeanClass stageStrip H (u.axialResidual c)) |
| 5194 | (hbarθ : MeanClass stageStrip β (meanBar (u.thetaResidual c))) |
| 5195 | (hbarz : MeanClass stageStrip β (meanBar (u.axialResidual c))) : |
| 5196 | IncrementBounds stageStrip H (temporalIncrementState g h index axial c u) ∧ |
| 5197 | MeanClass stageStrip H (gaugeTemporalPressureChange g h index axial c u) ∧ |
| 5198 | CorrectionState.CumulativeBounds stageStrip (temporalStageState g h index axial c u) ∧ |
| 5199 | SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (temporalStageState g h index axial c u).mean ∧ |
| 5200 | GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 5201 | (temporalStageState g h index axial c u).mean ∧ |
| 5202 | MeanClass stageStrip β ((temporalStageState g h index axial c u).thetaResidual c) ∧ |
| 5203 | MeanClass stageStrip β (fun n x => (temporalStageState g h index axial c u).axialResidual c n x - |
| 5204 | temporalAliasState g h index c u n (x,0) 2) := by |
| 5205 | obtain ⟨hR, hT, hZ⟩ := temporalIncrementState_classes U g ha hd hcL hcR ε L hε hεone hL hell |
| 5206 | hh hscale index gap hgap axial c u heps hθ hz hpθ hpz hsz hcθ hcz |
| 5207 | have hi : IncrementBounds stageStrip H (temporalIncrementState g h index axial c u) := ⟨hR, hT, hZ⟩ |
| 5208 | have him := gaugeTemporalIncrement_smooth U g ha hd hell h index axial c u hθ hz hpθ hpz hsz |
| 5209 | have his : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 5210 | (temporalIncrementState g h index axial c u) := by |
| 5211 | have hs n := temporalIncrementState_supportedGauge U g ha hd hell c u h index axial n |
| 5212 | (hz n) (hpz n) (hsz n) (hsθ n) |
| 5213 | exact ⟨fun n => (hs n).1, fun n => (hs n).2.1, fun n => (hs n).2.2⟩ |
| 5214 | have hp := gaugeTemporalStage_pressure_change_mem U g ha hd hcL hcR ε L hε hεone hL hell |
| 5215 | h index axial c u hfixed hH hκ ho hb hu hi hop hbase hm him hms his hW hWs |
| 5216 | have hgain := gaugeTemporalStage_mean_gain (s := stageStrip) U.isOpen (fun _ hx => hx.1) g h index axial c u |
| 5217 | hv hfast ho hb hu hi hp (fun i j n => (hW i j n).mono (fun _ hx => hx.1)) |
| 5218 | hbarθ hbarz hθ hz hpθ hpz hH hβ |
| 5219 | exact ⟨hi, hp, gaugeTemporalStage_cumulative g h index axial c u hu hi hp hH, |
| 5220 | smooth_updated hm him, hms.updated his, hgain⟩ |
| 5221 | |
| 5222 | end ConstructedTemporalStage |
| 5223 | section ConstructedRankStage |
| 5224 | |
| 5225 | open CorrectionState VariableGaugeMean LocalSignedRequest |
| 5226 | variable {coord cL cR A B : ℝ} (U : SlowRegion coord) (g : GaugeData PressureStream.Plane) |
| 5227 | (r : RankData PressureStream.Plane) |
| 5228 | (ha : 0 < g.radial.inner) (hd : 0 < g.radial.exponent) (hcL : 0 < cL) (hcR : 0 < cR) |
| 5229 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 5230 | (hell : ∀ n, g.length n = qLength coord) |
| 5231 | |
| 5232 | include hd hell |
| 5233 | local notation "stageStrip" => movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL |
| 5234 | |
| 5235 | /-- The actual rank increment and its pressure change are derived from the |
| 5236 | measured debt. The previous temporal alias stays subtracted. -/ |
| 5237 | theorem gaugeRankStage_constructed |
| 5238 | (axial : PressureStream.Plane × PressureStream.Plane) (c : Context Point) (u : State Point) |
| 5239 | (hg : LocalRankDefect.RankGeometry g r U.carrier c u) |
| 5240 | (hparam : RankStateBounds.NormalizedParameters coord A B r U.carrier) (hB : B ≠ 0) |
| 5241 | (hleft : g.radial.inner < r.inner) (hright : r.outer < g.radial.outer) |
| 5242 | {H κ β : ℝ} (hH : 9 / 10 ≤ H) (hκ : 2 * κ ≤ 9 / 10) (hβ : β ≤ H + 1 - 2 * κ) |
| 5243 | (hfast : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 5244 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 5245 | (ho : OperatorBounds stageStrip c.operators κ) (hb : BaseBounds stageStrip c.base) |
| 5246 | (hu : CorrectionState.CumulativeBounds stageStrip u) |
| 5247 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 5248 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 5249 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 5250 | (hms : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier u.mean) |
| 5251 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) (u.covariance i j)) |
| 5252 | (hWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier (u.covariance i j)) |
| 5253 | (hdebt : UnweightedClass (PhysicalMeanDomain.localSlowStripData U.carrier U.isOpen ε L hε hεone hL) |
| 5254 | H (debt c u)) |
| 5255 | (aliasField : ScalarField Point) |
| 5256 | (hθ : MeanClass stageStrip β (u.thetaResidual c)) |
| 5257 | (hz : MeanClass stageStrip β (u.axialResidual c - aliasField)) : |
| 5258 | IncrementBounds stageStrip H (rankIncrementState g r axial c u) ∧ |
| 5259 | MeanClass stageStrip H (gaugeRankPressureChange g r axial c u) ∧ |
| 5260 | CorrectionState.CumulativeBounds stageStrip (rankStageState g r axial c u) ∧ |
| 5261 | SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (rankStageState g r axial c u).mean ∧ |
| 5262 | GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 5263 | (rankStageState g r axial c u).mean ∧ |
| 5264 | MeanClass stageStrip β ((rankStageState g r axial c u).thetaResidual c) ∧ |
| 5265 | MeanClass stageStrip β ((rankStageState g r axial c u).axialResidual c - aliasField) := by |
| 5266 | have heps : BandBound stageStrip 1 c.operators.epsilon := by |
| 5267 | rw [ho.epsilon_eq] |
| 5268 | simpa only [Real.rpow_one] using bandBound_rpow stageStrip 1 |
| 5269 | have hi := RankStateBounds.rankIncrementState_bounds U g r ha hcL hcR ε L hε hεone hL |
| 5270 | c u hg hparam hB hleft hright axial heps hdebt |
| 5271 | obtain ⟨a, b, L₀, ha₀, hab, _, _, hLo, hHi, _⟩ := qLength_reference_bounds U ha g.radial.inner_lt_outer |
| 5272 | have hleft₀ (n : ℕ) (x : PressureStream.Plane) (hx : x ∈ U.carrier) : a ≤ r.length n x * r.inner := by |
| 5273 | rw [hparam.length n x hx] |
| 5274 | exact (hLo x hx).trans (mul_le_mul_of_nonneg_left hleft.le |
| 5275 | (qLength_pos U.coord_pos U.coord_lt_one (U.time_pos x hx)).le) |
| 5276 | have hright₀ (n : ℕ) (x : PressureStream.Plane) (hx : x ∈ U.carrier) : r.length n x * r.outer ≤ b := by |
| 5277 | rw [hparam.length n x hx] |
| 5278 | exact (mul_le_mul_of_nonneg_left hright.le |
| 5279 | (qLength_pos U.coord_pos U.coord_lt_one (U.time_pos x hx)).le).trans (hHi x hx) |
| 5280 | have hil := hg.increment_localTriple ha₀ hab U.isOpen hleft₀ hright₀ axial |
| 5281 | have his : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 5282 | (rankIncrementState g r axial c u) := by |
| 5283 | have hsup n := hg.increment_supportedGauge ha₀ hab U.isOpen hleft₀ hright₀ axial n |
| 5284 | have enlarge {f : Point → ℝ} (n : ℕ) (hf : SupportedGauge r.inner r.outer (r.length n) U.carrier f) : |
| 5285 | SupportedGauge g.radial.inner g.radial.outer (qLength coord) U.carrier f := by |
| 5286 | intro x hx hn |
| 5287 | have hs := hf x hx hn |
| 5288 | rw [hparam.length n x.2.1 hx] at hs |
| 5289 | have hq := (qLength_pos U.coord_pos U.coord_lt_one (U.time_pos x.2.1 hx)).le |
| 5290 | exact ⟨(mul_le_mul_of_nonneg_left hleft.le hq).trans hs.1, |
| 5291 | hs.2.trans (mul_le_mul_of_nonneg_left hright.le hq)⟩ |
| 5292 | exact ⟨fun n => enlarge n (hsup n).1, fun n => enlarge n (hsup n).2.1, |
| 5293 | fun n => enlarge n (hsup n).2.2⟩ |
| 5294 | have hp := gaugeRankStage_pressure_change_mem U g ha hd hcL hcR ε L hε hεone hL hell |
| 5295 | r axial c u hfixed hH hκ ho hb hu hi hop hbase hm hil.smooth hms his hW hWs |
| 5296 | have hgain := gaugeRankStage_mean_gain (s := stageStrip) U.isOpen (fun _ hx => hx.1) g r axial c u hg ha₀ hab |
| 5297 | hleft₀ hright₀ (TorusInverse.vector .temporal) hfast ho hb hu hi hp |
| 5298 | (fun i j n => (hW i j n).mono (fun _ hx => hx.1)) aliasField hθ hz hH hβ |
| 5299 | exact ⟨hi, hp, gaugeRankStage_cumulative g r axial c u hu hi hp hH, |
| 5300 | smooth_updated hm hil.smooth, hms.updated his, hgain⟩ |
| 5301 | |
| 5302 | end ConstructedRankStage |
| 5303 | |
| 5304 | |
| 5305 | section CycleMassPreservation |
| 5306 | |
| 5307 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 5308 | open scoped ContDiff BigOperators |
| 5309 | |
| 5310 | namespace CycleParameters |
| 5311 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 5312 | (c : Context CyclePoint) (u : State CyclePoint) |
| 5313 | |
| 5314 | theorem afterParticular_mean : (p.afterParticular v c u).mean = u.mean := |
| 5315 | gaugeWaveStage_mean _ _ _ _ _ _ |
| 5316 | |
| 5317 | theorem afterSigned_mean : (p.afterSigned v c u).mean = u.mean := |
| 5318 | (gaugeWaveStage_mean _ _ _ _ _ _).trans (p.afterParticular_mean v c u) |
| 5319 | |
| 5320 | /-- Both actual conserved masses survive all four stages. All radial |
| 5321 | integrals are evaluated on the valid local slow region. -/ |
| 5322 | theorem next_preserve_masses {coord : ℝ} (U : SlowRegion coord) |
| 5323 | (ha : 0 < p.gauge.radial.inner) (hd : 0 < p.gauge.radial.exponent) |
| 5324 | (hell : ∀ n, p.gauge.length n = qLength coord) |
| 5325 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) u.mean) |
| 5326 | (hms : GaugeSupportedTriple p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier u.mean) |
| 5327 | (hθ : ∀ n, ContDiffOn ℝ ∞ ((p.afterSigned v c u).thetaResidual c n) |
| 5328 | (PhysicalMeanDomain.slowDomain U.carrier)) |
| 5329 | (hz : ∀ n, ContDiffOn ℝ ∞ ((p.afterSigned v c u).axialResidual c n) |
| 5330 | (PhysicalMeanDomain.slowDomain U.carrier)) |
| 5331 | (hpθ : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier ((p.afterSigned v c u).thetaResidual c n)) |
| 5332 | (hpz : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier ((p.afterSigned v c u).axialResidual c n)) |
| 5333 | (hsθ : GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5334 | ((p.afterSigned v c u).thetaResidual c)) |
| 5335 | (hsz : GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5336 | ((p.afterSigned v c u).axialResidual c)) |
| 5337 | (hg : LocalRankDefect.RankGeometry p.gauge p.rank U.carrier c (p.afterTemporal v c u)) |
| 5338 | (hrlength : ∀ n x, x ∈ U.carrier → p.rank.length n x = qLength coord x) |
| 5339 | (hleft : p.gauge.radial.inner ≤ p.rank.inner) (hright : p.rank.outer ≤ p.gauge.radial.outer) |
| 5340 | (n : ℕ) {x : PressureStream.Plane} (hx : x ∈ U.carrier) : |
| 5341 | radialMoment 2 (p.next v c u).mean.angular n x = radialMoment 2 u.mean.angular n x ∧ |
| 5342 | radialMoment 1 (p.next v c u).mean.axial n x = radialMoment 1 u.mean.axial n x := by |
| 5343 | have hmid : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (p.afterSigned v c u).mean := by |
| 5344 | rw [p.afterSigned_mean v c u] |
| 5345 | exact hm |
| 5346 | have hi := gaugeTemporalIncrement_smooth U p.gauge ha hd hell p.timeExponent p.commonIndex p.axial |
| 5347 | c (p.afterSigned v c u) hθ hz hpθ hpz hsz |
| 5348 | have him : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (p.afterTemporal v c u).mean := |
| 5349 | smooth_updated hmid hi |
| 5350 | have his : GaugeSupportedTriple p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5351 | (p.temporalIncrement v c u) := by |
| 5352 | have hs k := temporalIncrementState_supportedGauge U p.gauge ha hd hell c (p.afterSigned v c u) |
| 5353 | p.timeExponent p.commonIndex p.axial k (hz k) (hpz k) (hsz k) (hsθ k) |
| 5354 | exact ⟨fun k => (hs k).1, fun k => (hs k).2.1, fun k => (hs k).2.2⟩ |
| 5355 | have hmidd : GaugeSupportedTriple p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5356 | (p.afterSigned v c u).mean := by |
| 5357 | rw [p.afterSigned_mean v c u] |
| 5358 | exact hms |
| 5359 | have hmids : GaugeSupportedTriple p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5360 | (p.afterTemporal v c u).mean := hmidd.updated his |
| 5361 | have ht := GaugeMassPreservation.temporalStage_preserve_masses_on U p.gauge ha hd hell |
| 5362 | p.timeExponent p.commonIndex p.axial c (p.afterSigned v c u) |
| 5363 | (fun k => (hmid.angular k).continuousOn) (fun k => (hmid.axial k).continuousOn) |
| 5364 | hθ hz hpθ hpz hsz n hx |
| 5365 | change radialMoment 2 (p.afterTemporal v c u).mean.angular n x = |
| 5366 | radialMoment 2 (p.afterSigned v c u).mean.angular n x ∧ |
| 5367 | radialMoment 1 (p.afterTemporal v c u).mean.axial n x = |
| 5368 | radialMoment 1 (p.afterSigned v c u).mean.axial n x at ht |
| 5369 | rw [p.afterSigned_mean v c u] at ht |
| 5370 | obtain ⟨a, b, L, ha₀, hab, _, _, hLo, hHi, _⟩ := qLength_reference_bounds U ha p.gauge.radial.inner_lt_outer |
| 5371 | have hrl (k : ℕ) (y : PressureStream.Plane) (hy : y ∈ U.carrier) : a ≤ p.rank.length k y * p.rank.inner := by |
| 5372 | rw [hrlength k y hy] |
| 5373 | exact (hLo y hy).trans (mul_le_mul_of_nonneg_left hleft |
| 5374 | (qLength_pos U.coord_pos U.coord_lt_one (U.time_pos y hy)).le) |
| 5375 | have hrr (k : ℕ) (y : PressureStream.Plane) (hy : y ∈ U.carrier) : p.rank.length k y * p.rank.outer ≤ b := by |
| 5376 | rw [hrlength k y hy] |
| 5377 | exact (mul_le_mul_of_nonneg_left hright |
| 5378 | (qLength_pos U.coord_pos U.coord_lt_one (U.time_pos y hy)).le).trans (hHi y hy) |
| 5379 | have localize {f : ScalarField Point} |
| 5380 | (hf : GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier f) : |
| 5381 | ∀ k, PhysicalMeanDomain.SupportedOn a b U.carrier (f k) := by |
| 5382 | intro k y hy hn |
| 5383 | exact ⟨(hLo _ hy).trans (hf k y hy hn).1, (hf k y hy hn).2.trans (hHi _ hy)⟩ |
| 5384 | have hml : LocalRankDefect.LocalTriple a b U.carrier (p.afterTemporal v c u).mean := |
| 5385 | ⟨⟨him.radial, localize hmids.radial⟩, ⟨him.angular, localize hmids.angular⟩, |
| 5386 | ⟨him.axial, localize hmids.axial⟩⟩ |
| 5387 | have hr := hg.preserve_masses ha₀ hab U.isOpen hrl hrr p.axial hml n hx |
| 5388 | exact ⟨hr.1.trans ht.1, hr.2.trans ht.2⟩ |
| 5389 | |
| 5390 | end CycleParameters |
| 5391 | |
| 5392 | end CycleMassPreservation |
| 5393 | |
| 5394 | section CycleMeanCompletion |
| 5395 | |
| 5396 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 5397 | open scoped ContDiff BigOperators |
| 5398 | |
| 5399 | namespace CycleParameters |
| 5400 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 5401 | (c : Context CyclePoint) (u : State CyclePoint) |
| 5402 | {coord cL cR A B : ℝ} (U : SlowRegion coord) |
| 5403 | (ha : 0 < p.gauge.radial.inner) (hd : 0 < p.gauge.radial.exponent) |
| 5404 | (hcL : 0 < cL) (hcR : 0 < cR) |
| 5405 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 5406 | (hell : ∀ n, p.gauge.length n = qLength coord) |
| 5407 | |
| 5408 | include hd hell |
| 5409 | local notation "stageStrip" => movingStripData U p.gauge.radial.inner p.gauge.radial.outer cL cR ha hcL hcR ε L hε hεone hL |
| 5410 | local notation "slowStrip" => PhysicalMeanDomain.localSlowStripData U.carrier U.isOpen ε L hε hεone hL |
| 5411 | local notation "signedState" => p.afterSigned v c u |
| 5412 | local notation "temporalState" => p.afterTemporal v c u |
| 5413 | |
| 5414 | /-- The two actual mean stages complete the `σ+1/10` mean and debt gains. |
| 5415 | Every increment and pressure-change estimate is derived internally from the |
| 5416 | post-signed residuals and measured debts. -/ |
| 5417 | theorem finish_mean_stages {σ κ : ℝ} |
| 5418 | (hσ : 1 / 5 ≤ σ) (hκsmall : κ ≤ 1 / 100000) |
| 5419 | (hh : 0 ≤ p.timeExponent) (hscale : ∀ n, ChartScales.S n ≤ L n) |
| 5420 | (gap : ℕ) (hgap : ∀ n, ChartScales.nativeIndex p.timeExponent n ≤ p.commonIndex n + gap) |
| 5421 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 5422 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 5423 | ChartScales.Tg ^ p.commonIndex n * ChartScales.Q n ^ (1 + p.timeExponent)) |
| 5424 | (ho : OperatorBounds stageStrip c.operators κ) (hb : BaseBounds stageStrip c.base) |
| 5425 | (hsigned : CorrectionState.CumulativeBounds stageStrip signedState) |
| 5426 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 5427 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 5428 | (hV : LocalRankDefect.IsSlowOn U.carrier c.base.angular) |
| 5429 | (hG : LocalRankDefect.IsSlowOn U.carrier c.base.axial) |
| 5430 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (signedState).mean) |
| 5431 | (hms : GaugeSupportedTriple p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier (signedState).mean) |
| 5432 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) ((signedState).covariance i j)) |
| 5433 | (hWs : ∀ i j, GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier ((signedState).covariance i j)) |
| 5434 | (hθ : ∀ n, ContDiffOn ℝ ∞ ((signedState).thetaResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 5435 | (hz : ∀ n, ContDiffOn ℝ ∞ ((signedState).axialResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 5436 | (hpθ : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier ((signedState).thetaResidual c n)) |
| 5437 | (hpz : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier ((signedState).axialResidual c n)) |
| 5438 | (hsθ : GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier ((signedState).thetaResidual c)) |
| 5439 | (hsz : GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier ((signedState).axialResidual c)) |
| 5440 | (hcθ : MeanClass stageStrip (1 + σ - 2 * κ) ((signedState).thetaResidual c)) |
| 5441 | (hcz : MeanClass stageStrip (1 + σ - 2 * κ) ((signedState).axialResidual c)) |
| 5442 | (hbarθ : MeanClass stageStrip (1 + σ + 17 / 100) (meanBar ((signedState).thetaResidual c))) |
| 5443 | (hbarz : MeanClass stageStrip (1 + σ + 17 / 100) (meanBar ((signedState).axialResidual c))) |
| 5444 | (hdebt : ∀ i : Fin 3, UnweightedClass slowStrip (1 + σ - 2 * κ) |
| 5445 | (fun n x => debt c signedState n x i)) |
| 5446 | (hg : LocalRankDefect.RankGeometry p.gauge p.rank U.carrier c temporalState) |
| 5447 | (hparam : RankStateBounds.NormalizedParameters coord A B p.rank U.carrier) (hB : B ≠ 0) |
| 5448 | (hleft : p.gauge.radial.inner < p.rank.inner) (hright : p.rank.outer < p.gauge.radial.outer) : |
| 5449 | CorrectionState.CumulativeBounds stageStrip (p.next v c u) ∧ |
| 5450 | DefectBounds slowStrip (σ + 1 / 10) c (p.next v c u) ∧ |
| 5451 | MeanClass stageStrip (1 + (σ + 1 / 10)) ((p.next v c u).thetaResidual c) ∧ |
| 5452 | MeanClass stageStrip (1 + (σ + 1 / 10)) |
| 5453 | ((p.next v c u).axialResidual c - |
| 5454 | fun n x => temporalAliasState p.gauge p.timeExponent p.commonIndex c signedState n (x,0) 2) := by |
| 5455 | have hH : 9 / 10 ≤ 1 + σ - 2 * κ := by linarith |
| 5456 | have hκ : 2 * κ ≤ 9 / 10 := by linarith |
| 5457 | have hβ : 1 + (σ + 1 / 10) ≤ (1 + σ - 2 * κ) + 1 - 2 * κ := by linarith |
| 5458 | obtain ⟨hi, hp, htCum, htSmooth, htSupport, htTheta, htAxial⟩ := |
| 5459 | gaugeTemporalStage_constructed U p.gauge ha hd hcL hcR ε L hε hεone hL hell |
| 5460 | hh hscale p.commonIndex gap hgap p.axial c signedState ho.epsilon_eq hv hfast rfl |
| 5461 | hH hκ hβ ho hb hsigned hop hbase hm hms hW hWs hθ hz hpθ hpz hsθ hsz hcθ hcz |
| 5462 | (hbarθ.mono_exponent (by linarith)) (hbarz.mono_exponent (by linarith)) |
| 5463 | have hiSmooth := gaugeTemporalIncrement_smooth U p.gauge ha hd hell p.timeExponent p.commonIndex p.axial |
| 5464 | c signedState hθ hz hpθ hpz hsz |
| 5465 | have hiSupport : GaugeSupportedTriple p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5466 | (p.temporalIncrement v c u) := by |
| 5467 | have hs n := temporalIncrementState_supportedGauge U p.gauge ha hd hell c signedState |
| 5468 | p.timeExponent p.commonIndex p.axial n (hz n) (hpz n) (hsz n) (hsθ n) |
| 5469 | exact ⟨fun n => (hs n).1, fun n => (hs n).2.1, fun n => (hs n).2.2⟩ |
| 5470 | have hmReg : GaugeDebtIncrement.RegularTriple U p.gauge.radial.inner p.gauge.radial.outer (signedState).mean := |
| 5471 | ⟨⟨hm.radial, hms.radial⟩, ⟨hm.angular, hms.angular⟩, ⟨hm.axial, hms.axial⟩⟩ |
| 5472 | have hiReg : GaugeDebtIncrement.RegularTriple U p.gauge.radial.inner p.gauge.radial.outer |
| 5473 | (p.temporalIncrement v c u) := |
| 5474 | ⟨⟨hiSmooth.radial, hiSupport.radial⟩, ⟨hiSmooth.angular, hiSupport.angular⟩, |
| 5475 | ⟨hiSmooth.axial, hiSupport.axial⟩⟩ |
| 5476 | have htDebt := GaugeDebtIncrement.temporalStage_debt_mem U ha p.gauge.radial.inner_lt_outer |
| 5477 | hcL hcR ε L hε hεone hL p.gauge p.timeExponent p.commonIndex p.axial c signedState |
| 5478 | hop hbase hmReg hiReg (fun i j => ⟨hW i j, hWs i j⟩) ho hb hsigned.velocity hi hH hκ le_rfl hdebt |
| 5479 | have hcov : (temporalState).covariance = (signedState).covariance := |
| 5480 | gaugeTemporalStage_covariance p.gauge p.timeExponent p.commonIndex p.axial c signedState |
| 5481 | have htW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) ((temporalState).covariance i j) := by |
| 5482 | simpa only [hcov] using hW |
| 5483 | have htWs : ∀ i j, GaugeSupported p.gauge.radial.inner p.gauge.radial.outer (qLength coord) U.carrier |
| 5484 | ((temporalState).covariance i j) := by simpa only [hcov] using hWs |
| 5485 | let aliasField : ScalarField Point := fun n x => |
| 5486 | temporalAliasState p.gauge p.timeExponent p.commonIndex c signedState n (x,0) 2 |
| 5487 | obtain ⟨hrInc, hrPressure, hrCum, _, _, hrTheta, hrAxial⟩ := |
| 5488 | gaugeRankStage_constructed U p.gauge p.rank ha hd hcL hcR ε L hε hεone hL hell |
| 5489 | p.axial c temporalState hg hparam hB hleft hright hH hκ hβ hv rfl |
| 5490 | ho hb htCum hop hbase htSmooth htSupport htW htWs |
| 5491 | (RankStateBounds.debtClass_of_components _ htDebt) aliasField htTheta htAxial |
| 5492 | have hrDebt := MovingMomentBounds.rankStage_defectBounds U p.gauge p.rank ha hcL hcR |
| 5493 | ε L hε hεone hL hell p.axial c temporalState hg hop hbase htSmooth |
| 5494 | ⟨htSupport.radial, htSupport.angular, htSupport.axial⟩ htW htWs hV hG |
| 5495 | ho hb htCum.velocity hrInc hH (show 1 + (σ + 1 / 10) ≤ (1 + σ - 2 * κ) + 9 / 10 - 2 * κ by linarith) |
| 5496 | exact ⟨⟨hrCum.velocity, hrCum.pressure⟩, hrDebt, hrTheta, hrAxial⟩ |
| 5497 | |
| 5498 | end CycleParameters |
| 5499 | |
| 5500 | end CycleMeanCompletion |
| 5501 | |
| 5502 | |
| 5503 | section PeriodizedNativeBounds |
| 5504 | |
| 5505 | open Set Filter WeightedClasses CorrectionState |
| 5506 | open scoped ContDiff Topology |
| 5507 | |
| 5508 | variable {D I : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 5509 | |
| 5510 | /-- Only primitive background fields remain in this native family. Its |
| 5511 | amplitude and pressure are zero, so its bounds assume no constructed output. -/ |
| 5512 | noncomputable def nativeBackground (a : LinearWaveBounds.WaveCoefficients D) : |
| 5513 | LocalizedWaveBounds.WaveFamily D I := |
| 5514 | LocalizedWaveBounds.WaveFamily.ofCoefficients (fun _ => |
| 5515 | { a with amplitude := 0, pressure := 0 }) |
| 5516 | |
| 5517 | theorem localInput_of_coefficients |
| 5518 | (a : PeriodizedWaveBounds.CopyData D I) {s : StripData D} |
| 5519 | {K : ℕ → I → Set D} {P : ℕ → D → ℝ} {α κ : ℝ} |
| 5520 | {d : LinearWaveBounds.GraphDirections D} |
| 5521 | (h : LocalizedWaveBounds.InputBounds s K (fun n _ => P n) 0 κ d |
| 5522 | (nativeBackground a.background)) |
| 5523 | (hP : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 5524 | (ha : PeriodizedWaveBounds.LocalJets s (fun n x => Real.sqrt (s.zeta x) * P n x) |
| 5525 | α K a.amplitude) |
| 5526 | (hp : PeriodizedWaveBounds.LocalJets s (fun n x => Real.sqrt (s.zeta x) * P n x) |
| 5527 | (α + 1 / 2) K a.pressure) : |
| 5528 | LocalizedWaveBounds.InputBounds s K (fun n _ => P n) α κ d |
| 5529 | (LocalizedWaveBounds.rawFamily a) := by |
| 5530 | have hw n x hx := mul_nonneg (Real.sqrt_nonneg (s.zeta x)) (hP n x hx) |
| 5531 | exact ⟨h.loss_nonneg, h.radial_profile, h.radial_scale, h.fast_scale, h.frequency_scale, |
| 5532 | h.radius, h.inverse_radius, h.radial_base, h.frequency_base, h.axial_base, |
| 5533 | h.radial_base_aux, h.frequency_base_aux, h.axial_base_aux, h.normal, h.defect, |
| 5534 | fun j => (LocalizedWaveBounds.LocalClass.of_localJets hw ha).map (ContinuousLinearMap.proj j), |
| 5535 | LocalizedWaveBounds.LocalClass.of_localJets hw hp⟩ |
| 5536 | |
| 5537 | namespace PeriodizedSignedParameters |
| 5538 | |
| 5539 | variable (p : PeriodizedSignedParameters D I) (s : StripData D) |
| 5540 | |
| 5541 | /-- Uniform native-copy input data for the signed quotient. The current |
| 5542 | request is deliberately absent; it is supplied from the measured residual. -/ |
| 5543 | structure NativeControl (P : ℕ → D → ℝ) (κ : ℝ) where |
| 5544 | cells : PeriodizedWaveBounds.Cells (D × ℝ) I |
| 5545 | phasePatch : ℕ → I → Set (D × ℝ) |
| 5546 | background : LocalizedWaveBounds.InputBounds (HarmonicWaveInteraction.productStrip s) |
| 5547 | phasePatch (fun n _ x => P n x.1) 0 κ p.directions (nativeBackground p.base) |
| 5548 | covariance : SignedCopyBounds.NativeCovariance (HarmonicWaveInteraction.productStrip s) |
| 5549 | phasePatch p.matrix p.target |
| 5550 | mask : PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) (fun _ _ => 1) |
| 5551 | 0 phasePatch (fun n i => p.mask i n) |
| 5552 | fundamental : PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) |
| 5553 | (fun n x => P n x.1) 0 phasePatch (fun n i => p.fundamental i n) |
| 5554 | normalMotion : PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) |
| 5555 | (fun _ _ => 1) 0 phasePatch (fun n i => p.normalMotion i n) |
| 5556 | action : PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) |
| 5557 | (fun _ _ => 1) 0 phasePatch (fun n i => p.action i n) |
| 5558 | cutoff : PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) |
| 5559 | (fun _ _ => 1) 0 phasePatch (fun n i => p.cutoff i n) |
| 5560 | cutoff_support : ∀ n i, Function.support (p.cutoff i n) ⊆ cells.carrier n i |
| 5561 | phase_cover : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ cells.carrier n i → |
| 5562 | x ∈ phasePatch n i ∨ (p.cutoff i n =ᶠ[𝓝 x] fun _ => 0) ∨ (p.mask i n =ᶠ[𝓝 x] fun _ => 0) |
| 5563 | envelope_nonneg : ∀ n x, x ∈ s.domain → 0 ≤ P n x |
| 5564 | lower : ℝ |
| 5565 | upper : ℝ |
| 5566 | lower_pos : 0 < lower |
| 5567 | normal_lower : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ phasePatch n i → |
| 5568 | lower ≤ ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ |
| 5569 | normal_upper : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ phasePatch n i → |
| 5570 | ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ ≤ upper |
| 5571 | inverse_frequency : BandBound (HarmonicWaveInteraction.productStrip s) (1 / 2) |
| 5572 | (fun n => 1 / p.base.frequency n) |
| 5573 | |
| 5574 | variable {p s} {P : ℕ → D → ℝ} {κ β : ℝ} |
| 5575 | |
| 5576 | theorem raw_zero_of_mask (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 5577 | (n : ℕ) (i : I) (x : D × ℝ) (hm : p.mask i n x = 0) : |
| 5578 | (p.copyData s request).amplitude n i x = 0 ∧ (p.copyData s request).pressure n i x = 0 := by |
| 5579 | simp [copyData, native, SignedParameters.coefficients, SignedWaveUpdate.coefficients, |
| 5580 | SignedWaveUpdate.homogeneousCoefficients, SignedWaveUpdate.signedVector, SignedWaveUpdate.signedScalar, |
| 5581 | hm, ParticularWaveBounds.projectedPressure, TangentProjection.pressureCoefficient] |
| 5582 | |
| 5583 | theorem localized_zero_of_mask (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 5584 | {n : ℕ} {i : I} {x : D × ℝ} (hm : p.mask i n =ᶠ[𝓝 x] fun _ => 0) : |
| 5585 | ((p.copyData s request).localized i).amplitude n =ᶠ[𝓝 x] (fun _ => 0) ∧ |
| 5586 | ((p.copyData s request).localized i).pressure n =ᶠ[𝓝 x] (fun _ => 0) := by |
| 5587 | constructor |
| 5588 | · filter_upwards [hm] with y hy |
| 5589 | change p.cutoff i n y • (p.copyData s request).amplitude n i y = 0 |
| 5590 | rw [(raw_zero_of_mask request n i y hy).1, smul_zero] |
| 5591 | · filter_upwards [hm] with y hy |
| 5592 | change (p.cutoff i n y : ℂ) * (p.copyData s request).pressure n i y = 0 |
| 5593 | rw [(raw_zero_of_mask request n i y hy).2, mul_zero] |
| 5594 | |
| 5595 | theorem NativeControl.raw_jets (h : p.NativeControl s P κ) |
| 5596 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 5597 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) : |
| 5598 | PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) |
| 5599 | (fun n x => Real.sqrt (s.zeta x.1) * P n x.1) (β + 1 / 2) h.phasePatch |
| 5600 | (p.copyData s request).amplitude ∧ |
| 5601 | PeriodizedWaveBounds.LocalJets (HarmonicWaveInteraction.productStrip s) |
| 5602 | (fun n x => Real.sqrt (s.zeta x.1) * P n x.1) (β + 1) h.phasePatch |
| 5603 | (p.copyData s request).pressure := by |
| 5604 | have hK : UniformPrimaryWeights.UniformBandBound (HarmonicWaveInteraction.productStrip s) |
| 5605 | (1 / 2) (fun (_ : I) n => 1 / p.base.frequency n) := by |
| 5606 | obtain ⟨C, hC, q, hb⟩ := h.inverse_frequency |
| 5607 | exact ⟨C, hC, q, fun _ n => hb n⟩ |
| 5608 | exact SignedCopyBounds.coefficients_jets (a := fun _ => p.base) (d := fun _ => p.directions) |
| 5609 | h.covariance (fun j => PeriodizedWaveBounds.LocalJets.of_memClass (hR j)) |
| 5610 | h.mask h.fundamental (fun n x hx => h.envelope_nonneg n x.1 hx) |
| 5611 | h.background.normal.to_localJets h.normalMotion h.action h.lower_pos |
| 5612 | h.normal_lower h.normal_upper hK p.column |
| 5613 | |
| 5614 | /-- All five full-lift classes are obtained from the actual quotient and |
| 5615 | uniform native data. Background estimates are used only on the cells. -/ |
| 5616 | theorem NativeControl.global_bounds (h : p.NativeControl s P κ) (hκ : κ ≤ 1 / 2) |
| 5617 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 5618 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) : |
| 5619 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (β + 1 / 2) |
| 5620 | (p.copyData s request).common.amplitude ∧ |
| 5621 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (β + 1 / 2) |
| 5622 | ((p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions).amplitude ∧ |
| 5623 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (β + 1) |
| 5624 | (p.copyData s request).common.pressure ∧ |
| 5625 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (β + 1 - κ) |
| 5626 | ((p.copyData s request).common.curlCorrection (HarmonicWaveInteraction.productStrip s) p.directions) ∧ |
| 5627 | WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (β + 1 - 3 * κ) |
| 5628 | ((p.copyData s request).globalGood (HarmonicWaveInteraction.productStrip s) p.directions) := by |
| 5629 | obtain ⟨ha, hp⟩ := h.raw_jets request hR |
| 5630 | have hinput := localInput_of_coefficients (p.copyData s request) h.background |
| 5631 | (fun n x hx => h.envelope_nonneg n x.1 hx) ha |
| 5632 | (by simp only [show β + 1 / 2 + 1 / 2 = β + 1 by ring]; exact hp) |
| 5633 | have hcover : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.cells.carrier n i → |
| 5634 | x ∈ h.phasePatch n i ∨ |
| 5635 | (((p.copyData s request).localized i).amplitude n =ᶠ[𝓝 x] fun _ => 0) ∧ |
| 5636 | (((p.copyData s request).localized i).pressure n =ᶠ[𝓝 x] fun _ => 0) := by |
| 5637 | intro n i x hx hi |
| 5638 | rcases h.phase_cover n i x hx hi with hp | hcut | hmask |
| 5639 | · exact Or.inl hp |
| 5640 | · exact Or.inr ((p.copyData s request).localized_zero_germs hcut) |
| 5641 | · exact Or.inr (localized_zero_of_mask request hmask) |
| 5642 | have hh := LocalizedWaveBounds.common_bounds_from_supported_native (p.copyData s request) |
| 5643 | h.cells h.cutoff_support h.phasePatch (fun n x hx => h.envelope_nonneg n x.1 hx) |
| 5644 | (hinput.with_cutoff (LocalizedWaveBounds.LocalClass.of_localJets (fun _ _ _ => zero_le_one) h.cutoff)) |
| 5645 | hκ h.lower_pos h.normal_lower h.normal_upper |
| 5646 | (LocalizedWaveBounds.LocalClass.band_const h.inverse_frequency) hcover |
| 5647 | simpa only [show β + 1 / 2 + 1 / 2 = β + 1 by ring] using hh |
| 5648 | |
| 5649 | theorem NativeControl.block_bounds (h : p.NativeControl s P κ) (hκ : κ ≤ 1 / 2) |
| 5650 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 5651 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) : |
| 5652 | (p.tangentBlock s request).WaveBounds s P (β + 1 / 2) ∧ |
| 5653 | (p.exactBlock s request).WaveBounds s P (β + 1 / 2) ∧ |
| 5654 | (p.exactBlock s request).PressureBounds s P (β + 1) ∧ |
| 5655 | (p.curlBlock s request).WaveBounds s P (β + 1 - κ) ∧ |
| 5656 | (p.goodBlock s request).WaveBounds s P (β + 1 - 3 * κ) := by |
| 5657 | obtain ⟨ha, he, hp, hc, hg⟩ := h.global_bounds hκ request hR |
| 5658 | have ht := SignedWaveUpdate.blockOfCoefficients_classes (p.copyData s request).common p.angularFrequency ha hp |
| 5659 | have hx := SignedWaveUpdate.blockOfCoefficients_classes |
| 5660 | ((p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions) |
| 5661 | p.angularFrequency he hp |
| 5662 | have hd : WaveClass (HarmonicWaveInteraction.productStrip s) (fun n x => P n x.1) (β + 1 - κ) |
| 5663 | (fun n x => ((p.copyData s request).commonCorrected |
| 5664 | (HarmonicWaveInteraction.productStrip s) p.directions).amplitude n x - |
| 5665 | (p.copyData s request).common.amplitude n x) := by |
| 5666 | apply LinearWaveBounds.class_congr hc |
| 5667 | intro n x hx |
| 5668 | simp only [PeriodizedWaveBounds.CopyData.commonCorrected, |
| 5669 | LinearWaveBounds.WaveCoefficients.addAmplitude, add_sub_cancel_left] |
| 5670 | have hd' := blockOfCoefficients_difference_mem _ _ p.angularFrequency hd |
| 5671 | have hg' := SignedWaveUpdate.class_zeroSection hg |
| 5672 | rw [sectionStrip_productStrip] at ht hx hd' hg' |
| 5673 | exact ⟨ht.1, hx.1, hx.2, hd', (SignedWaveUpdate.coefficientBlock_classes |
| 5674 | p.base.frequency (fun n x => p.base.phase n (x,0)) p.angularFrequency hg' |
| 5675 | (MemClass.zero (α := (0 : ℝ)) hg'.weight_nonneg)).1⟩ |
| 5676 | |
| 5677 | end PeriodizedSignedParameters |
| 5678 | |
| 5679 | namespace ParticularParameters |
| 5680 | |
| 5681 | open CommonCoverSolve TorusInverse |
| 5682 | |
| 5683 | variable {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 5684 | (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 5685 | (c : Context (Q × Plane)) (u : State (Q × Plane)) (b : HarmonicBlock (Q × Plane)) |
| 5686 | (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) (j : ℤ) |
| 5687 | |
| 5688 | noncomputable def nativeTangent : ℕ → TangentData (Q × ℝ) ProblemStatement.Space := |
| 5689 | fun n => ParticularWaveAssembly.angleTangent (p.tangent j n) |
| 5690 | |
| 5691 | /-- Input bounds for the actual complex Volterra solve on all of its |
| 5692 | native cells. The modal forcing is the literal current residual source. -/ |
| 5693 | structure NativeControl (W : ℕ → (Q × ℝ) × Plane → ℝ) (α κ : ℝ) where |
| 5694 | cells : PeriodizedWaveBounds.Cells ((Q × ℝ) × Plane) Frequency |
| 5695 | phasePatch : ℕ → Frequency → Set ((Q × ℝ) × Plane) |
| 5696 | background : LocalizedWaveBounds.InputBounds (nativeStrip s) phasePatch |
| 5697 | (fun n _ => W n) 0 κ p.directions (nativeBackground (p.copyData c u b G A j).background) |
| 5698 | frame : ℕ → PrimaryODE.FrameData ((Q × ℝ) × ℝ) |
| 5699 | envelope : ℕ → ℝ → ℝ |
| 5700 | realControl : ParticularCopyBounds.ModalControl (nativeStrip s) α frame |
| 5701 | (fun n => ParticularWaveBounds.realData (p.nativeTangent j n) ((p.copyData c u b G A j).source n)) |
| 5702 | j p.geometry p.length envelope phasePatch |
| 5703 | imagControl : ParticularCopyBounds.ModalControl (nativeStrip s) α frame |
| 5704 | (fun n => ParticularWaveBounds.imagData (p.nativeTangent j n) ((p.copyData c u b G A j).source n)) |
| 5705 | j p.geometry p.length envelope phasePatch |
| 5706 | envelope_nonneg : ∀ n x, x ∈ (nativeStrip s).domain → 0 ≤ W n x |
| 5707 | envelope_compare : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ phasePatch n i → |
| 5708 | envelope n ((p.geometry n).coordinates i x.2).2 ≤ W n x |
| 5709 | normal : PeriodizedWaveBounds.LocalJets (nativeStrip s) (fun _ _ => 1) 0 phasePatch |
| 5710 | (fun n i x => (p.nativeTangent j n).normal (ParticularWaveBounds.nativePoint (p.geometry n) i x)) |
| 5711 | normalMotion : PeriodizedWaveBounds.LocalJets (nativeStrip s) (fun _ _ => 1) 0 phasePatch |
| 5712 | (fun n i x => (p.nativeTangent j n).normalDot (ParticularWaveBounds.nativePoint (p.geometry n) i x)) |
| 5713 | action : PeriodizedWaveBounds.LocalJets (nativeStrip s) (fun _ _ => 1) 0 phasePatch |
| 5714 | (fun n i x => (p.nativeTangent j n).action (ParticularWaveBounds.nativePoint (p.geometry n) i x)) |
| 5715 | source : PeriodizedWaveBounds.LocalJets (nativeStrip s) |
| 5716 | (fun n x => Real.sqrt ((nativeStrip s).zeta x) * W n x) α phasePatch |
| 5717 | (fun n _ => (p.copyData c u b G A j).source n) |
| 5718 | cutoff : PeriodizedWaveBounds.LocalJets (nativeStrip s) (fun _ _ => 1) 0 phasePatch |
| 5719 | (p.copyData c u b G A j).cutoff |
| 5720 | cutoff_support : ∀ n i, Function.support ((p.copyData c u b G A j).cutoff n i) ⊆ cells.carrier n i |
| 5721 | phase_cover : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ cells.carrier n i → |
| 5722 | x ∈ phasePatch n i ∨ ∀ᶠ y in 𝓝 x, |
| 5723 | ((p.geometry n).coordinates i y.2).2 ∈ Icc 0 (p.length n) ∧ |
| 5724 | ∀ v ∈ Icc 0 (p.length n), (p.copyData c u b G A j).source n |
| 5725 | (y.1, (p.geometry n).path i y.2 v) = 0 |
| 5726 | lower : ℝ |
| 5727 | upper : ℝ |
| 5728 | lower_pos : 0 < lower |
| 5729 | normal_lower : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ phasePatch n i → |
| 5730 | lower ≤ ‖(p.nativeTangent j n).normal (ParticularWaveBounds.nativePoint (p.geometry n) i x)‖ |
| 5731 | normal_upper : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ phasePatch n i → |
| 5732 | ‖(p.nativeTangent j n).normal (ParticularWaveBounds.nativePoint (p.geometry n) i x)‖ ≤ upper |
| 5733 | normal_match : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ phasePatch n i → |
| 5734 | (p.copyData c u b G A j).background.normal (nativeStrip s) p.directions n x = |
| 5735 | (p.nativeTangent j n).normal (ParticularWaveBounds.nativePoint (p.geometry n) i x) |
| 5736 | inverse_frequency : BandBound (nativeStrip s) (1 / 2) |
| 5737 | (fun n => 1 / (p.copyData c u b G A j).background.frequency n) |
| 5738 | |
| 5739 | variable {p s c u b G A j} {W : ℕ → (Q × ℝ) × Plane → ℝ} {α κ : ℝ} |
| 5740 | |
| 5741 | theorem raw_zero_of_source_path {n : ℕ} {i : Frequency} {x : (Q × ℝ) × Plane} |
| 5742 | (hf : ∀ᶠ y in 𝓝 x, |
| 5743 | ((p.geometry n).coordinates i y.2).2 ∈ Icc 0 (p.length n) ∧ |
| 5744 | ∀ v ∈ Icc 0 (p.length n), (p.copyData c u b G A j).source n |
| 5745 | (y.1, (p.geometry n).path i y.2 v) = 0) : |
| 5746 | (p.copyData c u b G A j).amplitude n i =ᶠ[𝓝 x] (fun _ => 0) ∧ |
| 5747 | (p.copyData c u b G A j).pressure n i =ᶠ[𝓝 x] (fun _ => 0) ∧ |
| 5748 | (p.copyData c u b G A j).source n =ᶠ[𝓝 x] (fun _ => 0) := by |
| 5749 | refine ⟨?_, ?_, ?_⟩ |
| 5750 | · filter_upwards [hf] with y hy |
| 5751 | exact ParticularWaveBounds.complexCopyVelocity_zero_of_path (p.nativeTangent j n) |
| 5752 | ((p.copyData c u b G A j).source n) (p.geometry n) (p.length_pos n).le i y.1 y.2 hy.2 |
| 5753 | · filter_upwards [hf] with y hy |
| 5754 | exact ParticularWaveBounds.complexCopyPressure_zero_of_path (p.nativeTangent j n) |
| 5755 | ((p.copyData c u b G A j).source n) (p.geometry n) (p.length_pos n).le i |
| 5756 | ((p.copyData c u b G A j).background.frequency n) y.1 y.2 hy.2 hy.1 |
| 5757 | · filter_upwards [hf] with y hy |
| 5758 | simpa only [Geometry.path_current, Prod.mk.eta] using hy.2 _ hy.1 |
| 5759 | |
| 5760 | theorem localized_zero_of_source_path {n : ℕ} {i : Frequency} {x : (Q × ℝ) × Plane} |
| 5761 | (hf : ∀ᶠ y in 𝓝 x, |
| 5762 | ((p.geometry n).coordinates i y.2).2 ∈ Icc 0 (p.length n) ∧ |
| 5763 | ∀ v ∈ Icc 0 (p.length n), (p.copyData c u b G A j).source n |
| 5764 | (y.1, (p.geometry n).path i y.2 v) = 0) : |
| 5765 | ((p.copyData c u b G A j).localized i).amplitude n =ᶠ[𝓝 x] (fun _ => 0) ∧ |
| 5766 | ((p.copyData c u b G A j).localized i).pressure n =ᶠ[𝓝 x] (fun _ => 0) := by |
| 5767 | obtain ⟨ha, hp, _⟩ := raw_zero_of_source_path hf |
| 5768 | constructor |
| 5769 | · filter_upwards [ha] with y hy |
| 5770 | change _ • (p.copyData c u b G A j).amplitude n i y = 0 |
| 5771 | rw [hy, smul_zero] |
| 5772 | · filter_upwards [hp] with y hy |
| 5773 | change _ * (p.copyData c u b G A j).pressure n i y = 0 |
| 5774 | rw [hy, mul_zero] |
| 5775 | |
| 5776 | theorem NativeControl.raw_jets (h : p.NativeControl s c u b G A j W α κ) : |
| 5777 | PeriodizedWaveBounds.LocalJets (nativeStrip s) |
| 5778 | (fun n x => Real.sqrt ((nativeStrip s).zeta x) * W n x) α h.phasePatch |
| 5779 | (p.copyData c u b G A j).amplitude ∧ |
| 5780 | PeriodizedWaveBounds.LocalJets (nativeStrip s) |
| 5781 | (fun n x => Real.sqrt ((nativeStrip s).zeta x) * W n x) (α + 1 / 2) h.phasePatch |
| 5782 | (p.copyData c u b G A j).pressure := |
| 5783 | ParticularCopyBounds.coefficients_jets (p.copyData c u b G A j).background |
| 5784 | (p.nativeTangent j) (p.copyData c u b G A j).source p.geometry p.length p.length_pos |
| 5785 | h.envelope W h.frame j h.phasePatch h.realControl h.imagControl h.envelope_nonneg |
| 5786 | h.envelope_compare h.normal h.normalMotion h.action h.source h.lower_pos h.normal_lower |
| 5787 | h.normal_upper h.inverse_frequency |
| 5788 | |
| 5789 | /-- The global amplitude, pressure, exact curl, and retained linear error |
| 5790 | are derived from native modal inputs for the same actual residual solve. -/ |
| 5791 | theorem NativeControl.global_bounds (h : p.NativeControl s c u b G A j W α κ) (hκ : κ ≤ 1 / 2) : |
| 5792 | WaveClass (nativeStrip s) W α (p.copyData c u b G A j).common.amplitude ∧ |
| 5793 | WaveClass (nativeStrip s) W α (p.wave s c u b G A j).amplitude ∧ |
| 5794 | WaveClass (nativeStrip s) W (α + 1 / 2) (p.copyData c u b G A j).common.pressure ∧ |
| 5795 | WaveClass (nativeStrip s) W (α + 1 / 2 - κ) |
| 5796 | ((p.copyData c u b G A j).common.curlCorrection (nativeStrip s) p.directions) ∧ |
| 5797 | WaveClass (nativeStrip s) W (α + 1 / 2 - 3 * κ) |
| 5798 | ((p.copyData c u b G A j).globalGood (nativeStrip s) p.directions) := by |
| 5799 | obtain ⟨ha, hp⟩ := h.raw_jets |
| 5800 | have hin := localInput_of_coefficients (p.copyData c u b G A j) h.background h.envelope_nonneg ha hp |
| 5801 | exact LocalizedWaveBounds.common_bounds_from_supported_native (M := h.upper) |
| 5802 | (p.copyData c u b G A j) h.cells h.cutoff_support h.phasePatch h.envelope_nonneg |
| 5803 | (hin.with_cutoff (LocalizedWaveBounds.LocalClass.of_localJets (fun _ _ _ => zero_le_one) h.cutoff)) |
| 5804 | hκ h.lower_pos |
| 5805 | (fun n i x hx hi => by |
| 5806 | rw [h.normal_match n i x hx hi] |
| 5807 | exact h.normal_lower n i x hx hi) |
| 5808 | (fun n i x hx hi => by |
| 5809 | rw [h.normal_match n i x hx hi] |
| 5810 | exact h.normal_upper n i x hx hi) |
| 5811 | (LocalizedWaveBounds.LocalClass.band_const h.inverse_frequency) |
| 5812 | (fun n i x hx hi => (h.phase_cover n i x hx hi).imp_right localized_zero_of_source_path) |
| 5813 | |
| 5814 | theorem sectionStrip_nativeStrip (s : StripData (Q × Plane)) : |
| 5815 | ParticularWaveAssembly.sectionStrip (nativeStrip s) = s := by |
| 5816 | cases s |
| 5817 | rfl |
| 5818 | |
| 5819 | theorem assembled_bounds (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 5820 | (c : Context (Q × Plane)) (u : State (Q × Plane)) (b : HarmonicBlock (Q × Plane)) |
| 5821 | (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) (N : ℕ) |
| 5822 | {W : ℕ → (Q × ℝ) × Plane → ℝ} {α κ : ℝ} |
| 5823 | (C : ∀ j ∈ ParticularWaveAssembly.modes N, p.NativeControl s c u b G A j W α κ) |
| 5824 | (hW : ∀ n x, x ∈ (nativeStrip s).domain → 0 ≤ W n x) (hκ : κ ≤ 1 / 2) : |
| 5825 | (p.updateBlock s c u b G A N).WaveBounds s |
| 5826 | (fun n x => W n (ParticularWaveAssembly.angleShuffle (x,0))) α ∧ |
| 5827 | (p.updateBlock s c u b G A N).PressureBounds s |
| 5828 | (fun n x => W n (ParticularWaveAssembly.angleShuffle (x,0))) (α + 1 / 2) ∧ |
| 5829 | (p.goodBlock s c u b G A N).WaveBounds s |
| 5830 | (fun n x => W n (ParticularWaveAssembly.angleShuffle (x,0))) (α + 1 / 2 - 3 * κ) := by |
| 5831 | have hu := ParticularWaveAssembly.assembledBlock_classes |
| 5832 | (s := ParticularWaveAssembly.sectionStrip (nativeStrip s)) N b.frequency b.phase b.angularFrequency |
| 5833 | (fun n x hx => hW n _ hx) |
| 5834 | (fun j hj => ParticularWaveAssembly.nativeSlice_waveClass ((C j hj).global_bounds hκ).2.1) |
| 5835 | (fun j hj => ParticularWaveAssembly.nativeSlice_waveClass ((C j hj).global_bounds hκ).2.2.1) |
| 5836 | have hg := ParticularWaveAssembly.assembledBlock_classes |
| 5837 | (s := ParticularWaveAssembly.sectionStrip (nativeStrip s)) (γ := (0 : ℝ)) N |
| 5838 | b.frequency b.phase b.angularFrequency (fun n x hx => hW n _ hx) |
| 5839 | (fun j hj => ParticularWaveAssembly.nativeSlice_waveClass ((C j hj).global_bounds hκ).2.2.2.2) |
| 5840 | (fun _ _ => MemClass.zero (fun n x hx => mul_nonneg (Real.sqrt_nonneg _) (hW n _ hx))) |
| 5841 | rw [sectionStrip_nativeStrip] at hu hg |
| 5842 | exact ⟨hu.1, hu.2, hg.1⟩ |
| 5843 | |
| 5844 | end ParticularParameters |
| 5845 | |
| 5846 | end PeriodizedNativeBounds |
| 5847 | |
| 5848 | section NativeEquations |
| 5849 | |
| 5850 | open Set Filter WeightedClasses HarmonicCalculus CorrectionState |
| 5851 | open scoped ContDiff Topology |
| 5852 | |
| 5853 | variable {D I : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 5854 | |
| 5855 | theorem localClass_contDiffOn_inter {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 5856 | {s : StripData D} {C : ℕ → I → Set D} {w : ℕ → I → D → ℝ} {α : ℝ} |
| 5857 | {f : ℕ → I → D → E} (hf : LocalizedWaveBounds.LocalClass s C w α f) |
| 5858 | (hC : ∀ n i, IsOpen (C n i)) (n : ℕ) (i : I) : |
| 5859 | ContDiffOn ℝ ∞ (f n i) (s.domain ∩ C n i) := |
| 5860 | (s.isOpen_domain.inter (hC n i)).contDiffOn_iff.mpr |
| 5861 | (fun x hx => hf.smooth n i x hx.1 hx.2) |
| 5862 | |
| 5863 | /-- Angular and radial geometry of the actual raw copies. The analytic |
| 5864 | bounds on the normal and material defect remain restricted to `C`. -/ |
| 5865 | structure NativeAngularGeometry (a : PeriodizedWaveBounds.CopyData D I) (s : StripData D) |
| 5866 | (d : LinearWaveBounds.GraphDirections D) (C : ℕ → I → Set D) : Prop where |
| 5867 | open_patch : ∀ n i, IsOpen (C n i) |
| 5868 | phase_smooth : ∀ n, ContDiffOn ℝ ∞ (a.background.phase n) s.domain |
| 5869 | radius_nonzero : ∀ n i x, x ∈ s.domain → x ∈ C n i → a.background.radius n x ≠ 0 |
| 5870 | radial_radius : ∀ n i x, x ∈ s.domain → x ∈ C n i → |
| 5871 | along (d.radialField n) (a.background.radius n) x = 1 |
| 5872 | radius : ∀ n, CopyAngularInvariance.Invariant d.angular (a.background.radius n) |
| 5873 | radial_base : ∀ n, CopyAngularInvariance.Invariant d.angular (a.background.radialBase n) |
| 5874 | frequency_base : ∀ n, CopyAngularInvariance.Invariant d.angular (a.background.frequencyBase n) |
| 5875 | axial_base : ∀ n, CopyAngularInvariance.Invariant d.angular (a.background.axialBase n) |
| 5876 | radial_field : ∀ n, CopyAngularInvariance.Invariant d.angular (d.radialField n) |
| 5877 | phase : ∀ n, ∃ m, CopyAngularInvariance.AffinePhase d.angular m (a.background.phase n) |
| 5878 | amplitude : ∀ i n, CopyAngularInvariance.Invariant d.angular (a.amplitude n i) |
| 5879 | pressure : ∀ i n, CopyAngularInvariance.Invariant d.angular (a.pressure n i) |
| 5880 | cutoff : ∀ i n, CopyAngularInvariance.Invariant d.angular (a.cutoff n i) |
| 5881 | |
| 5882 | theorem NativeAngularGeometry.exactOn |
| 5883 | {a : PeriodizedWaveBounds.CopyData D I} {s : StripData D} |
| 5884 | {d : LinearWaveBounds.GraphDirections D} {C : ℕ → I → Set D} |
| 5885 | {P : ℕ → I → D → ℝ} {α κ lower upper : ℝ} |
| 5886 | (g : NativeAngularGeometry a s d C) |
| 5887 | (h : LocalizedWaveBounds.InputBounds s C P α κ d (LocalizedWaveBounds.rawFamily a)) |
| 5888 | (hψ : LocalizedWaveBounds.LocalUnweighted s C 0 a.cutoff) |
| 5889 | (hκ : κ ≤ 1 / 2) (hlower : 0 < lower) |
| 5890 | (hlo : ∀ n i x, x ∈ s.domain → x ∈ C n i → lower ≤ ‖a.background.normal s d n x‖) |
| 5891 | (hhi : ∀ n i x, x ∈ s.domain → x ∈ C n i → ‖a.background.normal s d n x‖ ≤ upper) |
| 5892 | (hfreq : LocalizedWaveBounds.LocalUnweighted s C (1 / 2) |
| 5893 | (fun n _ _ => 1 / a.background.frequency n)) (n : ℕ) (i : I) : |
| 5894 | LocalizedWaveBounds.ExactOn (a.corrected s d i) s d n (s.domain ∩ C n i) := by |
| 5895 | have hn := h.with_cutoff hψ |
| 5896 | have hc := hn.curlCorrection_class hlower hlo hhi hfreq |
| 5897 | have he := hn.add_curl_amplitude hκ (fun j => hc.map (ContinuousLinearMap.proj j)) |
| 5898 | have ha i n := CopyAngularInvariance.corrected_amplitude_invariant |
| 5899 | (a := a.raw i) (s := s) (d := d) (fun n => a.cutoff n i) g.radius g.radial_field |
| 5900 | (fun _ => CopyAngularInvariance.Invariant.const _) g.phase (g.amplitude i) (g.cutoff i) n |
| 5901 | have hp i n := CopyAngularInvariance.corrected_pressure_invariant |
| 5902 | (a := a.raw i) (s := s) (d := d) (fun n => a.cutoff n i) (g.pressure i) (g.cutoff i) n |
| 5903 | refine ⟨s.isOpen_domain.inter (g.open_patch n i), |
| 5904 | localClass_contDiffOn_inter h.radial_profile g.open_patch n i, |
| 5905 | (g.phase_smooth n).mono inter_subset_left, |
| 5906 | (fun j => localClass_contDiffOn_inter (he.amplitude j) g.open_patch n i), |
| 5907 | (fun x hx => (h.radius.smooth n i x hx.1 hx.2).differentiableAt (by simp)), |
| 5908 | (fun x hx => (h.radial_base.smooth n i x hx.1 hx.2).differentiableAt (by simp)), |
| 5909 | (fun x hx => (h.frequency_base.smooth n i x hx.1 hx.2).differentiableAt (by simp)), |
| 5910 | (fun x hx => (h.axial_base.smooth n i x hx.1 hx.2).differentiableAt (by simp)), |
| 5911 | (fun x hx => (he.pressure.smooth n i x hx.1 hx.2).differentiableAt (by simp)), |
| 5912 | (fun x hx => g.radius_nonzero n i x hx.1 hx.2), |
| 5913 | (fun x hx => g.radial_radius n i x hx.1 hx.2), ?_, ?_, ?_, ?_⟩ |
| 5914 | · intro x hx j |
| 5915 | exact ((CopyAngularInvariance.base_invariant (g.radius n) (g.radial_base n) |
| 5916 | (g.frequency_base n) (g.axial_base n)).component j).along_zero x |
| 5917 | · intro j x hx |
| 5918 | exact ((ha i n).component j).along_zero x |
| 5919 | · obtain ⟨m, hm⟩ := g.phase n |
| 5920 | exact ⟨m, fun x hx => hm.directional_eq |
| 5921 | (((g.phase_smooth n).contDiffAt (s.isOpen_domain.mem_nhds hx.1)).differentiableAt (by simp))⟩ |
| 5922 | · intro x hx |
| 5923 | exact (hp i n).along_zero x |
| 5924 | |
| 5925 | /-- The generic local identity is applied only after the primitive raw |
| 5926 | principal equation has been proved by its actual ODE constructor. -/ |
| 5927 | theorem native_cancellation_of_principal |
| 5928 | {a : PeriodizedWaveBounds.CopyData D I} {s : StripData D} |
| 5929 | {d : LinearWaveBounds.GraphDirections D} {C : ℕ → I → Set D} |
| 5930 | {P : ℕ → I → D → ℝ} {α κ lower upper : ℝ} |
| 5931 | (g : NativeAngularGeometry a s d C) |
| 5932 | (h : LocalizedWaveBounds.InputBounds s C P α κ d (LocalizedWaveBounds.rawFamily a)) |
| 5933 | (hψ : LocalizedWaveBounds.LocalUnweighted s C 0 a.cutoff) |
| 5934 | (hκ : κ ≤ 1 / 2) (hlower : 0 < lower) |
| 5935 | (hlo : ∀ n i x, x ∈ s.domain → x ∈ C n i → lower ≤ ‖a.background.normal s d n x‖) |
| 5936 | (hhi : ∀ n i x, x ∈ s.domain → x ∈ C n i → ‖a.background.normal s d n x‖ ≤ upper) |
| 5937 | (hfreq : LocalizedWaveBounds.LocalUnweighted s C (1 / 2) |
| 5938 | (fun n _ _ => 1 / a.background.frequency n)) |
| 5939 | (n : ℕ) (i : I) {x : D} (hx : x ∈ s.domain) (hi : x ∈ C n i) |
| 5940 | (hsolve : (a.raw i).principal s d n x = -a.source n x) : |
| 5941 | (a.corrected s d i).harmonicResidual s d n x + |
| 5942 | (fun j => a.source n x j * carrier (a.background.frequency n) (a.background.phase n) x) = |
| 5943 | (fun j => (a.localGood s d n i x j + a.localGaussian d n i x j) * |
| 5944 | carrier (a.background.frequency n) (a.background.phase n) x) := by |
| 5945 | have hc := (h.with_cutoff hψ).curlCorrection_class hlower hlo hhi hfreq |
| 5946 | exact LocalizedWaveBounds.harmonicResidual_eq_good_add_excluded_on (a.raw i) s d |
| 5947 | (fun n => a.cutoff n i) ((a.localized i).curlCorrection s d) a.source n |
| 5948 | (g.exactOn h hψ hκ hlower hlo hhi hfreq n i) ⟨hx,hi⟩ |
| 5949 | (fun j => (h.amplitude j).smooth n i x hx hi |>.differentiableAt (by simp)) |
| 5950 | ((hψ.smooth n i x hx hi).differentiableAt (by simp)) |
| 5951 | (fun j => (hc.map (ContinuousLinearMap.proj j)).smooth n i x hx hi |>.differentiableAt (by simp)) |
| 5952 | hsolve |
| 5953 | |
| 5954 | theorem harmonicResidual_zero_germ |
| 5955 | (a : LinearWaveBounds.WaveCoefficients D) (s : StripData D) |
| 5956 | (d : LinearWaveBounds.GraphDirections D) {n : ℕ} {x : D} |
| 5957 | (ha : a.amplitude n =ᶠ[𝓝 x] fun _ => 0) (hp : a.pressure n =ᶠ[𝓝 x] fun _ => 0) : |
| 5958 | a.harmonicResidual s d n =ᶠ[𝓝 x] fun _ => 0 := by |
| 5959 | have hv : vectorMode (a.frequency n) (a.phase n) (a.amplitude n) =ᶠ[𝓝 x] fun _ => 0 := by |
| 5960 | filter_upwards [ha] with y hy |
| 5961 | ext j |
| 5962 | simp only [vectorMode, mode, hy, Pi.zero_apply, zero_mul] |
| 5963 | have hpr : mode (a.frequency n) (a.phase n) (a.pressure n) =ᶠ[𝓝 x] fun _ => 0 := by |
| 5964 | filter_upwards [hp] with y hy |
| 5965 | simp only [mode, hy, zero_mul] |
| 5966 | have hh := ParticularWaveAssembly.linearResidual_germ hv hpr (s.epsilon n) (a.radius n) |
| 5967 | (d.radialField n) (fun _ => d.angular) (d.axialField s n) |
| 5968 | (LinearWaveResidual.timeDirection (s.epsilon n) (d.fastField n) (fun _ => d.slow)) |
| 5969 | (LinearWaveResidual.complexBase (a.radius n) (a.radialBase n) (a.frequencyBase n) (a.axialBase n)) |
| 5970 | simp only [PeriodizedWaveBounds.linearResidual_zero] at hh |
| 5971 | exact hh |
| 5972 | |
| 5973 | theorem local_cancellation_of_zero_germs |
| 5974 | (a : PeriodizedWaveBounds.CopyData D I) (s : StripData D) |
| 5975 | (d : LinearWaveBounds.GraphDirections D) {n : ℕ} {i : I} {x : D} |
| 5976 | (ha : (a.localized i).amplitude n =ᶠ[𝓝 x] fun _ => 0) |
| 5977 | (hp : (a.localized i).pressure n =ᶠ[𝓝 x] fun _ => 0) |
| 5978 | (hg : a.localGaussian d n i =ᶠ[𝓝 x] fun _ => 0) |
| 5979 | (hf : a.source n =ᶠ[𝓝 x] fun _ => 0) : |
| 5980 | (a.corrected s d i).harmonicResidual s d n x + |
| 5981 | (fun j => a.source n x j * carrier (a.background.frequency n) (a.background.phase n) x) = |
| 5982 | (fun j => (a.localGood s d n i x j + a.localGaussian d n i x j) * |
| 5983 | carrier (a.background.frequency n) (a.background.phase n) x) := by |
| 5984 | have hz := (LocalizedWaveBounds.nativeFamily a).outputs_zero_germs s d ha hp |
| 5985 | have hcor : (a.corrected s d i).amplitude n =ᶠ[𝓝 x] fun _ => 0 := hz.2.1 |
| 5986 | have hgood : a.localGood s d n i =ᶠ[𝓝 x] fun _ => 0 := hz.2.2 |
| 5987 | have hres := harmonicResidual_zero_germ (a.corrected s d i) s d hcor hp |
| 5988 | rw [hres.self_of_nhds, hf.self_of_nhds, hgood.self_of_nhds, hg.self_of_nhds] |
| 5989 | ext j |
| 5990 | simp |
| 5991 | |
| 5992 | namespace PeriodizedSignedParameters |
| 5993 | |
| 5994 | variable {p : PeriodizedSignedParameters D I} {s : StripData D} |
| 5995 | {P : ℕ → D → ℝ} {κ β : ℝ} (h : p.NativeControl s P κ) |
| 5996 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 5997 | |
| 5998 | /-- Primitive angular identities and the fixed unit fundamental's ODE. |
| 5999 | The signed principal equation and every cutoff/curl identity are derived. -/ |
| 6000 | structure NativeDynamics where |
| 6001 | slope : ℕ → ℝ |
| 6002 | angular : ∀ i, SignedWaveUpdate.AngularInputs (HarmonicWaveInteraction.productStrip s) |
| 6003 | p.directions p.base (p.matrix i) (p.target i) request (p.mask i) (p.fundamental i) |
| 6004 | (p.normalMotion i) (p.action i) (p.cutoff i) slope |
| 6005 | open_patch : ∀ n i, IsOpen (h.phasePatch n i) |
| 6006 | radius_nonzero : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 6007 | x ∈ h.phasePatch n i → p.base.radius n x ≠ 0 |
| 6008 | radial_radius : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → |
| 6009 | x ∈ h.phasePatch n i → along (p.directions.radialField n) (p.base.radius n) x = 1 |
| 6010 | matrix_frozen : ∀ i, SignedWaveUpdate.FrozenAlong p.directions.fast (p.matrix i) |
| 6011 | target_frozen : ∀ i, SignedWaveUpdate.FrozenAlong p.directions.fast (p.target i) |
| 6012 | request_frozen : SignedWaveUpdate.FrozenAlong p.directions.fast request |
| 6013 | mask_frozen : ∀ i, SignedWaveUpdate.FrozenAlong p.directions.fast (p.mask i) |
| 6014 | frequency_nonzero : ∀ n, p.base.frequency n ≠ 0 |
| 6015 | ode : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.phasePatch n i → |
| 6016 | along (p.directions.fastField n) (p.fundamental i n) x = |
| 6017 | TangentProjection.projectedRhs |
| 6018 | (p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x) |
| 6019 | (p.normalMotion i n x) (p.fundamental i n x) (p.action i n x (p.fundamental i n x)) 0 |
| 6020 | (s.epsilon n * p.base.frequency n ^ 2 * |
| 6021 | ‖p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x‖ ^ 2) |
| 6022 | action_eq : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.phasePatch n i → |
| 6023 | CurlClassBounds.complexify (p.action i n x (p.fundamental i n x)) = |
| 6024 | LinearWaveResidual.shear (p.base.radius n) (p.base.frequencyBase n) (p.base.axialBase n) |
| 6025 | (p.directions.radialField n) (fun y => CurlClassBounds.complexify (p.fundamental i n y)) x |
| 6026 | |
| 6027 | variable {h request} |
| 6028 | |
| 6029 | theorem NativeDynamics.angularGeometry (d : NativeDynamics h request) (i₀ : I) : |
| 6030 | NativeAngularGeometry (p.copyData s request) (HarmonicWaveInteraction.productStrip s) |
| 6031 | p.directions h.phasePatch := |
| 6032 | ⟨d.open_patch, (d.angular i₀).phase_smooth, d.radius_nonzero, d.radial_radius, |
| 6033 | (d.angular i₀).radius, (d.angular i₀).radial_base, (d.angular i₀).frequency_base, |
| 6034 | (d.angular i₀).axial_base, (d.angular i₀).radialField, |
| 6035 | fun n => ⟨d.slope n, (d.angular i₀).phase n⟩, |
| 6036 | fun i => (d.angular i).amplitude p.column, fun i => (d.angular i).pressure p.column, |
| 6037 | fun i => (d.angular i).cutoff⟩ |
| 6038 | |
| 6039 | theorem NativeDynamics.principal (d : NativeDynamics h request) |
| 6040 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 6041 | (n : ℕ) (i : I) {x : D × ℝ} (hx : x ∈ (HarmonicWaveInteraction.productStrip s).domain) |
| 6042 | (hi : x ∈ h.phasePatch n i) : |
| 6043 | ((p.copyData s request).raw i).principal (HarmonicWaveInteraction.productStrip s) p.directions n x = 0 := |
| 6044 | NativePrincipalEquations.signed_coefficients_principal_at (a := fun _ => p.base) |
| 6045 | (dirs := fun _ => p.directions) h.covariance |
| 6046 | (fun j => PeriodizedWaveBounds.LocalJets.of_memClass (hR j)) h.mask h.fundamental |
| 6047 | p.column n i hx hi (d.matrix_frozen i) (d.target_frozen i) d.request_frozen (d.mask_frozen i) |
| 6048 | (d.frequency_nonzero n) (d.ode n i x hx hi) (d.action_eq n i x hx hi) |
| 6049 | |
| 6050 | theorem NativeDynamics.local_equation (d : NativeDynamics h request) (hκ : κ ≤ 1 / 2) |
| 6051 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 6052 | (n : ℕ) (i : I) {x : D × ℝ} (hx : x ∈ (HarmonicWaveInteraction.productStrip s).domain) |
| 6053 | (hi : x ∈ h.phasePatch n i) : |
| 6054 | ((p.copyData s request).corrected (HarmonicWaveInteraction.productStrip s) p.directions i).harmonicResidual |
| 6055 | (HarmonicWaveInteraction.productStrip s) p.directions n x + |
| 6056 | (fun j => (p.copyData s request).source n x j * carrier (p.base.frequency n) (p.base.phase n) x) = |
| 6057 | (fun j => ((p.copyData s request).localGood (HarmonicWaveInteraction.productStrip s) p.directions n i x j + |
| 6058 | (p.copyData s request).localGaussian p.directions n i x j) * carrier (p.base.frequency n) (p.base.phase n) x) := by |
| 6059 | obtain ⟨ha, hp⟩ := h.raw_jets request hR |
| 6060 | have hin := localInput_of_coefficients (p.copyData s request) h.background |
| 6061 | (fun n x hx => h.envelope_nonneg n x.1 hx) ha |
| 6062 | (by simp only [show β + 1 / 2 + 1 / 2 = β + 1 by ring]; exact hp) |
| 6063 | exact native_cancellation_of_principal (d.angularGeometry i) hin |
| 6064 | (LocalizedWaveBounds.LocalClass.of_localJets (fun _ _ _ => zero_le_one) h.cutoff) |
| 6065 | hκ h.lower_pos h.normal_lower h.normal_upper |
| 6066 | (LocalizedWaveBounds.LocalClass.band_const h.inverse_frequency) n i hx hi |
| 6067 | (by simpa only [copyData, Pi.zero_apply, neg_zero] using d.principal hR n i hx hi) |
| 6068 | |
| 6069 | /-- The literal signed common curl has its actual retained good term and |
| 6070 | Gaussian derivative tail on the entire lift. Native ODE input is needed |
| 6071 | only on the supported phase patches. -/ |
| 6072 | theorem NativeDynamics.common_equation (d : NativeDynamics h request) (hκ : κ ≤ 1 / 2) |
| 6073 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 6074 | (n : ℕ) {x : D × ℝ} (hx : x ∈ (HarmonicWaveInteraction.productStrip s).domain) : |
| 6075 | ((p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions).harmonicResidual |
| 6076 | (HarmonicWaveInteraction.productStrip s) p.directions n x = |
| 6077 | (fun j => ((p.copyData s request).globalGood (HarmonicWaveInteraction.productStrip s) p.directions n x j + |
| 6078 | (p.copyData s request).globalGaussian p.directions n x j) * carrier (p.base.frequency n) (p.base.phase n) x) := by |
| 6079 | let a := p.copyData s request |
| 6080 | have hzsource (m : ℕ) (y : D × ℝ) : a.source m =ᶠ[𝓝 y] fun _ => 0 := |
| 6081 | Filter.Eventually.of_forall (fun _ => rfl) |
| 6082 | have hl : ∀ m i y, y ∈ (HarmonicWaveInteraction.productStrip s).domain → y ∈ h.cells.carrier m i → |
| 6083 | (a.corrected (HarmonicWaveInteraction.productStrip s) p.directions i).harmonicResidual |
| 6084 | (HarmonicWaveInteraction.productStrip s) p.directions m y + |
| 6085 | (fun j => a.source m y j * carrier (a.background.frequency m) (a.background.phase m) y) = |
| 6086 | (fun j => (a.localGood (HarmonicWaveInteraction.productStrip s) p.directions m i y j + |
| 6087 | a.localGaussian p.directions m i y j) * carrier (a.background.frequency m) (a.background.phase m) y) := by |
| 6088 | intro m i y hy hi |
| 6089 | rcases h.phase_cover m i y hy hi with hC | hcut | hmask |
| 6090 | · exact d.local_equation hκ hR m i hy hC |
| 6091 | · have hz := a.localized_zero_germs hcut |
| 6092 | have hg : a.localGaussian p.directions m i =ᶠ[𝓝 y] fun _ => 0 := by |
| 6093 | filter_upwards [a.localTail_zero_germ p.directions hcut] with z hz |
| 6094 | rw [a.localGaussian_eq, hz] |
| 6095 | simp only [a, copyData, smul_zero, add_zero] |
| 6096 | exact local_cancellation_of_zero_germs a _ _ hz.1 hz.2 hg (hzsource m y) |
| 6097 | · have hz := localized_zero_of_mask (s := s) request hmask |
| 6098 | have hu : a.amplitude m i =ᶠ[𝓝 y] fun _ => 0 := by |
| 6099 | filter_upwards [hmask] with z hz |
| 6100 | exact (raw_zero_of_mask request m i z hz).1 |
| 6101 | exact local_cancellation_of_zero_germs a _ _ hz.1 hz.2 |
| 6102 | (a.localGaussian_zero_of_fields p.directions hu (hzsource m y)) (hzsource m y) |
| 6103 | have he := a.common_cancellation h.cells h.cutoff_support |
| 6104 | (HarmonicWaveInteraction.productStrip s) p.directions hl n hx |
| 6105 | have hz : (fun j => a.source n x j * carrier (a.background.frequency n) (a.background.phase n) x) = 0 := by |
| 6106 | ext j |
| 6107 | exact zero_mul _ |
| 6108 | simp only [hz, add_zero] at he |
| 6109 | exact he |
| 6110 | |
| 6111 | end PeriodizedSignedParameters |
| 6112 | |
| 6113 | namespace ParticularParameters |
| 6114 | |
| 6115 | open CommonCoverSolve TorusInverse ParticularWaveAssembly CopyAngularInvariance |
| 6116 | |
| 6117 | variable {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 6118 | {p : ParticularParameters Q} {s : StripData (Q × Plane)} |
| 6119 | {c : Context (Q × Plane)} {u : State (Q × Plane)} {b : HarmonicBlock (Q × Plane)} |
| 6120 | {G A : HarmonicResidual.BlockCoefficients (Q × Plane)} {j : ℤ} |
| 6121 | {W : ℕ → (Q × ℝ) × Plane → ℝ} {α κ : ℝ} |
| 6122 | (h : p.NativeControl s c u b G A j W α κ) |
| 6123 | |
| 6124 | structure NativeDynamics : Prop where |
| 6125 | background : BackgroundControl (nativeStrip s) p.directions p.background b j |
| 6126 | open_patch : ∀ n i, IsOpen (h.phasePatch n i) |
| 6127 | frequency_nonzero : ∀ n, (j : ℝ) * b.frequency n ≠ 0 |
| 6128 | damping : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ h.phasePatch n i → |
| 6129 | (p.nativeTangent j n).damping (ParticularWaveBounds.nativePoint (p.geometry n) i x) = |
| 6130 | s.epsilon n * ((j : ℝ) * b.frequency n) ^ 2 * |
| 6131 | ‖(p.copyData c u b G A j).background.normal (nativeStrip s) p.directions n x‖ ^ 2 |
| 6132 | fast : ∀ n, p.directions.fastScale n • p.directions.fast = |
| 6133 | ((0 : Q × ℝ), ParticularWaveBounds.slotDirection (p.geometry n)) |
| 6134 | action : ∀ n i x, x ∈ (nativeStrip s).domain → x ∈ h.phasePatch n i → ∀ z : ProblemStatement.Space, |
| 6135 | CurlClassBounds.complexify ((p.nativeTangent j n).action |
| 6136 | (ParticularWaveBounds.nativePoint (p.geometry n) i x) z) = |
| 6137 | LinearWaveResidual.shear (p.background.radius n) (p.background.frequencyBase n) |
| 6138 | (p.background.axialBase n) (p.directions.radialField n) (fun _ => CurlClassBounds.complexify z) x |
| 6139 | |
| 6140 | variable {h} |
| 6141 | |
| 6142 | theorem NativeDynamics.angularGeometry (d : NativeDynamics h) : |
| 6143 | NativeAngularGeometry (p.copyData c u b G A j) (nativeStrip s) p.directions h.phasePatch := by |
| 6144 | refine ⟨d.open_patch, d.background.phase_smooth, |
| 6145 | (fun n _ x hx _ => d.background.radius_ne n x hx), |
| 6146 | (fun n _ x hx _ => d.background.radial_radius n x hx), |
| 6147 | d.background.radius_invariant, d.background.radial_base_invariant, |
| 6148 | d.background.frequency_base_invariant, d.background.axial_base_invariant, |
| 6149 | d.background.radial_invariant, ?_, ?_, ?_, ?_⟩ |
| 6150 | · intro n |
| 6151 | rw [d.background.angular] |
| 6152 | exact ⟨_, actualCarrier_affine p.background b j n⟩ |
| 6153 | · intro i n |
| 6154 | rw [d.background.angular] |
| 6155 | exact complexCopyVelocity_invariant (angleTangent_invariant _) (angleLift_invariant _) |
| 6156 | (p.geometry n) (p.length_pos n).le i |
| 6157 | · intro i n |
| 6158 | rw [d.background.angular] |
| 6159 | exact complexCopyPressure_invariant (angleTangent_invariant _) (angleLift_invariant _) |
| 6160 | (p.geometry n) (p.length_pos n).le i _ |
| 6161 | · intro i n |
| 6162 | rw [d.background.angular] |
| 6163 | exact nativeCutoff_invariant ((0 : Q), (1 : ℝ)) (p.geometry n) (p.cutoff n) i |
| 6164 | |
| 6165 | theorem NativeDynamics.principal (d : NativeDynamics h) |
| 6166 | (n : ℕ) (i : Frequency) {x : (Q × ℝ) × Plane} |
| 6167 | (hx : x ∈ (nativeStrip s).domain) (hi : x ∈ h.phasePatch n i) : |
| 6168 | ((p.copyData c u b G A j).raw i).principal (nativeStrip s) p.directions n x = |
| 6169 | -(p.copyData c u b G A j).source n x := |
| 6170 | NativePrincipalEquations.complexCopyCoefficients_principal_at |
| 6171 | (p.copyData c u b G A j).background p.length_pos h.realControl h.imagControl n i hx hi |
| 6172 | (d.frequency_nonzero n) (h.normal_match n i x hx hi) (d.damping n i x hx hi) |
| 6173 | (d.fast n) (d.action n i x hx hi) |
| 6174 | |
| 6175 | theorem NativeDynamics.local_equation (d : NativeDynamics h) (hκ : κ ≤ 1 / 2) |
| 6176 | (n : ℕ) (i : Frequency) {x : (Q × ℝ) × Plane} |
| 6177 | (hx : x ∈ (nativeStrip s).domain) (hi : x ∈ h.phasePatch n i) : |
| 6178 | ((p.copyData c u b G A j).corrected (nativeStrip s) p.directions i).harmonicResidual |
| 6179 | (nativeStrip s) p.directions n x + |
| 6180 | (fun k => (p.copyData c u b G A j).source n x k * |
| 6181 | carrier ((j : ℝ) * b.frequency n) ((actualCarrier p.background b j).phase n) x) = |
| 6182 | (fun k => ((p.copyData c u b G A j).localGood (nativeStrip s) p.directions n i x k + |
| 6183 | (p.copyData c u b G A j).localGaussian p.directions n i x k) * |
| 6184 | carrier ((j : ℝ) * b.frequency n) ((actualCarrier p.background b j).phase n) x) := by |
| 6185 | obtain ⟨ha, hp⟩ := h.raw_jets |
| 6186 | have hin := localInput_of_coefficients (p.copyData c u b G A j) h.background h.envelope_nonneg ha hp |
| 6187 | exact native_cancellation_of_principal d.angularGeometry hin |
| 6188 | (LocalizedWaveBounds.LocalClass.of_localJets (fun _ _ _ => zero_le_one) h.cutoff) |
| 6189 | hκ h.lower_pos |
| 6190 | (fun n i x hx hi => by rw [h.normal_match n i x hx hi]; exact h.normal_lower n i x hx hi) |
| 6191 | (fun n i x hx hi => by rw [h.normal_match n i x hx hi]; exact h.normal_upper n i x hx hi) |
| 6192 | (LocalizedWaveBounds.LocalClass.band_const h.inverse_frequency) n i hx hi (d.principal n i hx hi) |
| 6193 | |
| 6194 | /-- The actual inhomogeneous common wave cancels the literal HR source |
| 6195 | on the whole lift, including the uncovered-source term in its Gaussian. -/ |
| 6196 | theorem NativeDynamics.common_equation (d : NativeDynamics h) (hκ : κ ≤ 1 / 2) |
| 6197 | (n : ℕ) {x : (Q × ℝ) × Plane} (hx : x ∈ (nativeStrip s).domain) : |
| 6198 | (p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n x + |
| 6199 | (fun k => (p.copyData c u b G A j).source n x k * |
| 6200 | carrier ((j : ℝ) * b.frequency n) ((actualCarrier p.background b j).phase n) x) = |
| 6201 | (fun k => ((p.copyData c u b G A j).globalGood (nativeStrip s) p.directions n x k + |
| 6202 | (p.copyData c u b G A j).globalGaussian p.directions n x k) * |
| 6203 | carrier ((j : ℝ) * b.frequency n) ((actualCarrier p.background b j).phase n) x) := by |
| 6204 | apply (p.copyData c u b G A j).common_cancellation h.cells h.cutoff_support (nativeStrip s) p.directions _ n hx |
| 6205 | intro m i y hy hi |
| 6206 | rcases h.phase_cover m i y hy hi with hC | hpath |
| 6207 | · exact d.local_equation hκ m i hy hC |
| 6208 | · have hz := localized_zero_of_source_path (p := p) (c := c) (u := u) (b := b) (G := G) (A := A) (j := j) hpath |
| 6209 | have hr := raw_zero_of_source_path (p := p) (c := c) (u := u) (b := b) (G := G) (A := A) (j := j) hpath |
| 6210 | exact local_cancellation_of_zero_germs _ _ _ hz.1 hz.2 |
| 6211 | ((p.copyData c u b G A j).localGaussian_zero_of_fields p.directions hr.1 hr.2.2) hr.2.2 |
| 6212 | |
| 6213 | end ParticularParameters |
| 6214 | |
| 6215 | end NativeEquations |
| 6216 | |
| 6217 | section PeriodizedSignedLinear |
| 6218 | open Set Filter WeightedClasses HarmonicCalculus CorrectionState |
| 6219 | open scoped ContDiff Topology |
| 6220 | |
| 6221 | variable {D I : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 6222 | |
| 6223 | namespace NativeAngularGeometry |
| 6224 | variable {a : PeriodizedWaveBounds.CopyData D I} {s : StripData D} |
| 6225 | {d : LinearWaveBounds.GraphDirections D} {C : ℕ → I → Set D} |
| 6226 | (g : NativeAngularGeometry a s d C) |
| 6227 | |
| 6228 | include g |
| 6229 | |
| 6230 | theorem common_amplitude (n : ℕ) : |
| 6231 | CopyAngularInvariance.Invariant d.angular (a.common.amplitude n) := |
| 6232 | a.common_amplitude_invariant d.angular (fun n i => g.cutoff i n) |
| 6233 | (fun n i => g.amplitude i n) n |
| 6234 | |
| 6235 | theorem common_pressure (n : ℕ) : |
| 6236 | CopyAngularInvariance.Invariant d.angular (a.common.pressure n) := |
| 6237 | a.common_pressure_invariant d.angular (fun n i => g.cutoff i n) |
| 6238 | (fun n i => g.pressure i n) n |
| 6239 | |
| 6240 | theorem corrected_amplitude (n : ℕ) : |
| 6241 | CopyAngularInvariance.Invariant d.angular ((a.commonCorrected s d).amplitude n) := |
| 6242 | a.commonCorrected_invariant s d d.angular (fun n i => g.cutoff i n) |
| 6243 | (fun n i => g.amplitude i n) g.radius g.radial_field |
| 6244 | (fun _ => CopyAngularInvariance.Invariant.const _) g.phase n |
| 6245 | |
| 6246 | theorem good (n : ℕ) : |
| 6247 | CopyAngularInvariance.Invariant d.angular (a.globalGood s d n) := |
| 6248 | a.globalGood_invariant s d (fun n i => g.cutoff i n) (fun n i => g.amplitude i n) |
| 6249 | (fun n i => g.pressure i n) g.radius g.radial_base g.frequency_base g.axial_base |
| 6250 | g.radial_field (fun _ => CopyAngularInvariance.Invariant.const _) g.phase n |
| 6251 | |
| 6252 | theorem gaussian (hf : ∀ n, CopyAngularInvariance.Invariant d.angular (a.source n)) (n : ℕ) : |
| 6253 | CopyAngularInvariance.Invariant d.angular (a.globalGaussian d n) := |
| 6254 | a.globalGaussian_invariant d d.angular (fun n i => g.cutoff i n) |
| 6255 | (fun n i => g.amplitude i n) hf n |
| 6256 | end NativeAngularGeometry |
| 6257 | |
| 6258 | namespace PeriodizedSignedParameters |
| 6259 | variable {p : PeriodizedSignedParameters D I} {s : StripData D} |
| 6260 | {P : ℕ → D → ℝ} {κ β : ℝ} {h : p.NativeControl s P κ} |
| 6261 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 6262 | (d : NativeDynamics h request) (i₀ : I) |
| 6263 | |
| 6264 | include i₀ in |
| 6265 | theorem NativeDynamics.phase_eq (hθ : p.directions.angular = (0,1)) |
| 6266 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) |
| 6267 | (n : ℕ) (x : D) (θ : ℝ) : |
| 6268 | p.base.frequency n * p.base.phase n (x,θ) = |
| 6269 | p.base.frequency n * p.base.phase n (x,0) + (p.angularFrequency n : ℝ) * θ := by |
| 6270 | rw [CopyAngularInvariance.affinePhase_eq_zeroSlice |
| 6271 | (Φ := p.base.phase n) (m := d.slope n) |
| 6272 | (by simpa only [hθ] using (d.angular i₀).phase n) x θ, |
| 6273 | mul_add, ← mul_assoc, hkp] |
| 6274 | |
| 6275 | include i₀ in |
| 6276 | theorem NativeDynamics.exact_represents (hθ : p.directions.angular = (0,1)) |
| 6277 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) : |
| 6278 | let z := (p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions |
| 6279 | (p.exactBlock s request).oscillation = |
| 6280 | (fun n x i => (vectorMode (p.base.frequency n) (p.base.phase n) (z.amplitude n) x i).re) ∧ |
| 6281 | (p.exactBlock s request).oscillatoryPressure = |
| 6282 | (fun n x => (mode (p.base.frequency n) (p.base.phase n) (z.pressure n) x).re) := by |
| 6283 | apply SignedWaveUpdate.blockOfCoefficients_represents |
| 6284 | · intro n x θ |
| 6285 | exact CopyAngularInvariance.invariant_eq_zeroSlice |
| 6286 | (by simpa only [hθ] using (d.angularGeometry i₀).corrected_amplitude n) x θ |
| 6287 | · intro n x θ |
| 6288 | exact CopyAngularInvariance.invariant_eq_zeroSlice |
| 6289 | (by |
| 6290 | have hp := (d.angularGeometry i₀).common_pressure n |
| 6291 | simp only [hθ] at hp |
| 6292 | exact hp) x θ |
| 6293 | · exact d.phase_eq i₀ hθ hkp |
| 6294 | |
| 6295 | include i₀ in |
| 6296 | theorem NativeDynamics.good_represents (hθ : p.directions.angular = (0,1)) |
| 6297 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) : |
| 6298 | (p.goodBlock s request).oscillation = fun n x i => |
| 6299 | ((p.copyData s request).globalGood (HarmonicWaveInteraction.productStrip s) |
| 6300 | p.directions n x i * carrier (p.base.frequency n) (p.base.phase n) x).re := by |
| 6301 | let z : LinearWaveBounds.WaveCoefficients (D × ℝ) := |
| 6302 | {p.base with amplitude := ((p.copyData s request).globalGood |
| 6303 | (HarmonicWaveInteraction.productStrip s) p.directions), pressure := 0} |
| 6304 | exact (SignedWaveUpdate.blockOfCoefficients_represents z p.angularFrequency |
| 6305 | (fun n x θ => CopyAngularInvariance.invariant_eq_zeroSlice |
| 6306 | (by simpa only [hθ] using (d.angularGeometry i₀).good n) x θ) |
| 6307 | (fun _ _ _ => rfl) (d.phase_eq i₀ hθ hkp)).1 |
| 6308 | |
| 6309 | include i₀ in |
| 6310 | theorem NativeDynamics.gaussian_represents (hθ : p.directions.angular = (0,1)) |
| 6311 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) : |
| 6312 | (p.gaussianBlock s request).oscillation = fun n x i => |
| 6313 | ((p.copyData s request).globalGaussian p.directions n x i * |
| 6314 | carrier (p.base.frequency n) (p.base.phase n) x).re := by |
| 6315 | let z : LinearWaveBounds.WaveCoefficients (D × ℝ) := |
| 6316 | {p.base with amplitude := (p.copyData s request).globalGaussian p.directions, pressure := 0} |
| 6317 | exact (SignedWaveUpdate.blockOfCoefficients_represents z p.angularFrequency |
| 6318 | (fun n x θ => CopyAngularInvariance.invariant_eq_zeroSlice |
| 6319 | (by simpa only [hθ] using ((d.angularGeometry i₀).gaussian |
| 6320 | (fun _ => CopyAngularInvariance.Invariant.const _) n)) x θ) |
| 6321 | (fun _ _ _ => rfl) (d.phase_eq i₀ hθ hkp)).1 |
| 6322 | |
| 6323 | theorem frame_common (p : PeriodizedSignedParameters D I) (s : StripData D) |
| 6324 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) {c : Context D} |
| 6325 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) : |
| 6326 | WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions |
| 6327 | ((p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions) := |
| 6328 | ⟨hm.epsilon, hm.radius, hm.radial, hm.angular, hm.axial, hm.time, |
| 6329 | hm.radialBase, hm.angularBase, hm.axialBase⟩ |
| 6330 | |
| 6331 | theorem exactBlock_zero (p : PeriodizedSignedParameters D I) (s : StripData D) |
| 6332 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 6333 | HarmonicWaveInteraction.ZeroMode (p.exactBlock s request) := |
| 6334 | (SignedWaveUpdate.coefficientBlock_zero_coefficient _ _ _ _ _).1 |
| 6335 | |
| 6336 | theorem exactBlock_pressure_zero (p : PeriodizedSignedParameters D I) (s : StripData D) |
| 6337 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) : |
| 6338 | ∀ n, (p.exactBlock s request).pressure n 0 = 0 := |
| 6339 | (SignedWaveUpdate.coefficientBlock_zero_coefficient _ _ _ _ _).2 |
| 6340 | |
| 6341 | include i₀ in |
| 6342 | /-- The periodized signed update satisfies the actual context linear |
| 6343 | operator, with the computed Gaussian term retained. -/ |
| 6344 | theorem NativeDynamics.context_linear_identity (hκ : κ ≤ 1 / 2) |
| 6345 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x i)) |
| 6346 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) |
| 6347 | (c : Context D) (hB : MeanIncrementBounds.SmoothTriple s.domain c.base) |
| 6348 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 6349 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 6350 | (a : HarmonicBlock D) (hcarrier : SameCarrier a (p.exactBlock s request)) |
| 6351 | (n : ℕ) (x : D × ℝ) (hx : x.1 ∈ s.domain) : |
| 6352 | linearBlockField c a (p.exactBlock s request) n x = |
| 6353 | (p.goodBlock s request).oscillation n x + (p.gaussianBlock s request).oscillation n x := by |
| 6354 | let z := (p.copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) p.directions |
| 6355 | have hb := h.global_bounds hκ request hR |
| 6356 | have hr : ContDiffOn ℝ ∞ (radialDirection c n) (HarmonicResidual.liftDomain s.domain) := |
| 6357 | HarmonicResidual.liftDirection_smooth (hrad n) |
| 6358 | have hz : ContDiffOn ℝ ∞ (axialDirection c n) (HarmonicResidual.liftDomain s.domain) := contDiffOn_const |
| 6359 | have hphase := (d.angular i₀).phase_smooth n |
| 6360 | rw [productStrip_domain] at hphase |
| 6361 | have hv (i : Fin 3) : ContDiffOn ℝ ∞ (fun y => z.amplitude n y i) |
| 6362 | (HarmonicResidual.liftDomain s.domain) := by |
| 6363 | simpa only [productStrip_domain] using (CurlClassBounds.class_component hb.2.1 i).smooth n |
| 6364 | have hp : ContDiffOn ℝ ∞ (z.pressure n) (HarmonicResidual.liftDomain s.domain) := by |
| 6365 | have hp := hb.2.2.1.smooth n |
| 6366 | simp only [productStrip_domain] at hp |
| 6367 | exact hp |
| 6368 | have hvrep : (HarmonicWaveInteraction.withCarrier a (p.exactBlock s request)).oscillation n = |
| 6369 | fun y i => (vectorMode (z.frequency n) (z.phase n) (z.amplitude n) y i).re := by |
| 6370 | rw [withCarrier_of_same hcarrier] |
| 6371 | exact congrFun (d.exact_represents i₀ hm.angular hkp).1 n |
| 6372 | have hprep : (HarmonicWaveInteraction.withCarrier a (p.exactBlock s request)).oscillatoryPressure n = |
| 6373 | fun y => (mode (z.frequency n) (z.phase n) (z.pressure n) y).re := by |
| 6374 | rw [withCarrier_of_same hcarrier] |
| 6375 | exact congrFun (d.exact_represents i₀ hm.angular hkp).2 n |
| 6376 | rw [linearBlockField_eq_modeResidual s.isOpen_domain c a (p.exactBlock s request) |
| 6377 | (HarmonicWaveInteraction.productStrip s) p.directions z (p.frame_common s request hm) |
| 6378 | n hB hr hz hphase hv hp hvrep hprep ⟨hx, trivial⟩] |
| 6379 | rw [d.good_represents i₀ hm.angular hkp, d.gaussian_represents i₀ hm.angular hkp] |
| 6380 | funext i |
| 6381 | have he := congrArg Complex.re (congrFun (d.common_equation hκ hR n hx) i) |
| 6382 | simpa only [add_mul, Complex.add_re, Pi.add_apply] using he |
| 6383 | |
| 6384 | include i₀ in |
| 6385 | /-- This is the literal HWI linear remainder of the constructed common |
| 6386 | signed block; its class follows from the native quotient and unit ODE. -/ |
| 6387 | theorem NativeDynamics.linearGood_bounds (hκ : κ ≤ 1 / 2) |
| 6388 | (hR : ∀ i, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x i)) |
| 6389 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) |
| 6390 | (hkpne : ∀ n, p.angularFrequency n ≠ 0) |
| 6391 | (c : Context D) (hB : MeanIncrementBounds.SmoothTriple s.domain c.base) |
| 6392 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 6393 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 6394 | (a : HarmonicBlock D) (hcarrier : SameCarrier a (p.exactBlock s request)) : |
| 6395 | (HarmonicWaveInteraction.linearGoodBlock c a (p.exactBlock s request) |
| 6396 | (p.gaussianBlock s request).velocity).WaveBounds s P (β + 1 - 3 * κ) := by |
| 6397 | let zero : HarmonicBlock D := ErrorHarmonics.zeroBlock a.frequency a.phase a.angularFrequency 0 |
| 6398 | have hb := h.block_bounds hκ request hR |
| 6399 | have hbs := HarmonicWaveInteraction.waveBounds_smooth hb.2.1 (p.exactBlock_zero s request) |
| 6400 | have hps (n : ℕ) : HarmonicResidual.SmoothCoefficients s.domain ((p.exactBlock s request).pressure n) := by |
| 6401 | intro j |
| 6402 | by_cases hj : j = 0 |
| 6403 | · subst j |
| 6404 | rw [p.exactBlock_pressure_zero s request n] |
| 6405 | exact contDiffOn_const |
| 6406 | exact (hb.2.2.1 j hj).smooth n |
| 6407 | have hphase (n : ℕ) : ContDiffOn ℝ ∞ (a.phase n) s.domain := by |
| 6408 | rw [← hcarrier.phase] |
| 6409 | exact ((d.angular i₀).phase_smooth n).comp (SignedWaveUpdate.zeroSection (D := D)).contDiff.contDiffOn |
| 6410 | (fun x hx => hx) |
| 6411 | have hkp' (n : ℕ) : a.angularFrequency n ≠ 0 := by |
| 6412 | rw [← hcarrier.angular] |
| 6413 | exact hkpne n |
| 6414 | have hgcarrier : SameCarrier a (p.goodBlock s request) := |
| 6415 | ⟨hcarrier.frequency, hcarrier.phase, hcarrier.angular⟩ |
| 6416 | have hecarrier : SameCarrier a (p.gaussianBlock s request) := |
| 6417 | ⟨hcarrier.frequency, hcarrier.phase, hcarrier.angular⟩ |
| 6418 | have hc := linearGoodBlock_cancel_mem c a (p.exactBlock s request) zero |
| 6419 | (p.goodBlock s request) (p.gaussianBlock s request).velocity hrad |
| 6420 | (fun _ => contDiffOn_const) hB hbs hps hphase hkp' |
| 6421 | (fun n i => ErrorHarmonics.zeroBlock_symmetric _ _ _ _ n i) |
| 6422 | (SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _).1 hb.2.2.2.2 ?_ |
| 6423 | · intro i j hj |
| 6424 | simpa [zero, ErrorHarmonics.zeroBlock, HarmonicFields.constantCoefficient, |
| 6425 | Finsupp.single_apply, hj, Ne.symm hj] using hc i j hj |
| 6426 | · intro n x hx θ i |
| 6427 | have he := congrFun (d.context_linear_identity i₀ hκ hR hkp c hB hrad hm a hcarrier n (x,θ) hx) i |
| 6428 | rw [withCarrier_of_same hgcarrier] |
| 6429 | have heval : (HarmonicFields.field ((p.gaussianBlock s request).velocity n i) |
| 6430 | (a.frequency n) (a.phase n) (a.angularFrequency n) (x,θ)).re = |
| 6431 | (p.gaussianBlock s request).oscillation n (x,θ) i := by |
| 6432 | simp only [HarmonicBlock.oscillation, hecarrier.frequency, hecarrier.phase, hecarrier.angular] |
| 6433 | rw [heval] |
| 6434 | simpa only [zero, HarmonicWaveInteraction.withCarrier, ErrorHarmonics.zeroBlock, |
| 6435 | HarmonicBlock.oscillation, HarmonicResidual.field_constant, Pi.zero_apply, Complex.ofReal_zero, |
| 6436 | Complex.zero_re, Pi.add_apply, add_zero] using he |
| 6437 | |
| 6438 | end PeriodizedSignedParameters |
| 6439 | |
| 6440 | end PeriodizedSignedLinear |
| 6441 | |
| 6442 | section ParticularLinear |
| 6443 | open Set WeightedClasses HarmonicCalculus |
| 6444 | open ParticularWaveBounds LinearWaveBounds |
| 6445 | variable {D E : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 6446 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 6447 | |
| 6448 | theorem harmonicResidual_reindex (e : D ≃ₗᵢ[ℝ] E) (a : WaveCoefficients E) |
| 6449 | (s : StripData E) (d : GraphDirections E) (n : ℕ) (x : D) : |
| 6450 | (reindexCoefficients e a).harmonicResidual (reindexStrip e s) (reindexDirections e d) n x = |
| 6451 | a.harmonicResidual s d n (e x) := by |
| 6452 | have ht : LinearWaveResidual.timeDirection ((reindexStrip e s).epsilon n) |
| 6453 | ((reindexDirections e d).fastField n) (fun _ => (reindexDirections e d).slow) = |
| 6454 | reindexVector e (LinearWaveResidual.timeDirection (s.epsilon n) |
| 6455 | (d.fastField n) (fun _ => d.slow)) := by |
| 6456 | funext y |
| 6457 | simp only [LinearWaveResidual.timeDirection, GraphDirections.fastField, |
| 6458 | reindexDirections, reindexStrip, reindexVector, map_sub, map_smul] |
| 6459 | unfold WaveCoefficients.harmonicResidual |
| 6460 | rw [reindex_radialField, reindex_axialField, ht] |
| 6461 | exact StateReindex.linearResidual_field_pull e (s.epsilon n) (a.radius n) |
| 6462 | (d.radialField n) (fun _ => d.angular) (d.axialField s n) |
| 6463 | (LinearWaveResidual.timeDirection (s.epsilon n) (d.fastField n) (fun _ => d.slow)) |
| 6464 | (LinearWaveResidual.complexBase (a.radius n) (a.radialBase n) (a.frequencyBase n) (a.axialBase n)) |
| 6465 | (vectorMode (a.frequency n) (a.phase n) (a.amplitude n)) |
| 6466 | (mode (a.frequency n) (a.phase n) (a.pressure n)) x |
| 6467 | |
| 6468 | open CorrectionState TorusInverse CommonCoverSolve ParticularWaveAssembly CopyAngularInvariance |
| 6469 | open scoped ContDiff BigOperators |
| 6470 | |
| 6471 | namespace ParticularParameters |
| 6472 | variable {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 6473 | {p : ParticularParameters Q} {s : StripData (Q × Plane)} |
| 6474 | {c : Context (Q × Plane)} {u : State (Q × Plane)} {b : HarmonicBlock (Q × Plane)} |
| 6475 | {G A : HarmonicResidual.BlockCoefficients (Q × Plane)} {j : ℤ} |
| 6476 | {W : ℕ → (Q × ℝ) × Plane → ℝ} {α κ : ℝ} |
| 6477 | {h : p.NativeControl s c u b G A j W α κ} |
| 6478 | |
| 6479 | theorem NativeDynamics.frequency_ne (d : NativeDynamics h) (n : ℕ) : b.frequency n ≠ 0 := by |
| 6480 | intro hz |
| 6481 | exact d.frequency_nonzero n (by rw [hz, mul_zero]) |
| 6482 | |
| 6483 | theorem NativeDynamics.good_invariant (d : NativeDynamics h) (n : ℕ) : |
| 6484 | Invariant p.directions.angular ((p.copyData c u b G A j).globalGood (nativeStrip s) p.directions n) := |
| 6485 | d.angularGeometry.good n |
| 6486 | |
| 6487 | theorem NativeDynamics.gaussian_invariant (d : NativeDynamics h) (n : ℕ) : |
| 6488 | Invariant p.directions.angular ((p.copyData c u b G A j).globalGaussian p.directions n) := by |
| 6489 | apply d.angularGeometry.gaussian |
| 6490 | intro m |
| 6491 | rw [d.background.angular] |
| 6492 | exact angleLift_invariant (residualSource c u b G A j m) |
| 6493 | |
| 6494 | theorem NativeDynamics.section_equation (d : NativeDynamics h) (hκ : κ ≤ 1 / 2) |
| 6495 | (n : ℕ) (x : (Q × Plane) × ℝ) (hx : x.1 ∈ s.domain) (i : Fin 3) : |
| 6496 | (p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n (angleShuffle x) i + |
| 6497 | residualSource c u b G A j n x.1 i * |
| 6498 | HarmonicFields.character j (b.frequency n * b.phase n x.1 + (b.angularFrequency n : ℝ) * x.2) = |
| 6499 | ((p.copyData c u b G A j).globalGood (nativeStrip s) p.directions n (angleShuffle (x.1,0)) i + |
| 6500 | (p.copyData c u b G A j).globalGaussian p.directions n (angleShuffle (x.1,0)) i) * |
| 6501 | HarmonicFields.character j (b.frequency n * b.phase n x.1 + (b.angularFrequency n : ℝ) * x.2) := by |
| 6502 | have hg := d.good_invariant n |
| 6503 | have he := d.gaussian_invariant n |
| 6504 | rw [d.background.angular] at hg he |
| 6505 | have hgs := invariant_angleShuffle hg x.1 x.2 |
| 6506 | have hes := invariant_angleShuffle he x.1 x.2 |
| 6507 | have hh := congrFun (d.common_equation hκ n (x := angleShuffle x) hx) i |
| 6508 | change (p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n (angleShuffle x) i + |
| 6509 | residualSource c u b G A j n x.1 i * carrier ((actualCarrier p.background b j).frequency n) |
| 6510 | ((actualCarrier p.background b j).phase n) (angleShuffle x) = |
| 6511 | ((p.copyData c u b G A j).globalGood (nativeStrip s) p.directions n (angleShuffle x) i + |
| 6512 | (p.copyData c u b G A j).globalGaussian p.directions n (angleShuffle x) i) * |
| 6513 | carrier ((actualCarrier p.background b j).frequency n) |
| 6514 | ((actualCarrier p.background b j).phase n) (angleShuffle x) at hh |
| 6515 | rw [actualCarrier_character p.background b j d.frequency_ne n x, hgs, hes] at hh |
| 6516 | exact hh |
| 6517 | |
| 6518 | theorem NativeDynamics.wave_smooth (d : NativeDynamics h) (hκ : κ ≤ 1 / 2) (n : ℕ) (i : Fin 3) : |
| 6519 | ContDiffOn ℝ ∞ (fun x => vectorMode ((p.wave s c u b G A j).frequency n) |
| 6520 | ((p.wave s c u b G A j).phase n) ((p.wave s c u b G A j).amplitude n) (angleShuffle x) i) |
| 6521 | (HarmonicResidual.liftDomain s.domain) := by |
| 6522 | have hf := HarmonicCalculus.contDiffOn_mode ((j : ℝ) * b.frequency n) (d.background.phase_smooth n) |
| 6523 | ((CurlClassBounds.class_component (h.global_bounds hκ).2.1 i).smooth n) |
| 6524 | exact hf.comp (angleShuffle (P := Q)).contDiff.contDiffOn (fun _ hx => hx.1) |
| 6525 | |
| 6526 | theorem NativeDynamics.pressure_smooth (d : NativeDynamics h) (hκ : κ ≤ 1 / 2) (n : ℕ) : |
| 6527 | ContDiffOn ℝ ∞ (fun x => mode ((p.wave s c u b G A j).frequency n) |
| 6528 | ((p.wave s c u b G A j).phase n) ((p.wave s c u b G A j).pressure n) (angleShuffle x)) |
| 6529 | (HarmonicResidual.liftDomain s.domain) := by |
| 6530 | have hf := HarmonicCalculus.contDiffOn_mode ((j : ℝ) * b.frequency n) (d.background.phase_smooth n) |
| 6531 | ((h.global_bounds hκ).2.2.1.smooth n) |
| 6532 | exact hf.comp (angleShuffle (P := Q)).contDiff.contDiffOn (fun _ hx => hx.1) |
| 6533 | |
| 6534 | theorem angleStrip_nativeStrip (s : StripData (Q × Plane)) : |
| 6535 | reindexStrip angleShuffle (nativeStrip s) = HarmonicWaveInteraction.productStrip s := by |
| 6536 | cases s |
| 6537 | rfl |
| 6538 | |
| 6539 | theorem frame_wave (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 6540 | (c : Context (Q × Plane)) (u : State (Q × Plane)) (b : HarmonicBlock (Q × Plane)) |
| 6541 | (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) (j : ℤ) |
| 6542 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 6543 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) : |
| 6544 | WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 6545 | (reindexDirections angleShuffle p.directions) |
| 6546 | (reindexCoefficients angleShuffle (p.wave s c u b G A j)) := |
| 6547 | ⟨hm.epsilon, hm.radius, hm.radial, hm.angular, hm.axial, hm.time, |
| 6548 | hm.radialBase, hm.angularBase, hm.axialBase⟩ |
| 6549 | |
| 6550 | theorem native_context_residual (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 6551 | (c : Context (Q × Plane)) (u : State (Q × Plane)) (b : HarmonicBlock (Q × Plane)) |
| 6552 | (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) (j : ℤ) |
| 6553 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 6554 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 6555 | (n : ℕ) (x : (Q × Plane) × ℝ) : |
| 6556 | (p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n (angleShuffle x) = |
| 6557 | LinearWaveResidual.linearResidual (c.operators.epsilon n) |
| 6558 | (fun y : (Q × Plane) × ℝ => c.operators.radius y.1) (radialDirection c n) angularDirection |
| 6559 | (axialDirection c n) (timeDirection c n) (complexBase c n) |
| 6560 | (fun y => vectorMode ((p.wave s c u b G A j).frequency n) ((p.wave s c u b G A j).phase n) |
| 6561 | ((p.wave s c u b G A j).amplitude n) (angleShuffle y)) |
| 6562 | (fun y => mode ((p.wave s c u b G A j).frequency n) ((p.wave s c u b G A j).phase n) |
| 6563 | ((p.wave s c u b G A j).pressure n) (angleShuffle y)) x := by |
| 6564 | rw [← harmonicResidual_reindex angleShuffle (p.wave s c u b G A j) (nativeStrip s) p.directions, |
| 6565 | angleStrip_nativeStrip, (p.frame_wave s c u b G A j hm).harmonicResidual] |
| 6566 | rfl |
| 6567 | |
| 6568 | variable (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 6569 | (c : Context (Q × Plane)) (u : State (Q × Plane)) (b : HarmonicBlock (Q × Plane)) |
| 6570 | (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) (N : ℕ) |
| 6571 | (C : ∀ j ∈ modes N, p.NativeControl s c u b G A j W α κ) |
| 6572 | (dyn : ∀ j hj, NativeDynamics (C j hj)) |
| 6573 | |
| 6574 | include dyn in |
| 6575 | theorem update_represents : |
| 6576 | (p.updateBlock s c u b G A N).oscillation = |
| 6577 | (fun n x i => ∑ j ∈ modes N, (vectorMode ((p.wave s c u b G A j).frequency n) |
| 6578 | ((p.wave s c u b G A j).phase n) ((p.wave s c u b G A j).amplitude n) (angleShuffle x) i).re) ∧ |
| 6579 | (p.updateBlock s c u b G A N).oscillatoryPressure = |
| 6580 | (fun n x => ∑ j ∈ modes N, (mode ((p.wave s c u b G A j).frequency n) |
| 6581 | ((p.wave s c u b G A j).phase n) ((p.wave s c u b G A j).pressure n) (angleShuffle x)).re) := by |
| 6582 | constructor |
| 6583 | · funext n x i |
| 6584 | rw [updateBlock, assembledBlock_value] |
| 6585 | apply Finset.sum_congr rfl |
| 6586 | intro j hj |
| 6587 | have hinv := (dyn j hj).angularGeometry.corrected_amplitude n |
| 6588 | rw [(dyn j hj).background.angular] at hinv |
| 6589 | have hi : (p.wave s c u b G A j).amplitude n (angleShuffle x) = |
| 6590 | (p.wave s c u b G A j).amplitude n (angleShuffle (x.1,0)) := |
| 6591 | invariant_angleShuffle hinv x.1 x.2 |
| 6592 | change Complex.re (_ * _) = ((p.wave s c u b G A j).amplitude n (angleShuffle x) i * |
| 6593 | carrier ((actualCarrier p.background b j).frequency n) ((actualCarrier p.background b j).phase n) |
| 6594 | (angleShuffle x)).re |
| 6595 | rw [actualCarrier_character p.background b j (dyn j hj).frequency_ne n x, hi] |
| 6596 | · funext n x |
| 6597 | rw [updateBlock, assembledBlock_pressure_value] |
| 6598 | apply Finset.sum_congr rfl |
| 6599 | intro j hj |
| 6600 | have hinv := (dyn j hj).angularGeometry.common_pressure n |
| 6601 | rw [(dyn j hj).background.angular] at hinv |
| 6602 | have hi := invariant_angleShuffle hinv x.1 x.2 |
| 6603 | change Complex.re (_ * _) = ((p.copyData c u b G A j).common.pressure n (angleShuffle x) * |
| 6604 | carrier ((actualCarrier p.background b j).frequency n) ((actualCarrier p.background b j).phase n) |
| 6605 | (angleShuffle x)).re |
| 6606 | rw [actualCarrier_character p.background b j (dyn j hj).frequency_ne n x, hi] |
| 6607 | rfl |
| 6608 | |
| 6609 | include dyn in |
| 6610 | theorem cancellation_sum (hκ : κ ≤ 1 / 2) |
| 6611 | (hN : (HarmonicResidual.residualBlock c u b G A).BandLimited N) |
| 6612 | (n : ℕ) (x : (Q × Plane) × ℝ) (hx : x.1 ∈ s.domain) : |
| 6613 | (fun i => ∑ j ∈ modes N, |
| 6614 | ((p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n (angleShuffle x) i).re) + |
| 6615 | (HarmonicResidual.residualBlock c u b G A).oscillation n x = |
| 6616 | (p.goodBlock s c u b G A N).oscillation n x + (p.gaussianBlock c u b G A N).oscillation n x := by |
| 6617 | apply finite_cancellation c u b G A N hN |
| 6618 | (fun j n x => (p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n (angleShuffle x)) |
| 6619 | (fun j n x => (p.copyData c u b G A j).globalGood (nativeStrip s) p.directions n (angleShuffle (x,0))) |
| 6620 | (fun j n x => (p.copyData c u b G A j).globalGaussian p.directions n (angleShuffle (x,0))) n x |
| 6621 | intro j hj i |
| 6622 | exact (dyn j hj).section_equation hκ n x hx i |
| 6623 | |
| 6624 | include dyn in |
| 6625 | theorem context_linear_sum (hκ : κ ≤ 1 / 2) |
| 6626 | (hB : MeanIncrementBounds.SmoothTriple s.domain c.base) |
| 6627 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 6628 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 6629 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 6630 | (n : ℕ) (x : (Q × Plane) × ℝ) (hx : x.1 ∈ s.domain) : |
| 6631 | linearBlockField c b (p.updateBlock s c u b G A N) n x = |
| 6632 | fun i => ∑ j ∈ modes N, |
| 6633 | ((p.wave s c u b G A j).harmonicResidual (nativeStrip s) p.directions n (angleShuffle x) i).re := by |
| 6634 | have hu := p.update_represents s c u b G A N C dyn |
| 6635 | have hv (j : ℤ) (hj : j ∈ modes N) (i : Fin 3) := (dyn j hj).wave_smooth hκ n i |
| 6636 | have hp (j : ℤ) (hj : j ∈ modes N) := (dyn j hj).pressure_smooth hκ n |
| 6637 | have hvs (i : Fin 3) : ContDiffOn ℝ ∞ |
| 6638 | (fun y => (p.updateBlock s c u b G A N).oscillation n y i) (HarmonicResidual.liftDomain s.domain) := by |
| 6639 | rw [hu.1] |
| 6640 | exact ContDiffOn.sum (fun j hj => Complex.reCLM.contDiff.comp_contDiffOn (hv j hj i)) |
| 6641 | have hps : ContDiffOn ℝ ∞ ((p.updateBlock s c u b G A N).oscillatoryPressure n) |
| 6642 | (HarmonicResidual.liftDomain s.domain) := by |
| 6643 | rw [hu.2] |
| 6644 | exact ContDiffOn.sum (fun j hj => Complex.reCLM.contDiff.comp_contDiffOn (hp j hj)) |
| 6645 | have hcarrier : SameCarrier b (p.updateBlock s c u b G A N) := ⟨rfl,rfl,rfl⟩ |
| 6646 | have hr : ContDiffOn ℝ ∞ (radialDirection c n) (HarmonicResidual.liftDomain s.domain) := |
| 6647 | HarmonicResidual.liftDirection_smooth (hrad n) |
| 6648 | rw [linearBlockField_eq_real s.isOpen_domain c b (p.updateBlock s c u b G A N) n hr |
| 6649 | contDiffOn_const hB (by simpa only [withCarrier_of_same hcarrier] using hvs) |
| 6650 | (by simpa only [withCarrier_of_same hcarrier] using hps) ⟨hx,trivial⟩, |
| 6651 | withCarrier_of_same hcarrier, hu.1, hu.2] |
| 6652 | have he := real_linearResidual_sum (Vθ := angularDirection) (modes N) (HarmonicResidual.liftDomain_open s.isOpen_domain) |
| 6653 | (c.operators.epsilon n) (fun y : (Q × Plane) × ℝ => c.operators.radius y.1) (timeDirection c n) |
| 6654 | hr contDiffOn_const (show ContDiffOn ℝ ∞ (axialDirection c n) (HarmonicResidual.liftDomain s.domain) |
| 6655 | from contDiffOn_const) (contextRealBase c n) |
| 6656 | (fun j y => vectorMode ((p.wave s c u b G A j).frequency n) ((p.wave s c u b G A j).phase n) |
| 6657 | ((p.wave s c u b G A j).amplitude n) (angleShuffle y)) |
| 6658 | (fun j y => mode ((p.wave s c u b G A j).frequency n) ((p.wave s c u b G A j).phase n) |
| 6659 | ((p.wave s c u b G A j).pressure n) (angleShuffle y)) hv hp |
| 6660 | (fun i => ((contextRealBase_smooth hB n i).contDiffAt |
| 6661 | ((HarmonicResidual.liftDomain_open s.isOpen_domain).mem_nhds ⟨hx,trivial⟩)).differentiableAt (by simp)) |
| 6662 | ⟨hx,trivial⟩ |
| 6663 | rw [← complexBase_eq_realLift] at he |
| 6664 | rw [he] |
| 6665 | funext i |
| 6666 | apply Finset.sum_congr rfl |
| 6667 | intro j hj |
| 6668 | rw [p.native_context_residual s c u b G A j hm] |
| 6669 | |
| 6670 | include dyn in |
| 6671 | theorem context_linear_cancellation (hκ : κ ≤ 1 / 2) |
| 6672 | (hN : (HarmonicResidual.residualBlock c u b G A).BandLimited N) |
| 6673 | (hB : MeanIncrementBounds.SmoothTriple s.domain c.base) |
| 6674 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 6675 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 6676 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 6677 | (n : ℕ) (x : (Q × Plane) × ℝ) (hx : x.1 ∈ s.domain) : |
| 6678 | linearBlockField c b (p.updateBlock s c u b G A N) n x + |
| 6679 | (HarmonicResidual.residualBlock c u b G A).oscillation n x = |
| 6680 | (p.goodBlock s c u b G A N).oscillation n x + (p.gaussianBlock c u b G A N).oscillation n x := by |
| 6681 | rw [p.context_linear_sum s c u b G A N C dyn hκ hB hrad hm n x hx] |
| 6682 | exact p.cancellation_sum s c u b G A N C dyn hκ hN n x hx |
| 6683 | |
| 6684 | include dyn in |
| 6685 | /-- The current residual is cancelled by the actual finite inverse. The |
| 6686 | remaining coefficient is precisely the computed retained-good block. -/ |
| 6687 | theorem linearGood_bounds (hκ : κ ≤ 1 / 2) |
| 6688 | (hN : (HarmonicResidual.residualBlock c u b G A).BandLimited N) |
| 6689 | (hB : MeanIncrementBounds.SmoothTriple s.domain c.base) |
| 6690 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 6691 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 6692 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 6693 | (hphase : ∀ n, ContDiffOn ℝ ∞ (b.phase n) s.domain) |
| 6694 | (hkp : ∀ n, b.angularFrequency n ≠ 0) |
| 6695 | (hW : ∀ n x, x ∈ (nativeStrip s).domain → 0 ≤ W n x) : |
| 6696 | ∀ i j, j ≠ 0 → WaveClass s (fun n x => W n (angleShuffle (x,0))) |
| 6697 | (α + 1 / 2 - 3 * κ) (fun n x => |
| 6698 | (HarmonicResidual.residualBlock c u b G A).velocity n i j x + |
| 6699 | (HarmonicWaveInteraction.linearGoodBlock c b (p.updateBlock s c u b G A N) |
| 6700 | (p.gaussianBlock c u b G A N).velocity).velocity n i j x) := by |
| 6701 | have hb := p.assembled_bounds s c u b G A N C hW hκ |
| 6702 | have hz : HarmonicWaveInteraction.ZeroMode (p.updateBlock s c u b G A N) := |
| 6703 | (assembledBlock_zero _ _ _ _ _ _).1 |
| 6704 | have hpz : ∀ n, (p.updateBlock s c u b G A N).pressure n 0 = 0 := |
| 6705 | (assembledBlock_zero _ _ _ _ _ _).2 |
| 6706 | have hbs := HarmonicWaveInteraction.waveBounds_smooth hb.1 hz |
| 6707 | have hps (n : ℕ) : HarmonicResidual.SmoothCoefficients s.domain |
| 6708 | ((p.updateBlock s c u b G A N).pressure n) := by |
| 6709 | intro j |
| 6710 | by_cases hj : j = 0 |
| 6711 | · subst j |
| 6712 | rw [hpz] |
| 6713 | exact contDiffOn_const |
| 6714 | exact (hb.2.1 j hj).smooth n |
| 6715 | apply linearGoodBlock_cancel_mem c b (p.updateBlock s c u b G A N) |
| 6716 | (HarmonicResidual.residualBlock c u b G A) (p.goodBlock s c u b G A N) |
| 6717 | (p.gaussianBlock c u b G A N).velocity hrad (fun _ => contDiffOn_const) |
| 6718 | hB hbs hps hphase hkp (HarmonicResidual.residualBlock_conjugate _ _ _ _ _) |
| 6719 | (assembledBlock_real _ _ _ _ _ _).1 hb.2.2 |
| 6720 | intro n x hx θ i |
| 6721 | have he := congrFun (p.context_linear_cancellation s c u b G A N C dyn hκ hN hB hrad hm n (x,θ) hx) i |
| 6722 | exact he |
| 6723 | |
| 6724 | end ParticularParameters |
| 6725 | |
| 6726 | end ParticularLinear |
| 6727 | |
| 6728 | section SupportedWaveGain |
| 6729 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState |
| 6730 | open scoped ContDiff Topology |
| 6731 | variable {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 6732 | |
| 6733 | theorem waveStage_residual_mem_local {s : StripData D} {C : ℕ → Set D} {P : ℕ → D → ℝ} {κ α β H γ : ℝ} |
| 6734 | (c : Context D) (ho : OperatorBounds s c.operators κ) (hκ : κ ≤ 1 / 2) |
| 6735 | (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 6736 | (u v : State D) (hmean : v.mean = u.mean) |
| 6737 | (hm : IncrementBounds s H u.mean) |
| 6738 | (hbase : SmoothTriple s.domain c.base) |
| 6739 | (a b : HarmonicBlock D) {M N : ℕ} |
| 6740 | (ha : a.WaveBounds s P α) (hb : b.WaveBounds s P β) |
| 6741 | (ha0 : HarmonicWaveInteraction.ZeroMode a) (hb0 : HarmonicWaveInteraction.ZeroMode b) |
| 6742 | (hM : a.BandLimited M) (hN : b.BandLimited N) |
| 6743 | (hΦ : ∀ n, ContDiffOn ℝ ∞ (a.phase n) s.domain) |
| 6744 | (hk : ∀ n, a.frequency n ≠ 0) (hkp : ∀ n, a.angularFrequency n ≠ 0) |
| 6745 | (hda : HarmonicWaveInteraction.ModeSolenoidal s c a) |
| 6746 | (hdb : HarmonicWaveInteraction.ModeSolenoidal s c (HarmonicWaveInteraction.withCarrier a b)) |
| 6747 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s (fun n (_ : Unit) => C n) 0 |
| 6748 | (fun n _ x => HarmonicMeanInteraction.slowNormal c ho hR a.phase n x i)) |
| 6749 | (hFreq : BandBound s (-(1 / 2)) a.frequency) |
| 6750 | (hAng : BandBound s (-(1 / 2)) (fun n => (a.angularFrequency n : ℝ))) |
| 6751 | (hz : ∀ n x, x ∈ s.domain → x ∉ C n → |
| 6752 | ∀ i j, j ≠ 0 → b.velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 6753 | (hP0 : ∀ n x, x ∈ s.domain → 0 ≤ P n x) |
| 6754 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) |
| 6755 | (hpa : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (a.pressure n)) |
| 6756 | (hpb : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (b.pressure n)) |
| 6757 | (G g A₀ A₁ : HarmonicResidual.BlockCoefficients D) |
| 6758 | (hA : ∀ n i, HarmonicFields.BandLimited (A₁ n i - A₀ n i) 0) |
| 6759 | (hlinear : ∀ i j, j ≠ 0 → WaveClass s P γ (fun n x => |
| 6760 | (HarmonicResidual.residualBlock c u a G A₀).velocity n i j x + |
| 6761 | (HarmonicWaveInteraction.linearGoodBlock c a b g).velocity n i j x)) |
| 6762 | (hγm : γ ≤ β + H - 1 / 2) (hγc : γ ≤ α + β - κ) (hγs : γ ≤ β + β - κ) : |
| 6763 | (HarmonicResidual.residualBlock c v (HarmonicWaveInteraction.addBlock a b) (G + g) A₁).WaveBounds |
| 6764 | s P γ := by |
| 6765 | have hnon := LocalizedMeanInteraction.interactionBlock_class c ho hκ hR hm ha hb ha0 hb0 hM hN |
| 6766 | hΦ hk hda hdb hNormal hFreq hAng hz hP0 hP1 |
| 6767 | have hca := block_waveBounds_all a ha ha0 hP0 |
| 6768 | have hcb := block_waveBounds_all b hb hb0 hP0 |
| 6769 | intro i j hj |
| 6770 | apply WaveInteractionBounds.class_congr |
| 6771 | ((hlinear i j hj).add ((hnon i j hj).mono_exponent (le_min hγm (le_min hγc hγs)))) |
| 6772 | intro n x hx |
| 6773 | have hr : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain := |
| 6774 | contDiffOn_const.add ((contDiffOn_const.mul (ho.radialProfile.smooth 0)).smul contDiffOn_const) |
| 6775 | have he := HarmonicWaveInteraction.residualBlock_wave_update_split s.isOpen_domain c u v hmean |
| 6776 | a b G g A₀ A₁ hA n hr |
| 6777 | contDiffOn_const (hΦ n) (hkp n) |
| 6778 | (fun l => (HarmonicMeanInteraction.tripleField_smooth hbase n l)) |
| 6779 | (fun l => (HarmonicMeanInteraction.tripleField_smooth hm.smooth n l)) |
| 6780 | (fun l k => (hca l k).smooth n) (fun l k => (hcb l k).smooth n) (hpa n) (hpb n) hx j i |
| 6781 | change _ = _ at he |
| 6782 | linear_combination -he |
| 6783 | |
| 6784 | end SupportedWaveGain |
| 6785 | |
| 6786 | section ActualRecurrence |
| 6787 | open Set CorrectionState WeightedClasses |
| 6788 | open scoped BigOperators |
| 6789 | |
| 6790 | abbrev AxisymmetricAlias := ℕ → CyclePoint → Fin 3 → ℝ |
| 6791 | |
| 6792 | noncomputable def coefficientField (b : HarmonicBlock CyclePoint) |
| 6793 | (a : HarmonicResidual.BlockCoefficients CyclePoint) : Oscillation CyclePoint := |
| 6794 | fun n x i => (HarmonicFields.field (a n i) (b.frequency n) (b.phase n) (b.angularFrequency n) x).re |
| 6795 | |
| 6796 | /-- The axisymmetric alias is kept separately from the spatial labels. |
| 6797 | No slot support is imposed on a zero angular mode. -/ |
| 6798 | structure CycleRepresentation {ι : Type} (v : CycleCoefficients ι) |
| 6799 | (u : State CyclePoint) (axis : AxisymmetricAlias) : Prop where |
| 6800 | velocity : ∀ n x i, u.oscillation n x i = ∑ l ∈ v.labels n, (v.blocks l).oscillation n x i |
| 6801 | pressure : ∀ n x, u.oscillatoryPressure n x = ∑ l ∈ v.labels n, (v.blocks l).oscillatoryPressure n x |
| 6802 | gaussian : ∀ n x i, u.errors.gaussian n x i = ∑ l ∈ v.labels n, coefficientField (v.blocks l) (v.gaussian l) n x i |
| 6803 | aliasError : ∀ n x i, u.errors.aliasError n x i = |
| 6804 | (∑ l ∈ v.labels n, coefficientField (v.blocks l) (v.aliasCoefficients l) n x i) + axis n x.1 i |
| 6805 | |
| 6806 | /-- A common integer bound for stored coefficient values, including errors. -/ |
| 6807 | structure CoefficientBands {ι : Type} (v : CycleCoefficients ι) : Prop where |
| 6808 | velocityPressure : ∀ l, (v.blocks l).BandLimited v.residualBand |
| 6809 | gaussian : ∀ l n i, HarmonicFields.BandLimited (v.gaussian l n i) v.residualBand |
| 6810 | aliasError : ∀ l n i, HarmonicFields.BandLimited (v.aliasCoefficients l n i) v.residualBand |
| 6811 | |
| 6812 | namespace CycleParameters |
| 6813 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 6814 | (c : Context CyclePoint) (u : State CyclePoint) |
| 6815 | |
| 6816 | theorem particular_carrier (l : ι) : SameCarrier (v.blocks l) (p.particularBlock v c u l) := |
| 6817 | ⟨rfl,rfl,rfl⟩ |
| 6818 | |
| 6819 | theorem particularGaussian_carrier (l : ι) : SameCarrier (v.blocks l) (p.particularGaussianBlock v c u l) := |
| 6820 | ⟨rfl,rfl,rfl⟩ |
| 6821 | |
| 6822 | /-- The new nonzero harmonic data are literal sums of the old and |
| 6823 | constructed coefficients. All new mean aliases remain in the separate field. -/ |
| 6824 | noncomputable def nextCoefficients : CycleCoefficients ι where |
| 6825 | labels := v.labels |
| 6826 | blocks := p.finalBlock v c u |
| 6827 | gaussian := fun l => v.gaussian l + (p.particularGaussianBlock v c u l).velocity + |
| 6828 | (p.signedGaussianBlock v c u l).velocity |
| 6829 | aliasCoefficients := v.aliasCoefficients |
| 6830 | residualBand := 2 * max v.residualBand 1 |
| 6831 | |
| 6832 | noncomputable def nextAxisymmetricAlias (axis : AxisymmetricAlias) : AxisymmetricAlias := |
| 6833 | fun n x i => axis n x i + |
| 6834 | VariableGaugeMean.temporalAliasState p.gauge p.timeExponent p.commonIndex c (p.afterSigned v c u) n (x,0) i + |
| 6835 | (VariableGaugeMean.pressureAliasState p.gauge c (p.afterRank v c u) n (x,0) i - |
| 6836 | VariableGaugeMean.pressureAliasState p.gauge c u n (x,0) i) |
| 6837 | |
| 6838 | theorem finalBlock_oscillation |
| 6839 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) (l : ι) : |
| 6840 | (p.finalBlock v c u l).oscillation = (v.blocks l).oscillation + |
| 6841 | (p.particularBlock v c u l).oscillation + (p.signedBlock v c u l).oscillation := by |
| 6842 | have hs : SameCarrier (addBlock (v.blocks l) (p.particularBlock v c u l)) (p.signedBlock v c u l) := |
| 6843 | ⟨(hc l).frequency,(hc l).phase,(hc l).angular⟩ |
| 6844 | rw [finalBlock, addBlock_oscillation _ _ hs, addBlock_oscillation _ _ (p.particular_carrier v c u l)] |
| 6845 | |
| 6846 | theorem finalBlock_pressure |
| 6847 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) (l : ι) : |
| 6848 | (p.finalBlock v c u l).oscillatoryPressure = (v.blocks l).oscillatoryPressure + |
| 6849 | (p.particularBlock v c u l).oscillatoryPressure + (p.signedBlock v c u l).oscillatoryPressure := by |
| 6850 | have hs : SameCarrier (addBlock (v.blocks l) (p.particularBlock v c u l)) (p.signedBlock v c u l) := |
| 6851 | ⟨(hc l).frequency,(hc l).phase,(hc l).angular⟩ |
| 6852 | rw [finalBlock, addBlock_pressure _ _ hs, addBlock_pressure _ _ (p.particular_carrier v c u l)] |
| 6853 | |
| 6854 | theorem nextCoefficients_gaussian_field |
| 6855 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) |
| 6856 | (l : ι) (n : ℕ) (x : CyclePoint × ℝ) (i : Fin 3) : |
| 6857 | coefficientField ((p.nextCoefficients v c u).blocks l) ((p.nextCoefficients v c u).gaussian l) n x i = |
| 6858 | coefficientField (v.blocks l) (v.gaussian l) n x i + |
| 6859 | (p.particularGaussianBlock v c u l).oscillation n x i + |
| 6860 | (p.signedGaussianBlock v c u l).oscillation n x i := by |
| 6861 | have hs : SameCarrier (v.blocks l) (p.signedGaussianBlock v c u l) := |
| 6862 | ⟨(hc l).frequency,(hc l).phase,(hc l).angular⟩ |
| 6863 | have hp := p.particularGaussian_carrier v c u l |
| 6864 | change (HarmonicFields.field (v.gaussian l n i + |
| 6865 | (p.particularGaussianBlock v c u l).velocity n i + (p.signedGaussianBlock v c u l).velocity n i) |
| 6866 | ((v.blocks l).frequency n) ((v.blocks l).phase n) ((v.blocks l).angularFrequency n) x).re = _ |
| 6867 | rw [HarmonicResidual.field_add, HarmonicResidual.field_add, Complex.add_re, Complex.add_re] |
| 6868 | simp only [coefficientField, HarmonicBlock.oscillation, hp.frequency, hp.phase, hp.angular, |
| 6869 | hs.frequency, hs.phase, hs.angular] |
| 6870 | |
| 6871 | theorem next_representation {axis : AxisymmetricAlias} |
| 6872 | (hrep : CycleRepresentation v u axis) |
| 6873 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) : |
| 6874 | CycleRepresentation (p.nextCoefficients v c u) (p.next v c u) |
| 6875 | (p.nextAxisymmetricAlias v c u axis) := by |
| 6876 | constructor |
| 6877 | · intro n x i |
| 6878 | rw [p.next_oscillation] |
| 6879 | simp only [Pi.add_apply, hrep.velocity n x i, particularVelocity, signedVelocity, |
| 6880 | LabelSumBounds.fieldSum, nextCoefficients, p.finalBlock_oscillation v c u hc, |
| 6881 | Finset.sum_add_distrib] |
| 6882 | · intro n x |
| 6883 | rw [p.next_oscillatoryPressure] |
| 6884 | simp only [Pi.add_apply, hrep.pressure n x, particularPressure, signedPressure, |
| 6885 | nextCoefficients, p.finalBlock_pressure v c u hc, Finset.sum_add_distrib] |
| 6886 | · intro n x i |
| 6887 | rw [p.next_gaussian_error] |
| 6888 | simp only [Pi.add_apply, hrep.gaussian n x i, particularGaussian, signedGaussian, |
| 6889 | LabelSumBounds.fieldSum, p.nextCoefficients_gaussian_field v c u hc, |
| 6890 | show (p.nextCoefficients v c u).labels = v.labels from rfl, Finset.sum_add_distrib] |
| 6891 | · intro n x i |
| 6892 | rw [p.next_alias_error] |
| 6893 | simp only [Pi.add_apply, Pi.sub_apply, hrep.aliasError n x i, nextCoefficients, |
| 6894 | coefficientField, finalBlock, addBlock, nextAxisymmetricAlias] |
| 6895 | simp only [VariableGaugeMean.temporalAliasState, VariableGaugeMean.pressureAliasState] |
| 6896 | ring |
| 6897 | |
| 6898 | theorem next_coefficient_bands (h : CoefficientBands v) : |
| 6899 | CoefficientBands (p.nextCoefficients v c u) := by |
| 6900 | have hn : max v.residualBand 1 ≤ 2 * max v.residualBand 1 := by omega |
| 6901 | have hb l : (p.finalBlock v c u l).BandLimited (max v.residualBand 1) := by |
| 6902 | simpa only [max_self] using p.finalBlock_band v c u h.velocityPressure l |
| 6903 | have hg l n i : HarmonicFields.BandLimited |
| 6904 | ((p.nextCoefficients v c u).gaussian l n i) (max v.residualBand 1) := by |
| 6905 | exact (((h.gaussian l n i).mono (le_max_left _ _)).add |
| 6906 | (((p.particularGaussianBlock_band v c u l).1 n i).mono (le_max_left _ _))).add |
| 6907 | ((((p.signed l).gaussianBlock_band p.strip (p.signedRequest v c u)).1 n i).mono (le_max_right _ _)) |
| 6908 | exact ⟨fun l => ⟨fun n i => ((hb l).1 n i).mono hn, fun n => ((hb l).2 n).mono hn⟩, |
| 6909 | fun l n i => (hg l n i).mono hn, |
| 6910 | fun l n i => (h.aliasError l n i).mono ((le_max_left _ _).trans hn)⟩ |
| 6911 | |
| 6912 | /-- The residual value bound of the next actual state is derived from |
| 6913 | stored coefficient bands, independently of a norm estimate. -/ |
| 6914 | theorem next_residual_band (h : CoefficientBands v) (l : ι) : |
| 6915 | (HarmonicResidual.residualBlock c (p.next v c u) |
| 6916 | ((p.nextCoefficients v c u).blocks l) ((p.nextCoefficients v c u).gaussian l) |
| 6917 | ((p.nextCoefficients v c u).aliasCoefficients l)).BandLimited |
| 6918 | (p.nextCoefficients v c u).residualBand := by |
| 6919 | have hb : (p.finalBlock v c u l).BandLimited (max v.residualBand 1) := by |
| 6920 | simpa only [max_self] using p.finalBlock_band v c u h.velocityPressure l |
| 6921 | have hg n i : HarmonicFields.BandLimited |
| 6922 | ((p.nextCoefficients v c u).gaussian l n i) (max v.residualBand 1) := by |
| 6923 | exact (((h.gaussian l n i).mono (le_max_left _ _)).add |
| 6924 | (((p.particularGaussianBlock_band v c u l).1 n i).mono (le_max_left _ _))).add |
| 6925 | ((((p.signed l).gaussianBlock_band p.strip (p.signedRequest v c u)).1 n i).mono (le_max_right _ _)) |
| 6926 | have ha n i : HarmonicFields.BandLimited |
| 6927 | ((p.nextCoefficients v c u).aliasCoefficients l n i) (max v.residualBand 1) := |
| 6928 | (h.aliasError l n i).mono (le_max_left _ _) |
| 6929 | have he := HarmonicResidual.residualBlock_band c (p.next v c u) (p.finalBlock v c u l) |
| 6930 | ((p.nextCoefficients v c u).gaussian l) ((p.nextCoefficients v c u).aliasCoefficients l) hb hg ha |
| 6931 | have hn : max (max v.residualBand 1 + max v.residualBand 1) (max v.residualBand 1) = |
| 6932 | 2 * max v.residualBand 1 := by omega |
| 6933 | simp only [hn] at he |
| 6934 | exact he |
| 6935 | |
| 6936 | end CycleParameters |
| 6937 | |
| 6938 | /-- The represented state and its literal coefficient data evolve together. -/ |
| 6939 | structure CycleState (ι : Type) where |
| 6940 | state : State CyclePoint |
| 6941 | coefficients : CycleCoefficients ι |
| 6942 | axisymmetricAlias : AxisymmetricAlias |
| 6943 | |
| 6944 | namespace CycleState |
| 6945 | variable {ι : Type} |
| 6946 | |
| 6947 | noncomputable def step (p : CycleParameters ι) (c : Context CyclePoint) (u : CycleState ι) : CycleState ι where |
| 6948 | state := p.next u.coefficients c u.state |
| 6949 | coefficients := p.nextCoefficients u.coefficients c u.state |
| 6950 | axisymmetricAlias := p.nextAxisymmetricAlias u.coefficients c u.state u.axisymmetricAlias |
| 6951 | |
| 6952 | noncomputable def iterate (p : ℕ → CycleParameters ι) (c : Context CyclePoint) |
| 6953 | (seed : CycleState ι) : ℕ → CycleState ι |
| 6954 | | 0 => seed |
| 6955 | | n + 1 => (iterate p c seed n).step (p n) c |
| 6956 | |
| 6957 | theorem iterate_zero (p : ℕ → CycleParameters ι) (c : Context CyclePoint) (seed : CycleState ι) : |
| 6958 | iterate p c seed 0 = seed := rfl |
| 6959 | |
| 6960 | theorem iterate_succ (p : ℕ → CycleParameters ι) (c : Context CyclePoint) (seed : CycleState ι) (n : ℕ) : |
| 6961 | iterate p c seed (n+1) = (iterate p c seed n).step (p n) c := rfl |
| 6962 | |
| 6963 | theorem iterate_representation (p : ℕ → CycleParameters ι) (c : Context CyclePoint) (seed : CycleState ι) |
| 6964 | (hseed : CycleRepresentation seed.coefficients seed.state seed.axisymmetricAlias) |
| 6965 | (hc : ∀ n l, let v := iterate p c seed n |
| 6966 | SameCarrier (v.coefficients.blocks l) ((p n).signedBlock v.coefficients c v.state l)) : |
| 6967 | ∀ n, let v := iterate p c seed n |
| 6968 | CycleRepresentation v.coefficients v.state v.axisymmetricAlias := by |
| 6969 | intro n |
| 6970 | induction n with |
| 6971 | | zero => exact hseed |
| 6972 | | succ n ih => |
| 6973 | exact (p n).next_representation (iterate p c seed n).coefficients c (iterate p c seed n).state ih (hc n) |
| 6974 | |
| 6975 | theorem iterate_bands (p : ℕ → CycleParameters ι) (c : Context CyclePoint) (seed : CycleState ι) |
| 6976 | (hseed : CoefficientBands seed.coefficients) : |
| 6977 | ∀ n, CoefficientBands (iterate p c seed n).coefficients := by |
| 6978 | intro n |
| 6979 | induction n with |
| 6980 | | zero => exact hseed |
| 6981 | | succ n ih => |
| 6982 | exact (p n).next_coefficient_bands (iterate p c seed n).coefficients c (iterate p c seed n).state ih |
| 6983 | |
| 6984 | theorem iterate_residual_band (p : ℕ → CycleParameters ι) (c : Context CyclePoint) (seed : CycleState ι) |
| 6985 | (hseed : CoefficientBands seed.coefficients) (n : ℕ) (l : ι) : |
| 6986 | let v := iterate p c seed (n+1) |
| 6987 | (HarmonicResidual.residualBlock c v.state (v.coefficients.blocks l) |
| 6988 | (v.coefficients.gaussian l) (v.coefficients.aliasCoefficients l)).BandLimited v.coefficients.residualBand := |
| 6989 | (p n).next_residual_band (iterate p c seed n).coefficients c (iterate p c seed n).state |
| 6990 | (iterate_bands p c seed hseed n) l |
| 6991 | |
| 6992 | end CycleState |
| 6993 | |
| 6994 | end ActualRecurrence |
| 6995 | |
| 6996 | section PeriodizedCurl |
| 6997 | open Set Filter WeightedClasses HarmonicCalculus CorrectionState |
| 6998 | open scoped ContDiff Topology InnerProductSpace |
| 6999 | |
| 7000 | variable {D I : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 7001 | |
| 7002 | theorem cylindricalDivergence_reindex {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 7003 | (e : D ≃ₗᵢ[ℝ] E) (R : E → ℝ) (Vr Vθ Vz : E → E) (a : E → ComplexVector) (x : D) : |
| 7004 | cylindricalDivergence (fun y => R (e y)) (StateReindex.vector e Vr) |
| 7005 | (StateReindex.vector e Vθ) (StateReindex.vector e Vz) (fun y => a (e y)) x = |
| 7006 | cylindricalDivergence R Vr Vθ Vz a (e x) := by |
| 7007 | simp only [cylindricalDivergence, StateReindex.along_pull_component] |
| 7008 | |
| 7009 | namespace PeriodizedSignedParameters |
| 7010 | variable {p : PeriodizedSignedParameters D I} {s : StripData D} |
| 7011 | {P : ℕ → D → ℝ} {κ β : ℝ} (h : p.NativeControl s P κ) |
| 7012 | (request : ℕ → D × ℝ → SignedWaveUpdate.Vec2) |
| 7013 | |
| 7014 | theorem NativeControl.amplitude_cover (n : ℕ) (i : I) (x : D × ℝ) |
| 7015 | (hx : x ∈ (HarmonicWaveInteraction.productStrip s).domain) (hi : x ∈ h.cells.carrier n i) : |
| 7016 | x ∈ h.phasePatch n i ∨ ((p.copyData s request).localized i).amplitude n =ᶠ[𝓝 x] fun _ => 0 := by |
| 7017 | rcases h.phase_cover n i x hx hi with hC | hcut | hmask |
| 7018 | · exact Or.inl hC |
| 7019 | · exact Or.inr ((p.copyData s request).localized_zero_germs hcut).1 |
| 7020 | · exact Or.inr (localized_zero_of_mask request hmask).1 |
| 7021 | |
| 7022 | variable {h request} |
| 7023 | |
| 7024 | theorem NativeDynamics.rawCurlData (d : NativeDynamics h request) |
| 7025 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 7026 | (G : ∀ n, CurlClassBounds.CylindricalGeometry (HarmonicWaveInteraction.productStrip s).domain |
| 7027 | (p.base.radius n) (p.directions.radialField n) (fun _ => p.directions.angular) |
| 7028 | (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n)) |
| 7029 | (ht : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.phasePatch n i → |
| 7030 | ⟪p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x, p.fundamental i n x⟫_ℝ = 0) : |
| 7031 | LocalizedCurlRealization.RawData (p.copyData s request) (HarmonicWaveInteraction.productStrip s) |
| 7032 | p.directions h.phasePatch := by |
| 7033 | apply LocalizedCurlRealization.RawData.of_localClasses |
| 7034 | (fun n i => LocalizedCurlRealization.geometry_restrict (G n) |
| 7035 | ((HarmonicWaveInteraction.productStrip s).isOpen_domain.inter (d.open_patch n i)) inter_subset_left) |
| 7036 | (fun n i => ((d.angular i).phase_smooth n).mono inter_subset_left) |
| 7037 | (LocalizedWaveBounds.LocalClass.of_localJets |
| 7038 | (fun n x hx => mul_nonneg (Real.sqrt_nonneg _) (h.envelope_nonneg n x.1 hx)) (h.raw_jets request hR).1) |
| 7039 | (LocalizedWaveBounds.LocalClass.of_localJets (fun _ _ _ => zero_le_one) h.cutoff) |
| 7040 | d.frequency_nonzero |
| 7041 | · intro n i x hx hzero |
| 7042 | change p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x = 0 at hzero |
| 7043 | have hh := h.normal_lower n i x hx.1 hx.2 |
| 7044 | rw [hzero, norm_zero] at hh |
| 7045 | exact (not_le_of_gt h.lower_pos) hh |
| 7046 | · intro n i x hx |
| 7047 | exact LocalizedCurlRealization.signed_coefficients_tangent_at p.base |
| 7048 | (p.matrix i) (p.target i) request (p.mask i) (p.fundamental i) |
| 7049 | (p.normalMotion i) (p.action i) p.column n (ht n i x hx.1 hx.2) |
| 7050 | |
| 7051 | theorem NativeDynamics.full_divergence_zero (d : NativeDynamics h request) (i₀ : I) |
| 7052 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 7053 | (G : ∀ n, CurlClassBounds.CylindricalGeometry (HarmonicWaveInteraction.productStrip s).domain |
| 7054 | (p.base.radius n) (p.directions.radialField n) (fun _ => p.directions.angular) |
| 7055 | (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n)) |
| 7056 | (ht : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.phasePatch n i → |
| 7057 | ⟪p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x, p.fundamental i n x⟫_ℝ = 0) |
| 7058 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) |
| 7059 | (c : Context D) (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 7060 | (n : ℕ) (x : D × ℝ) (hx : x.1 ∈ s.domain) : |
| 7061 | cylindricalDivergence (fun q => c.operators.radius q.1) (radialDirection c n) |
| 7062 | angularDirection (axialDirection c n) (fun q i => ((p.exactBlock s request).oscillation n q i : ℂ)) x = 0 := by |
| 7063 | have rd := d.rawCurlData hR G ht |
| 7064 | have hd := rd.common_divergence_zero h.cells h.cutoff_support (h.amplitude_cover request) n hx |
| 7065 | change cylindricalDivergence (p.base.radius n) _ _ _ _ x = 0 at hd |
| 7066 | have hs := rd.common_velocity_smooth h.cells h.cutoff_support (h.amplitude_cover request) n |
| 7067 | have hv i := ((contDiffOn_pi.mp hs i).contDiffAt |
| 7068 | ((HarmonicWaveInteraction.productStrip s).isOpen_domain.mem_nhds hx)).differentiableAt (by simp) |
| 7069 | let L : ℂ →L[ℝ] ℂ := Complex.ofRealCLM.comp Complex.reCLM |
| 7070 | have he := ParticularWaveAssembly.divergence_map L (p.base.radius n) (p.directions.radialField n) |
| 7071 | (fun _ => p.directions.angular) (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n) hv |
| 7072 | rw [hd] at he |
| 7073 | have hθ : angularDirection (D := D) = fun _ => p.directions.angular := by rw [hm.angular]; rfl |
| 7074 | rw [(d.exact_represents i₀ hm.angular hkp).1, ← hm.radius, ← hm.radial, ← hm.axial, hθ] |
| 7075 | simp only [L, ContinuousLinearMap.comp_apply, Complex.ofRealCLM_apply, Complex.reCLM_apply, |
| 7076 | map_zero] at he |
| 7077 | exact he |
| 7078 | |
| 7079 | theorem NativeDynamics.modeSolenoidal (d : NativeDynamics h request) (i₀ : I) (hκ : κ ≤ 1 / 2) |
| 7080 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 7081 | (G : ∀ n, CurlClassBounds.CylindricalGeometry (HarmonicWaveInteraction.productStrip s).domain |
| 7082 | (p.base.radius n) (p.directions.radialField n) (fun _ => p.directions.angular) |
| 7083 | (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n)) |
| 7084 | (ht : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.phasePatch n i → |
| 7085 | ⟪p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x, p.fundamental i n x⟫_ℝ = 0) |
| 7086 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) |
| 7087 | (hkpne : ∀ n, p.angularFrequency n ≠ 0) |
| 7088 | (c : Context D) (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) : |
| 7089 | HarmonicWaveInteraction.ModeSolenoidal s c (p.exactBlock s request) := by |
| 7090 | apply HarmonicWaveInteraction.modeSolenoidal_of_full c (p.exactBlock s request) |
| 7091 | · intro n |
| 7092 | exact ((d.angular i₀).phase_smooth n).comp (SignedWaveUpdate.zeroSection (D := D)).contDiff.contDiffOn |
| 7093 | (fun _ hx => hx) |
| 7094 | · exact hkpne |
| 7095 | · exact HarmonicWaveInteraction.waveBounds_smooth (h.block_bounds hκ request hR).2.1 (p.exactBlock_zero s request) |
| 7096 | · exact d.full_divergence_zero i₀ hR G ht hkp c hm |
| 7097 | end PeriodizedSignedParameters |
| 7098 | |
| 7099 | open CommonCoverSolve TorusInverse ParticularWaveAssembly ParticularWaveBounds LinearWaveBounds |
| 7100 | |
| 7101 | namespace ParticularParameters |
| 7102 | variable {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 7103 | {p : ParticularParameters Q} {s : StripData (Q × Plane)} |
| 7104 | {c : Context (Q × Plane)} {u : State (Q × Plane)} {b : HarmonicBlock (Q × Plane)} |
| 7105 | {G A : HarmonicResidual.BlockCoefficients (Q × Plane)} {j : ℤ} |
| 7106 | {W : ℕ → (Q × ℝ) × Plane → ℝ} {α κ : ℝ} |
| 7107 | (h : p.NativeControl s c u b G A j W α κ) |
| 7108 | |
| 7109 | theorem NativeControl.amplitude_cover (n : ℕ) (i : Frequency) (x : (Q × ℝ) × Plane) |
| 7110 | (hx : x ∈ (nativeStrip s).domain) (hi : x ∈ h.cells.carrier n i) : |
| 7111 | x ∈ h.phasePatch n i ∨ ((p.copyData c u b G A j).localized i).amplitude n =ᶠ[𝓝 x] fun _ => 0 := |
| 7112 | (h.phase_cover n i x hx hi).imp_right (fun hz => (localized_zero_of_source_path hz).1) |
| 7113 | |
| 7114 | variable {h} |
| 7115 | |
| 7116 | theorem NativeDynamics.rawCurlData (d : NativeDynamics h) : |
| 7117 | LocalizedCurlRealization.RawData (p.copyData c u b G A j) (nativeStrip s) |
| 7118 | p.directions h.phasePatch := by |
| 7119 | apply LocalizedCurlRealization.RawData.of_localClasses |
| 7120 | (fun n i => LocalizedCurlRealization.geometry_restrict (d.background.cylindrical n) |
| 7121 | ((nativeStrip s).isOpen_domain.inter (d.open_patch n i)) inter_subset_left) |
| 7122 | (fun n _ => (d.background.phase_smooth n).mono inter_subset_left) |
| 7123 | (LocalizedWaveBounds.LocalClass.of_localJets |
| 7124 | (fun n x hx => mul_nonneg (Real.sqrt_nonneg _) (h.envelope_nonneg n x hx)) h.raw_jets.1) |
| 7125 | (LocalizedWaveBounds.LocalClass.of_localJets (fun _ _ _ => zero_le_one) h.cutoff) |
| 7126 | d.frequency_nonzero |
| 7127 | · intro n i x hx hz |
| 7128 | have hh := h.normal_lower n i x hx.1 hx.2 |
| 7129 | rw [← h.normal_match n i x hx.1 hx.2, hz, norm_zero] at hh |
| 7130 | exact (not_le_of_gt h.lower_pos) hh |
| 7131 | · intro n i x hx |
| 7132 | exact LocalizedCurlRealization.complexCopyCoefficients_tangent_at |
| 7133 | (p.copyData c u b G A j).background p.length_pos h.realControl h.imagControl n i hx.1 hx.2 |
| 7134 | (h.normal_match n i x hx.1 hx.2) |
| 7135 | |
| 7136 | theorem NativeDynamics.common_divergence_zero (d : NativeDynamics h) (n : ℕ) |
| 7137 | {x : (Q × ℝ) × Plane} (hx : x ∈ (nativeStrip s).domain) : |
| 7138 | cylindricalDivergence (p.background.radius n) (p.directions.radialField n) |
| 7139 | (fun _ => p.directions.angular) (p.directions.axialField (nativeStrip s) n) |
| 7140 | (vectorMode ((p.wave s c u b G A j).frequency n) ((p.wave s c u b G A j).phase n) |
| 7141 | ((p.wave s c u b G A j).amplitude n)) x = 0 := |
| 7142 | d.rawCurlData.common_divergence_zero h.cells h.cutoff_support h.amplitude_cover n hx |
| 7143 | |
| 7144 | |
| 7145 | theorem native_context_divergence (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 7146 | (c : Context (Q × Plane)) |
| 7147 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 7148 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 7149 | (a : ((Q × ℝ) × Plane) → ComplexVector) (n : ℕ) (x : (Q × Plane) × ℝ) : |
| 7150 | cylindricalDivergence (fun y => c.operators.radius y.1) (radialDirection c n) |
| 7151 | angularDirection (axialDirection c n) (fun y => a (angleShuffle y)) x = |
| 7152 | cylindricalDivergence (p.background.radius n) (p.directions.radialField n) |
| 7153 | (fun _ => p.directions.angular) (p.directions.axialField (nativeStrip s) n) a (angleShuffle x) := by |
| 7154 | have hr : StateReindex.vector (angleShuffle (P := Q)) (p.directions.radialField n) = |
| 7155 | radialDirection c n := |
| 7156 | (reindex_radialField (angleShuffle (P := Q)) p.directions n).symm.trans (hm.radial n) |
| 7157 | have hz : StateReindex.vector (angleShuffle (P := Q)) (p.directions.axialField (nativeStrip s) n) = |
| 7158 | axialDirection c n := by |
| 7159 | change reindexVector (angleShuffle (P := Q)) (p.directions.axialField (nativeStrip s) n) = _ |
| 7160 | rw [← reindex_axialField (angleShuffle (P := Q)) p.directions (nativeStrip s) n, angleStrip_nativeStrip] |
| 7161 | exact hm.axial n |
| 7162 | have hθ : StateReindex.vector (angleShuffle (P := Q)) (fun _ => p.directions.angular) = |
| 7163 | angularDirection (D := Q × Plane) := by |
| 7164 | funext y |
| 7165 | exact hm.angular |
| 7166 | have hR : (fun y => p.background.radius n (angleShuffle y)) = |
| 7167 | (fun y : (Q × Plane) × ℝ => c.operators.radius y.1) := hm.radius n |
| 7168 | have he := cylindricalDivergence_reindex (angleShuffle (P := Q)) (p.background.radius n) |
| 7169 | (p.directions.radialField n) (fun _ => p.directions.angular) |
| 7170 | (p.directions.axialField (nativeStrip s) n) a x |
| 7171 | rw [hr, hz, hθ, hR] at he |
| 7172 | exact he |
| 7173 | |
| 7174 | |
| 7175 | variable (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 7176 | (c : Context (Q × Plane)) (u : State (Q × Plane)) (b : HarmonicBlock (Q × Plane)) |
| 7177 | (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) (N : ℕ) |
| 7178 | (C : ∀ j ∈ modes N, p.NativeControl s c u b G A j W α κ) |
| 7179 | (dyn : ∀ j hj, NativeDynamics (C j hj)) |
| 7180 | |
| 7181 | include dyn in |
| 7182 | theorem full_divergence_zero (hκ : κ ≤ 1 / 2) |
| 7183 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 7184 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 7185 | (n : ℕ) (x : (Q × Plane) × ℝ) (hx : x.1 ∈ s.domain) : |
| 7186 | cylindricalDivergence (fun y => c.operators.radius y.1) (radialDirection c n) |
| 7187 | angularDirection (axialDirection c n) |
| 7188 | (fun y i => ((p.updateBlock s c u b G A N).oscillation n y i : ℂ)) x = 0 := by |
| 7189 | rw [(p.update_represents s c u b G A N C dyn).1] |
| 7190 | apply real_divergence_sum_zero (modes N) |
| 7191 | · intro j hj i |
| 7192 | exact (((dyn j hj).wave_smooth hκ n i).contDiffAt |
| 7193 | ((HarmonicResidual.liftDomain_open s.isOpen_domain).mem_nhds ⟨hx,trivial⟩)).differentiableAt (by simp) |
| 7194 | · intro j hj |
| 7195 | rw [p.native_context_divergence s c hm] |
| 7196 | exact (dyn j hj).common_divergence_zero n hx |
| 7197 | |
| 7198 | include dyn in |
| 7199 | theorem modeSolenoidal (hκ : κ ≤ 1 / 2) |
| 7200 | (hW : ∀ n x, x ∈ (nativeStrip s).domain → 0 ≤ W n x) |
| 7201 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 7202 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 7203 | (hphase : ∀ n, ContDiffOn ℝ ∞ (b.phase n) s.domain) |
| 7204 | (hkp : ∀ n, b.angularFrequency n ≠ 0) : |
| 7205 | HarmonicWaveInteraction.ModeSolenoidal s c (p.updateBlock s c u b G A N) := by |
| 7206 | apply HarmonicWaveInteraction.modeSolenoidal_of_full c (p.updateBlock s c u b G A N) hphase hkp |
| 7207 | · exact HarmonicWaveInteraction.waveBounds_smooth (p.assembled_bounds s c u b G A N C hW hκ).1 |
| 7208 | (assembledBlock_zero _ _ _ _ _ _).1 |
| 7209 | · exact p.full_divergence_zero s c u b G A N C dyn hκ hm |
| 7210 | |
| 7211 | end ParticularParameters |
| 7212 | |
| 7213 | end PeriodizedCurl |
| 7214 | |
| 7215 | section UniformCycleGains |
| 7216 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState |
| 7217 | open LabelSumBounds UniformHarmonicInteraction |
| 7218 | open scoped ContDiff Topology |
| 7219 | variable {D ι : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 7220 | |
| 7221 | /-- Coefficient extraction preserves constants chosen before the spatial |
| 7222 | label. The identity concerns the actual linear field and retained Gaussian. -/ |
| 7223 | theorem linearGoodBlock_cancel_uniform {s : StripData D} {P : ι → ℕ → D → ℝ} {γ : ℝ} |
| 7224 | (c : Context D) (a b source good : ι → HarmonicBlock D) |
| 7225 | (g : ι → HarmonicResidual.BlockCoefficients D) |
| 7226 | (hr : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 7227 | (hz : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).axial s.domain) |
| 7228 | (hB : SmoothTriple s.domain c.base) |
| 7229 | (hb : ∀ l n i, HarmonicResidual.SmoothCoefficients s.domain ((b l).velocity n i)) |
| 7230 | (hp : ∀ l n, HarmonicResidual.SmoothCoefficients s.domain ((b l).pressure n)) |
| 7231 | (hΦ : ∀ l n, ContDiffOn ℝ ∞ ((a l).phase n) s.domain) |
| 7232 | (hkp : ∀ l n, (a l).angularFrequency n ≠ 0) |
| 7233 | (hs : ∀ l n i, HarmonicFields.ConjugateSymmetric ((source l).velocity n i)) |
| 7234 | (hg : ∀ l n i, HarmonicFields.ConjugateSymmetric ((good l).velocity n i)) |
| 7235 | (hgood : UniformVelocity s P γ good) |
| 7236 | (hcancel : ∀ l n x, x ∈ s.domain → ∀ θ i, linearBlockField c (a l) (b l) n (x,θ) i + |
| 7237 | (HarmonicWaveInteraction.withCarrier (a l) (source l)).oscillation n (x,θ) i = |
| 7238 | (HarmonicWaveInteraction.withCarrier (a l) (good l)).oscillation n (x,θ) i + |
| 7239 | (HarmonicFields.field (g l n i) ((a l).frequency n) ((a l).phase n) |
| 7240 | ((a l).angularFrequency n) (x,θ)).re) : |
| 7241 | ∀ i j, j ≠ 0 → UniformWaveClass s P γ (fun l n x => (source l).velocity n i j x + |
| 7242 | (HarmonicWaveInteraction.linearGoodBlock c (a l) (b l) (g l)).velocity n i j x) := by |
| 7243 | intro i j hj |
| 7244 | apply (hgood i j hj).congr |
| 7245 | intro l n x hx |
| 7246 | exact (linearGoodBlock_cancel s.isOpen_domain c (a l) (b l) (source l) (good l) (g l) n |
| 7247 | (hr n) (hz n) (fun k => HarmonicMeanInteraction.tripleField_smooth hB n k) |
| 7248 | (hb l n) (hp l n) (hΦ l n) (hkp l n) (hs l n) (hg l n) hx j hj i |
| 7249 | (fun θ => hcancel l n x hx θ i)).symm |
| 7250 | |
| 7251 | /-- The exact nonlinear update preserves the joint label/band estimate. |
| 7252 | All three wave products and the support-local mean interaction are retained. -/ |
| 7253 | theorem waveStage_residual_uniform {s : StripData D} {P : ι → ℕ → D → ℝ} |
| 7254 | {κ α β H γ : ℝ} {C : ℕ → ι → Set D} |
| 7255 | (c : Context D) (ho : OperatorBounds s c.operators κ) (hκ : κ ≤ 1 / 2) |
| 7256 | (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 7257 | (u v : State D) (hmean : v.mean = u.mean) (hm : IncrementBounds s H u.mean) |
| 7258 | (hbase : SmoothTriple s.domain c.base) |
| 7259 | (a b : ι → HarmonicBlock D) {M N : ℕ} |
| 7260 | (ha : UniformVelocity s P α a) (hb : UniformVelocity s P β b) |
| 7261 | (ha0 : ∀ l, HarmonicWaveInteraction.ZeroMode (a l)) |
| 7262 | (hb0 : ∀ l, HarmonicWaveInteraction.ZeroMode (b l)) |
| 7263 | (hM : ∀ l, (a l).BandLimited M) (hN : ∀ l, (b l).BandLimited N) |
| 7264 | (hΦ : ∀ l n, ContDiffOn ℝ ∞ ((a l).phase n) s.domain) |
| 7265 | (hk : ∀ l n, (a l).frequency n ≠ 0) (hkp : ∀ l n, (a l).angularFrequency n ≠ 0) |
| 7266 | (hda : ∀ l, HarmonicWaveInteraction.ModeSolenoidal s c (a l)) |
| 7267 | (hdb : ∀ l, HarmonicWaveInteraction.ModeSolenoidal s c (HarmonicWaveInteraction.withCarrier (a l) (b l))) |
| 7268 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s C 0 |
| 7269 | (fun n l x => HarmonicMeanInteraction.slowNormal c ho hR (a l).phase n x i)) |
| 7270 | (hFreq : LocalizedWaveBounds.LocalUnweighted s C (-(1/2)) (fun n l _ => (a l).frequency n)) |
| 7271 | (hAng : LocalizedWaveBounds.LocalUnweighted s C (-(1/2)) (fun n l _ => ((a l).angularFrequency n : ℝ))) |
| 7272 | (hz : ∀ n l x, x ∈ s.domain → x ∉ C n l → |
| 7273 | ∀ i j, j ≠ 0 → (b l).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 7274 | (hP0 : ∀ l n x, x ∈ s.domain → 0 ≤ P l n x) |
| 7275 | (hP1 : ∀ l n x, x ∈ s.domain → P l n x ≤ 1) |
| 7276 | (hpa : ∀ l n, HarmonicResidual.SmoothCoefficients s.domain ((a l).pressure n)) |
| 7277 | (hpb : ∀ l n, HarmonicResidual.SmoothCoefficients s.domain ((b l).pressure n)) |
| 7278 | (G g A₀ A₁ : ι → HarmonicResidual.BlockCoefficients D) |
| 7279 | (hA : ∀ l n i, HarmonicFields.BandLimited (A₁ l n i - A₀ l n i) 0) |
| 7280 | (hlinear : ∀ i j, j ≠ 0 → UniformWaveClass s P γ (fun l n x => |
| 7281 | (HarmonicResidual.residualBlock c u (a l) (G l) (A₀ l)).velocity n i j x + |
| 7282 | (HarmonicWaveInteraction.linearGoodBlock c (a l) (b l) (g l)).velocity n i j x)) |
| 7283 | (hγm : γ ≤ β + H - 1/2) (hγc : γ ≤ α + β - κ) (hγs : γ ≤ 2*β - κ) : |
| 7284 | UniformVelocity s P γ (fun l => HarmonicResidual.residualBlock c v |
| 7285 | (HarmonicWaveInteraction.addBlock (a l) (b l)) (G l + g l) (A₁ l)) := by |
| 7286 | have hca l := block_waveBounds_all (a l) (waveBounds_each ha l) (ha0 l) (hP0 l) |
| 7287 | have hcb l := block_waveBounds_all (b l) (waveBounds_each hb l) (hb0 l) (hP0 l) |
| 7288 | intro i j hj |
| 7289 | have hnon := UniformHarmonicInteraction.interactionBlock_uniform c ho hκ hR hm ha hb ha0 hb0 hM hN |
| 7290 | hΦ hk hda hdb hNormal hFreq hAng hz hP0 hP1 hj i |
| 7291 | apply ((hlinear i j hj).add (hnon.mono_exponent (le_min hγm (le_min hγc hγs)))).congr |
| 7292 | intro l n x hx |
| 7293 | have hr : ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain := |
| 7294 | contDiffOn_const.add ((contDiffOn_const.mul (ho.radialProfile.smooth 0)).smul contDiffOn_const) |
| 7295 | have he := HarmonicWaveInteraction.residualBlock_wave_update_split s.isOpen_domain c u v hmean |
| 7296 | (a l) (b l) (G l) (g l) (A₀ l) (A₁ l) (hA l) n hr contDiffOn_const (hΦ l n) (hkp l n) |
| 7297 | (fun k => HarmonicMeanInteraction.tripleField_smooth hbase n k) |
| 7298 | (fun k => HarmonicMeanInteraction.tripleField_smooth hm.smooth n k) |
| 7299 | (fun k m => (hca l k m).smooth n) (fun k m => (hcb l k m).smooth n) (hpa l n) (hpb l n) hx j i |
| 7300 | change _ = _ at he |
| 7301 | linear_combination -he |
| 7302 | |
| 7303 | /-- The unchanged oscillation retains a uniform residual estimate after |
| 7304 | an actual mean increment; pressure recomputation and axisymmetric aliases |
| 7305 | may change freely. -/ |
| 7306 | theorem meanStage_residual_uniform {s : StripData D} {P : ι → ℕ → D → ℝ} |
| 7307 | {κ α H γ : ℝ} {C : ℕ → ι → Set D} |
| 7308 | (c : Context D) (ho : OperatorBounds s c.operators κ) (hκ : κ ≤ 1/2) |
| 7309 | (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 7310 | (u v : State D) (h : Triple D) (he : v.mean = updated u.mean h) |
| 7311 | (hbase : SmoothTriple s.domain c.base) (hm : SmoothTriple s.domain u.mean) |
| 7312 | (hh : IncrementBounds s H h) (b : ι → HarmonicBlock D) (hb : UniformVelocity s P α b) |
| 7313 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s C 0 |
| 7314 | (fun n l x => HarmonicMeanInteraction.slowNormal c ho hR (b l).phase n x i)) |
| 7315 | (hFreq : LocalizedWaveBounds.LocalUnweighted s C (-(1/2)) (fun n l _ => (b l).frequency n)) |
| 7316 | (hAng : LocalizedWaveBounds.LocalUnweighted s C (-(1/2)) (fun n l _ => ((b l).angularFrequency n : ℝ))) |
| 7317 | (hz : ∀ n l x, x ∈ s.domain → x ∉ C n l → |
| 7318 | ∀ i j, j ≠ 0 → (b l).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 7319 | (G A₀ A₁ : ι → HarmonicResidual.BlockCoefficients D) |
| 7320 | (hA : ∀ l n i, HarmonicFields.BandLimited (A₁ l n i - A₀ l n i) 0) |
| 7321 | (hold : UniformVelocity s P γ (fun l => HarmonicResidual.residualBlock c u (b l) (G l) (A₀ l))) |
| 7322 | (hγ : γ ≤ α + H - 1/2) : |
| 7323 | UniformVelocity s P γ (fun l => HarmonicResidual.residualBlock c v (b l) (G l) (A₁ l)) := by |
| 7324 | intro i j hj |
| 7325 | have hdelta := LocalizedMeanInteraction.uniform_realMeanCross_class c ho hκ hR hh hb |
| 7326 | hNormal hFreq hAng hz hj i |
| 7327 | apply ((hold i j hj).add (hdelta.mono_exponent hγ)).congr |
| 7328 | intro l n x hx |
| 7329 | have hm' := (s.isOpen_domain.mem_nhds hx) |
| 7330 | have hd := HarmonicMeanInteraction.residualBlock_axisymmetric_alias_update c u v h he (b l) |
| 7331 | (G l) (A₀ l) (A₁ l) (hA l) n |
| 7332 | (fun k => ((HarmonicMeanInteraction.tripleField_smooth hbase n k).contDiffAt hm').differentiableAt (by simp)) |
| 7333 | (fun k => ((HarmonicMeanInteraction.tripleField_smooth hm n k).contDiffAt hm').differentiableAt (by simp)) |
| 7334 | (fun k => ((HarmonicMeanInteraction.tripleField_smooth hh.smooth n k).contDiffAt hm').differentiableAt (by simp)) |
| 7335 | hj i |
| 7336 | change _ = _ at hd |
| 7337 | linear_combination -hd |
| 7338 | |
| 7339 | end UniformCycleGains |
| 7340 | |
| 7341 | section ConstructedWaveGains |
| 7342 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState |
| 7343 | open HarmonicCalculus ParticularWaveAssembly ParticularWaveBounds |
| 7344 | open scoped ContDiff Topology InnerProductSpace |
| 7345 | variable {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 7346 | |
| 7347 | theorem meanIncrement_of_cumulative {s : StripData D} {m : Triple D} |
| 7348 | (h : MeanIncrementBounds.CumulativeBounds s m) : IncrementBounds s (9/10) m := |
| 7349 | ⟨by convert! h.radial using 1; norm_num, h.angular, h.axial⟩ |
| 7350 | |
| 7351 | theorem pressureBounds_smooth {s : StripData D} {P : ℕ → D → ℝ} {α : ℝ} |
| 7352 | {b : HarmonicBlock D} (h : b.PressureBounds s P α) (hz : ∀ n, b.pressure n 0 = 0) |
| 7353 | (n : ℕ) : HarmonicResidual.SmoothCoefficients s.domain (b.pressure n) := by |
| 7354 | intro j |
| 7355 | by_cases hj : j = 0 |
| 7356 | · subst j |
| 7357 | rw [hz] |
| 7358 | exact contDiffOn_const |
| 7359 | · exact (h j hj).smooth n |
| 7360 | |
| 7361 | theorem operator_radial_smooth {s : StripData D} {κ : ℝ} {c : Context D} |
| 7362 | (ho : OperatorBounds s c.operators κ) (n : ℕ) : |
| 7363 | ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain := |
| 7364 | contDiffOn_const.add ((contDiffOn_const.mul (ho.radialProfile.smooth 0)).smul contDiffOn_const) |
| 7365 | |
| 7366 | namespace ParticularParameters |
| 7367 | open TorusInverse |
| 7368 | variable {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 7369 | |
| 7370 | theorem residual_gain_local |
| 7371 | (p : ParticularParameters Q) (s : StripData (Q × Plane)) |
| 7372 | (c : Context (Q × Plane)) (u v : State (Q × Plane)) (hmean : v.mean = u.mean) |
| 7373 | (b : HarmonicBlock (Q × Plane)) (G A : HarmonicResidual.BlockCoefficients (Q × Plane)) |
| 7374 | {W : ℕ → (Q × ℝ) × Plane → ℝ} {α κ : ℝ} {M N : ℕ} |
| 7375 | (C : ∀ j ∈ modes N, p.NativeControl s c u b G A j W α κ) |
| 7376 | (dyn : ∀ j hj, NativeDynamics (C j hj)) |
| 7377 | (hα : 7/10 ≤ α) (hκ : κ ≤ 1/100000) |
| 7378 | (ho : OperatorBounds s c.operators κ) (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 7379 | (hb : BaseBounds s c.base) (hu : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 7380 | (hW : ∀ n x, x ∈ (nativeStrip s).domain → 0 ≤ W n x) |
| 7381 | (hWone : ∀ n x, x ∈ s.domain → W n (angleShuffle (x,0)) ≤ 1) |
| 7382 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 7383 | (reindexDirections angleShuffle p.directions) (reindexCoefficients angleShuffle p.background)) |
| 7384 | (hold : b.WaveBounds s (fun n x => W n (angleShuffle (x,0))) (1/2)) |
| 7385 | (hold0 : HarmonicWaveInteraction.ZeroMode b) (holdBand : b.BandLimited M) |
| 7386 | (hsourceBand : (HarmonicResidual.residualBlock c u b G A).BandLimited N) |
| 7387 | (hphase : ∀ n, ContDiffOn ℝ ∞ (b.phase n) s.domain) |
| 7388 | (hk : ∀ n, b.frequency n ≠ 0) (hkp : ∀ n, b.angularFrequency n ≠ 0) |
| 7389 | (hdiv : HarmonicWaveInteraction.ModeSolenoidal s c b) |
| 7390 | (hpress : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (b.pressure n)) |
| 7391 | {patch : ℕ → Set (Q × Plane)} |
| 7392 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s (fun n (_ : Unit) => patch n) 0 |
| 7393 | (fun n _ x => HarmonicMeanInteraction.slowNormal c ho hR b.phase n x i)) |
| 7394 | (hFreq : BandBound s (-(1/2)) b.frequency) |
| 7395 | (hAng : BandBound s (-(1/2)) (fun n => (b.angularFrequency n : ℝ))) |
| 7396 | (hz : ∀ n x, x ∈ s.domain → x ∉ patch n → ∀ i j, j ≠ 0 → |
| 7397 | (p.updateBlock s c u b G A N).velocity n i j =ᶠ[𝓝 x] fun _ => 0) : |
| 7398 | (HarmonicResidual.residualBlock c v |
| 7399 | (HarmonicWaveInteraction.addBlock b (p.updateBlock s c u b G A N)) |
| 7400 | (G + (p.gaussianBlock c u b G A N).velocity) A).WaveBounds |
| 7401 | s (fun n x => W n (angleShuffle (x,0))) (α + 1/10) := by |
| 7402 | have hκhalf : κ ≤ 1/2 := by linarith |
| 7403 | have hbounds := p.assembled_bounds s c u b G A N C hW hκhalf |
| 7404 | have hzmode : HarmonicWaveInteraction.ZeroMode (p.updateBlock s c u b G A N) := |
| 7405 | (assembledBlock_zero _ _ _ _ _ _).1 |
| 7406 | have hzpress : ∀ n, (p.updateBlock s c u b G A N).pressure n 0 = 0 := |
| 7407 | (assembledBlock_zero _ _ _ _ _ _).2 |
| 7408 | have hnewdiv : HarmonicWaveInteraction.ModeSolenoidal s c |
| 7409 | (HarmonicWaveInteraction.withCarrier b (p.updateBlock s c u b G A N)) := by |
| 7410 | rw [withCarrier_of_same (show SameCarrier b (p.updateBlock s c u b G A N) from ⟨rfl,rfl,rfl⟩)] |
| 7411 | exact p.modeSolenoidal s c u b G A N C dyn hκhalf hW hm hphase hkp |
| 7412 | apply waveStage_residual_mem_local c ho hκhalf hR u v hmean (meanIncrement_of_cumulative hu) |
| 7413 | hb.smooth b (p.updateBlock s c u b G A N) hold hbounds.1 hold0 hzmode holdBand |
| 7414 | (p.updateBlock_band s c u b G A N) hphase hk hkp hdiv hnewdiv hNormal hFreq hAng hz |
| 7415 | (fun n x hx => hW n _ hx) hWone hpress (pressureBounds_smooth hbounds.2.1 hzpress) |
| 7416 | G (p.gaussianBlock c u b G A N).velocity A A |
| 7417 | (fun n i => by rw [sub_self]; exact HarmonicResidual.band_zero _) _ (by linarith) (by linarith) (by linarith) |
| 7418 | intro i j hj |
| 7419 | exact (p.linearGood_bounds s c u b G A N C dyn hκhalf hsourceBand hb.smooth |
| 7420 | (operator_radial_smooth ho) hm hphase hkp hW i j hj).mono_exponent (by linarith) |
| 7421 | |
| 7422 | end ParticularParameters |
| 7423 | |
| 7424 | namespace PeriodizedSignedParameters |
| 7425 | variable {I : Type} {p : PeriodizedSignedParameters D I} {s : StripData D} |
| 7426 | {P : ℕ → D → ℝ} {B κ : ℝ} {h : p.NativeControl s P κ} |
| 7427 | {request : ℕ → D × ℝ → SignedWaveUpdate.Vec2} |
| 7428 | |
| 7429 | theorem NativeDynamics.residual_gain_local (d : NativeDynamics h request) (i₀ : I) |
| 7430 | (hB : 7/10 ≤ B) (hκ : κ ≤ 1/100000) |
| 7431 | (hRquest : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) (B-1/2-κ) |
| 7432 | (fun n x => request n x j)) |
| 7433 | (geom : ∀ n, CurlClassBounds.CylindricalGeometry (HarmonicWaveInteraction.productStrip s).domain |
| 7434 | (p.base.radius n) (p.directions.radialField n) (fun _ => p.directions.angular) |
| 7435 | (p.directions.axialField (HarmonicWaveInteraction.productStrip s) n)) |
| 7436 | (ht : ∀ n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ h.phasePatch n i → |
| 7437 | ⟪p.base.normal (HarmonicWaveInteraction.productStrip s) p.directions n x, p.fundamental i n x⟫_ℝ = 0) |
| 7438 | (hkp : ∀ n, p.base.frequency n * d.slope n = (p.angularFrequency n : ℝ)) |
| 7439 | (hkpne : ∀ n, p.angularFrequency n ≠ 0) |
| 7440 | (c : Context D) (u v : State D) (hmean : v.mean = u.mean) |
| 7441 | (ho : OperatorBounds s c.operators κ) (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 7442 | (hbase : BaseBounds s c.base) (hu : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 7443 | (hm : WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) p.directions p.base) |
| 7444 | (a : HarmonicBlock D) (hcarrier : SameCarrier a (p.exactBlock s request)) |
| 7445 | (ha : a.WaveBounds s P (1/2)) (ha0 : HarmonicWaveInteraction.ZeroMode a) |
| 7446 | {M : ℕ} (hM : a.BandLimited M) |
| 7447 | (hphase : ∀ n, ContDiffOn ℝ ∞ (a.phase n) s.domain) |
| 7448 | (hk : ∀ n, a.frequency n ≠ 0) (hka : ∀ n, a.angularFrequency n ≠ 0) |
| 7449 | (hdiv : HarmonicWaveInteraction.ModeSolenoidal s c a) |
| 7450 | (hpress : ∀ n, HarmonicResidual.SmoothCoefficients s.domain (a.pressure n)) |
| 7451 | {patch : ℕ → Set D} |
| 7452 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s (fun n (_ : Unit) => patch n) 0 |
| 7453 | (fun n _ x => HarmonicMeanInteraction.slowNormal c ho hR a.phase n x i)) |
| 7454 | (hFreq : BandBound s (-(1/2)) a.frequency) |
| 7455 | (hAng : BandBound s (-(1/2)) (fun n => (a.angularFrequency n : ℝ))) |
| 7456 | (hz : ∀ n x, x ∈ s.domain → x ∉ patch n → ∀ i j, j ≠ 0 → |
| 7457 | (p.exactBlock s request).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 7458 | (hP1 : ∀ n x, x ∈ s.domain → P n x ≤ 1) |
| 7459 | (G A : HarmonicResidual.BlockCoefficients D) |
| 7460 | (hold : (HarmonicResidual.residualBlock c u a G A).WaveBounds s P (B+1/10)) : |
| 7461 | (HarmonicResidual.residualBlock c v |
| 7462 | (HarmonicWaveInteraction.addBlock a (p.exactBlock s request)) |
| 7463 | (G + (p.gaussianBlock s request).velocity) A).WaveBounds s P (B+1/10) := by |
| 7464 | have hκhalf : κ ≤ 1/2 := by linarith |
| 7465 | have hbounds := h.block_bounds hκhalf request hRquest |
| 7466 | have hnewdiv : HarmonicWaveInteraction.ModeSolenoidal s c |
| 7467 | (HarmonicWaveInteraction.withCarrier a (p.exactBlock s request)) := by |
| 7468 | rw [withCarrier_of_same hcarrier] |
| 7469 | exact d.modeSolenoidal i₀ hκhalf hRquest geom ht hkp hkpne c hm |
| 7470 | apply waveStage_residual_mem_local c ho hκhalf hR u v hmean (meanIncrement_of_cumulative hu) |
| 7471 | hbase.smooth a (p.exactBlock s request) ha hbounds.2.1 ha0 (p.exactBlock_zero s request) |
| 7472 | hM (p.exactBlock_band s request) hphase hk hka hdiv hnewdiv hNormal hFreq hAng hz |
| 7473 | h.envelope_nonneg hP1 hpress (pressureBounds_smooth hbounds.2.2.1 (p.exactBlock_pressure_zero s request)) |
| 7474 | G (p.gaussianBlock s request).velocity A A |
| 7475 | (fun n i => by rw [sub_self]; exact HarmonicResidual.band_zero _) _ (by linarith) (by linarith) (by linarith) |
| 7476 | intro i j hj |
| 7477 | exact (hold i j hj).add ((d.linearGood_bounds i₀ hκhalf hRquest hkp hkpne c hbase.smooth |
| 7478 | (operator_radial_smooth ho) hm a hcarrier i j hj).mono_exponent (by linarith)) |
| 7479 | |
| 7480 | end PeriodizedSignedParameters |
| 7481 | |
| 7482 | end ConstructedWaveGains |
| 7483 | |
| 7484 | section ConstructedWaveMeans |
| 7485 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 7486 | open scoped ContDiff BigOperators Topology |
| 7487 | |
| 7488 | section CovarianceAssembly |
| 7489 | variable {D ι : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 7490 | |
| 7491 | theorem assembledCovarianceIncrement_mem |
| 7492 | {s : StripData D} {P : ι → ℕ → D → ℝ} {α β : ℝ} (hαβ : α ≤ β) |
| 7493 | {d h : ℝ} {vr vt : TorusInverse.Plane} |
| 7494 | {sys : PartitionedCovariance.SlotSystem d h vr vt} |
| 7495 | (labels : ℕ → Finset ι) (label : ℕ → ι → SlotColoring.Label) |
| 7496 | (hinj : ∀ n, Set.InjOn (label n) (labels n : Set ι)) |
| 7497 | (hlevel : ∀ n l, l ∈ labels n → 1 ≤ (label n l).1) |
| 7498 | (χ : ℕ → D → LabelSumBounds.WindowPoint) (hχ : ∀ n, ContinuousOn (χ n) s.domain) |
| 7499 | (Y : ℕ → D → TorusInverse.Plane) |
| 7500 | (a b : ι → HarmonicBlock D) (N : ℕ) |
| 7501 | (hNa : ∀ l, (a l).BandLimited N) (hNb : ∀ l, (b l).BandLimited N) |
| 7502 | (hcarrier : ∀ l, LabelSumBounds.SameCarrier (a l) (b l)) |
| 7503 | (ha : UniformHarmonicInteraction.UniformVelocity s P α a) |
| 7504 | (hb : UniformHarmonicInteraction.UniformVelocity s P β b) |
| 7505 | (ha0 : ∀ l, HarmonicWaveInteraction.ZeroMode (a l)) |
| 7506 | (hb0 : ∀ l, HarmonicWaveInteraction.ZeroMode (b l)) |
| 7507 | (hP0 : ∀ l n x, x ∈ s.domain → 0 ≤ P l n x) |
| 7508 | (hP1 : ∀ l n x, x ∈ s.domain → P l n x ≤ 1) |
| 7509 | (hkp : ∀ l n, (a l).angularFrequency n ≠ 0) |
| 7510 | (hsu : LabelSumBounds.SupportedOscillations sys label χ Y s.domain (fun l => (a l).oscillation)) |
| 7511 | (hsv : LabelSumBounds.SupportedOscillations sys label χ Y s.domain (fun l => (b l).oscillation)) |
| 7512 | (u : State D) |
| 7513 | (hrep : u.oscillation = LabelSumBounds.fieldSum labels (fun l => (a l).oscillation)) : |
| 7514 | SignedMeanGain.TensorClass s (α + β) |
| 7515 | (SignedMeanGain.covarianceIncrement u.oscillation |
| 7516 | (LabelSumBounds.fieldSum labels (fun l => (b l).oscillation))) := by |
| 7517 | rw [hrep] |
| 7518 | exact fun i j => LabelSumBounds.harmonic_covariance_increment_sum_mem hαβ labels label hinj hlevel |
| 7519 | χ hχ Y a b N hNa hNb hcarrier |
| 7520 | (LabelSumBounds.uniform_coefficients_of_nonzero a ha ha0 hP0) |
| 7521 | (LabelSumBounds.uniform_coefficients_of_nonzero b hb hb0 hP0) hP0 hP1 hkp hsu hsv i j |
| 7522 | |
| 7523 | end CovarianceAssembly |
| 7524 | |
| 7525 | section WavePressureDebt |
| 7526 | variable {coord cL cR : ℝ} (U : SlowRegion coord) (g : GaugeData PressureStream.Plane) |
| 7527 | (ha : 0 < g.radial.inner) (hd : 0 < g.radial.exponent) (hcL : 0 < cL) (hcR : 0 < cR) |
| 7528 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 7529 | (hell : ∀ n, g.length n = qLength coord) |
| 7530 | local notation "st" => movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL |
| 7531 | local notation "ss" => PhysicalMeanDomain.localSlowStripData U.carrier U.isOpen ε L hε hεone hL |
| 7532 | variable (c : Context Point) (u : State Point) (w : Oscillation Point) |
| 7533 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 7534 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 7535 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 7536 | (hm : GaugeDebtIncrement.RegularTriple U g.radial.inner g.radial.outer u.mean) |
| 7537 | (hW : ∀ i j, GaugeDebtIncrement.Regular U g.radial.inner g.radial.outer (u.covariance i j)) |
| 7538 | (hX : ∀ i j, GaugeDebtIncrement.Regular U g.radial.inner g.radial.outer |
| 7539 | (SignedMeanGain.covarianceIncrement u.oscillation w i j)) |
| 7540 | {κ α : ℝ} (ho : OperatorBounds (movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL) c.operators κ) |
| 7541 | (hcX : SignedMeanGain.TensorClass (movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL) α (SignedMeanGain.covarianceIncrement u.oscillation w)) |
| 7542 | |
| 7543 | include hd hell hop hbase hm hW hX ho hcX in |
| 7544 | theorem gaugeWaveStage_pressure_from_covariance |
| 7545 | (hfixed : (reconstructState g c u).pressure = u.pressure) : |
| 7546 | MeanClass st (α-κ) (SignedMeanGain.pressureChange g c u w q gaussian) := by |
| 7547 | let v := SignedMeanGain.waveStage g c u w q gaussian |
| 7548 | have hmu := GaugeDebtIncrement.waveStage_mean_regular U g c u w q gaussian hm |
| 7549 | have hvW := GaugeDebtIncrement.waveStage_covariance_regular U g c u w q gaussian hW hX |
| 7550 | have hgu := hm.gr ha g.radial.inner_lt_outer hbase hop u.covariance hW |
| 7551 | have hgv := hmu.gr ha g.radial.inner_lt_outer hbase hop v.covariance hvW |
| 7552 | have hgr : MeanClass st (α-κ) (v.gr c - u.gr c) := by |
| 7553 | apply class_congr (SignedMeanGain.radialCovarianceChange_mem ho hcX) |
| 7554 | intro n x hx |
| 7555 | exact GaugeDebtIncrement.waveStage_gr_agree U ha g.radial.inner_lt_outer g c u w q gaussian |
| 7556 | hop hbase hm hW hX n hx.1 |
| 7557 | have hp := reconstructState_pressure_change_class U g ha hd hcL hcR ε L hε hεone hL hell |
| 7558 | c v u hgv.smooth hgu.smooth hgv.supported hgu.supported hgr |
| 7559 | simp only [hfixed] at hp |
| 7560 | exact hp |
| 7561 | |
| 7562 | include hd hell hop hbase hm hW hX ho hcX in |
| 7563 | theorem gaugeWaveStage_mean_from_covariance |
| 7564 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 7565 | (hb : BaseBounds st c.base) (hu : CorrectionState.CumulativeBounds st u) |
| 7566 | (hα : 9/10 ≤ α-κ) {β : ℝ} (hβ : β ≤ α-κ) |
| 7567 | (hθ : MeanClass st β (u.thetaResidual c)) |
| 7568 | (hz : MeanClass st β (u.axialResidual c)) |
| 7569 | (hdebt : ∀ i : Fin 3, UnweightedClass ss β (fun n x => debt c u n x i)) : |
| 7570 | let v := SignedMeanGain.waveStage g c u w q gaussian |
| 7571 | MeanClass st (α-κ) (SignedMeanGain.pressureChange g c u w q gaussian) ∧ |
| 7572 | CorrectionState.CumulativeBounds st v ∧ |
| 7573 | MeanClass st β (v.thetaResidual c) ∧ |
| 7574 | MeanClass st β (v.axialResidual c) ∧ |
| 7575 | (∀ i : Fin 3, UnweightedClass ss β (fun n x => debt c v n x i)) := by |
| 7576 | let v := SignedMeanGain.waveStage g c u w q gaussian |
| 7577 | have hp := gaugeWaveStage_pressure_from_covariance U g ha hd hcL hcR ε L hε hεone hL hell |
| 7578 | c u w q gaussian hop hbase hm hW hX ho hcX hfixed |
| 7579 | have hWs : ∀ i j, SmoothOn (st).domain (u.covariance i j) := |
| 7580 | fun i j n => ((hW i j).smooth n).mono (fun _ hx => hx.1) |
| 7581 | have ht : MeanClass st (α-κ) (v.thetaResidual c - u.thetaResidual c) := by |
| 7582 | apply class_congr (SignedMeanGain.thetaCovarianceChange_mem ho hcX) |
| 7583 | exact SignedMeanGain.waveStage_theta_change (st).isOpen_domain g c u w q gaussian |
| 7584 | hb.smooth hu.velocity.smooth hWs (fun i j => (hcX i j).smooth) |
| 7585 | have hz' : MeanClass st (α-κ) (v.axialResidual c - u.axialResidual c) := by |
| 7586 | apply class_congr ((SignedMeanGain.axialCovarianceChange_mem ho hcX).add |
| 7587 | ((ho.dz hp).mono_exponent (by linarith))) |
| 7588 | exact SignedMeanGain.waveStage_axial_change (st).isOpen_domain g c u w q gaussian |
| 7589 | hb.smooth hu.velocity.smooth hWs (fun i j => (hcX i j).smooth) hu.pressure.smooth hp.smooth |
| 7590 | refine ⟨hp, gaugeWaveStage_cumulative g c u w q ⟨0,gaussian,0⟩ hu hp hα, ?_, ?_, ?_⟩ |
| 7591 | · apply class_congr (hθ.add (ht.mono_exponent hβ)) |
| 7592 | intro n x hx |
| 7593 | change v.thetaResidual c n x = u.thetaResidual c n x + (v.thetaResidual c n x - u.thetaResidual c n x) |
| 7594 | ring |
| 7595 | · apply class_congr (hz.add (hz'.mono_exponent hβ)) |
| 7596 | intro n x hx |
| 7597 | change v.axialResidual c n x = u.axialResidual c n x + (v.axialResidual c n x - u.axialResidual c n x) |
| 7598 | ring |
| 7599 | · exact GaugeDebtIncrement.debt_mem_after_change ss c u v le_rfl hβ hdebt |
| 7600 | (GaugeDebtIncrement.waveStage_debt_change_mem U ha g.radial.inner_lt_outer hcL hcR |
| 7601 | ε L hε hεone hL g c u w q gaussian hop hbase hm hW hX ho hcX) |
| 7602 | |
| 7603 | end WavePressureDebt |
| 7604 | |
| 7605 | end ConstructedWaveMeans |
| 7606 | |
| 7607 | section CycleSignedFamily |
| 7608 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState |
| 7609 | open scoped ContDiff Topology BigOperators |
| 7610 | |
| 7611 | namespace CycleParameters |
| 7612 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 7613 | (c : Context CyclePoint) (u : State CyclePoint) |
| 7614 | |
| 7615 | noncomputable def beforeSignedBlock (l : ι) : HarmonicBlock CyclePoint := |
| 7616 | addBlock (v.blocks l) (p.particularBlock v c u l) |
| 7617 | |
| 7618 | noncomputable def signedTangent (l : ι) : HarmonicBlock CyclePoint := |
| 7619 | (p.signed l).tangentBlock p.strip (p.signedRequest v c u) |
| 7620 | |
| 7621 | noncomputable def signedCurl (l : ι) : HarmonicBlock CyclePoint := |
| 7622 | (p.signed l).curlBlock p.strip (p.signedRequest v c u) |
| 7623 | |
| 7624 | theorem beforeSignedBlock_represents {axis : AxisymmetricAlias} |
| 7625 | (hrep : CycleRepresentation v u axis) : |
| 7626 | (p.afterParticular v c u).oscillation = |
| 7627 | LabelSumBounds.fieldSum v.labels (fun l => (p.beforeSignedBlock v c u l).oscillation) := by |
| 7628 | funext n x i |
| 7629 | change u.oscillation n x i + p.particularVelocity v c u n x i = _ |
| 7630 | rw [hrep.velocity n x i] |
| 7631 | simp only [beforeSignedBlock, addBlock_oscillation _ _ (p.particular_carrier v c u _), |
| 7632 | LabelSumBounds.fieldSum, particularVelocity, Pi.add_apply, Finset.sum_add_distrib] |
| 7633 | |
| 7634 | theorem signedVelocity_split : |
| 7635 | p.signedVelocity v c u = |
| 7636 | LabelSumBounds.fieldSum v.labels (fun l => (p.signedTangent v c u l).oscillation) + |
| 7637 | LabelSumBounds.fieldSum v.labels (fun l => (p.signedCurl v c u l).oscillation) := by |
| 7638 | funext n x i |
| 7639 | simp only [signedVelocity, signedBlock, signedTangent, signedCurl, |
| 7640 | PeriodizedSignedParameters.exactBlock_split, LabelSumBounds.fieldSum, |
| 7641 | Pi.add_apply, Finset.sum_add_distrib] |
| 7642 | |
| 7643 | private theorem block_band_mono {b : HarmonicBlock CyclePoint} {N M : ℕ} |
| 7644 | (h : b.BandLimited N) (hle : N ≤ M) : b.BandLimited M := |
| 7645 | ⟨fun n i => (h.1 n i).mono hle, fun n => (h.2 n).mono hle⟩ |
| 7646 | |
| 7647 | /-- The family in the signed covariance identity is computed from the |
| 7648 | current cycle, including its actual particular increment and signed curl. -/ |
| 7649 | noncomputable def signedFamily |
| 7650 | (primary : ι → HarmonicBlock CyclePoint) (P : ι → ℕ → CyclePoint → ℝ) |
| 7651 | {σ κ : ℝ} (hσ : 1/5 ≤ σ) (N : ℕ) |
| 7652 | (hprimary : ∀ l, (primary l).BandLimited N) (hband : CoefficientBands v) |
| 7653 | (hcp : ∀ l, SameCarrier (v.blocks l) (primary l)) |
| 7654 | (hcs : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) |
| 7655 | (hold : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2) |
| 7656 | (fun l n x => (v.blocks l).velocity n i j x)) |
| 7657 | (hdiff : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (17/25) |
| 7658 | (fun l n x => (v.blocks l).velocity n i j x - (primary l).velocity n i j x)) |
| 7659 | (hpart : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ) |
| 7660 | (fun l n x => (p.particularBlock v c u l).velocity n i j x)) |
| 7661 | (htangent : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ-κ) |
| 7662 | (fun l n x => (p.signedTangent v c u l).velocity n i j x)) |
| 7663 | (hcurl : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1+σ-2*κ) |
| 7664 | (fun l n x => (p.signedCurl v c u l).velocity n i j x)) |
| 7665 | (hP0 : ∀ l n x, x ∈ p.strip.domain → 0 ≤ P l n x) |
| 7666 | (hP1 : ∀ l n x, x ∈ p.strip.domain → P l n x ≤ 1) |
| 7667 | (hkp : ∀ l n, (v.blocks l).angularFrequency n ≠ 0) : |
| 7668 | LabelSumBounds.SignedFamily p.strip P (1/2) (17/25) (1/2+σ-κ) (1+σ-2*κ) where |
| 7669 | primary := primary |
| 7670 | old := p.beforeSignedBlock v c u |
| 7671 | tangent := p.signedTangent v c u |
| 7672 | curl := p.signedCurl v c u |
| 7673 | bandwidth := max (max N v.residualBand) 1 |
| 7674 | primary_band l := block_band_mono (hprimary l) ((le_max_left _ _).trans (le_max_left _ _)) |
| 7675 | old_band l := block_band_mono |
| 7676 | (show (p.beforeSignedBlock v c u l).BandLimited v.residualBand from by |
| 7677 | have hb := addBlock_band (hband.velocityPressure l) (p.particularBlock_band v c u l) |
| 7678 | simp only [max_self] at hb |
| 7679 | exact hb) |
| 7680 | ((le_max_right _ _).trans (le_max_left _ _)) |
| 7681 | tangent_band l := block_band_mono ((p.signed l).tangentBlock_band _ _) (le_max_right _ _) |
| 7682 | curl_band l := block_band_mono |
| 7683 | (show (p.signedCurl v c u l).BandLimited 1 from by |
| 7684 | have hb := subBlock_band ((p.signed l).exactBlock_band p.strip (p.signedRequest v c u)) |
| 7685 | ((p.signed l).tangentBlock_band p.strip (p.signedRequest v c u)) |
| 7686 | simp only [max_self] at hb |
| 7687 | exact hb) (le_max_right _ _) |
| 7688 | primary_carrier l := ⟨(hcp l).frequency, (hcp l).phase, (hcp l).angular⟩ |
| 7689 | tangent_carrier l := ⟨(hcs l).frequency, (hcs l).phase, (hcs l).angular⟩ |
| 7690 | curl_carrier l := ⟨(hcs l).frequency, (hcs l).phase, (hcs l).angular⟩ |
| 7691 | old_bounds i j := (hold i j).add ((hpart i j).mono_exponent (by linarith)) |
| 7692 | difference_bounds i j := by |
| 7693 | apply ((hdiff i j).add ((hpart i j).mono_exponent (by linarith))).congr |
| 7694 | intro l n x hx |
| 7695 | change (v.blocks l).velocity n i j x - (primary l).velocity n i j x + |
| 7696 | (p.particularBlock v c u l).velocity n i j x = |
| 7697 | (v.blocks l).velocity n i j x + (p.particularBlock v c u l).velocity n i j x - |
| 7698 | (primary l).velocity n i j x |
| 7699 | ring |
| 7700 | tangent_bounds := htangent |
| 7701 | curl_bounds := hcurl |
| 7702 | envelope_nonneg := hP0 |
| 7703 | envelope_le_one := hP1 |
| 7704 | angular_ne_zero := hkp |
| 7705 | |
| 7706 | end CycleParameters |
| 7707 | |
| 7708 | end CycleSignedFamily |
| 7709 | |
| 7710 | section NativeSignedMeanComposition |
| 7711 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 7712 | open scoped ContDiff BigOperators |
| 7713 | |
| 7714 | /-- The actual native signed update supplies its pressure, cumulative, |
| 7715 | mean-residual, and measured-debt bounds from the same covariance. -/ |
| 7716 | theorem nativeSignedStage_mean_debt |
| 7717 | (G : SignedMeanGain.Geometry) (B : SignedMeanGain.NativeData G) |
| 7718 | (c : Context Point) (u : State Point) |
| 7719 | {P : SignedMeanGain.NativeIndex → ℕ → Point → ℝ} {σ κ : ℝ} |
| 7720 | (hσ : 1/5 ≤ σ) (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1/100000) |
| 7721 | (f : LabelSumBounds.SignedFamily G.strip P (1/2) (17/25) |
| 7722 | (1/2+σ-κ) (1+σ-2*κ)) (a : SignedMeanGain.Assembly f) |
| 7723 | (hl : a.labels = B.labels) |
| 7724 | (hp : ∀ l, (f.primary l).velocity = (B.primaryBlocks l).velocity) |
| 7725 | (hcp : ∀ l, LabelSumBounds.SameCarrier (f.primary l) (B.primaryBlocks l)) |
| 7726 | (ht : ∀ l, (f.tangent l).velocity = (B.signedBlocks c u l).velocity) |
| 7727 | (hct : ∀ l, LabelSumBounds.SameCarrier (f.tangent l) (B.signedBlocks c u l)) |
| 7728 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 7729 | (hold : u.oscillation = SignedMeanGain.oldField f a) |
| 7730 | (H : SignedMeanGain.LocalData G c u |
| 7731 | (SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a) q gaussian) |
| 7732 | (ho : OperatorBounds G.strip G.operators κ) |
| 7733 | (hu : CorrectionState.CumulativeBounds G.strip u) |
| 7734 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain G.region.carrier) c.base) |
| 7735 | (hm : GaugeDebtIncrement.RegularTriple G.region G.patch.a G.patch.b u.mean) |
| 7736 | (hW : ∀ i j, GaugeDebtIncrement.Regular G.region G.patch.a G.patch.b (u.covariance i j)) |
| 7737 | (hX : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.incrementTensor f a i j)) |
| 7738 | (hS : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.crossTensor f a i j)) |
| 7739 | (hθ : MeanClass G.strip (1+σ-κ) (u.thetaResidual c)) |
| 7740 | (hz : MeanClass G.strip (1+σ-κ) (u.axialResidual c)) |
| 7741 | (hd : DefectBounds G.slowStrip (σ-κ) c u) : |
| 7742 | let v := SignedMeanGain.waveStage G.gauge c u |
| 7743 | (SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a) q gaussian |
| 7744 | MeanClass G.strip (1+σ-2*κ) (v.pressure - u.pressure) ∧ |
| 7745 | CorrectionState.CumulativeBounds G.strip v ∧ |
| 7746 | MeanClass G.strip (1+σ-2*κ) (v.thetaResidual c) ∧ |
| 7747 | MeanClass G.strip (1+σ-2*κ) (v.axialResidual c) ∧ |
| 7748 | MeanClass G.strip (1+σ+17/100) (meanBar (v.thetaResidual c)) ∧ |
| 7749 | MeanClass G.strip (1+σ+17/100) (meanBar (v.axialResidual c)) ∧ |
| 7750 | DefectBounds G.slowStrip (σ-2*κ) c v := by |
| 7751 | let w := SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a |
| 7752 | let v := SignedMeanGain.waveStage G.gauge c u w q gaussian |
| 7753 | have hXT : SignedMeanGain.TensorClass G.strip (1+σ-κ) |
| 7754 | (SignedMeanGain.covarianceIncrement u.oscillation w) := by |
| 7755 | simpa only [hold, w, SignedMeanGain.incrementTensor] using |
| 7756 | (SignedMeanGain.signed_tensor_bounds hσ hκsmall f a).1 |
| 7757 | have hXR : ∀ i j, GaugeDebtIncrement.Regular G.region G.patch.a G.patch.b |
| 7758 | (SignedMeanGain.covarianceIncrement u.oscillation w i j) := by |
| 7759 | intro i j |
| 7760 | have hf := hX i j |
| 7761 | change GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b |
| 7762 | (SignedMeanGain.incrementTensor f a i j) at hf |
| 7763 | rw [hold] |
| 7764 | exact ⟨hf.smooth, hf.supported⟩ |
| 7765 | have hpressure : MeanClass G.strip (1+σ-2*κ) (SignedMeanGain.pressureChange G.gauge c u w q gaussian) := by |
| 7766 | simpa only [show 1+σ-κ-κ = 1+σ-2*κ by ring] using H.pressureChange_mem ho hXT |
| 7767 | have hc : OperatorBounds G.strip c.operators κ := by simpa only [H.operators_eq] using ho |
| 7768 | have hop : LocalRankDefect.LocalOperators G.region.carrier c.operators := by |
| 7769 | rw [H.operators_eq] |
| 7770 | exact G.local_operators |
| 7771 | have hdebt := GaugeDebtIncrement.waveStage_defectBounds G.region G.patch.a_pos G.patch.a_lt_b |
| 7772 | G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one |
| 7773 | G.gauge c u w q gaussian hop hbase hm hW hXR hc hXT |
| 7774 | (show σ-2*κ ≤ σ-κ by linarith) (show 1+(σ-2*κ) ≤ (1+σ-κ)-κ by linarith) hd |
| 7775 | have hgain := SignedMeanGain.native_signed_mean_gain G B c u hσ hκ hκsmall f a hl hp hcp ht hct |
| 7776 | q gaussian hold H ho hX hS hθ hz hd |
| 7777 | have hcum : CorrectionState.CumulativeBounds G.strip v := |
| 7778 | gaugeWaveStage_cumulative G.gauge c u w q ⟨0,gaussian,0⟩ hu hpressure (by linarith) |
| 7779 | exact ⟨hpressure, hcum, hgain.1, hgain.2.1, hgain.2.2.1, hgain.2.2.2, hdebt⟩ |
| 7780 | |
| 7781 | |
| 7782 | end NativeSignedMeanComposition |
| 7783 | |
| 7784 | section UniformPeriodizedCoefficients |
| 7785 | open Set Filter Function WeightedClasses CorrectionState |
| 7786 | open scoped ContDiff Topology |
| 7787 | variable {D I ι : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 7788 | |
| 7789 | noncomputable def jointRawBackground (a : ι → PeriodizedWaveBounds.CopyData D I) : |
| 7790 | LocalizedWaveBounds.WaveFamily D (ι × I) := |
| 7791 | LocalizedWaveBounds.WaveFamily.ofCoefficients (fun j => |
| 7792 | {(a j.1).background with amplitude := 0, pressure := 0}) |
| 7793 | |
| 7794 | noncomputable def jointRawCoefficients (a : ι → PeriodizedWaveBounds.CopyData D I) : |
| 7795 | LocalizedWaveBounds.WaveFamily D (ι × I) := |
| 7796 | LocalizedWaveBounds.WaveFamily.ofCoefficients (fun j => (a j.1).raw j.2) |
| 7797 | |
| 7798 | theorem uniform_localInput_of_coefficients |
| 7799 | (a : ι → PeriodizedWaveBounds.CopyData D I) {s : StripData D} |
| 7800 | {C : ι → ℕ → I → Set D} {W : ι → ℕ → D → ℝ} {α κ : ℝ} |
| 7801 | {d : LinearWaveBounds.GraphDirections D} |
| 7802 | (h : LocalizedWaveBounds.InputBounds s (fun n (j : ι × I) => C j.1 n j.2) |
| 7803 | (fun n j x => W j.1 n x) 0 κ d (jointRawBackground a)) |
| 7804 | (hW : ∀ l n x, x ∈ s.domain → 0 ≤ W l n x) |
| 7805 | (ha : PeriodizedWaveBounds.UniformLocalJets s (fun l n x => Real.sqrt (s.zeta x)*W l n x) |
| 7806 | α C (fun l => (a l).amplitude)) |
| 7807 | (hp : PeriodizedWaveBounds.UniformLocalJets s (fun l n x => Real.sqrt (s.zeta x)*W l n x) |
| 7808 | (α+1/2) C (fun l => (a l).pressure)) : |
| 7809 | LocalizedWaveBounds.InputBounds s (fun n (j : ι × I) => C j.1 n j.2) |
| 7810 | (fun n j x => W j.1 n x) α κ d (jointRawCoefficients a) := by |
| 7811 | have hw l n x hx := mul_nonneg (Real.sqrt_nonneg (s.zeta x)) (hW l n x hx) |
| 7812 | exact ⟨h.loss_nonneg, h.radial_profile, h.radial_scale, h.fast_scale, h.frequency_scale, |
| 7813 | h.radius, h.inverse_radius, h.radial_base, h.frequency_base, h.axial_base, |
| 7814 | h.radial_base_aux, h.frequency_base_aux, h.axial_base_aux, h.normal, h.defect, |
| 7815 | fun j => (LocalizedWaveBounds.LocalClass.of_uniformLocalJets hw ha).map (ContinuousLinearMap.proj j), |
| 7816 | LocalizedWaveBounds.LocalClass.of_uniformLocalJets hw hp⟩ |
| 7817 | |
| 7818 | /-- The native solver estimates enter before summation over copies or |
| 7819 | spatial labels. All bounds on the background remain local to `C`. -/ |
| 7820 | theorem uniform_common_bounds_from_raw |
| 7821 | (a : ι → PeriodizedWaveBounds.CopyData D I) (K : ι → PeriodizedWaveBounds.Cells D I) |
| 7822 | (hs : ∀ l n i, support ((a l).cutoff n i) ⊆ (K l).carrier n i) |
| 7823 | {s : StripData D} {C : ι → ℕ → I → Set D} {W : ι → ℕ → D → ℝ} {α κ : ℝ} |
| 7824 | {d : LinearWaveBounds.GraphDirections D} |
| 7825 | (hW : ∀ l n x, x ∈ s.domain → 0 ≤ W l n x) |
| 7826 | (h : LocalizedWaveBounds.InputBounds s (fun n (j : ι × I) => C j.1 n j.2) |
| 7827 | (fun n j x => W j.1 n x) 0 κ d (jointRawBackground a)) |
| 7828 | (ha : PeriodizedWaveBounds.UniformLocalJets s (fun l n x => Real.sqrt (s.zeta x)*W l n x) |
| 7829 | α C (fun l => (a l).amplitude)) |
| 7830 | (hp : PeriodizedWaveBounds.UniformLocalJets s (fun l n x => Real.sqrt (s.zeta x)*W l n x) |
| 7831 | (α+1/2) C (fun l => (a l).pressure)) |
| 7832 | (hcut : PeriodizedWaveBounds.UniformLocalJets s (fun _ _ _ => 1) 0 C (fun l => (a l).cutoff)) |
| 7833 | (hκ : κ ≤ 1/2) {lo hi : ℝ} (hlo : 0 < lo) |
| 7834 | (hLower : ∀ l n i x, x ∈ s.domain → x ∈ C l n i → lo ≤ ‖(a l).background.normal s d n x‖) |
| 7835 | (hUpper : ∀ l n i x, x ∈ s.domain → x ∈ C l n i → ‖(a l).background.normal s d n x‖ ≤ hi) |
| 7836 | (hfreq : LocalizedWaveBounds.LocalUnweighted s (fun n (j : ι × I) => C j.1 n j.2) (1/2) |
| 7837 | (fun n j _ => 1/(a j.1).background.frequency n)) |
| 7838 | (hcover : ∀ l n i x, x ∈ s.domain → x ∈ (K l).carrier n i → x ∈ C l n i ∨ |
| 7839 | (((a l).localized i).amplitude n =ᶠ[𝓝 x] fun _ => 0) ∧ |
| 7840 | (((a l).localized i).pressure n =ᶠ[𝓝 x] fun _ => 0)) : |
| 7841 | LabelSumBounds.UniformWaveClass s W α (fun l => (a l).common.amplitude) ∧ |
| 7842 | LabelSumBounds.UniformWaveClass s W α (fun l => ((a l).commonCorrected s d).amplitude) ∧ |
| 7843 | LabelSumBounds.UniformWaveClass s W (α+1/2) (fun l => (a l).common.pressure) ∧ |
| 7844 | LabelSumBounds.UniformWaveClass s W (α+1/2-κ) (fun l => (a l).common.curlCorrection s d) ∧ |
| 7845 | LabelSumBounds.UniformWaveClass s W (α+1/2-3*κ) (fun l => (a l).globalGood s d) := by |
| 7846 | have hin := uniform_localInput_of_coefficients a h hW ha hp |
| 7847 | have hout := hin.with_cutoff |
| 7848 | (LocalizedWaveBounds.LocalClass.of_uniformLocalJets (fun _ _ _ _ => zero_le_one) hcut) |
| 7849 | exact LocalizedWaveBounds.uniform_common_bounds_from_supported_native a K hs C hW hout |
| 7850 | hκ hlo hLower hUpper hfreq hcover |
| 7851 | |
| 7852 | namespace PeriodizedSignedParameters |
| 7853 | variable (p : ι → PeriodizedSignedParameters D I) (s : StripData D) |
| 7854 | (request : ℕ → D×ℝ → SignedWaveUpdate.Vec2) |
| 7855 | |
| 7856 | /-- Literal stored coefficients inherit the joint estimates of the |
| 7857 | actual common solves, including the exact-minus-tangent curl. -/ |
| 7858 | theorem uniform_block_bounds |
| 7859 | {P : ι → ℕ → D → ℝ} {α κ : ℝ} |
| 7860 | (ha : LabelSumBounds.UniformWaveClass (HarmonicWaveInteraction.productStrip s) |
| 7861 | (fun l n x => P l n x.1) α (fun l => ((p l).copyData s request).common.amplitude)) |
| 7862 | (he : LabelSumBounds.UniformWaveClass (HarmonicWaveInteraction.productStrip s) |
| 7863 | (fun l n x => P l n x.1) α (fun l => |
| 7864 | (((p l).copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) (p l).directions).amplitude)) |
| 7865 | (hp : LabelSumBounds.UniformWaveClass (HarmonicWaveInteraction.productStrip s) |
| 7866 | (fun l n x => P l n x.1) (α+1/2) (fun l => ((p l).copyData s request).common.pressure)) |
| 7867 | (hc : LabelSumBounds.UniformWaveClass (HarmonicWaveInteraction.productStrip s) |
| 7868 | (fun l n x => P l n x.1) (α+1/2-κ) (fun l => |
| 7869 | ((p l).copyData s request).common.curlCorrection (HarmonicWaveInteraction.productStrip s) (p l).directions)) |
| 7870 | (hg : LabelSumBounds.UniformWaveClass (HarmonicWaveInteraction.productStrip s) |
| 7871 | (fun l n x => P l n x.1) (α+1/2-3*κ) (fun l => |
| 7872 | ((p l).copyData s request).globalGood (HarmonicWaveInteraction.productStrip s) (p l).directions)) : |
| 7873 | (∀ i j, LabelSumBounds.UniformWaveClass s P α (fun l n x => ((p l).tangentBlock s request).velocity n i j x)) ∧ |
| 7874 | (∀ i j, LabelSumBounds.UniformWaveClass s P α (fun l n x => ((p l).exactBlock s request).velocity n i j x)) ∧ |
| 7875 | (∀ j, LabelSumBounds.UniformWaveClass s P (α+1/2) (fun l n x => ((p l).exactBlock s request).pressure n j x)) ∧ |
| 7876 | (∀ i j, LabelSumBounds.UniformWaveClass s P (α+1/2-κ) (fun l n x => ((p l).curlBlock s request).velocity n i j x)) ∧ |
| 7877 | (∀ i j, LabelSumBounds.UniformWaveClass s P (α+1/2-3*κ) (fun l n x => ((p l).goodBlock s request).velocity n i j x)) := by |
| 7878 | have ht := UniformBlockBounds.blockOfCoefficients_product_uniform |
| 7879 | (fun l => ((p l).copyData s request).common) (fun l => (p l).angularFrequency) ha hp |
| 7880 | have hx := UniformBlockBounds.blockOfCoefficients_product_uniform |
| 7881 | (fun l => ((p l).copyData s request).commonCorrected (HarmonicWaveInteraction.productStrip s) (p l).directions) |
| 7882 | (fun l => (p l).angularFrequency) he hp |
| 7883 | have hd := UniformBlockBounds.commonCorrected_product_difference_uniform |
| 7884 | (fun l => (p l).copyData s request) (fun l => (p l).directions) (fun l => (p l).angularFrequency) hc |
| 7885 | have hgs := UniformBlockBounds.uniform_slice (s := s) |
| 7886 | (w := fun l n x => Real.sqrt (s.zeta x) * P l n x) hg |
| 7887 | have hgb := UniformBlockBounds.coefficientBlock_uniform |
| 7888 | (fun l => (p l).base.frequency) (fun l n x => (p l).base.phase n (x,0)) (fun l => (p l).angularFrequency) |
| 7889 | hgs (LabelSumBounds.UniformClass.zero (E := ℂ) (α := (0:ℝ)) hgs.weight_nonneg) |
| 7890 | exact ⟨ht.1,hx.1,hx.2,hd,hgb.1⟩ |
| 7891 | |
| 7892 | end PeriodizedSignedParameters |
| 7893 | |
| 7894 | end UniformPeriodizedCoefficients |
| 7895 | |
| 7896 | section CoherentReferenceParticular |
| 7897 | |
| 7898 | open Set Filter Function CorrectionState WeightedClasses ParticularWaveAssembly ParticularWaveBounds |
| 7899 | open scoped ContDiff Topology BigOperators |
| 7900 | namespace ParticularParameters |
| 7901 | open TorusInverse |
| 7902 | variable {P : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 7903 | |
| 7904 | theorem common_amplitude (p : ParticularParameters P) |
| 7905 | (c : Context (P×Plane)) (u : State (P×Plane)) (b : HarmonicBlock (P×Plane)) |
| 7906 | (G A : HarmonicResidual.BlockCoefficients (P×Plane)) (j : ℤ) (n : ℕ) : |
| 7907 | (p.copyData c u b G A j).common.amplitude n = |
| 7908 | angleLift (ParticularWaveBounds.commonVelocity (p.tangent j n) |
| 7909 | (residualSource c u b G A j n) (p.geometry n) (p.length_pos n).le (p.cutoff n)) := by |
| 7910 | funext z |
| 7911 | rcases z with ⟨⟨x,θ⟩,Y⟩ |
| 7912 | apply tsum_congr |
| 7913 | intro k |
| 7914 | exact congrArg (fun w => p.cutoff n ((p.geometry n).coordinates k Y) • w) |
| 7915 | (complexCopyVelocity_angle (p.tangent j n) (residualSource c u b G A j n) |
| 7916 | (p.geometry n) (p.length_pos n).le k x θ Y) |
| 7917 | |
| 7918 | theorem common_pressure (p : ParticularParameters P) |
| 7919 | (c : Context (P×Plane)) (u : State (P×Plane)) (b : HarmonicBlock (P×Plane)) |
| 7920 | (G A : HarmonicResidual.BlockCoefficients (P×Plane)) (j : ℤ) (n : ℕ) |
| 7921 | (hk : (j:ℝ)*b.frequency n ≠ 0) : |
| 7922 | (p.copyData c u b G A j).common.pressure n = |
| 7923 | angleLift (ParticularWaveBounds.commonPressure (p.tangent j n) |
| 7924 | (residualSource c u b G A j n) (p.geometry n) (p.length_pos n).le (p.cutoff n) |
| 7925 | ((j:ℝ)*b.frequency n)) := by |
| 7926 | funext z |
| 7927 | rcases z with ⟨⟨x,θ⟩,Y⟩ |
| 7928 | apply tsum_congr |
| 7929 | intro k |
| 7930 | exact congrArg (fun w => p.cutoff n ((p.geometry n).coordinates k Y) • w) |
| 7931 | (complexCopyPressure_angle (p.tangent j n) (residualSource c u b G A j n) |
| 7932 | (p.geometry n) (p.length_pos n).le k hk x θ Y) |
| 7933 | |
| 7934 | /-- Every target band uses the same chosen reference tangent, geometry, |
| 7935 | clock interval and cutoff. Only the current HR source is supplied at solve time. -/ |
| 7936 | noncomputable def fromReference |
| 7937 | (D : AssemblyData PhysicalParticularWave.Parameter) (h : ℝ) (gap : ℕ→ℕ) : |
| 7938 | ParticularParameters PhysicalParticularWave.Parameter where |
| 7939 | tangent j n := ScaledTangentTransport.transportTangent (D.reference.tangent j) |
| 7940 | (PhysicalParticularWave.parameterChange h (ChartScales.Q n) (ChartScales.Q D.reference.band)) (gap n) 0 |
| 7941 | (PhysicalParticularWave.clockWeight h (ChartScales.Q n) (ChartScales.Q D.reference.band)) |
| 7942 | (PhysicalParticularWave.velocityWeight h (ChartScales.Q n) (ChartScales.Q D.reference.band)) |
| 7943 | (PhysicalParticularWave.normalWeight (ChartScales.Q n) (ChartScales.Q D.reference.band) |
| 7944 | ((j:ℝ)*D.carrierBlock.frequency n) (PhysicalParticularWave.referenceFrequency D j)) |
| 7945 | geometry n := CopySolveCompatibility.transportGeometry D.reference.geometry (gap n) 0 |
| 7946 | (PhysicalParticularWave.clockWeight h (ChartScales.Q n) (ChartScales.Q D.reference.band)) |
| 7947 | (PhysicalParticularWave.ratioPower_pos (ChartScales.Q_pos n) (ChartScales.Q_pos D.reference.band) |
| 7948 | (CoordinateAlgebra.A h+1/2)).ne' |
| 7949 | length n := D.reference.length / |
| 7950 | PhysicalParticularWave.clockWeight h (ChartScales.Q n) (ChartScales.Q D.reference.band) |
| 7951 | length_pos n := div_pos D.reference.length_pos |
| 7952 | (PhysicalParticularWave.ratioPower_pos (ChartScales.Q_pos n) (ChartScales.Q_pos D.reference.band) |
| 7953 | (CoordinateAlgebra.A h+1/2)) |
| 7954 | cutoff n := D.reference.cutoff ∘ CopySolveCompatibility.nativeTimeMap 0 |
| 7955 | (PhysicalParticularWave.clockWeight h (ChartScales.Q n) (ChartScales.Q D.reference.band)) |
| 7956 | background := D.background |
| 7957 | directions := D.directions |
| 7958 | |
| 7959 | theorem fromReference_amplitude |
| 7960 | (D : AssemblyData PhysicalParticularWave.Parameter) (h : ℝ) (gap : ℕ→ℕ) (j : ℤ) (n : ℕ) : |
| 7961 | ((fromReference D h gap).copyData D.context D.state D.carrierBlock D.gaussianInput D.aliasInput j).common.amplitude n = |
| 7962 | angleLift (PhysicalParticularWave.residualBandAmplitude D h (ChartScales.Q_pos n) |
| 7963 | (ChartScales.Q_pos D.reference.band) (gap n) ((j:ℝ)*D.carrierBlock.frequency n) j n) := |
| 7964 | common_amplitude _ _ _ _ _ _ _ _ |
| 7965 | |
| 7966 | theorem fromReference_pressure |
| 7967 | (D : AssemblyData PhysicalParticularWave.Parameter) (h : ℝ) (gap : ℕ→ℕ) (j : ℤ) (n : ℕ) |
| 7968 | (hk : (j:ℝ)*D.carrierBlock.frequency n ≠ 0) : |
| 7969 | ((fromReference D h gap).copyData D.context D.state D.carrierBlock D.gaussianInput D.aliasInput j).common.pressure n = |
| 7970 | angleLift (PhysicalParticularWave.residualBandPressure D h (ChartScales.Q_pos n) |
| 7971 | (ChartScales.Q_pos D.reference.band) (gap n) ((j:ℝ)*D.carrierBlock.frequency n) j n) := |
| 7972 | common_pressure _ _ _ _ _ _ _ _ hk |
| 7973 | |
| 7974 | /-- Full-lift current-state coherence identifies the actual solved amplitude |
| 7975 | with the one reference physical wave, before taking a graph restriction. -/ |
| 7976 | theorem fromReference_coherent_amplitude |
| 7977 | (D : AssemblyData PhysicalParticularWave.Parameter) (h : ℝ) (gap : ℕ→ℕ) (j : ℤ) (n i : ℕ) |
| 7978 | (H : PhysicalResidualNaturality.BandCoherence D h (ChartScales.Q_pos n) |
| 7979 | (ChartScales.Q_pos D.reference.band) i (gap n) n) |
| 7980 | (hn : PhysicalResidualNaturality.PositiveSupport D.carrierBlock D.gaussianInput D.aliasInput n) |
| 7981 | (hr : PhysicalResidualNaturality.PositiveSupport D.carrierBlock D.gaussianInput D.aliasInput D.reference.band) : |
| 7982 | ((fromReference D h gap).copyData D.context D.state D.carrierBlock D.gaussianInput D.aliasInput j).common.amplitude n = |
| 7983 | angleLift (PhysicalParticularWave.bandAmplitude D h (ChartScales.Q_pos n) |
| 7984 | (ChartScales.Q_pos D.reference.band) (gap n) ((j:ℝ)*D.carrierBlock.frequency n) j) := by |
| 7985 | rw [fromReference_amplitude, H.residualBandAmplitude_eq hn hr] |
| 7986 | |
| 7987 | theorem fromReference_coherent_pressure |
| 7988 | (D : AssemblyData PhysicalParticularWave.Parameter) (h : ℝ) (gap : ℕ→ℕ) (j : ℤ) (n i : ℕ) |
| 7989 | (H : PhysicalResidualNaturality.BandCoherence D h (ChartScales.Q_pos n) |
| 7990 | (ChartScales.Q_pos D.reference.band) i (gap n) n) |
| 7991 | (hn : PhysicalResidualNaturality.PositiveSupport D.carrierBlock D.gaussianInput D.aliasInput n) |
| 7992 | (hr : PhysicalResidualNaturality.PositiveSupport D.carrierBlock D.gaussianInput D.aliasInput D.reference.band) |
| 7993 | (hk : (j:ℝ)*D.carrierBlock.frequency n ≠ 0) : |
| 7994 | ((fromReference D h gap).copyData D.context D.state D.carrierBlock D.gaussianInput D.aliasInput j).common.pressure n = |
| 7995 | angleLift (PhysicalParticularWave.bandPressure D h (ChartScales.Q_pos n) |
| 7996 | (ChartScales.Q_pos D.reference.band) (gap n) ((j:ℝ)*D.carrierBlock.frequency n) j) := by |
| 7997 | rw [fromReference_pressure D h gap j n hk, H.residualBandPressure_eq hn hr] |
| 7998 | |
| 7999 | end ParticularParameters |
| 8000 | |
| 8001 | end CoherentReferenceParticular |
| 8002 | |
| 8003 | section ConstructedMeanStages |
| 8004 | |
| 8005 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 8006 | open scoped ContDiff BigOperators |
| 8007 | section |
| 8008 | variable (g : GaugeData PressureStream.Plane) (r : RankData PressureStream.Plane) |
| 8009 | (h : ℝ) (index : ℕ → ℕ) (axial : PressureStream.Plane × PressureStream.Plane) |
| 8010 | (c : Context Point) (u : State Point) |
| 8011 | {coord cL cR A B : ℝ} (U : SlowRegion coord) |
| 8012 | (ha : 0 < g.radial.inner) (hd : 0 < g.radial.exponent) |
| 8013 | (hcL : 0 < cL) (hcR : 0 < cR) |
| 8014 | (ε L : ℕ → ℝ) (hε : ∀ n, 0 < ε n) (hεone : ∀ n, ε n ≤ 1) (hL : ∀ n, 1 ≤ L n) |
| 8015 | (hell : ∀ n, g.length n = qLength coord) |
| 8016 | include hd hell |
| 8017 | local notation "stageStrip" => movingStripData U g.radial.inner g.radial.outer cL cR ha hcL hcR ε L hε hεone hL |
| 8018 | local notation "slowStrip" => PhysicalMeanDomain.localSlowStripData U.carrier U.isOpen ε L hε hεone hL |
| 8019 | local notation "signedState" => u |
| 8020 | local notation "temporalState" => temporalStageState g h index axial c u |
| 8021 | theorem meanStages_constructed {σ κ : ℝ} |
| 8022 | (hfixed : (reconstructState g c u).pressure = u.pressure) |
| 8023 | (hσ : 1 / 5 ≤ σ) (hκsmall : κ ≤ 1 / 100000) |
| 8024 | (hh : 0 ≤ h) (hscale : ∀ n, ChartScales.S n ≤ L n) |
| 8025 | (gap : ℕ) (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) |
| 8026 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 8027 | (hfast : ∀ n, c.operators.fastCoefficient n = |
| 8028 | ChartScales.Tg ^ index n * ChartScales.Q n ^ (1 + h)) |
| 8029 | (ho : OperatorBounds stageStrip c.operators κ) (hb : BaseBounds stageStrip c.base) |
| 8030 | (hsigned : CorrectionState.CumulativeBounds stageStrip signedState) |
| 8031 | (hop : LocalRankDefect.LocalOperators U.carrier c.operators) |
| 8032 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain U.carrier) c.base) |
| 8033 | (hV : LocalRankDefect.IsSlowOn U.carrier c.base.angular) |
| 8034 | (hG : LocalRankDefect.IsSlowOn U.carrier c.base.axial) |
| 8035 | (hm : SmoothTriple (PhysicalMeanDomain.slowDomain U.carrier) (signedState).mean) |
| 8036 | (hms : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier (signedState).mean) |
| 8037 | (hW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) ((signedState).covariance i j)) |
| 8038 | (hWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier ((signedState).covariance i j)) |
| 8039 | (hθ : ∀ n, ContDiffOn ℝ ∞ ((signedState).thetaResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 8040 | (hz : ∀ n, ContDiffOn ℝ ∞ ((signedState).axialResidual c n) (PhysicalMeanDomain.slowDomain U.carrier)) |
| 8041 | (hpθ : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier ((signedState).thetaResidual c n)) |
| 8042 | (hpz : ∀ n, PhysicalMeanDomain.PeriodicOn U.carrier ((signedState).axialResidual c n)) |
| 8043 | (hsθ : GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier ((signedState).thetaResidual c)) |
| 8044 | (hsz : GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier ((signedState).axialResidual c)) |
| 8045 | (hcθ : MeanClass stageStrip (1 + σ - 2 * κ) ((signedState).thetaResidual c)) |
| 8046 | (hcz : MeanClass stageStrip (1 + σ - 2 * κ) ((signedState).axialResidual c)) |
| 8047 | (hbarθ : MeanClass stageStrip (1 + σ + 17 / 100) (meanBar ((signedState).thetaResidual c))) |
| 8048 | (hbarz : MeanClass stageStrip (1 + σ + 17 / 100) (meanBar ((signedState).axialResidual c))) |
| 8049 | (hdebt : ∀ i : Fin 3, UnweightedClass slowStrip (1 + σ - 2 * κ) |
| 8050 | (fun n x => debt c signedState n x i)) |
| 8051 | (hg : LocalRankDefect.RankGeometry g r U.carrier c temporalState) |
| 8052 | (hparam : RankStateBounds.NormalizedParameters coord A B r U.carrier) (hB : B ≠ 0) |
| 8053 | (hleft : g.radial.inner < r.inner) (hright : r.outer < g.radial.outer) : |
| 8054 | IncrementBounds stageStrip (1 + σ - 2 * κ) (temporalIncrementState g h index axial c u) ∧ |
| 8055 | IncrementBounds stageStrip (1 + σ - 2 * κ) (rankIncrementState g r axial c temporalState) ∧ |
| 8056 | MeanClass stageStrip (1 + σ - 2 * κ) ((rankStageState g r axial c temporalState).pressure - u.pressure) ∧ |
| 8057 | CorrectionState.CumulativeBounds stageStrip (rankStageState g r axial c temporalState) ∧ |
| 8058 | DefectBounds slowStrip (σ + 1 / 10) c (rankStageState g r axial c temporalState) ∧ |
| 8059 | MeanClass stageStrip (1 + (σ + 1 / 10)) ((rankStageState g r axial c temporalState).thetaResidual c) ∧ |
| 8060 | MeanClass stageStrip (1 + (σ + 1 / 10)) |
| 8061 | ((rankStageState g r axial c temporalState).axialResidual c - |
| 8062 | fun n x => temporalAliasState g h index c signedState n (x,0) 2) := by |
| 8063 | have hH : 9 / 10 ≤ 1 + σ - 2 * κ := by linarith |
| 8064 | have hκ : 2 * κ ≤ 9 / 10 := by linarith |
| 8065 | have hβ : 1 + (σ + 1 / 10) ≤ (1 + σ - 2 * κ) + 1 - 2 * κ := by linarith |
| 8066 | obtain ⟨hi, hp, htCum, htSmooth, htSupport, htTheta, htAxial⟩ := |
| 8067 | gaugeTemporalStage_constructed U g ha hd hcL hcR ε L hε hεone hL hell |
| 8068 | hh hscale index gap hgap axial c signedState ho.epsilon_eq hv hfast hfixed |
| 8069 | hH hκ hβ ho hb hsigned hop hbase hm hms hW hWs hθ hz hpθ hpz hsθ hsz hcθ hcz |
| 8070 | (hbarθ.mono_exponent (by linarith)) (hbarz.mono_exponent (by linarith)) |
| 8071 | have hiSmooth := gaugeTemporalIncrement_smooth U g ha hd hell h index axial |
| 8072 | c signedState hθ hz hpθ hpz hsz |
| 8073 | have hiSupport : GaugeSupportedTriple g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 8074 | (temporalIncrementState g h index axial c u) := by |
| 8075 | have hs n := temporalIncrementState_supportedGauge U g ha hd hell c signedState |
| 8076 | h index axial n (hz n) (hpz n) (hsz n) (hsθ n) |
| 8077 | exact ⟨fun n => (hs n).1, fun n => (hs n).2.1, fun n => (hs n).2.2⟩ |
| 8078 | have hmReg : GaugeDebtIncrement.RegularTriple U g.radial.inner g.radial.outer (signedState).mean := |
| 8079 | ⟨⟨hm.radial, hms.radial⟩, ⟨hm.angular, hms.angular⟩, ⟨hm.axial, hms.axial⟩⟩ |
| 8080 | have hiReg : GaugeDebtIncrement.RegularTriple U g.radial.inner g.radial.outer |
| 8081 | (temporalIncrementState g h index axial c u) := |
| 8082 | ⟨⟨hiSmooth.radial, hiSupport.radial⟩, ⟨hiSmooth.angular, hiSupport.angular⟩, |
| 8083 | ⟨hiSmooth.axial, hiSupport.axial⟩⟩ |
| 8084 | have htDebt := GaugeDebtIncrement.temporalStage_debt_mem U ha g.radial.inner_lt_outer |
| 8085 | hcL hcR ε L hε hεone hL g h index axial c signedState |
| 8086 | hop hbase hmReg hiReg (fun i j => ⟨hW i j, hWs i j⟩) ho hb hsigned.velocity hi hH hκ le_rfl hdebt |
| 8087 | have hcov : (temporalState).covariance = (signedState).covariance := |
| 8088 | gaugeTemporalStage_covariance g h index axial c signedState |
| 8089 | have htW : ∀ i j, SmoothOn (PhysicalMeanDomain.slowDomain U.carrier) ((temporalState).covariance i j) := by |
| 8090 | simpa only [hcov] using hW |
| 8091 | have htWs : ∀ i j, GaugeSupported g.radial.inner g.radial.outer (qLength coord) U.carrier |
| 8092 | ((temporalState).covariance i j) := by simpa only [hcov] using hWs |
| 8093 | let aliasField : ScalarField Point := fun n x => |
| 8094 | temporalAliasState g h index c signedState n (x,0) 2 |
| 8095 | obtain ⟨hrInc, hrPressure, hrCum, _, _, hrTheta, hrAxial⟩ := |
| 8096 | gaugeRankStage_constructed U g r ha hd hcL hcR ε L hε hεone hL hell |
| 8097 | axial c temporalState hg hparam hB hleft hright hH hκ hβ hv rfl |
| 8098 | ho hb htCum hop hbase htSmooth htSupport htW htWs |
| 8099 | (RankStateBounds.debtClass_of_components _ htDebt) aliasField htTheta htAxial |
| 8100 | have hrDebt := MovingMomentBounds.rankStage_defectBounds U g r ha hcL hcR |
| 8101 | ε L hε hεone hL hell axial c temporalState hg hop hbase htSmooth |
| 8102 | ⟨htSupport.radial, htSupport.angular, htSupport.axial⟩ htW htWs hV hG |
| 8103 | ho hb htCum.velocity hrInc hH (show 1 + (σ + 1 / 10) ≤ (1 + σ - 2 * κ) + 9 / 10 - 2 * κ by linarith) |
| 8104 | have hpressure : MeanClass stageStrip (1 + σ - 2 * κ) |
| 8105 | ((rankStageState g r axial c temporalState).pressure - u.pressure) := by |
| 8106 | apply class_congr (hp.add hrPressure) |
| 8107 | intro n x hx |
| 8108 | change (rankStageState g r axial c temporalState).pressure n x - u.pressure n x = |
| 8109 | ((temporalState).pressure n x - u.pressure n x) + |
| 8110 | ((rankStageState g r axial c temporalState).pressure n x - (temporalState).pressure n x) |
| 8111 | ring |
| 8112 | exact ⟨hi, hrInc, hpressure, hrCum, hrDebt, hrTheta, hrAxial⟩ |
| 8113 | |
| 8114 | end |
| 8115 | |
| 8116 | end ConstructedMeanStages |
| 8117 | |
| 8118 | section UniformParticularGain |
| 8119 | |
| 8120 | open Set Filter Function WeightedClasses CorrectionState ParticularWaveAssembly ParticularWaveBounds |
| 8121 | open scoped ContDiff Topology BigOperators |
| 8122 | namespace ParticularParameters |
| 8123 | open TorusInverse |
| 8124 | variable {Q ι : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 8125 | (p : ι → ParticularParameters Q) (s : StripData (Q×Plane)) |
| 8126 | (c : Context (Q×Plane)) (u : State (Q×Plane)) |
| 8127 | (b : ι → HarmonicBlock (Q×Plane)) (G A : ι → HarmonicResidual.BlockCoefficients (Q×Plane)) |
| 8128 | (N : ℕ) |
| 8129 | |
| 8130 | theorem uniform_assembled_bounds {W : ι → ℕ → (Q×ℝ)×Plane → ℝ} {α κ : ℝ} |
| 8131 | (hW : ∀ l n x, x ∈ (nativeStrip s).domain → 0 ≤ W l n x) |
| 8132 | (ha : ∀ j ∈ modes N, LabelSumBounds.UniformWaveClass (nativeStrip s) W α |
| 8133 | (fun l => ((p l).wave s c u (b l) (G l) (A l) j).amplitude)) |
| 8134 | (hp : ∀ j ∈ modes N, LabelSumBounds.UniformWaveClass (nativeStrip s) W (α+1/2) |
| 8135 | (fun l => ((p l).wave s c u (b l) (G l) (A l) j).pressure)) |
| 8136 | (hg : ∀ j ∈ modes N, LabelSumBounds.UniformWaveClass (nativeStrip s) W (α+1/2-3*κ) |
| 8137 | (fun l => ((p l).copyData c u (b l) (G l) (A l) j).globalGood (nativeStrip s) (p l).directions)) : |
| 8138 | (∀ i j, LabelSumBounds.UniformWaveClass s (fun l n x => W l n (angleShuffle (x,0))) α |
| 8139 | (fun l n x => ((p l).updateBlock s c u (b l) (G l) (A l) N).velocity n i j x)) ∧ |
| 8140 | (∀ j, LabelSumBounds.UniformWaveClass s (fun l n x => W l n (angleShuffle (x,0))) (α+1/2) |
| 8141 | (fun l n x => ((p l).updateBlock s c u (b l) (G l) (A l) N).pressure n j x)) ∧ |
| 8142 | (∀ i j, LabelSumBounds.UniformWaveClass s (fun l n x => W l n (angleShuffle (x,0))) (α+1/2-3*κ) |
| 8143 | (fun l n x => ((p l).goodBlock s c u (b l) (G l) (A l) N).velocity n i j x)) := by |
| 8144 | have hw l n x hx := mul_nonneg (Real.sqrt_nonneg ((nativeStrip s).zeta x)) (hW l n x hx) |
| 8145 | have hupdate := UniformBlockBounds.native_assembledBlock_original_uniform (s := s) |
| 8146 | N (fun l => (b l).frequency) (fun l => (b l).phase) (fun l => (b l).angularFrequency) hw ha hp |
| 8147 | have hgood := UniformBlockBounds.native_assembledBlock_original_uniform (s := s) |
| 8148 | N (fun l => (b l).frequency) (fun l => (b l).phase) (fun l => (b l).angularFrequency) hw hg |
| 8149 | (fun _ _ => LabelSumBounds.UniformClass.zero (E := ℂ) (α := (0:ℝ)) hw) |
| 8150 | exact ⟨hupdate.1,hupdate.2,hgood.1⟩ |
| 8151 | |
| 8152 | theorem uniform_linearGood_bounds {W : ι → ℕ → (Q×ℝ)×Plane → ℝ} {α κ : ℝ} |
| 8153 | (C : ∀ l j, j ∈ modes N → (p l).NativeControl s c u (b l) (G l) (A l) j (W l) α κ) |
| 8154 | (dyn : ∀ l j hj, NativeDynamics (C l j hj)) |
| 8155 | (hκ : κ ≤ 1/2) |
| 8156 | (hW : ∀ l n x, x ∈ (nativeStrip s).domain → 0 ≤ W l n x) |
| 8157 | (hg : ∀ i j, LabelSumBounds.UniformWaveClass s (fun l n x => W l n (angleShuffle (x,0))) |
| 8158 | (α+1/2-3*κ) (fun l n x => ((p l).goodBlock s c u (b l) (G l) (A l) N).velocity n i j x)) |
| 8159 | (hN : ∀ l, (HarmonicResidual.residualBlock c u (b l) (G l) (A l)).BandLimited N) |
| 8160 | (hB : MeanIncrementBounds.SmoothTriple s.domain c.base) |
| 8161 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 8162 | (hm : ∀ l, WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 8163 | (reindexDirections angleShuffle (p l).directions) (reindexCoefficients angleShuffle (p l).background)) |
| 8164 | (hphase : ∀ l n, ContDiffOn ℝ ∞ ((b l).phase n) s.domain) |
| 8165 | (hkp : ∀ l n, (b l).angularFrequency n ≠ 0) : |
| 8166 | ∀ i j, j ≠ 0 → LabelSumBounds.UniformWaveClass s (fun l n x => W l n (angleShuffle (x,0))) |
| 8167 | (α+1/2-3*κ) (fun l n x => |
| 8168 | (HarmonicResidual.residualBlock c u (b l) (G l) (A l)).velocity n i j x + |
| 8169 | (HarmonicWaveInteraction.linearGoodBlock c (b l) ((p l).updateBlock s c u (b l) (G l) (A l) N) |
| 8170 | ((p l).gaussianBlock c u (b l) (G l) (A l) N).velocity).velocity n i j x) := by |
| 8171 | have hb l := (p l).assembled_bounds s c u (b l) (G l) (A l) N (C l) (hW l) hκ |
| 8172 | apply linearGoodBlock_cancel_uniform c b (fun l => (p l).updateBlock s c u (b l) (G l) (A l) N) |
| 8173 | (fun l => HarmonicResidual.residualBlock c u (b l) (G l) (A l)) |
| 8174 | (fun l => (p l).goodBlock s c u (b l) (G l) (A l) N) |
| 8175 | (fun l => ((p l).gaussianBlock c u (b l) (G l) (A l) N).velocity) |
| 8176 | hrad (fun _ => contDiffOn_const) hB |
| 8177 | (fun l => HarmonicWaveInteraction.waveBounds_smooth (hb l).1 (assembledBlock_zero _ _ _ _ _ _).1) |
| 8178 | (fun l => pressureBounds_smooth (hb l).2.1 (assembledBlock_zero _ _ _ _ _ _).2) |
| 8179 | hphase hkp (fun l => HarmonicResidual.residualBlock_conjugate _ _ _ _ _) |
| 8180 | (fun _ => (assembledBlock_real _ _ _ _ _ _).1) (fun i j _ => hg i j) |
| 8181 | intro l n x hx θ i |
| 8182 | exact congrFun ((p l).context_linear_cancellation s c u (b l) (G l) (A l) N (C l) (dyn l) |
| 8183 | hκ (hN l) hB hrad (hm l) n (x,θ) hx) i |
| 8184 | |
| 8185 | theorem uniform_residual_gain {W : ι → ℕ → (Q×ℝ)×Plane → ℝ} {α κ : ℝ} |
| 8186 | (C : ∀ l j, j ∈ modes N → (p l).NativeControl s c u (b l) (G l) (A l) j (W l) α κ) |
| 8187 | (dyn : ∀ l j hj, NativeDynamics (C l j hj)) |
| 8188 | (hα : 7/10 ≤ α) (hκ : κ ≤ 1/100000) |
| 8189 | (ho : MeanIncrementBounds.OperatorBounds s c.operators κ) |
| 8190 | (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 8191 | (hb : MeanIncrementBounds.BaseBounds s c.base) |
| 8192 | (hu : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 8193 | (v : State (Q×Plane)) (hmean : v.mean = u.mean) |
| 8194 | (hW : ∀ l n x, x ∈ (nativeStrip s).domain → 0 ≤ W l n x) |
| 8195 | (hWone : ∀ l n x, x ∈ s.domain → W l n (angleShuffle (x,0)) ≤ 1) |
| 8196 | (hm : ∀ l, WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) |
| 8197 | (reindexDirections angleShuffle (p l).directions) (reindexCoefficients angleShuffle (p l).background)) |
| 8198 | (hcopy : ∀ j ∈ modes N, LabelSumBounds.UniformWaveClass (nativeStrip s) W α |
| 8199 | (fun l => ((p l).wave s c u (b l) (G l) (A l) j).amplitude)) |
| 8200 | (hpressure : ∀ j ∈ modes N, LabelSumBounds.UniformWaveClass (nativeStrip s) W (α+1/2) |
| 8201 | (fun l => ((p l).wave s c u (b l) (G l) (A l) j).pressure)) |
| 8202 | (hgood : ∀ j ∈ modes N, LabelSumBounds.UniformWaveClass (nativeStrip s) W (α+1/2-3*κ) |
| 8203 | (fun l => ((p l).copyData c u (b l) (G l) (A l) j).globalGood (nativeStrip s) (p l).directions)) |
| 8204 | (hold : UniformHarmonicInteraction.UniformVelocity s (fun l n x => W l n (angleShuffle (x,0))) (1/2) b) |
| 8205 | (hzero : ∀ l, HarmonicWaveInteraction.ZeroMode (b l)) |
| 8206 | {M : ℕ} (hband : ∀ l, (b l).BandLimited M) |
| 8207 | (hsource : ∀ l, (HarmonicResidual.residualBlock c u (b l) (G l) (A l)).BandLimited N) |
| 8208 | (hphase : ∀ l n, ContDiffOn ℝ ∞ ((b l).phase n) s.domain) |
| 8209 | (hk : ∀ l n, (b l).frequency n ≠ 0) (hkp : ∀ l n, (b l).angularFrequency n ≠ 0) |
| 8210 | (hdiv : ∀ l, HarmonicWaveInteraction.ModeSolenoidal s c (b l)) |
| 8211 | (hpold : ∀ l n, HarmonicResidual.SmoothCoefficients s.domain ((b l).pressure n)) |
| 8212 | {patch : ℕ → ι → Set (Q×Plane)} |
| 8213 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s patch 0 |
| 8214 | (fun n l x => HarmonicMeanInteraction.slowNormal c ho hR (b l).phase n x i)) |
| 8215 | (hFreq : LocalizedWaveBounds.LocalUnweighted s patch (-(1/2)) (fun n l _ => (b l).frequency n)) |
| 8216 | (hAng : LocalizedWaveBounds.LocalUnweighted s patch (-(1/2)) |
| 8217 | (fun n l _ => ((b l).angularFrequency n : ℝ))) |
| 8218 | (hz : ∀ n l x, x ∈ s.domain → x ∉ patch n l → ∀ i j, j ≠ 0 → |
| 8219 | ((p l).updateBlock s c u (b l) (G l) (A l) N).velocity n i j =ᶠ[𝓝 x] fun _ => 0) : |
| 8220 | UniformHarmonicInteraction.UniformVelocity s (fun l n x => W l n (angleShuffle (x,0))) (α+1/10) |
| 8221 | (fun l => HarmonicResidual.residualBlock c v |
| 8222 | (HarmonicWaveInteraction.addBlock (b l) ((p l).updateBlock s c u (b l) (G l) (A l) N)) |
| 8223 | (G l + ((p l).gaussianBlock c u (b l) (G l) (A l) N).velocity) (A l)) := by |
| 8224 | have hkhalf : κ ≤ 1/2 := by linarith |
| 8225 | have hblocks := uniform_assembled_bounds p s c u b G A N hW hcopy hpressure hgood |
| 8226 | have hlin := uniform_linearGood_bounds p s c u b G A N C dyn hkhalf hW hblocks.2.2 |
| 8227 | hsource hb.smooth (operator_radial_smooth ho) hm hphase hkp |
| 8228 | have hnewdiv l : HarmonicWaveInteraction.ModeSolenoidal s c |
| 8229 | (HarmonicWaveInteraction.withCarrier (b l) ((p l).updateBlock s c u (b l) (G l) (A l) N)) := by |
| 8230 | rw [withCarrier_of_same (show SameCarrier (b l) ((p l).updateBlock s c u (b l) (G l) (A l) N) from ⟨rfl,rfl,rfl⟩)] |
| 8231 | exact (p l).modeSolenoidal s c u (b l) (G l) (A l) N (C l) (dyn l) hkhalf (hW l) (hm l) (hphase l) (hkp l) |
| 8232 | exact waveStage_residual_uniform c ho hkhalf hR u v hmean (meanIncrement_of_cumulative hu) hb.smooth |
| 8233 | b (fun l => (p l).updateBlock s c u (b l) (G l) (A l) N) hold (fun i j _ => hblocks.1 i j) |
| 8234 | hzero (fun _ => (assembledBlock_zero _ _ _ _ _ _).1) hband |
| 8235 | (fun l => (p l).updateBlock_band _ _ _ _ _ _ _) hphase hk hkp hdiv hnewdiv hNormal hFreq hAng hz |
| 8236 | (fun l n x hx => hW l n _ hx) hWone hpold (fun l n j => (hblocks.2.1 j).smooth l n) |
| 8237 | G (fun l => ((p l).gaussianBlock c u (b l) (G l) (A l) N).velocity) A A |
| 8238 | (fun _ _ _ => by rw [sub_self]; exact HarmonicResidual.band_zero _) |
| 8239 | (fun i j hj => (hlin i j hj).mono_exponent (by linarith)) |
| 8240 | (by linarith) (by linarith) (by linarith) |
| 8241 | |
| 8242 | end ParticularParameters |
| 8243 | |
| 8244 | end UniformParticularGain |
| 8245 | |
| 8246 | section BandNativeSignedMeanComposition |
| 8247 | |
| 8248 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 8249 | open scoped ContDiff BigOperators |
| 8250 | |
| 8251 | /-- The actual native signed update supplies its pressure, cumulative, |
| 8252 | mean-residual, and measured-debt bounds from the same covariance. -/ |
| 8253 | theorem bandNativeSignedStage_mean_debt {ι : Type} |
| 8254 | (G : SignedMeanGain.Geometry) (B : SignedMeanGain.NativeData G) |
| 8255 | (c : Context Point) (u : State Point) |
| 8256 | {P : ι → ℕ → Point → ℝ} {σ κ : ℝ} |
| 8257 | (hσ : 1/5 ≤ σ) (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1/100000) |
| 8258 | (f : LabelSumBounds.SignedFamily G.strip P (1/2) (17/25) |
| 8259 | (1/2+σ-κ) (1+σ-2*κ)) (a : SignedMeanGain.Assembly f) |
| 8260 | (e : ℕ → ι → SignedMeanGain.NativeIndex) |
| 8261 | (he : ∀ n, Set.InjOn (e n) (a.labels n : Set ι)) |
| 8262 | (hlabels : ∀ n, (a.labels n).image (e n) = B.labels n) |
| 8263 | (hp : ∀ n l, l ∈ a.labels n → (f.primary l).velocity n = (B.primaryBlocks (e n l)).velocity n) |
| 8264 | (hcp : ∀ n l, l ∈ a.labels n → BandReindexedSignedMeanGain.SameCarrierAt |
| 8265 | (f.primary l) (B.primaryBlocks (e n l)) n) |
| 8266 | (ht : ∀ n l, l ∈ a.labels n → (f.tangent l).velocity n = (B.signedBlocks c u (e n l)).velocity n) |
| 8267 | (hct : ∀ n l, l ∈ a.labels n → BandReindexedSignedMeanGain.SameCarrierAt |
| 8268 | (f.tangent l) (B.signedBlocks c u (e n l)) n) |
| 8269 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 8270 | (hold : u.oscillation = SignedMeanGain.oldField f a) |
| 8271 | (H : SignedMeanGain.LocalData G c u |
| 8272 | (SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a) q gaussian) |
| 8273 | (ho : OperatorBounds G.strip G.operators κ) |
| 8274 | (hu : CorrectionState.CumulativeBounds G.strip u) |
| 8275 | (hbase : SmoothTriple (LocalRankDefect.positiveDomain G.region.carrier) c.base) |
| 8276 | (hm : GaugeDebtIncrement.RegularTriple G.region G.patch.a G.patch.b u.mean) |
| 8277 | (hW : ∀ i j, GaugeDebtIncrement.Regular G.region G.patch.a G.patch.b (u.covariance i j)) |
| 8278 | (hX : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.incrementTensor f a i j)) |
| 8279 | (hS : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.crossTensor f a i j)) |
| 8280 | (hθ : MeanClass G.strip (1+σ-κ) (u.thetaResidual c)) |
| 8281 | (hz : MeanClass G.strip (1+σ-κ) (u.axialResidual c)) |
| 8282 | (hd : DefectBounds G.slowStrip (σ-κ) c u) : |
| 8283 | let v := SignedMeanGain.waveStage G.gauge c u |
| 8284 | (SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a) q gaussian |
| 8285 | MeanClass G.strip (1+σ-2*κ) (v.pressure - u.pressure) ∧ |
| 8286 | CorrectionState.CumulativeBounds G.strip v ∧ |
| 8287 | MeanClass G.strip (1+σ-2*κ) (v.thetaResidual c) ∧ |
| 8288 | MeanClass G.strip (1+σ-2*κ) (v.axialResidual c) ∧ |
| 8289 | MeanClass G.strip (1+σ+17/100) (meanBar (v.thetaResidual c)) ∧ |
| 8290 | MeanClass G.strip (1+σ+17/100) (meanBar (v.axialResidual c)) ∧ |
| 8291 | DefectBounds G.slowStrip (σ-2*κ) c v := by |
| 8292 | let w := SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a |
| 8293 | let v := SignedMeanGain.waveStage G.gauge c u w q gaussian |
| 8294 | have hXT : SignedMeanGain.TensorClass G.strip (1+σ-κ) |
| 8295 | (SignedMeanGain.covarianceIncrement u.oscillation w) := by |
| 8296 | simpa only [hold, w, SignedMeanGain.incrementTensor] using |
| 8297 | (SignedMeanGain.signed_tensor_bounds hσ hκsmall f a).1 |
| 8298 | have hXR : ∀ i j, GaugeDebtIncrement.Regular G.region G.patch.a G.patch.b |
| 8299 | (SignedMeanGain.covarianceIncrement u.oscillation w i j) := by |
| 8300 | intro i j |
| 8301 | have hf := hX i j |
| 8302 | change GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b |
| 8303 | (SignedMeanGain.incrementTensor f a i j) at hf |
| 8304 | rw [hold] |
| 8305 | exact ⟨hf.smooth, hf.supported⟩ |
| 8306 | have hpressure : MeanClass G.strip (1+σ-2*κ) (SignedMeanGain.pressureChange G.gauge c u w q gaussian) := by |
| 8307 | simpa only [show 1+σ-κ-κ = 1+σ-2*κ by ring] using H.pressureChange_mem ho hXT |
| 8308 | have hc : OperatorBounds G.strip c.operators κ := by simpa only [H.operators_eq] using ho |
| 8309 | have hop : LocalRankDefect.LocalOperators G.region.carrier c.operators := by |
| 8310 | rw [H.operators_eq] |
| 8311 | exact G.local_operators |
| 8312 | have hdebt := GaugeDebtIncrement.waveStage_defectBounds G.region G.patch.a_pos G.patch.a_lt_b |
| 8313 | G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one |
| 8314 | G.gauge c u w q gaussian hop hbase hm hW hXR hc hXT |
| 8315 | (show σ-2*κ ≤ σ-κ by linarith) (show 1+(σ-2*κ) ≤ (1+σ-κ)-κ by linarith) hd |
| 8316 | have hgain := BandReindexedSignedMeanGain.native_signed_mean_gain G B c u hσ hκ hκsmall f a e he hlabels hp hcp ht hct |
| 8317 | q gaussian hold H ho hX hS hθ hz hd |
| 8318 | have hcum : CorrectionState.CumulativeBounds G.strip v := |
| 8319 | gaugeWaveStage_cumulative G.gauge c u w q ⟨0,gaussian,0⟩ hu hpressure (by linarith) |
| 8320 | exact ⟨hpressure, hcum, hgain.1, hgain.2.1, hgain.2.2.1, hgain.2.2.2, hdebt⟩ |
| 8321 | |
| 8322 | end BandNativeSignedMeanComposition |
| 8323 | |
| 8324 | section UniformSignedGain |
| 8325 | |
| 8326 | open Set Filter Function WeightedClasses MeanIncrementBounds CorrectionState |
| 8327 | open scoped ContDiff Topology BigOperators InnerProductSpace |
| 8328 | namespace PeriodizedSignedParameters |
| 8329 | variable {D I ι : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 8330 | (p : ι → PeriodizedSignedParameters D I) (s : StripData D) |
| 8331 | (request : ℕ → D×ℝ → SignedWaveUpdate.Vec2) |
| 8332 | {P : ι → ℕ → D → ℝ} {β κ : ℝ} |
| 8333 | (C : ∀ l, (p l).NativeControl s (P l) κ) |
| 8334 | (dyn : ∀ l, NativeDynamics (C l) request) (i₀ : I) |
| 8335 | |
| 8336 | include i₀ |
| 8337 | |
| 8338 | theorem uniform_linearGood_bounds |
| 8339 | (hκ : κ ≤ 1/2) |
| 8340 | (hR : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) β (fun n x => request n x j)) |
| 8341 | (hkp : ∀ l n, (p l).base.frequency n * (dyn l).slope n = ((p l).angularFrequency n : ℝ)) |
| 8342 | (hkpne : ∀ l n, (p l).angularFrequency n ≠ 0) |
| 8343 | (c : Context D) (hB : SmoothTriple s.domain c.base) |
| 8344 | (hrad : ∀ n, ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain) |
| 8345 | (hm : ∀ l, WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) (p l).directions (p l).base) |
| 8346 | (a : ι → HarmonicBlock D) (hc : ∀ l, SameCarrier (a l) ((p l).exactBlock s request)) |
| 8347 | (hg : UniformHarmonicInteraction.UniformVelocity s P (β+1-3*κ) |
| 8348 | (fun l => (p l).goodBlock s request)) : |
| 8349 | UniformHarmonicInteraction.UniformVelocity s P (β+1-3*κ) |
| 8350 | (fun l => HarmonicWaveInteraction.linearGoodBlock c (a l) ((p l).exactBlock s request) |
| 8351 | ((p l).gaussianBlock s request).velocity) := by |
| 8352 | let z : ι → HarmonicBlock D := fun l => ErrorHarmonics.zeroBlock (a l).frequency (a l).phase (a l).angularFrequency 0 |
| 8353 | have hb l := (C l).block_bounds hκ request hR |
| 8354 | have hphase l n : ContDiffOn ℝ ∞ ((a l).phase n) s.domain := by |
| 8355 | rw [← (hc l).phase] |
| 8356 | exact (((dyn l).angular i₀).phase_smooth n).comp (SignedWaveUpdate.zeroSection (D := D)).contDiff.contDiffOn |
| 8357 | (fun x hx => hx) |
| 8358 | have hka l n : (a l).angularFrequency n ≠ 0 := by rw [← (hc l).angular]; exact hkpne l n |
| 8359 | have he := linearGoodBlock_cancel_uniform c a (fun l => (p l).exactBlock s request) z |
| 8360 | (fun l => (p l).goodBlock s request) (fun l => ((p l).gaussianBlock s request).velocity) |
| 8361 | hrad (fun _ => contDiffOn_const) hB |
| 8362 | (fun l => HarmonicWaveInteraction.waveBounds_smooth (hb l).2.1 ((p l).exactBlock_zero s request)) |
| 8363 | (fun l => pressureBounds_smooth (hb l).2.2.1 ((p l).exactBlock_pressure_zero s request)) |
| 8364 | hphase hka (fun l n i => ErrorHarmonics.zeroBlock_symmetric _ _ _ _ n i) |
| 8365 | (fun _ => (SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _).1) hg ?_ |
| 8366 | · intro i j hj |
| 8367 | simpa [z, ErrorHarmonics.zeroBlock, HarmonicFields.constantCoefficient, Finsupp.single_apply, |
| 8368 | hj, Ne.symm hj] using he i j hj |
| 8369 | · intro l n x hx θ i |
| 8370 | have hgood : SameCarrier (a l) ((p l).goodBlock s request) := |
| 8371 | ⟨(hc l).frequency,(hc l).phase,(hc l).angular⟩ |
| 8372 | have hgauss : SameCarrier (a l) ((p l).gaussianBlock s request) := |
| 8373 | ⟨(hc l).frequency,(hc l).phase,(hc l).angular⟩ |
| 8374 | have hh := congrFun ((dyn l).context_linear_identity i₀ hκ hR (hkp l) c hB hrad (hm l) |
| 8375 | (a l) (hc l) n (x,θ) hx) i |
| 8376 | rw [withCarrier_of_same hgood] |
| 8377 | have heval : (HarmonicFields.field (((p l).gaussianBlock s request).velocity n i) |
| 8378 | ((a l).frequency n) ((a l).phase n) ((a l).angularFrequency n) (x,θ)).re = |
| 8379 | ((p l).gaussianBlock s request).oscillation n (x,θ) i := by |
| 8380 | simp only [HarmonicBlock.oscillation, hgauss.frequency, hgauss.phase, hgauss.angular] |
| 8381 | rw [heval] |
| 8382 | simpa only [z, HarmonicWaveInteraction.withCarrier, ErrorHarmonics.zeroBlock, |
| 8383 | HarmonicBlock.oscillation, HarmonicResidual.field_constant, Pi.zero_apply, Complex.ofReal_zero, |
| 8384 | Complex.zero_re, Pi.add_apply, add_zero] using hh |
| 8385 | |
| 8386 | theorem uniform_residual_gain {B : ℝ} |
| 8387 | (hB : 7/10 ≤ B) (hκ : κ ≤ 1/100000) |
| 8388 | (hRquest : ∀ j, MeanClass (HarmonicWaveInteraction.productStrip s) (B-1/2-κ) (fun n x => request n x j)) |
| 8389 | (geom : ∀ l n, CurlClassBounds.CylindricalGeometry (HarmonicWaveInteraction.productStrip s).domain |
| 8390 | ((p l).base.radius n) ((p l).directions.radialField n) (fun _ => (p l).directions.angular) |
| 8391 | ((p l).directions.axialField (HarmonicWaveInteraction.productStrip s) n)) |
| 8392 | (ht : ∀ l n i x, x ∈ (HarmonicWaveInteraction.productStrip s).domain → x ∈ (C l).phasePatch n i → |
| 8393 | ⟪(p l).base.normal (HarmonicWaveInteraction.productStrip s) (p l).directions n x, |
| 8394 | (p l).fundamental i n x⟫_ℝ = 0) |
| 8395 | (hkp : ∀ l n, (p l).base.frequency n*(dyn l).slope n = ((p l).angularFrequency n : ℝ)) |
| 8396 | (hkpne : ∀ l n, (p l).angularFrequency n ≠ 0) |
| 8397 | (c : Context D) (u v : State D) (hmean : v.mean = u.mean) |
| 8398 | (ho : OperatorBounds s c.operators κ) (hR : ∀ x ∈ s.domain, 0 < c.operators.radius x) |
| 8399 | (hbase : BaseBounds s c.base) (hu : MeanIncrementBounds.CumulativeBounds s u.mean) |
| 8400 | (hm : ∀ l, WaveFrameMatch c (HarmonicWaveInteraction.productStrip s) (p l).directions (p l).base) |
| 8401 | (a : ι → HarmonicBlock D) (hc : ∀ l, SameCarrier (a l) ((p l).exactBlock s request)) |
| 8402 | (ha : UniformHarmonicInteraction.UniformVelocity s P (1/2) a) |
| 8403 | (hnew : UniformHarmonicInteraction.UniformVelocity s P (B-κ) (fun l => (p l).exactBlock s request)) |
| 8404 | (hgood : UniformHarmonicInteraction.UniformVelocity s P (B+1/2-4*κ) (fun l => (p l).goodBlock s request)) |
| 8405 | (ha0 : ∀ l, HarmonicWaveInteraction.ZeroMode (a l)) {M : ℕ} (hM : ∀ l, (a l).BandLimited M) |
| 8406 | (hphase : ∀ l n, ContDiffOn ℝ ∞ ((a l).phase n) s.domain) |
| 8407 | (hk : ∀ l n, (a l).frequency n ≠ 0) (hka : ∀ l n, (a l).angularFrequency n ≠ 0) |
| 8408 | (hdiv : ∀ l, HarmonicWaveInteraction.ModeSolenoidal s c (a l)) |
| 8409 | (hpold : ∀ l n, HarmonicResidual.SmoothCoefficients s.domain ((a l).pressure n)) |
| 8410 | {patch : ℕ → ι → Set D} |
| 8411 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted s patch 0 |
| 8412 | (fun n l x => HarmonicMeanInteraction.slowNormal c ho hR (a l).phase n x i)) |
| 8413 | (hFreq : LocalizedWaveBounds.LocalUnweighted s patch (-(1/2)) (fun n l _ => (a l).frequency n)) |
| 8414 | (hAng : LocalizedWaveBounds.LocalUnweighted s patch (-(1/2)) (fun n l _ => ((a l).angularFrequency n : ℝ))) |
| 8415 | (hz : ∀ n l x, x ∈ s.domain → x ∉ patch n l → ∀ i j, j ≠ 0 → |
| 8416 | ((p l).exactBlock s request).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 8417 | (hP1 : ∀ l n x, x ∈ s.domain → P l n x ≤ 1) |
| 8418 | (G A : ι → HarmonicResidual.BlockCoefficients D) |
| 8419 | (hold : UniformHarmonicInteraction.UniformVelocity s P (B+1/10) |
| 8420 | (fun l => HarmonicResidual.residualBlock c u (a l) (G l) (A l))) : |
| 8421 | UniformHarmonicInteraction.UniformVelocity s P (B+1/10) |
| 8422 | (fun l => HarmonicResidual.residualBlock c v |
| 8423 | (HarmonicWaveInteraction.addBlock (a l) ((p l).exactBlock s request)) |
| 8424 | (G l+((p l).gaussianBlock s request).velocity) (A l)) := by |
| 8425 | have hkhalf : κ ≤ 1/2 := by linarith |
| 8426 | have hgood' : UniformHarmonicInteraction.UniformVelocity s P ((B-1/2-κ)+1-3*κ) |
| 8427 | (fun l => (p l).goodBlock s request) := by |
| 8428 | convert! hgood using 1 |
| 8429 | ring |
| 8430 | have hlin := uniform_linearGood_bounds p s request C dyn i₀ hkhalf hRquest hkp hkpne c hbase.smooth |
| 8431 | (operator_radial_smooth ho) hm a hc hgood' |
| 8432 | have hnewdiv l : HarmonicWaveInteraction.ModeSolenoidal s c |
| 8433 | (HarmonicWaveInteraction.withCarrier (a l) ((p l).exactBlock s request)) := by |
| 8434 | rw [withCarrier_of_same (hc l)] |
| 8435 | exact (dyn l).modeSolenoidal i₀ hkhalf hRquest (geom l) (ht l) (hkp l) (hkpne l) c (hm l) |
| 8436 | exact waveStage_residual_uniform c ho hkhalf hR u v hmean (meanIncrement_of_cumulative hu) hbase.smooth |
| 8437 | a (fun l => (p l).exactBlock s request) ha hnew ha0 (fun l => (p l).exactBlock_zero s request) |
| 8438 | hM (fun l => (p l).exactBlock_band s request) hphase hk hka hdiv hnewdiv hNormal hFreq hAng hz |
| 8439 | (fun l => (C l).envelope_nonneg) hP1 hpold |
| 8440 | (fun l => pressureBounds_smooth ((C l).block_bounds hkhalf request hRquest).2.2.1 |
| 8441 | ((p l).exactBlock_pressure_zero s request)) G (fun l => ((p l).gaussianBlock s request).velocity) A A |
| 8442 | (fun _ _ _ => by rw [sub_self]; exact HarmonicResidual.band_zero _) |
| 8443 | (fun i j hj => (hold i j hj).add ((hlin i j hj).mono_exponent (by linarith))) |
| 8444 | (by linarith) (by linarith) (by linarith) |
| 8445 | |
| 8446 | end PeriodizedSignedParameters |
| 8447 | |
| 8448 | end UniformSignedGain |
| 8449 | |
| 8450 | section FourStageMeanComposition |
| 8451 | |
| 8452 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 8453 | open scoped ContDiff BigOperators |
| 8454 | |
| 8455 | section MeanCycle |
| 8456 | variable {ι : Type} (G : SignedMeanGain.Geometry) (B : SignedMeanGain.NativeData G) |
| 8457 | (c : Context Point) (u : State Point) |
| 8458 | (w₁ : Oscillation Point) (q₁ : OscillatoryScalar Point) (e₁ : Oscillation Point) |
| 8459 | {P : ι → ℕ → Point → ℝ} {σ κ : ℝ} |
| 8460 | (f : LabelSumBounds.SignedFamily G.strip P (1/2) (17/25) (1/2+σ-κ) (1+σ-2*κ)) |
| 8461 | (a : SignedMeanGain.Assembly f) |
| 8462 | (q₂ : OscillatoryScalar Point) (e₂ : Oscillation Point) |
| 8463 | |
| 8464 | local notation "u₁" => SignedMeanGain.waveStage G.gauge c u w₁ q₁ e₁ |
| 8465 | local notation "w₂" => SignedMeanGain.tangentField f a + SignedMeanGain.curlField f a |
| 8466 | local notation "u₂" => SignedMeanGain.waveStage G.gauge c u₁ w₂ q₂ e₂ |
| 8467 | |
| 8468 | /-- The two actual wave updates, temporal inverse, and rank solve form one |
| 8469 | mean/debt gain. All intermediate residual and flux regularity is derived |
| 8470 | from the original primitive fields and the actual covariance increments. -/ |
| 8471 | theorem fourStage_mean_gain |
| 8472 | (hσ : 1/5 ≤ σ) (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1/100000) |
| 8473 | (H : MeanStateRegularity.PrimitiveData G.region G.patch.a G.patch.b c u) |
| 8474 | (hop : c.operators = G.operators) |
| 8475 | (ho : OperatorBounds G.strip G.operators κ) (hb : BaseBounds G.strip c.base) |
| 8476 | (hu : CorrectionState.CumulativeBounds G.strip u) |
| 8477 | (hfixed : (reconstructState G.gauge c u).pressure = u.pressure) |
| 8478 | (hmθ : ∀ n z, z ∈ G.region.carrier → radialMoment 2 u.mean.angular n z = 0) |
| 8479 | (hmz : ∀ n z, z ∈ G.region.carrier → radialMoment 1 u.mean.axial n z = 0) |
| 8480 | (hθ : MeanClass G.strip (1+σ) (u.thetaResidual c)) |
| 8481 | (hz : MeanClass G.strip (1+σ) (u.axialResidual c)) |
| 8482 | (hd : DefectBounds G.slowStrip σ c u) |
| 8483 | (hX₁ : ∀ i j, GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b |
| 8484 | (SignedMeanGain.covarianceIncrement u.oscillation w₁ i j)) |
| 8485 | (hX₁class : SignedMeanGain.TensorClass G.strip (1+σ) |
| 8486 | (SignedMeanGain.covarianceIncrement u.oscillation w₁)) |
| 8487 | (hX₂ : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.incrementTensor f a i j)) |
| 8488 | (hS : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.crossTensor f a i j)) |
| 8489 | (hold : (u₁).oscillation = SignedMeanGain.oldField f a) |
| 8490 | (e : ℕ → ι → SignedMeanGain.NativeIndex) |
| 8491 | (he : ∀ n, Set.InjOn (e n) (a.labels n : Set ι)) |
| 8492 | (hlabels : ∀ n, (a.labels n).image (e n) = B.labels n) |
| 8493 | (hp : ∀ n l, l ∈ a.labels n → (f.primary l).velocity n = (B.primaryBlocks (e n l)).velocity n) |
| 8494 | (hcp : ∀ n l, l ∈ a.labels n → BandReindexedSignedMeanGain.SameCarrierAt |
| 8495 | (f.primary l) (B.primaryBlocks (e n l)) n) |
| 8496 | (ht : ∀ n l, l ∈ a.labels n → (f.tangent l).velocity n = (B.signedBlocks c u₁ (e n l)).velocity n) |
| 8497 | (hct : ∀ n l, l ∈ a.labels n → BandReindexedSignedMeanGain.SameCarrierAt |
| 8498 | (f.tangent l) (B.signedBlocks c u₁ (e n l)) n) |
| 8499 | (r : RankData PressureStream.Plane) (h : ℝ) (index : ℕ → ℕ) |
| 8500 | (axial : PressureStream.Plane × PressureStream.Plane) |
| 8501 | (hh : 0 ≤ h) (hscale : ∀ n, ChartScales.S n ≤ G.slow n) |
| 8502 | (gap : ℕ) (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) |
| 8503 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 8504 | (hfast : ∀ n, c.operators.fastCoefficient n = ChartScales.Tg ^ index n * ChartScales.Q n ^ (1+h)) |
| 8505 | (hV : LocalRankDefect.IsSlowOn G.region.carrier c.base.angular) |
| 8506 | (hG : LocalRankDefect.IsSlowOn G.region.carrier c.base.axial) |
| 8507 | (hg : LocalRankDefect.RankGeometry G.gauge r G.region.carrier c |
| 8508 | (temporalStageState G.gauge h index axial c u₂)) |
| 8509 | {A₀ B₀ : ℝ} (hparam : RankStateBounds.NormalizedParameters G.coord A₀ B₀ r G.region.carrier) |
| 8510 | (hB : B₀ ≠ 0) (hleft : G.patch.a < r.inner) (hright : r.outer < G.patch.b) : |
| 8511 | let t := temporalStageState G.gauge h index axial c u₂ |
| 8512 | let v := rankStageState G.gauge r axial c t |
| 8513 | IncrementBounds G.strip (1+σ-2*κ) (temporalIncrementState G.gauge h index axial c u₂) ∧ |
| 8514 | IncrementBounds G.strip (1+σ-2*κ) (rankIncrementState G.gauge r axial c t) ∧ |
| 8515 | MeanClass G.strip (1+σ-2*κ) (v.pressure-u.pressure) ∧ |
| 8516 | CorrectionState.CumulativeBounds G.strip v ∧ |
| 8517 | DefectBounds G.slowStrip (σ+1/10) c v ∧ |
| 8518 | MeanClass G.strip (1+(σ+1/10)) (v.thetaResidual c) ∧ |
| 8519 | MeanClass G.strip (1+(σ+1/10)) |
| 8520 | (v.axialResidual c - fun n x => temporalAliasState G.gauge h index c u₂ n (x,0) 2) := by |
| 8521 | have hs : movingStripData G.region G.gauge.radial.inner G.gauge.radial.outer |
| 8522 | G.leftWeight G.rightWeight G.inner_pos G.left_pos G.right_pos |
| 8523 | G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one = G.strip := by |
| 8524 | simp only [SignedMeanGain.Geometry.strip, G.inner_eq, G.outer_eq] |
| 8525 | have H₀ : MeanStateRegularity.PrimitiveData G.region G.gauge.radial.inner G.gauge.radial.outer c u := by |
| 8526 | simpa only [G.inner_eq, G.outer_eq] using H |
| 8527 | have HX₁ : ∀ i j, GaugeDebtIncrement.Regular G.region G.gauge.radial.inner G.gauge.radial.outer |
| 8528 | (SignedMeanGain.covarianceIncrement u.oscillation w₁ i j) := by |
| 8529 | simpa only [G.inner_eq, G.outer_eq] using |
| 8530 | (fun i j => MeanStateRegularity.MovingField.regular (hX₁ i j)) |
| 8531 | have hc : OperatorBounds G.strip c.operators κ := by simpa only [hop] using ho |
| 8532 | have hfirst := gaugeWaveStage_mean_from_covariance G.region G.gauge G.inner_pos G.exponent_pos |
| 8533 | G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one G.length_eq |
| 8534 | c u w₁ q₁ e₁ H.operators.regular H.base.smooth H₀.mean.regular |
| 8535 | (fun i j => MeanStateRegularity.MovingField.regular (H₀.covariance i j)) HX₁ |
| 8536 | (hs.symm ▸ hc) (hs.symm ▸ hX₁class) hfixed (hs.symm ▸ hb) (hs.symm ▸ hu) |
| 8537 | (show 9/10 ≤ (1+σ)-κ by linarith) le_rfl |
| 8538 | (hs.symm ▸ hθ.mono_exponent (by linarith)) (hs.symm ▸ hz.mono_exponent (by linarith)) |
| 8539 | (fun i => (hd i).mono_exponent (by linarith)) |
| 8540 | rw [hs] at hfirst |
| 8541 | obtain ⟨hp₁, hu₁, hθ₁, hz₁, hd₁⟩ := hfirst |
| 8542 | have H₁ := H.waveStage G.gauge w₁ q₁ e₁ hX₁ |
| 8543 | have HX₂ : ∀ i j, GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b |
| 8544 | (SignedMeanGain.covarianceIncrement (u₁).oscillation w₂ i j) := by |
| 8545 | simp only [hold] |
| 8546 | exact hX₂ |
| 8547 | have Hsigned := MeanStateRegularity.localData G c u₁ w₂ q₂ e₂ H₁ hop HX₂ |
| 8548 | (GaugeMomentBalances.reconstructState_idempotent _ _ _) |
| 8549 | (by simpa only [SignedMeanGain.waveStage_mean] using hmθ) |
| 8550 | (by simpa only [SignedMeanGain.waveStage_mean] using hmz) |
| 8551 | have hdebt₁ : DefectBounds G.slowStrip (σ-κ) c u₁ := by |
| 8552 | simpa only [DefectBounds, SignedMeanGain.Geometry.slowStrip, |
| 8553 | show 1+(σ-κ) = 1+σ-κ by ring] using hd₁ |
| 8554 | obtain ⟨hp₂, hu₂, hθ₂, hz₂, hbarθ, hbarz, hd₂⟩ := |
| 8555 | bandNativeSignedStage_mean_debt G B c u₁ hσ hκ hκsmall f a e he hlabels hp hcp ht hct |
| 8556 | q₂ e₂ hold Hsigned ho hu₁ H.base.smooth H₁.mean.regular |
| 8557 | (fun i j => MeanStateRegularity.MovingField.regular (H₁.covariance i j)) hX₂ hS |
| 8558 | hθ₁ hz₁ hdebt₁ |
| 8559 | have H₂ := H₁.waveStage G.gauge w₂ q₂ e₂ HX₂ |
| 8560 | have H₂g : MeanStateRegularity.PrimitiveData G.region G.gauge.radial.inner G.gauge.radial.outer c u₂ := by |
| 8561 | simpa only [G.inner_eq, G.outer_eq] using H₂ |
| 8562 | have hθreg := H₂g.theta G.inner_pos G.gauge.radial.inner_lt_outer |
| 8563 | have hzreg := H₂g.axial_reconstructed G.inner_pos G.exponent_pos G.length_eq rfl |
| 8564 | have hmean := meanStages_constructed G.gauge r h index axial c u₂ G.region G.inner_pos G.exponent_pos |
| 8565 | G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one G.length_eq |
| 8566 | rfl hσ hκsmall hh hscale gap hgap hv hfast (hs.symm ▸ hc) (hs.symm ▸ hb) (hs.symm ▸ hu₂) |
| 8567 | H.operators.regular H.base.smooth hV hG H₂g.mean.regular.smooth |
| 8568 | ⟨H₂g.mean.radial.supported, H₂g.mean.angular.supported, H₂g.mean.axial.supported⟩ |
| 8569 | (fun i j => (H₂g.covariance i j).smooth) (fun i j => (H₂g.covariance i j).supported) |
| 8570 | hθreg.smooth hzreg.smooth hθreg.periodic hzreg.periodic hθreg.supported hzreg.supported |
| 8571 | (hs.symm ▸ hθ₂) (hs.symm ▸ hz₂) (hs.symm ▸ hbarθ) (hs.symm ▸ hbarz) |
| 8572 | (by simpa only [DefectBounds, SignedMeanGain.Geometry.slowStrip, |
| 8573 | show 1+(σ-2*κ) = 1+σ-2*κ by ring] using hd₂) |
| 8574 | hg hparam hB (by simpa only [G.inner_eq] using hleft) (by simpa only [G.outer_eq] using hright) |
| 8575 | rw [hs] at hmean |
| 8576 | obtain ⟨hi, hr, hpmean, hcum, hdebt, htheta, haxial⟩ := hmean |
| 8577 | refine ⟨hi, hr, ?_, hcum, hdebt, htheta, haxial⟩ |
| 8578 | apply class_congr (((hp₁.mono_exponent (by linarith)).add hp₂).add hpmean) |
| 8579 | intro n x hx |
| 8580 | change (rankStageState G.gauge r axial c (temporalStageState G.gauge h index axial c u₂)).pressure n x - |
| 8581 | u.pressure n x = ((u₁).pressure n x - u.pressure n x + |
| 8582 | ((u₂).pressure n x - (u₁).pressure n x)) + |
| 8583 | ((rankStageState G.gauge r axial c (temporalStageState G.gauge h index axial c u₂)).pressure n x - |
| 8584 | (u₂).pressure n x) |
| 8585 | ring |
| 8586 | |
| 8587 | end MeanCycle |
| 8588 | |
| 8589 | end FourStageMeanComposition |
| 8590 | |
| 8591 | section CycleUniformComposition |
| 8592 | |
| 8593 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState |
| 8594 | open scoped ContDiff Topology BigOperators |
| 8595 | |
| 8596 | theorem incrementBounds_updated {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 8597 | {s : StripData D} {H : ℝ} {a b : Triple D} |
| 8598 | (ha : IncrementBounds s H a) (hb : IncrementBounds s H b) : |
| 8599 | IncrementBounds s H (updated a b) := |
| 8600 | ⟨ha.radial.add hb.radial, ha.angular.add hb.angular, ha.axial.add hb.axial⟩ |
| 8601 | |
| 8602 | theorem updated_assoc {D : Type} (a b c : Triple D) : |
| 8603 | updated (updated a b) c = updated a (updated b c) := by |
| 8604 | apply triple_ext <;> exact add_assoc _ _ _ |
| 8605 | |
| 8606 | namespace CycleParameters |
| 8607 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 8608 | (c : Context CyclePoint) (u : State CyclePoint) |
| 8609 | |
| 8610 | /-- The actual two wave increments retain the cumulative bound and the |
| 8611 | difference from the fixed primary family, with constants before labels. -/ |
| 8612 | theorem finalBlock_uniform_cumulative |
| 8613 | (primary : ι → HarmonicBlock CyclePoint) {P : ι → ℕ → CyclePoint → ℝ} {σ κ : ℝ} |
| 8614 | (hσ : 1/5 ≤ σ) (hκsmall : κ ≤ 1/100000) |
| 8615 | (hold : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2) |
| 8616 | (fun l n x => (v.blocks l).velocity n i j x)) |
| 8617 | (hdiff : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (17/25) |
| 8618 | (fun l n x => (v.blocks l).velocity n i j x - (primary l).velocity n i j x)) |
| 8619 | (hpart : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ) |
| 8620 | (fun l n x => (p.particularBlock v c u l).velocity n i j x)) |
| 8621 | (hsigned : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ-κ) |
| 8622 | (fun l n x => (p.signedBlock v c u l).velocity n i j x)) : |
| 8623 | (∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2) |
| 8624 | (fun l n x => (p.finalBlock v c u l).velocity n i j x)) ∧ |
| 8625 | (∀ i j, LabelSumBounds.UniformWaveClass p.strip P (17/25) |
| 8626 | (fun l n x => (p.finalBlock v c u l).velocity n i j x - (primary l).velocity n i j x)) := by |
| 8627 | constructor |
| 8628 | · intro i j |
| 8629 | exact ((hold i j).add ((hpart i j).mono_exponent (by linarith))).add |
| 8630 | ((hsigned i j).mono_exponent (by linarith)) |
| 8631 | · intro i j |
| 8632 | apply (((hdiff i j).add ((hpart i j).mono_exponent (by linarith))).add |
| 8633 | ((hsigned i j).mono_exponent (by linarith))).congr |
| 8634 | intro l n x hx |
| 8635 | change (v.blocks l).velocity n i j x - (primary l).velocity n i j x + |
| 8636 | (p.particularBlock v c u l).velocity n i j x + (p.signedBlock v c u l).velocity n i j x = |
| 8637 | (v.blocks l).velocity n i j x + (p.particularBlock v c u l).velocity n i j x + |
| 8638 | (p.signedBlock v c u l).velocity n i j x - (primary l).velocity n i j x |
| 8639 | ring |
| 8640 | |
| 8641 | theorem finalBlock_increment_bounds {P : ι → ℕ → CyclePoint → ℝ} {σ κ : ℝ} |
| 8642 | (hκ : 0 ≤ κ) |
| 8643 | (hpart : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ) |
| 8644 | (fun l n x => (p.particularBlock v c u l).velocity n i j x)) |
| 8645 | (hsigned : ∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ-κ) |
| 8646 | (fun l n x => (p.signedBlock v c u l).velocity n i j x)) |
| 8647 | (hpp : ∀ j, LabelSumBounds.UniformWaveClass p.strip P (1+σ) |
| 8648 | (fun l n x => (p.particularBlock v c u l).pressure n j x)) |
| 8649 | (hsp : ∀ j, LabelSumBounds.UniformWaveClass p.strip P (1+σ-κ) |
| 8650 | (fun l n x => (p.signedBlock v c u l).pressure n j x)) : |
| 8651 | (∀ i j, LabelSumBounds.UniformWaveClass p.strip P (1/2+σ-κ) |
| 8652 | (fun l n x => (p.finalBlock v c u l).velocity n i j x - (v.blocks l).velocity n i j x)) ∧ |
| 8653 | (∀ j, LabelSumBounds.UniformWaveClass p.strip P (1+σ-κ) |
| 8654 | (fun l n x => (p.finalBlock v c u l).pressure n j x - (v.blocks l).pressure n j x)) := by |
| 8655 | constructor |
| 8656 | · intro i j |
| 8657 | apply (((hpart i j).mono_exponent (by linarith)).add (hsigned i j)).congr |
| 8658 | intro l n x hx |
| 8659 | change (p.particularBlock v c u l).velocity n i j x + (p.signedBlock v c u l).velocity n i j x = |
| 8660 | (v.blocks l).velocity n i j x + (p.particularBlock v c u l).velocity n i j x + |
| 8661 | (p.signedBlock v c u l).velocity n i j x - (v.blocks l).velocity n i j x |
| 8662 | ring |
| 8663 | · intro j |
| 8664 | apply (((hpp j).mono_exponent (by linarith)).add (hsp j)).congr |
| 8665 | intro l n x hx |
| 8666 | change (p.particularBlock v c u l).pressure n j x + (p.signedBlock v c u l).pressure n j x = |
| 8667 | (v.blocks l).pressure n j x + (p.particularBlock v c u l).pressure n j x + |
| 8668 | (p.signedBlock v c u l).pressure n j x - (v.blocks l).pressure n j x |
| 8669 | ring |
| 8670 | |
| 8671 | /-- Apply the complete actual mean increment once to the stored harmonic |
| 8672 | residual. The pressure-alias refresh contributes only an angular zero mode. -/ |
| 8673 | theorem meanStages_residual_gain {P : ι → ℕ → CyclePoint → ℝ} {σ κ : ℝ} |
| 8674 | (hκsmall : κ ≤ 1/100000) |
| 8675 | (ho : OperatorBounds p.strip c.operators κ) |
| 8676 | (hR : ∀ x ∈ p.strip.domain, 0 < c.operators.radius x) |
| 8677 | (hb : SmoothTriple p.strip.domain c.base) |
| 8678 | (hm : SmoothTriple p.strip.domain u.mean) |
| 8679 | (hTemporal : IncrementBounds p.strip (1+σ-2*κ) (p.temporalIncrement v c u)) |
| 8680 | (hRank : IncrementBounds p.strip (1+σ-2*κ) (p.rankIncrement v c u)) |
| 8681 | (hvelocity : UniformHarmonicInteraction.UniformVelocity p.strip P (1/2) (p.finalBlock v c u)) |
| 8682 | {C : ℕ → ι → Set CyclePoint} |
| 8683 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted p.strip C 0 |
| 8684 | (fun n l x => HarmonicMeanInteraction.slowNormal c ho hR (v.blocks l).phase n x i)) |
| 8685 | (hFreq : LocalizedWaveBounds.LocalUnweighted p.strip C (-(1/2)) (fun n l _ => (v.blocks l).frequency n)) |
| 8686 | (hAng : LocalizedWaveBounds.LocalUnweighted p.strip C (-(1/2)) |
| 8687 | (fun n l _ => ((v.blocks l).angularFrequency n : ℝ))) |
| 8688 | (hz : ∀ n l x, x ∈ p.strip.domain → x ∉ C n l → ∀ i j, j ≠ 0 → |
| 8689 | (p.finalBlock v c u l).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 8690 | (hold : UniformHarmonicInteraction.UniformVelocity p.strip P (1/2+σ+1/10) |
| 8691 | (fun l => HarmonicResidual.residualBlock c (p.afterSigned v c u) (p.finalBlock v c u l) |
| 8692 | ((p.nextCoefficients v c u).gaussian l) (v.aliasCoefficients l))) : |
| 8693 | UniformHarmonicInteraction.UniformVelocity p.strip P (1/2+(σ+1/10)) |
| 8694 | (fun l => HarmonicResidual.residualBlock c (p.next v c u) ((p.nextCoefficients v c u).blocks l) |
| 8695 | ((p.nextCoefficients v c u).gaussian l) ((p.nextCoefficients v c u).aliasCoefficients l)) := by |
| 8696 | have hh := incrementBounds_updated hTemporal hRank |
| 8697 | have he : (p.next v c u).mean = updated (p.afterSigned v c u).mean |
| 8698 | (updated (p.temporalIncrement v c u) (p.rankIncrement v c u)) := by |
| 8699 | rw [p.next_mean v c u, p.afterSigned_mean v c u, updated_assoc] |
| 8700 | have hms : SmoothTriple p.strip.domain (p.afterSigned v c u).mean := by |
| 8701 | simpa only [p.afterSigned_mean v c u] using hm |
| 8702 | have hout := meanStage_residual_uniform c ho (by linarith) hR (p.afterSigned v c u) (p.next v c u) |
| 8703 | (updated (p.temporalIncrement v c u) (p.rankIncrement v c u)) he hb hms hh (p.finalBlock v c u) |
| 8704 | hvelocity hNormal hFreq hAng hz ((p.nextCoefficients v c u).gaussian) v.aliasCoefficients v.aliasCoefficients |
| 8705 | (fun _ _ _ => by rw [sub_self]; exact HarmonicResidual.band_zero _) hold (by linarith) |
| 8706 | simp only [add_assoc] at hout ⊢ |
| 8707 | exact hout |
| 8708 | |
| 8709 | end CycleParameters |
| 8710 | |
| 8711 | end CycleUniformComposition |
| 8712 | |
| 8713 | section ActualMovingCovariance |
| 8714 | |
| 8715 | open Set MeasureTheory WeightedClasses MeanIncrementBounds CorrectionState LocalSignedRequest |
| 8716 | open scoped ContDiff BigOperators |
| 8717 | |
| 8718 | /-- Whole-fiber periodicity of the actual real oscillation. -/ |
| 8719 | def OscillationPeriodic (U : Set PressureStream.Plane) (w : Oscillation Point) : Prop := |
| 8720 | ∀ n R s, s ∈ U → ∀ θ, FourierAlias.TorusPeriodic (fun Y => w n ((R,(s,Y)),θ)) |
| 8721 | |
| 8722 | theorem OscillationPeriodic.add {U : Set PressureStream.Plane} {u w : Oscillation Point} |
| 8723 | (hu : OscillationPeriodic U u) (hw : OscillationPeriodic U w) : OscillationPeriodic U (u+w) := |
| 8724 | fun n R s hs θ Y k => congrArg₂ (·+·) (hu n R s hs θ Y k) (hw n R s hs θ Y k) |
| 8725 | |
| 8726 | theorem OscillationPeriodic.bilinearCovariance {U : Set PressureStream.Plane} {u w : Oscillation Point} |
| 8727 | (hu : OscillationPeriodic U u) (hw : OscillationPeriodic U w) (i j : Fin 3) : |
| 8728 | MeanStateRegularity.Periodic U (bilinearCovariance u w i j) := by |
| 8729 | intro n R s hs Y k |
| 8730 | unfold CorrectionState.bilinearCovariance CorrectionState.angularAverage |
| 8731 | apply congrArg (fun t : ℝ => t / (2 * Real.pi)) |
| 8732 | apply intervalIntegral.integral_congr |
| 8733 | intro θ hθ |
| 8734 | exact congrArg₂ (· * ·) (congrFun (hu n R s hs θ Y k) i) (congrFun (hw n R s hs θ Y k) j) |
| 8735 | |
| 8736 | theorem OscillationPeriodic.covarianceIncrement {U : Set PressureStream.Plane} {u w : Oscillation Point} |
| 8737 | (hu : OscillationPeriodic U u) (hw : OscillationPeriodic U w) (i j : Fin 3) : |
| 8738 | MeanStateRegularity.Periodic U (SignedMeanGain.covarianceIncrement u w i j) := |
| 8739 | MeanStateRegularity.Periodic.sub ((hu.add hw).bilinearCovariance (hu.add hw) i j) |
| 8740 | (hu.bilinearCovariance hu i j) |
| 8741 | |
| 8742 | theorem covarianceIncrement_moving {coord a b : ℝ} (U : SlowRegion coord) |
| 8743 | {u w : Oscillation Point} |
| 8744 | (hu : WaveStateRegularity.AngularSmooth (PhysicalMeanDomain.slowDomain U.carrier) u) |
| 8745 | (hw : WaveStateRegularity.AngularSmooth (PhysicalMeanDomain.slowDomain U.carrier) w) |
| 8746 | (hs : WaveStateRegularity.WaveSupport U a b w) |
| 8747 | (hup : OscillationPeriodic U.carrier u) (hwp : OscillationPeriodic U.carrier w) (i j : Fin 3) : |
| 8748 | GaugeMomentBalances.MovingField U a b (SignedMeanGain.covarianceIncrement u w i j) := |
| 8749 | MeanStateRegularity.MovingField.of_regular (WaveStateRegularity.covarianceIncrement_regular U hu hw hs i j) |
| 8750 | (hup.covarianceIncrement hwp i j) |
| 8751 | |
| 8752 | theorem symmetricCovariance_moving {coord a b : ℝ} (U : SlowRegion coord) |
| 8753 | {u w : Oscillation Point} |
| 8754 | (hu : WaveStateRegularity.AngularSmooth (PhysicalMeanDomain.slowDomain U.carrier) u) |
| 8755 | (hw : WaveStateRegularity.AngularSmooth (PhysicalMeanDomain.slowDomain U.carrier) w) |
| 8756 | (hs : WaveStateRegularity.WaveSupport U a b w) |
| 8757 | (hup : OscillationPeriodic U.carrier u) (hwp : OscillationPeriodic U.carrier w) (i j : Fin 3) : |
| 8758 | GaugeMomentBalances.MovingField U a b (LabelSumBounds.symmetricCovariance u w i j) := by |
| 8759 | have h₁ : GaugeDebtIncrement.Regular U a b (bilinearCovariance u w i j) := by |
| 8760 | rw [bilinearCovariance_comm u w i j] |
| 8761 | exact WaveStateRegularity.bilinearCovariance_regular U hw hu hs j i |
| 8762 | exact MeanStateRegularity.MovingField.add |
| 8763 | (MeanStateRegularity.MovingField.of_regular h₁ (hup.bilinearCovariance hwp i j)) |
| 8764 | (MeanStateRegularity.MovingField.of_regular |
| 8765 | (WaveStateRegularity.bilinearCovariance_regular U hw hu hs i j) (hwp.bilinearCovariance hup i j)) |
| 8766 | |
| 8767 | end ActualMovingCovariance |
| 8768 | |
| 8769 | section ActualGaussianMeans |
| 8770 | |
| 8771 | open Set MeasureTheory WeightedClasses MeanIncrementBounds CorrectionState |
| 8772 | open scoped ContDiff BigOperators |
| 8773 | |
| 8774 | theorem block_zeroMode_pull {D E : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 8775 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 8776 | (e : D ≃ₗᵢ[ℝ] E) (b : HarmonicBlock E) (hb : HarmonicWaveInteraction.ZeroMode b) : |
| 8777 | HarmonicWaveInteraction.ZeroMode (StateReindex.block e b) := by |
| 8778 | intro n i |
| 8779 | funext x |
| 8780 | change b.velocity n i 0 (e x) = 0 |
| 8781 | rw [hb] |
| 8782 | rfl |
| 8783 | |
| 8784 | theorem block_angularMean_zero {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 8785 | (b : HarmonicBlock D) (hb : HarmonicWaveInteraction.ZeroMode b) |
| 8786 | (hk : ∀ n, b.angularFrequency n ≠ 0) : angularMeanVector b.oscillation = 0 := by |
| 8787 | funext n x i |
| 8788 | change (∫ θ in (0:ℝ)..2*Real.pi, |
| 8789 | (HarmonicFields.field (b.velocity n i) (b.frequency n) (b.phase n) (b.angularFrequency n) (x,θ)).re) / |
| 8790 | (2*Real.pi) = 0 |
| 8791 | rw [SignedWaveUpdate.angularAverage_re_field, HarmonicFields.angularMean_field _ _ _ (hk n), hb] |
| 8792 | rfl |
| 8793 | |
| 8794 | theorem fieldSum_angularMean_zero {D ι : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 8795 | (labels : ℕ → Finset ι) (b : ι → HarmonicBlock D) |
| 8796 | (hb : ∀ l, HarmonicWaveInteraction.ZeroMode (b l)) |
| 8797 | (hk : ∀ l n, (b l).angularFrequency n ≠ 0) : |
| 8798 | angularMeanVector (LabelSumBounds.fieldSum labels (fun l => (b l).oscillation)) = 0 := by |
| 8799 | funext n x i |
| 8800 | change (∫ θ in (0:ℝ)..2*Real.pi, ∑ l ∈ labels n, (b l).oscillation n (x,θ) i) / (2*Real.pi) = 0 |
| 8801 | rw [intervalIntegral.integral_finsetSum] |
| 8802 | · rw [Finset.sum_div] |
| 8803 | apply Finset.sum_eq_zero |
| 8804 | intro l hl |
| 8805 | exact congrFun (congrFun (congrFun (block_angularMean_zero (b l) (hb l) (hk l)) n) x) i |
| 8806 | · intro l hl |
| 8807 | exact (block_angularContinuous (b l) n x i).intervalIntegrable _ _ |
| 8808 | |
| 8809 | namespace CycleParameters |
| 8810 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 8811 | (c : Context CyclePoint) (u : State CyclePoint) |
| 8812 | |
| 8813 | theorem particularBlock_zero (l : ι) : HarmonicWaveInteraction.ZeroMode (p.particularBlock v c u l) := |
| 8814 | block_zeroMode_pull _ _ (ParticularWaveAssembly.assembledBlock_zero _ _ _ _ _ _).1 |
| 8815 | |
| 8816 | theorem particularGaussianBlock_zero (l : ι) : |
| 8817 | HarmonicWaveInteraction.ZeroMode (p.particularGaussianBlock v c u l) := |
| 8818 | block_zeroMode_pull _ _ (ParticularWaveAssembly.assembledBlock_zero _ _ _ _ _ _).1 |
| 8819 | |
| 8820 | theorem signedGaussianBlock_zero (l : ι) : |
| 8821 | HarmonicWaveInteraction.ZeroMode (p.signedGaussianBlock v c u l) := |
| 8822 | (SignedWaveUpdate.coefficientBlock_zero_coefficient _ _ _ _ _).1 |
| 8823 | |
| 8824 | theorem gaussianIncrement_angularMeans |
| 8825 | (hk : ∀ l n, (v.blocks l).angularFrequency n ≠ 0) |
| 8826 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) : |
| 8827 | angularMeanVector (p.particularGaussian v c u) = 0 ∧ |
| 8828 | angularMeanVector (p.signedGaussian v c u) = 0 := by |
| 8829 | constructor |
| 8830 | · exact fieldSum_angularMean_zero v.labels (p.particularGaussianBlock v c u) |
| 8831 | (p.particularGaussianBlock_zero v c u) hk |
| 8832 | · apply fieldSum_angularMean_zero v.labels (p.signedGaussianBlock v c u) |
| 8833 | (p.signedGaussianBlock_zero v c u) |
| 8834 | intro l n |
| 8835 | change (p.signedBlock v c u l).angularFrequency n ≠ 0 |
| 8836 | rw [(hc l).angular] |
| 8837 | exact hk l n |
| 8838 | |
| 8839 | theorem gaussianIncrement_angularContinuous : |
| 8840 | AngularContinuous (p.particularGaussian v c u) ∧ AngularContinuous (p.signedGaussian v c u) := |
| 8841 | ⟨LabelSumBounds.fieldSum_angularContinuous _ _ (fun _ => block_angularContinuous _), |
| 8842 | LabelSumBounds.fieldSum_angularContinuous _ _ (fun _ => block_angularContinuous _)⟩ |
| 8843 | |
| 8844 | theorem next_gaussian_angularMean |
| 8845 | (hk : ∀ l n, (v.blocks l).angularFrequency n ≠ 0) |
| 8846 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) |
| 8847 | (hu : AngularContinuous u.errors.gaussian) : |
| 8848 | angularMeanVector (p.next v c u).errors.gaussian = angularMeanVector u.errors.gaussian := by |
| 8849 | rw [p.next_gaussian_error v c u] |
| 8850 | have hs := p.gaussianIncrement_angularContinuous v c u |
| 8851 | have hz := p.gaussianIncrement_angularMeans v c u hk hc |
| 8852 | rw [angularMeanVector_add (hu.add hs.1) hs.2, angularMeanVector_add hu hs.1, hz.1, hz.2] |
| 8853 | simp only [add_zero] |
| 8854 | |
| 8855 | theorem next_alias_lift : |
| 8856 | (p.next v c u).errors.aliasError = u.errors.aliasError + |
| 8857 | fun n x => p.nextAxisymmetricAlias v c u 0 n x.1 := by |
| 8858 | rw [p.next_alias_error v c u] |
| 8859 | funext n x i |
| 8860 | simp only [nextAxisymmetricAlias, Pi.add_apply, Pi.sub_apply, Pi.zero_apply, zero_add, |
| 8861 | VariableGaugeMean.temporalAliasState, VariableGaugeMean.pressureAliasState] |
| 8862 | ring |
| 8863 | |
| 8864 | theorem next_alias_angularContinuous (hu : AngularContinuous u.errors.aliasError) : |
| 8865 | AngularContinuous (p.next v c u).errors.aliasError := by |
| 8866 | rw [p.next_alias_lift v c u] |
| 8867 | apply hu.add |
| 8868 | intro n x i |
| 8869 | change Continuous (fun _ : ℝ => p.nextAxisymmetricAlias v c u 0 n x i) |
| 8870 | exact continuous_const |
| 8871 | |
| 8872 | theorem next_alias_angularMean (hu : AngularContinuous u.errors.aliasError) : |
| 8873 | angularMeanVector (p.next v c u).errors.aliasError = |
| 8874 | angularMeanVector u.errors.aliasError + p.nextAxisymmetricAlias v c u 0 := by |
| 8875 | have hs : AngularContinuous (fun n x => p.nextAxisymmetricAlias v c u 0 n x.1) := by |
| 8876 | intro n x i |
| 8877 | change Continuous (fun _ : ℝ => p.nextAxisymmetricAlias v c u 0 n x i) |
| 8878 | exact continuous_const |
| 8879 | rw [p.next_alias_lift v c u, angularMeanVector_add hu hs] |
| 8880 | congr 1 |
| 8881 | funext n x i |
| 8882 | exact congrFun (congrFun (angularAverage_axisymmetric |
| 8883 | (fun n x => p.nextAxisymmetricAlias v c u 0 n x i)) n) x |
| 8884 | |
| 8885 | theorem nextAliasIncrement_angular (n : ℕ) (x : CyclePoint) : |
| 8886 | p.nextAxisymmetricAlias v c u 0 n x 1 = 0 := by |
| 8887 | simp only [nextAxisymmetricAlias, Pi.zero_apply, VariableGaugeMean.temporalAliasState, |
| 8888 | VariableGaugeMean.pressureAliasState, Matrix.cons_val_one, Matrix.cons_val_zero, add_zero, sub_self] |
| 8889 | |
| 8890 | theorem nextAliasIncrement_axial (n : ℕ) (x : CyclePoint) : |
| 8891 | p.nextAxisymmetricAlias v c u 0 n x 2 = |
| 8892 | VariableGaugeMean.temporalAliasState p.gauge p.timeExponent p.commonIndex c |
| 8893 | (p.afterSigned v c u) n (x,0) 2 := by |
| 8894 | simp only [nextAxisymmetricAlias, Pi.zero_apply, VariableGaugeMean.pressureAliasState, |
| 8895 | Matrix.cons_val_two, |
| 8896 | zero_add, add_zero, sub_self] |
| 8897 | |
| 8898 | /-- The actual good mean residual gains the requested exponent. New |
| 8899 | Gaussian means vanish exactly, and the new temporal alias is the same |
| 8900 | one retained by the mean-stage calculation. -/ |
| 8901 | theorem next_meanResidualBounds {σ : ℝ} |
| 8902 | (hk : ∀ l n, (v.blocks l).angularFrequency n ≠ 0) |
| 8903 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) |
| 8904 | (hb : ∀ n x, x ∈ p.strip.domain → ∀ i, |
| 8905 | Continuous (fun θ : ℝ => u.errors.base n (x, θ) i)) |
| 8906 | (hg : AngularContinuous u.errors.gaussian) |
| 8907 | (ha : AngularContinuous u.errors.aliasError) |
| 8908 | (hθ : MeanClass p.strip (1+σ) ((p.next v c u).thetaResidual c)) |
| 8909 | (hz : MeanClass p.strip (1+σ) ((p.next v c u).axialResidual c - fun n x => |
| 8910 | VariableGaugeMean.temporalAliasState p.gauge p.timeExponent p.commonIndex c |
| 8911 | (p.afterSigned v c u) n (x,0) 2)) |
| 8912 | (hgθ : MeanClass p.strip (1+σ) (fun n x => angularMeanVector u.errors.gaussian n x 1)) |
| 8913 | (hgz : MeanClass p.strip (1+σ) (fun n x => angularMeanVector u.errors.gaussian n x 2)) |
| 8914 | (haθ : MeanClass p.strip (1+σ) (fun n x => angularMeanVector u.errors.aliasError n x 1)) |
| 8915 | (haz : MeanClass p.strip (1+σ) (fun n x => angularMeanVector u.errors.aliasError n x 2)) : |
| 8916 | CorrectionState.MeanResidualBounds p.strip σ c (p.next v c u) := by |
| 8917 | have hbn : ∀ n x, x ∈ p.strip.domain → ∀ i, |
| 8918 | Continuous (fun θ : ℝ => (p.next v c u).errors.base n (x, θ) i) := by |
| 8919 | simpa only [p.next_base_error v c u] using hb |
| 8920 | have hgn : AngularContinuous (p.next v c u).errors.gaussian := by |
| 8921 | rw [p.next_gaussian_error v c u] |
| 8922 | exact (hg.add (p.gaussianIncrement_angularContinuous v c u).1).add |
| 8923 | (p.gaussianIncrement_angularContinuous v c u).2 |
| 8924 | have han := p.next_alias_angularContinuous v c u ha |
| 8925 | have he n x hx i := meanGoodResidual_at c (p.next v c u) n x i |
| 8926 | (hbn n x hx i) (hgn n x i) (han n x i) |
| 8927 | have hgm := p.next_gaussian_angularMean v c u hk hc hg |
| 8928 | have ham := p.next_alias_angularMean v c u ha |
| 8929 | constructor |
| 8930 | · apply class_congr (Class.sub (Class.sub hθ hgθ) haθ) |
| 8931 | intro n x hx |
| 8932 | dsimp only |
| 8933 | rw [he n x hx 1, hgm, ham] |
| 8934 | change (p.next v c u).thetaResidual c n x - angularMeanVector u.errors.gaussian n x 1 - |
| 8935 | (angularMeanVector u.errors.aliasError n x 1 + p.nextAxisymmetricAlias v c u 0 n x 1) = _ |
| 8936 | rw [p.nextAliasIncrement_angular v c u, add_zero] |
| 8937 | rfl |
| 8938 | · apply class_congr (Class.sub (Class.sub hz hgz) haz) |
| 8939 | intro n x hx |
| 8940 | dsimp only |
| 8941 | rw [he n x hx 2, hgm, ham] |
| 8942 | change (p.next v c u).axialResidual c n x - angularMeanVector u.errors.gaussian n x 2 - |
| 8943 | (angularMeanVector u.errors.aliasError n x 2 + p.nextAxisymmetricAlias v c u 0 n x 2) = _ |
| 8944 | rw [p.nextAliasIncrement_axial v c u] |
| 8945 | change (p.next v c u).axialResidual c n x - angularMeanVector u.errors.gaussian n x 2 - |
| 8946 | (angularMeanVector u.errors.aliasError n x 2 + |
| 8947 | VariableGaugeMean.temporalAliasState p.gauge p.timeExponent p.commonIndex c |
| 8948 | (p.afterSigned v c u) n (x,0) 2) = |
| 8949 | ((p.next v c u).axialResidual c n x - |
| 8950 | VariableGaugeMean.temporalAliasState p.gauge p.timeExponent p.commonIndex c |
| 8951 | (p.afterSigned v c u) n (x,0) 2) - angularMeanVector u.errors.gaussian n x 2 - |
| 8952 | angularMeanVector u.errors.aliasError n x 2 |
| 8953 | ring |
| 8954 | |
| 8955 | end CycleParameters |
| 8956 | |
| 8957 | end ActualGaussianMeans |
| 8958 | |
| 8959 | section ActualCycleMeanGain |
| 8960 | |
| 8961 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 8962 | open scoped ContDiff BigOperators |
| 8963 | namespace CycleParameters |
| 8964 | |
| 8965 | /-- One geometric choice is shared by all four literal stages. -/ |
| 8966 | noncomputable def ofGeometry {ι : Type} (G : SignedMeanGain.Geometry) |
| 8967 | (h : ℝ) (index : ℕ → ℕ) (axial : PressureStream.Plane × PressureStream.Plane) |
| 8968 | (particular : ι → ParticularParameters CycleSlow) |
| 8969 | (signed : ι → PeriodizedSignedParameters CyclePoint TorusInverse.Frequency) |
| 8970 | (rank : RankData PressureStream.Plane) : CycleParameters ι where |
| 8971 | gauge := G.gauge |
| 8972 | strip := G.strip |
| 8973 | patch := G.patch |
| 8974 | coordinate := G.coord |
| 8975 | timeExponent := h |
| 8976 | commonIndex := index |
| 8977 | axial := axial |
| 8978 | particular := particular |
| 8979 | signed := signed |
| 8980 | rank := rank |
| 8981 | |
| 8982 | section ActualMean |
| 8983 | variable {ι : Type} (G : SignedMeanGain.Geometry) (B : SignedMeanGain.NativeData G) |
| 8984 | (h : ℝ) (index : ℕ → ℕ) (axial : PressureStream.Plane × PressureStream.Plane) |
| 8985 | (particular : ι → ParticularParameters CycleSlow) |
| 8986 | (signed : ι → PeriodizedSignedParameters CyclePoint TorusInverse.Frequency) |
| 8987 | (r : RankData PressureStream.Plane) |
| 8988 | (v : CycleCoefficients ι) (c : Context CyclePoint) (u : State CyclePoint) |
| 8989 | (primary : ι → HarmonicBlock CyclePoint) (P : ι → ℕ → CyclePoint → ℝ) |
| 8990 | {σ κ : ℝ} (hσ : 1/5 ≤ σ) (N : ℕ) |
| 8991 | (hprimary : ∀ l, (primary l).BandLimited N) (hband : CoefficientBands v) |
| 8992 | (hcp : ∀ l, SameCarrier (v.blocks l) (primary l)) |
| 8993 | |
| 8994 | |
| 8995 | variable (hcs : ∀ l, SameCarrier (v.blocks l) ((ofGeometry G h index axial particular signed r).signedBlock v c u l)) |
| 8996 | (hold : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (1/2) |
| 8997 | (fun l n x => (v.blocks l).velocity n i j x)) |
| 8998 | (hdiff : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (17/25) |
| 8999 | (fun l n x => (v.blocks l).velocity n i j x - (primary l).velocity n i j x)) |
| 9000 | (hpart : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (1/2+σ) |
| 9001 | (fun l n x => ((ofGeometry G h index axial particular signed r).particularBlock v c u l).velocity n i j x)) |
| 9002 | (htangent : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (1/2+σ-κ) |
| 9003 | (fun l n x => ((ofGeometry G h index axial particular signed r).signedTangent v c u l).velocity n i j x)) |
| 9004 | (hcurl : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (1+σ-2*κ) |
| 9005 | (fun l n x => ((ofGeometry G h index axial particular signed r).signedCurl v c u l).velocity n i j x)) |
| 9006 | (hP0 : ∀ l n x, x ∈ G.strip.domain → 0 ≤ P l n x) |
| 9007 | (hP1 : ∀ l n x, x ∈ G.strip.domain → P l n x ≤ 1) |
| 9008 | (hkp : ∀ l n, (v.blocks l).angularFrequency n ≠ 0) |
| 9009 | |
| 9010 | local notation "F" => signedFamily (ofGeometry G h index axial particular signed r) v c u primary P hσ N hprimary hband hcp hcs |
| 9011 | hold hdiff hpart htangent hcurl hP0 hP1 hkp |
| 9012 | |
| 9013 | /-- The complete measured-mean gain for `next`. The signed family is |
| 9014 | computed from this cycle's actual particular, tangent, and curl blocks; |
| 9015 | its first covariance estimate is derived from the same finite labels. -/ |
| 9016 | theorem mean_gain_from_waves |
| 9017 | (a : SignedMeanGain.Assembly F) (halabels : a.labels = v.labels) |
| 9018 | {axis : AxisymmetricAlias} (hrep : CycleRepresentation v u axis) |
| 9019 | (hzero : ∀ l, HarmonicWaveInteraction.ZeroMode (v.blocks l)) |
| 9020 | (hpartzero : ∀ l, HarmonicWaveInteraction.ZeroMode ((ofGeometry G h index axial particular signed r).particularBlock v c u l)) |
| 9021 | (hsold : LabelSumBounds.SupportedOscillations a.slots a.label a.window a.auxiliary G.strip.domain |
| 9022 | (fun l => (v.blocks l).oscillation)) |
| 9023 | (hspart : LabelSumBounds.SupportedOscillations a.slots a.label a.window a.auxiliary G.strip.domain |
| 9024 | (fun l => ((ofGeometry G h index axial particular signed r).particularBlock v c u l).oscillation)) |
| 9025 | (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1/100000) |
| 9026 | (H : MeanStateRegularity.PrimitiveData G.region G.patch.a G.patch.b c u) |
| 9027 | (hop : c.operators = G.operators) |
| 9028 | (ho : OperatorBounds G.strip G.operators κ) (hb : BaseBounds G.strip c.base) |
| 9029 | (hu : CorrectionState.CumulativeBounds G.strip u) |
| 9030 | (hfixed : (reconstructState G.gauge c u).pressure = u.pressure) |
| 9031 | (hmθ : ∀ n z, z ∈ G.region.carrier → radialMoment 2 u.mean.angular n z = 0) |
| 9032 | (hmz : ∀ n z, z ∈ G.region.carrier → radialMoment 1 u.mean.axial n z = 0) |
| 9033 | (hθ : MeanClass G.strip (1+σ) (u.thetaResidual c)) |
| 9034 | (hz : MeanClass G.strip (1+σ) (u.axialResidual c)) |
| 9035 | (hd : DefectBounds G.slowStrip σ c u) |
| 9036 | (hX₁ : ∀ i j, GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b |
| 9037 | (SignedMeanGain.covarianceIncrement u.oscillation ((ofGeometry G h index axial particular signed r).particularVelocity v c u) i j)) |
| 9038 | (hX₂ : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.incrementTensor F a i j)) |
| 9039 | (hS : ∀ i j, SignedMeanGain.MovingField G (SignedMeanGain.crossTensor F a i j)) |
| 9040 | (e : ℕ → ι → SignedMeanGain.NativeIndex) |
| 9041 | (he : ∀ n, Set.InjOn (e n) (v.labels n : Set ι)) |
| 9042 | (hlabels : ∀ n, (v.labels n).image (e n) = B.labels n) |
| 9043 | (hp : ∀ n l, l ∈ v.labels n → (primary l).velocity n = (B.primaryBlocks (e n l)).velocity n) |
| 9044 | (hpc : ∀ n l, l ∈ v.labels n → BandReindexedSignedMeanGain.SameCarrierAt |
| 9045 | (primary l) (B.primaryBlocks (e n l)) n) |
| 9046 | (ht : ∀ n l, l ∈ v.labels n → ((ofGeometry G h index axial particular signed r).signedTangent v c u l).velocity n = |
| 9047 | (B.signedBlocks c ((ofGeometry G h index axial particular signed r).afterParticular v c u) (e n l)).velocity n) |
| 9048 | (htc : ∀ n l, l ∈ v.labels n → BandReindexedSignedMeanGain.SameCarrierAt |
| 9049 | ((ofGeometry G h index axial particular signed r).signedTangent v c u l) (B.signedBlocks c ((ofGeometry G h index axial particular signed r).afterParticular v c u) (e n l)) n) |
| 9050 | (hh : 0 ≤ h) (hscale : ∀ n, ChartScales.S n ≤ G.slow n) |
| 9051 | (gap : ℕ) (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + gap) |
| 9052 | (hv : c.operators.vT = (0, (0, TorusInverse.vector .temporal))) |
| 9053 | (hfast : ∀ n, c.operators.fastCoefficient n = ChartScales.Tg ^ index n * ChartScales.Q n ^ (1+h)) |
| 9054 | (hV : LocalRankDefect.IsSlowOn G.region.carrier c.base.angular) |
| 9055 | (hG : LocalRankDefect.IsSlowOn G.region.carrier c.base.axial) |
| 9056 | (hg : LocalRankDefect.RankGeometry G.gauge r G.region.carrier c ((ofGeometry G h index axial particular signed r).afterTemporal v c u)) |
| 9057 | {A₀ B₀ : ℝ} (hparam : RankStateBounds.NormalizedParameters G.coord A₀ B₀ r G.region.carrier) |
| 9058 | (hB : B₀ ≠ 0) (hleft : G.patch.a < r.inner) (hright : r.outer < G.patch.b) : |
| 9059 | IncrementBounds G.strip (1+σ-2*κ) ((ofGeometry G h index axial particular signed r).temporalIncrement v c u) ∧ |
| 9060 | IncrementBounds G.strip (1+σ-2*κ) ((ofGeometry G h index axial particular signed r).rankIncrement v c u) ∧ |
| 9061 | MeanClass G.strip (1+σ-2*κ) (((ofGeometry G h index axial particular signed r).next v c u).pressure-u.pressure) ∧ |
| 9062 | CorrectionState.CumulativeBounds G.strip ((ofGeometry G h index axial particular signed r).next v c u) ∧ |
| 9063 | DefectBounds G.slowStrip (σ+1/10) c ((ofGeometry G h index axial particular signed r).next v c u) ∧ |
| 9064 | MeanClass G.strip (1+(σ+1/10)) (((ofGeometry G h index axial particular signed r).next v c u).thetaResidual c) ∧ |
| 9065 | MeanClass G.strip (1+(σ+1/10)) |
| 9066 | (((ofGeometry G h index axial particular signed r).next v c u).axialResidual c - fun n x => temporalAliasState G.gauge h index c |
| 9067 | ((ofGeometry G h index axial particular signed r).afterSigned v c u) n (x,0) 2) := by |
| 9068 | have hrep₀ : u.oscillation = LabelSumBounds.fieldSum a.labels (fun l => (v.blocks l).oscillation) := by |
| 9069 | rw [halabels] |
| 9070 | funext n x i |
| 9071 | exact hrep.velocity n x i |
| 9072 | have hcov := assembledCovarianceIncrement_mem (show (1:ℝ)/2 ≤ 1/2+σ by linarith) |
| 9073 | a.labels a.label a.injective a.level a.window a.window_continuous a.auxiliary |
| 9074 | v.blocks ((ofGeometry G h index axial particular signed r).particularBlock v c u) v.residualBand hband.velocityPressure |
| 9075 | ((ofGeometry G h index axial particular signed r).particularBlock_band v c u) (fun _ => ⟨rfl,rfl,rfl⟩) |
| 9076 | (fun i j _ => hold i j) (fun i j _ => hpart i j) hzero hpartzero hP0 hP1 hkp hsold hspart u hrep₀ |
| 9077 | have hcov' : SignedMeanGain.TensorClass G.strip (1+σ) |
| 9078 | (SignedMeanGain.covarianceIncrement u.oscillation ((ofGeometry G h index axial particular signed r).particularVelocity v c u)) := by |
| 9079 | simp only [halabels, particularVelocity, show (1:ℝ)/2+(1/2+σ) = 1+σ by ring] at hcov ⊢ |
| 9080 | exact hcov |
| 9081 | have hrep₁ : ((ofGeometry G h index axial particular signed r).afterParticular v c u).oscillation = SignedMeanGain.oldField F a := by |
| 9082 | simpa only [SignedMeanGain.oldField, halabels, signedFamily] using (ofGeometry G h index axial particular signed r).beforeSignedBlock_represents v c u hrep |
| 9083 | have hw₂ : SignedMeanGain.tangentField F a + SignedMeanGain.curlField F a = (ofGeometry G h index axial particular signed r).signedVelocity v c u := by |
| 9084 | simpa only [SignedMeanGain.tangentField, SignedMeanGain.curlField, signedFamily, halabels] using |
| 9085 | ((ofGeometry G h index axial particular signed r).signedVelocity_split v c u).symm |
| 9086 | have hgain := fourStage_mean_gain G B c u ((ofGeometry G h index axial particular signed r).particularVelocity v c u) ((ofGeometry G h index axial particular signed r).particularPressure v c u) |
| 9087 | ((ofGeometry G h index axial particular signed r).particularGaussian v c u) F a ((ofGeometry G h index axial particular signed r).signedPressure v c u) ((ofGeometry G h index axial particular signed r).signedGaussian v c u) |
| 9088 | hσ hκ hκsmall H hop ho hb hu hfixed hmθ hmz hθ hz hd hX₁ hcov' hX₂ hS hrep₁ e |
| 9089 | (by simpa only [halabels] using he) (by simpa only [halabels] using hlabels) |
| 9090 | (by simpa only [signedFamily, halabels] using hp) |
| 9091 | (by simpa only [signedFamily, halabels] using hpc) |
| 9092 | (by |
| 9093 | have harg := ht |
| 9094 | simp only [signedFamily, halabels] at harg ⊢ |
| 9095 | exact harg) |
| 9096 | (by |
| 9097 | have harg := htc |
| 9098 | simp only [signedFamily, halabels] at harg ⊢ |
| 9099 | exact harg) |
| 9100 | r h index axial hh hscale gap hgap hv hfast hV hG |
| 9101 | (by erw [hw₂]; exact hg) hparam hB hleft hright |
| 9102 | erw [hw₂] at hgain |
| 9103 | obtain ⟨hi, hr, hpmean, hcum, hdebt, htheta, haxial⟩ := hgain |
| 9104 | exact ⟨hi, hr, hpmean, ⟨hcum.velocity, hcum.pressure⟩, hdebt, htheta, haxial⟩ |
| 9105 | |
| 9106 | end ActualMean |
| 9107 | end CycleParameters |
| 9108 | |
| 9109 | end ActualCycleMeanGain |
| 9110 | |
| 9111 | section CycleRegularityPreservation |
| 9112 | |
| 9113 | open Set CorrectionState VariableGaugeMean LocalSignedRequest MeanStateRegularity |
| 9114 | namespace CycleParameters |
| 9115 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 9116 | (c : Context CyclePoint) (u : State CyclePoint) |
| 9117 | |
| 9118 | /-- Primitive regularity is propagated through the literal four-stage |
| 9119 | state. The rank geometry is reused from the incoming state; its new |
| 9120 | measured-debt smoothness is proved from the updated primitive fields. -/ |
| 9121 | theorem next_primitive {coord : ℝ} (U : SlowRegion coord) |
| 9122 | (ha : 0 < p.gauge.radial.inner) (hd : 0 < p.gauge.radial.exponent) |
| 9123 | (hell : ∀ n, p.gauge.length n = qLength coord) |
| 9124 | (H : PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c u) |
| 9125 | (hX₁ : ∀ i j, GaugeMomentBalances.MovingField U p.gauge.radial.inner p.gauge.radial.outer |
| 9126 | (SignedMeanGain.covarianceIncrement u.oscillation (p.particularVelocity v c u) i j)) |
| 9127 | (hX₂ : ∀ i j, GaugeMomentBalances.MovingField U p.gauge.radial.inner p.gauge.radial.outer |
| 9128 | (SignedMeanGain.covarianceIncrement (p.afterParticular v c u).oscillation (p.signedVelocity v c u) i j)) |
| 9129 | (hg : LocalRankDefect.RankGeometry p.gauge p.rank U.carrier c u) : |
| 9130 | PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c (p.next v c u) ∧ |
| 9131 | reconstructState p.gauge c (p.next v c u) = p.next v c u := by |
| 9132 | have H₁ : PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c (p.afterParticular v c u) := |
| 9133 | H.waveStage p.gauge (p.particularVelocity v c u) (p.particularPressure v c u) |
| 9134 | (p.particularGaussian v c u) hX₁ |
| 9135 | have H₂ : PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c (p.afterSigned v c u) := |
| 9136 | H₁.waveStage p.gauge (p.signedVelocity v c u) (p.signedPressure v c u) |
| 9137 | (p.signedGaussian v c u) hX₂ |
| 9138 | have ht := MeanStageRegularity.temporalStage_primitive H₂ ha hd hell rfl |
| 9139 | p.timeExponent p.commonIndex p.axial |
| 9140 | have hgt := MeanStageRegularity.rankGeometry_for_state ht ha p.gauge.radial.inner_lt_outer hg |
| 9141 | have hr := MeanStageRegularity.rankStage_primitive ht hgt hell p.axial |
| 9142 | exact ⟨⟨hr.operators, hr.base, hr.mean, hr.covariance, hr.virtualTheta, hr.virtualAxial⟩, rfl⟩ |
| 9143 | |
| 9144 | theorem next_zeroMassesOn {coord : ℝ} (U : SlowRegion coord) |
| 9145 | (ha : 0 < p.gauge.radial.inner) (hd : 0 < p.gauge.radial.exponent) |
| 9146 | (hell : ∀ n, p.gauge.length n = qLength coord) |
| 9147 | (H : PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c u) |
| 9148 | (hX₁ : ∀ i j, GaugeMomentBalances.MovingField U p.gauge.radial.inner p.gauge.radial.outer |
| 9149 | (SignedMeanGain.covarianceIncrement u.oscillation (p.particularVelocity v c u) i j)) |
| 9150 | (hX₂ : ∀ i j, GaugeMomentBalances.MovingField U p.gauge.radial.inner p.gauge.radial.outer |
| 9151 | (SignedMeanGain.covarianceIncrement (p.afterParticular v c u).oscillation (p.signedVelocity v c u) i j)) |
| 9152 | (hg : LocalRankDefect.RankGeometry p.gauge p.rank U.carrier c u) |
| 9153 | (hlength : ∀ n x, x ∈ U.carrier → p.rank.length n x = qLength coord x) |
| 9154 | (hleft : p.gauge.radial.inner ≤ p.rank.inner) (hright : p.rank.outer ≤ p.gauge.radial.outer) |
| 9155 | (hm : GaugeMassPreservation.ZeroMassesOn U.carrier u) : |
| 9156 | GaugeMassPreservation.ZeroMassesOn U.carrier (p.next v c u) := by |
| 9157 | have H₁ : PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c (p.afterParticular v c u) := |
| 9158 | H.waveStage p.gauge (p.particularVelocity v c u) (p.particularPressure v c u) |
| 9159 | (p.particularGaussian v c u) hX₁ |
| 9160 | have H₂ : PrimitiveData U p.gauge.radial.inner p.gauge.radial.outer c (p.afterSigned v c u) := |
| 9161 | H₁.waveStage p.gauge (p.signedVelocity v c u) (p.signedPressure v c u) |
| 9162 | (p.signedGaussian v c u) hX₂ |
| 9163 | have ht := MeanStageRegularity.temporalStage_primitive H₂ ha hd hell rfl |
| 9164 | p.timeExponent p.commonIndex p.axial |
| 9165 | have hgt := MeanStageRegularity.rankGeometry_for_state ht ha p.gauge.radial.inner_lt_outer hg |
| 9166 | have hθ := H₂.theta ha p.gauge.radial.inner_lt_outer |
| 9167 | have hz := H₂.axial_reconstructed ha hd hell rfl |
| 9168 | intro n x hx |
| 9169 | have he := p.next_preserve_masses v c u U ha hd hell H.mean.regular.smooth |
| 9170 | ⟨H.mean.radial.supported,H.mean.angular.supported,H.mean.axial.supported⟩ |
| 9171 | hθ.smooth hz.smooth hθ.periodic hz.periodic hθ.supported hz.supported |
| 9172 | hgt hlength hleft hright n hx |
| 9173 | exact ⟨he.1.trans (hm n x hx).1, he.2.trans (hm n x hx).2⟩ |
| 9174 | |
| 9175 | end CycleParameters |
| 9176 | |
| 9177 | end CycleRegularityPreservation |
| 9178 | |
| 9179 | section CycleAssociationTransport |
| 9180 | |
| 9181 | open Set WeightedClasses CorrectionState |
| 9182 | open scoped BigOperators |
| 9183 | section Reindex |
| 9184 | variable {D E : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 9185 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 9186 | |
| 9187 | theorem reindex_addBlock (e : D ≃ₗᵢ[ℝ] E) (a b : HarmonicBlock E) : |
| 9188 | StateReindex.block e (HarmonicWaveInteraction.addBlock a b) = |
| 9189 | HarmonicWaveInteraction.addBlock (StateReindex.block e a) (StateReindex.block e b) := by |
| 9190 | simp only [StateReindex.block, HarmonicWaveInteraction.addBlock, StateReindex.coefficients_add] |
| 9191 | |
| 9192 | theorem reindex_coefficients_add (e : D ≃ₗᵢ[ℝ] E) (G A : HarmonicResidual.BlockCoefficients E) : |
| 9193 | StateReindex.blockCoefficients e (G+A) = |
| 9194 | StateReindex.blockCoefficients e G + StateReindex.blockCoefficients e A := by |
| 9195 | funext n i |
| 9196 | exact StateReindex.coefficients_add e (G n i) (A n i) |
| 9197 | |
| 9198 | theorem reindex_coefficients_roundtrip (e : D ≃ₗᵢ[ℝ] E) (G : HarmonicResidual.BlockCoefficients D) : |
| 9199 | StateReindex.blockCoefficients e (StateReindex.blockCoefficients e.symm G) = G := by |
| 9200 | funext n i |
| 9201 | exact StateReindex.coefficients_roundtrip e (G n i) |
| 9202 | |
| 9203 | /-- Returning the actual mixed old/new block and its new Gaussian term |
| 9204 | commutes with the entire nonlinear residual, including all derivatives. -/ |
| 9205 | theorem residual_update_return (e : D ≃ₗᵢ[ℝ] E) (c : Context D) (u : State D) |
| 9206 | (a : HarmonicBlock D) (b : HarmonicBlock E) |
| 9207 | (G A : HarmonicResidual.BlockCoefficients D) (g : HarmonicResidual.BlockCoefficients E) : |
| 9208 | StateReindex.block e |
| 9209 | (HarmonicResidual.residualBlock (StateReindex.context e.symm c) (StateReindex.state e.symm u) |
| 9210 | (HarmonicWaveInteraction.addBlock (StateReindex.block e.symm a) b) |
| 9211 | (StateReindex.blockCoefficients e.symm G+g) (StateReindex.blockCoefficients e.symm A)) = |
| 9212 | HarmonicResidual.residualBlock c u (HarmonicWaveInteraction.addBlock a (StateReindex.block e b)) |
| 9213 | (G+StateReindex.blockCoefficients e g) A := by |
| 9214 | rw [← StateReindex.residualBlock_pull, StateReindex.context_roundtrip, StateReindex.state_roundtrip, |
| 9215 | reindex_addBlock, StateReindex.block_roundtrip, reindex_coefficients_add, |
| 9216 | reindex_coefficients_roundtrip, reindex_coefficients_roundtrip] |
| 9217 | |
| 9218 | theorem residual_update_uniform_return {ι : Type} (e : D ≃ₗᵢ[ℝ] E) |
| 9219 | {s : StripData D} {P : ι → ℕ → D → ℝ} {α : ℝ} |
| 9220 | (c : Context D) (u : State D) (a : ι → HarmonicBlock D) (b : ι → HarmonicBlock E) |
| 9221 | (G A : ι → HarmonicResidual.BlockCoefficients D) (g : ι → HarmonicResidual.BlockCoefficients E) |
| 9222 | (hh : UniformHarmonicInteraction.UniformVelocity (ParticularWaveBounds.reindexStrip e.symm s) |
| 9223 | (fun l n x => P l n (e.symm x)) α |
| 9224 | (fun l => HarmonicResidual.residualBlock (StateReindex.context e.symm c) (StateReindex.state e.symm u) |
| 9225 | (HarmonicWaveInteraction.addBlock (StateReindex.block e.symm (a l)) (b l)) |
| 9226 | (StateReindex.blockCoefficients e.symm (G l)+g l) (StateReindex.blockCoefficients e.symm (A l)))) : |
| 9227 | UniformHarmonicInteraction.UniformVelocity s P α |
| 9228 | (fun l => HarmonicResidual.residualBlock c u |
| 9229 | (HarmonicWaveInteraction.addBlock (a l) (StateReindex.block e (b l))) |
| 9230 | (G l+StateReindex.blockCoefficients e (g l)) (A l)) := by |
| 9231 | simpa only [residual_update_return] using MeanBoundsReindex.uniformVelocity_return e hh |
| 9232 | |
| 9233 | end Reindex |
| 9234 | |
| 9235 | end CycleAssociationTransport |
| 9236 | |
| 9237 | section CycleResidualGrouping |
| 9238 | |
| 9239 | open Set CorrectionState |
| 9240 | open scoped BigOperators |
| 9241 | namespace CycleRepresentation |
| 9242 | variable {ι : Type} {v : CycleCoefficients ι} {u : State CyclePoint} {axis : AxisymmetricAlias} |
| 9243 | |
| 9244 | theorem withAxis (h : CycleRepresentation v u axis) : |
| 9245 | AxisymmetricResidualGrouping.Representation v.labels v.blocks v.gaussian v.aliasCoefficients u axis := |
| 9246 | ⟨h.velocity, h.pressure, h.gaussian, h.aliasError⟩ |
| 9247 | |
| 9248 | theorem fullGoodWaveResidual_grouped (h : CycleRepresentation v u axis) |
| 9249 | {U : Set CyclePoint} (hU : IsOpen U) {c : Context CyclePoint} {n : ℕ} |
| 9250 | (hr : HarmonicResidual.ExtractionRegular U c u v.labels v.blocks v.gaussian v.aliasCoefficients n) |
| 9251 | {x : CyclePoint × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 9252 | fullGoodWaveResidual c u n x i = ∑ l ∈ v.labels n, |
| 9253 | (HarmonicResidual.residualBlock c u (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)).oscillation n x i := |
| 9254 | AxisymmetricResidualGrouping.stateGoodWaveResidual_grouped hU h.withAxis hr hx i |
| 9255 | |
| 9256 | theorem fullResidual_reconstructed (h : CycleRepresentation v u axis) |
| 9257 | {U : Set CyclePoint} (hU : IsOpen U) {c : Context CyclePoint} {n : ℕ} |
| 9258 | (hr : HarmonicResidual.ExtractionRegular U c u v.labels v.blocks v.gaussian v.aliasCoefficients n) |
| 9259 | {x : CyclePoint × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 9260 | fullResidual c u n x i = (∑ l ∈ v.labels n, |
| 9261 | (HarmonicResidual.residualBlock c u (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)).oscillation n x i) + |
| 9262 | (HarmonicResidual.stateMeanCoefficientValue v.labels v.blocks v.gaussian v.aliasCoefficients c u n x.1 i - |
| 9263 | axis n x.1 i) + u.errors.total n x i := |
| 9264 | AxisymmetricResidualGrouping.stateFullResidual_reconstructed hU h.withAxis hr hx i |
| 9265 | |
| 9266 | theorem fullGoodWaveResidual_grouped_local (h : CycleRepresentation v u axis) |
| 9267 | {U : Set CyclePoint} (hU : IsOpen U) {c : Context CyclePoint} {n : ℕ} |
| 9268 | (hr : LocalResidualGrouping.ExtractionRegular U c u v.labels v.blocks v.gaussian v.aliasCoefficients n) |
| 9269 | {x : CyclePoint × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 9270 | fullGoodWaveResidual c u n x i = ∑ l ∈ v.labels n, |
| 9271 | (HarmonicResidual.residualBlock c u (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)).oscillation n x i := |
| 9272 | LocalResidualGrouping.stateGoodWaveResidual_grouped hU h.withAxis hr hx i |
| 9273 | |
| 9274 | theorem fullResidual_reconstructed_local (h : CycleRepresentation v u axis) |
| 9275 | {U : Set CyclePoint} (hU : IsOpen U) {c : Context CyclePoint} {n : ℕ} |
| 9276 | (hr : LocalResidualGrouping.ExtractionRegular U c u v.labels v.blocks v.gaussian v.aliasCoefficients n) |
| 9277 | {x : CyclePoint × ℝ} (hx : x ∈ HarmonicResidual.liftDomain U) (i : Fin 3) : |
| 9278 | fullResidual c u n x i = (∑ l ∈ v.labels n, |
| 9279 | (HarmonicResidual.residualBlock c u (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)).oscillation n x i) + |
| 9280 | (HarmonicResidual.stateMeanCoefficientValue v.labels v.blocks v.gaussian v.aliasCoefficients c u n x.1 i - |
| 9281 | axis n x.1 i) + u.errors.total n x i := |
| 9282 | LocalResidualGrouping.stateFullResidual_reconstructed hU h.withAxis hr hx i |
| 9283 | |
| 9284 | end CycleRepresentation |
| 9285 | |
| 9286 | end CycleResidualGrouping |
| 9287 | |
| 9288 | section RealCoefficientStructure |
| 9289 | open Set Filter CorrectionState HarmonicFields |
| 9290 | open scoped Topology ComplexConjugate |
| 9291 | |
| 9292 | /-- The stored coefficients themselves represent real fields. Retaining |
| 9293 | this algebraic invariant lets support of the real projection control the |
| 9294 | same coefficients used in the differentiated interaction estimates. -/ |
| 9295 | structure CycleRealCoefficients {ι : Type} (v : CycleCoefficients ι) : Prop where |
| 9296 | velocity : ∀ l n i, ConjugateSymmetric ((v.blocks l).velocity n i) |
| 9297 | pressure : ∀ l n, ConjugateSymmetric ((v.blocks l).pressure n) |
| 9298 | gaussian : ∀ l n i, ConjugateSymmetric (v.gaussian l n i) |
| 9299 | |
| 9300 | private theorem conjugate_add {D : Type} {a b : Coefficients D} |
| 9301 | (ha : ConjugateSymmetric a) (hb : ConjugateSymmetric b) : ConjugateSymmetric (a+b) := by |
| 9302 | intro j x |
| 9303 | change a (-j) x + b (-j) x = conj (a j x + b j x) |
| 9304 | rw [ha j x, hb j x, map_add] |
| 9305 | |
| 9306 | private theorem conjugate_pull {D E : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 9307 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 9308 | (e : D ≃ₗᵢ[ℝ] E) {a : Coefficients E} (ha : ConjugateSymmetric a) : |
| 9309 | ConjugateSymmetric (StateReindex.coefficients e a) := |
| 9310 | fun j x => ha j (e x) |
| 9311 | |
| 9312 | namespace CycleParameters |
| 9313 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 9314 | (c : Context CyclePoint) (u : State CyclePoint) |
| 9315 | |
| 9316 | theorem particularBlock_real (l : ι) : ErrorHarmonics.RealBlock (p.particularBlock v c u l) := |
| 9317 | ⟨fun n i => conjugate_pull cycleAssoc ((ParticularWaveAssembly.assembledBlock_real _ _ _ _ _ _).1 n i), |
| 9318 | fun n => conjugate_pull cycleAssoc ((ParticularWaveAssembly.assembledBlock_real _ _ _ _ _ _).2 n)⟩ |
| 9319 | |
| 9320 | theorem signedBlock_real (l : ι) : ErrorHarmonics.RealBlock (p.signedBlock v c u l) := |
| 9321 | SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _ |
| 9322 | |
| 9323 | theorem next_realCoefficients (h : CycleRealCoefficients v) : |
| 9324 | CycleRealCoefficients (p.nextCoefficients v c u) := by |
| 9325 | have hpv l n i : ConjugateSymmetric ((p.particularBlock v c u l).velocity n i) := |
| 9326 | conjugate_pull cycleAssoc ((ParticularWaveAssembly.assembledBlock_real _ _ _ _ _ _).1 n i) |
| 9327 | have hpp l n : ConjugateSymmetric ((p.particularBlock v c u l).pressure n) := |
| 9328 | conjugate_pull cycleAssoc ((ParticularWaveAssembly.assembledBlock_real _ _ _ _ _ _).2 n) |
| 9329 | have hpg l n i : ConjugateSymmetric ((p.particularGaussianBlock v c u l).velocity n i) := |
| 9330 | conjugate_pull cycleAssoc ((ParticularWaveAssembly.assembledBlock_real _ _ _ _ _ _).1 n i) |
| 9331 | have hsv l n i : ConjugateSymmetric ((p.signedBlock v c u l).velocity n i) := |
| 9332 | (SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _).1 n i |
| 9333 | have hsp l n : ConjugateSymmetric ((p.signedBlock v c u l).pressure n) := |
| 9334 | (SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _).2 n |
| 9335 | have hsg l n i : ConjugateSymmetric ((p.signedGaussianBlock v c u l).velocity n i) := |
| 9336 | (SignedWaveUpdate.coefficientBlock_symmetric _ _ _ _ _).1 n i |
| 9337 | exact ⟨fun l n i => conjugate_add (conjugate_add (h.velocity l n i) (hpv l n i)) (hsv l n i), |
| 9338 | fun l n => conjugate_add (conjugate_add (h.pressure l n) (hpp l n)) (hsp l n), |
| 9339 | fun l n i => conjugate_add (conjugate_add (h.gaussian l n i) (hpg l n i)) (hsg l n i)⟩ |
| 9340 | |
| 9341 | end CycleParameters |
| 9342 | |
| 9343 | theorem block_velocity_zero_germ_of_inputSupport {U : Set CyclePoint} {S : ℕ → Set CyclePoint} |
| 9344 | (hU : IsOpen U) (hS : ∀ n, IsClosed (S n)) |
| 9345 | {b : HarmonicBlock CyclePoint} {G A : HarmonicResidual.BlockCoefficients CyclePoint} |
| 9346 | (hs : HarmonicSourceSupport.InputSupportOn U S b G A) |
| 9347 | (hr : ∀ n i, ConjugateSymmetric (b.velocity n i)) (n : ℕ) {x : CyclePoint} |
| 9348 | (hx : x ∈ U) (hn : x ∉ S n) (i : Fin 3) (j : ℤ) (hj : j ≠ 0) : |
| 9349 | b.velocity n i j =ᶠ[𝓝 x] fun _ => 0 := by |
| 9350 | apply PeriodizedWaveBounds.zero_germ_of_support (hU.isClosed_compl.union (hS n)) |
| 9351 | · have hh := (hs.velocity n i).enlarge j hj |
| 9352 | rw [HarmonicResidual.realCoefficients_eq_self (hr n i)] at hh |
| 9353 | intro z hz |
| 9354 | by_contra hz' |
| 9355 | exact hz (hh z hz') |
| 9356 | · simpa using And.intro hx hn |
| 9357 | |
| 9358 | /-- The genuine input support controls raw nonzero coefficient germs |
| 9359 | because their real-projection identity is retained. -/ |
| 9360 | theorem velocity_zero_germ_of_inputSupport {ι : Type} {v : CycleCoefficients ι} |
| 9361 | {U : Set CyclePoint} {S : ι → ℕ → Set CyclePoint} |
| 9362 | (hU : IsOpen U) (hS : ∀ l n, IsClosed (S l n)) |
| 9363 | (hs : ∀ l, HarmonicSourceSupport.InputSupportOn U (S l) |
| 9364 | (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)) |
| 9365 | (hr : CycleRealCoefficients v) (l : ι) (n : ℕ) {x : CyclePoint} |
| 9366 | (hx : x ∈ U) (hn : x ∉ S l n) (i : Fin 3) (j : ℤ) (hj : j ≠ 0) : |
| 9367 | (v.blocks l).velocity n i j =ᶠ[𝓝 x] fun _ => 0 := by |
| 9368 | apply PeriodizedWaveBounds.zero_germ_of_support (hU.isClosed_compl.union (hS l n)) |
| 9369 | · have hh := ((hs l).velocity n i).enlarge j hj |
| 9370 | rw [HarmonicResidual.realCoefficients_eq_self (hr.velocity l n i)] at hh |
| 9371 | intro z hz |
| 9372 | by_contra hz' |
| 9373 | exact hz (hh z hz') |
| 9374 | · simpa using And.intro hx hn |
| 9375 | |
| 9376 | end RealCoefficientStructure |
| 9377 | |
| 9378 | section AnalyticInvariant |
| 9379 | |
| 9380 | open Set WeightedClasses MeanIncrementBounds CorrectionState LocalSignedRequest |
| 9381 | open scoped ContDiff BigOperators |
| 9382 | |
| 9383 | namespace CycleRepresentation |
| 9384 | variable {ι : Type} {v : CycleCoefficients ι} {u : State CyclePoint} {axis : AxisymmetricAlias} |
| 9385 | |
| 9386 | theorem alias_eq_lift (h : CycleRepresentation v u axis) (hz : ∀ l, v.aliasCoefficients l = 0) : |
| 9387 | u.errors.aliasError = fun n x => axis n x.1 := by |
| 9388 | funext n x i |
| 9389 | rw [h.aliasError] |
| 9390 | simp only [hz, coefficientField, Pi.zero_apply, HarmonicResidual.field_zero, Complex.zero_re, |
| 9391 | Finset.sum_const_zero, zero_add] |
| 9392 | |
| 9393 | theorem gaussian_angularContinuous (h : CycleRepresentation v u axis) : |
| 9394 | AngularContinuous u.errors.gaussian := by |
| 9395 | let b : ι → HarmonicBlock CyclePoint := fun l => |
| 9396 | ⟨v.gaussian l, 0, (v.blocks l).frequency, (v.blocks l).phase, (v.blocks l).angularFrequency⟩ |
| 9397 | have he : u.errors.gaussian = LabelSumBounds.fieldSum v.labels (fun l => (b l).oscillation) := by |
| 9398 | funext n x i |
| 9399 | exact h.gaussian n x i |
| 9400 | rw [he] |
| 9401 | exact LabelSumBounds.fieldSum_angularContinuous _ _ (fun _ => block_angularContinuous _) |
| 9402 | |
| 9403 | end CycleRepresentation |
| 9404 | |
| 9405 | /-- The quantitative and local regularity invariant is stated on the |
| 9406 | actual stored fields of `CycleState`, including the independent alias. |
| 9407 | Its definition makes no assertion that an arbitrary step preserves it. -/ |
| 9408 | structure CycleAnalyticInvariant {ι : Type} (G : SignedMeanGain.Geometry) |
| 9409 | (c : Context CyclePoint) (primary : ι → HarmonicBlock CyclePoint) |
| 9410 | (P : ι → ℕ → CyclePoint → ℝ) (labelCarrier : ι → ℕ → Set CyclePoint) |
| 9411 | (σ : ℝ) (x : CycleState ι) : Prop where |
| 9412 | representation : CycleRepresentation x.coefficients x.state x.axisymmetricAlias |
| 9413 | bands : CoefficientBands x.coefficients |
| 9414 | realCoefficients : CycleRealCoefficients x.coefficients |
| 9415 | inputSupport : ∀ l, HarmonicSourceSupport.InputSupportOn G.domain (labelCarrier l) |
| 9416 | (x.coefficients.blocks l) (x.coefficients.gaussian l) (x.coefficients.aliasCoefficients l) |
| 9417 | sourceBand : ∀ l, (HarmonicResidual.residualBlock c x.state (x.coefficients.blocks l) |
| 9418 | (x.coefficients.gaussian l) (x.coefficients.aliasCoefficients l)).BandLimited x.coefficients.residualBand |
| 9419 | zeroVelocity : ∀ l, HarmonicWaveInteraction.ZeroMode (x.coefficients.blocks l) |
| 9420 | zeroPressure : ∀ l n, (x.coefficients.blocks l).pressure n 0 = 0 |
| 9421 | carrier : ∀ l, SameCarrier (x.coefficients.blocks l) (primary l) |
| 9422 | phase : ∀ l n, ContDiffOn ℝ ∞ ((x.coefficients.blocks l).phase n) G.strip.domain |
| 9423 | frequency : ∀ l n, (x.coefficients.blocks l).frequency n ≠ 0 |
| 9424 | angular : ∀ l n, (x.coefficients.blocks l).angularFrequency n ≠ 0 |
| 9425 | coefficientSmooth : ∀ l n i, HarmonicResidual.SmoothCoefficients G.domain |
| 9426 | ((x.coefficients.blocks l).velocity n i) |
| 9427 | pressureCoefficientSmooth : ∀ l n, HarmonicResidual.SmoothCoefficients G.domain |
| 9428 | ((x.coefficients.blocks l).pressure n) |
| 9429 | gaussianCoefficientSmooth : ∀ l n i, HarmonicResidual.SmoothCoefficients G.domain |
| 9430 | (x.coefficients.gaussian l n i) |
| 9431 | solenoidal : ∀ l, HarmonicWaveInteraction.ModeSolenoidal G.strip c (x.coefficients.blocks l) |
| 9432 | wave : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (1/2) |
| 9433 | (fun l n z => (x.coefficients.blocks l).velocity n i j z) |
| 9434 | pressure : ∀ j, LabelSumBounds.UniformWaveClass G.strip P 1 |
| 9435 | (fun l n z => (x.coefficients.blocks l).pressure n j z) |
| 9436 | difference : ∀ i j, LabelSumBounds.UniformWaveClass G.strip P (17/25) |
| 9437 | (fun l n z => (x.coefficients.blocks l).velocity n i j z - (primary l).velocity n i j z) |
| 9438 | cumulative : CorrectionState.CumulativeBounds G.strip x.state |
| 9439 | covariance : ∀ i j, MeanClass G.strip 1 (x.state.covariance i j) |
| 9440 | residual : UniformHarmonicInteraction.UniformVelocity G.strip P (1/2+σ) |
| 9441 | (fun l => HarmonicResidual.residualBlock c x.state (x.coefficients.blocks l) |
| 9442 | (x.coefficients.gaussian l) (x.coefficients.aliasCoefficients l)) |
| 9443 | mean : MeanResidualBounds G.strip σ c x.state |
| 9444 | meanHypotheses : LiftedMeanResidual.MeanHypotheses G.strip.domain c x.state |
| 9445 | debt : DefectBounds G.slowStrip σ c x.state |
| 9446 | primitives : MeanStateRegularity.PrimitiveData G.region G.patch.a G.patch.b c x.state |
| 9447 | reconstructed : VariableGaugeMean.reconstructState G.gauge c x.state = x.state |
| 9448 | masses : GaugeMassPreservation.ZeroMassesOn G.region.carrier x.state |
| 9449 | oscillationSmooth : WaveStateRegularity.AngularSmooth G.domain x.state.oscillation |
| 9450 | oscillatoryPressureSmooth : ∀ n, ContDiffOn ℝ ∞ (x.state.oscillatoryPressure n) |
| 9451 | (G.domain ×ˢ (Set.univ : Set ℝ)) |
| 9452 | oscillationPeriodic : OscillationPeriodic G.region.carrier x.state.oscillation |
| 9453 | oscillationSupport : WaveStateRegularity.WaveSupport G.region G.patch.a G.patch.b x.state.oscillation |
| 9454 | gaussianFlat : ∀ β i j, LabelSumBounds.UniformClass G.strip |
| 9455 | (fun _ _ z => Real.sqrt (G.strip.zeta z)) β |
| 9456 | (fun l n z => x.coefficients.gaussian l n i j z) |
| 9457 | gaussianMean : angularMeanVector x.state.errors.gaussian = 0 |
| 9458 | aliasCoefficients : ∀ l, x.coefficients.aliasCoefficients l = 0 |
| 9459 | axisFlat : ∀ β, MeanClass G.strip β x.axisymmetricAlias |
| 9460 | baseAngular : ∀ n z, z ∈ G.domain → ∀ i, |
| 9461 | Continuous (fun θ : ℝ => x.state.errors.base n (z, θ) i) |
| 9462 | |
| 9463 | namespace CycleAnalyticInvariant |
| 9464 | variable {ι : Type} {G : SignedMeanGain.Geometry} {c : Context CyclePoint} |
| 9465 | {primary : ι → HarmonicBlock CyclePoint} {P : ι → ℕ → CyclePoint → ℝ} |
| 9466 | {labelCarrier : ι → ℕ → Set CyclePoint} {σ : ℝ} {x : CycleState ι} |
| 9467 | |
| 9468 | /-- Raw residual classes required by the next signed request are derived |
| 9469 | from the good-mean invariant and the actual all-power axis alias. -/ |
| 9470 | theorem raw_mean_bounds (H : CycleAnalyticInvariant G c primary P labelCarrier σ x) : |
| 9471 | MeanClass G.strip (1+σ) (x.state.thetaResidual c) ∧ |
| 9472 | MeanClass G.strip (1+σ) (x.state.axialResidual c) := by |
| 9473 | have ha := H.representation.alias_eq_lift H.aliasCoefficients |
| 9474 | have hca : AngularContinuous x.state.errors.aliasError := by |
| 9475 | rw [ha] |
| 9476 | intro n z i |
| 9477 | change Continuous (fun _ : ℝ => x.axisymmetricAlias n z i) |
| 9478 | exact continuous_const |
| 9479 | have ham : angularMeanVector x.state.errors.aliasError = x.axisymmetricAlias := by |
| 9480 | rw [ha] |
| 9481 | funext n z i |
| 9482 | exact congrFun (congrFun (angularAverage_axisymmetric (fun n z => x.axisymmetricAlias n z i)) n) z |
| 9483 | have he n z hz i := meanGoodResidual_at c x.state n z i |
| 9484 | (H.baseAngular n z (G.strip_subset hz) i) |
| 9485 | (H.representation.gaussian_angularContinuous n z i) (hca n z i) |
| 9486 | have haxis (i : Fin 3) : MeanClass G.strip (1+σ) (fun n z => x.axisymmetricAlias n z i) := |
| 9487 | (H.axisFlat (1+σ)).map (ContinuousLinearMap.proj i) |
| 9488 | constructor |
| 9489 | · apply class_congr (H.mean.angular.add (haxis 1)) |
| 9490 | intro n z hz |
| 9491 | dsimp only |
| 9492 | rw [he n z hz 1, H.gaussianMean, ham] |
| 9493 | change x.state.thetaResidual c n z = x.state.thetaResidual c n z - 0 - x.axisymmetricAlias n z 1 + |
| 9494 | x.axisymmetricAlias n z 1 |
| 9495 | ring |
| 9496 | · apply class_congr (H.mean.axial.add (haxis 2)) |
| 9497 | intro n z hz |
| 9498 | dsimp only |
| 9499 | rw [he n z hz 2, H.gaussianMean, ham] |
| 9500 | change x.state.axialResidual c n z = x.state.axialResidual c n z - 0 - x.axisymmetricAlias n z 2 + |
| 9501 | x.axisymmetricAlias n z 2 |
| 9502 | ring |
| 9503 | |
| 9504 | end CycleAnalyticInvariant |
| 9505 | |
| 9506 | end AnalyticInvariant |
| 9507 | |
| 9508 | section ActualWaveCycleGain |
| 9509 | open Set Filter WeightedClasses MeanIncrementBounds CorrectionState |
| 9510 | open LabelSumBounds UniformHarmonicInteraction |
| 9511 | open scoped ContDiff Topology BigOperators |
| 9512 | |
| 9513 | namespace CycleParameters |
| 9514 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 9515 | (c : Context CyclePoint) (u : State CyclePoint) |
| 9516 | |
| 9517 | /-- The two constructed linear cancellations give the improved residual |
| 9518 | of the literal post-signed state, including both nonlinear wave updates. |
| 9519 | The linear estimates are the native equation/jet outputs, not estimates |
| 9520 | on either complete updated residual. -/ |
| 9521 | theorem waveStages_residual_gain {P : ι → ℕ → CyclePoint → ℝ} {σ κ : ℝ} |
| 9522 | (hσ : 1/5 ≤ σ) (hκsmall : κ ≤ 1/100000) |
| 9523 | (ho : OperatorBounds p.strip c.operators κ) |
| 9524 | (hR : ∀ x ∈ p.strip.domain, 0 < c.operators.radius x) |
| 9525 | (hbase : BaseBounds p.strip c.base) |
| 9526 | (hu : MeanIncrementBounds.CumulativeBounds p.strip u.mean) |
| 9527 | (hc : ∀ l, SameCarrier (v.blocks l) (p.signedBlock v c u l)) |
| 9528 | (hold : ∀ i j, UniformWaveClass p.strip P (1/2) |
| 9529 | (fun l n x => (v.blocks l).velocity n i j x)) |
| 9530 | (hpart : ∀ i j, UniformWaveClass p.strip P (1/2+σ) |
| 9531 | (fun l n x => (p.particularBlock v c u l).velocity n i j x)) |
| 9532 | (hsigned : ∀ i j, UniformWaveClass p.strip P (1/2+σ-κ) |
| 9533 | (fun l n x => (p.signedBlock v c u l).velocity n i j x)) |
| 9534 | (hpold : ∀ l n, HarmonicResidual.SmoothCoefficients p.strip.domain ((v.blocks l).pressure n)) |
| 9535 | (hppart : ∀ l n, HarmonicResidual.SmoothCoefficients p.strip.domain |
| 9536 | ((p.particularBlock v c u l).pressure n)) |
| 9537 | (hpsigned : ∀ l n, HarmonicResidual.SmoothCoefficients p.strip.domain |
| 9538 | ((p.signedBlock v c u l).pressure n)) |
| 9539 | (hzero : ∀ l, HarmonicWaveInteraction.ZeroMode (v.blocks l)) |
| 9540 | (hband : ∀ l, (v.blocks l).BandLimited v.residualBand) |
| 9541 | (hphase : ∀ l n, ContDiffOn ℝ ∞ ((v.blocks l).phase n) p.strip.domain) |
| 9542 | (hk : ∀ l n, (v.blocks l).frequency n ≠ 0) |
| 9543 | (hkp : ∀ l n, (v.blocks l).angularFrequency n ≠ 0) |
| 9544 | (hdiv : ∀ l, HarmonicWaveInteraction.ModeSolenoidal p.strip c (v.blocks l)) |
| 9545 | (hdivpart : ∀ l, HarmonicWaveInteraction.ModeSolenoidal p.strip c (p.particularBlock v c u l)) |
| 9546 | (hdivsigned : ∀ l, HarmonicWaveInteraction.ModeSolenoidal p.strip c (p.signedBlock v c u l)) |
| 9547 | {C : ℕ → ι → Set CyclePoint} |
| 9548 | (hNormal : ∀ i, LocalizedWaveBounds.LocalUnweighted p.strip C 0 |
| 9549 | (fun n l x => HarmonicMeanInteraction.slowNormal c ho hR (v.blocks l).phase n x i)) |
| 9550 | (hFreq : LocalizedWaveBounds.LocalUnweighted p.strip C (-(1/2)) |
| 9551 | (fun n l _ => (v.blocks l).frequency n)) |
| 9552 | (hAng : LocalizedWaveBounds.LocalUnweighted p.strip C (-(1/2)) |
| 9553 | (fun n l _ => ((v.blocks l).angularFrequency n : ℝ))) |
| 9554 | (hzpart : ∀ n l x, x ∈ p.strip.domain → x ∉ C n l → ∀ i j, j ≠ 0 → |
| 9555 | (p.particularBlock v c u l).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 9556 | (hzsigned : ∀ n l x, x ∈ p.strip.domain → x ∉ C n l → ∀ i j, j ≠ 0 → |
| 9557 | (p.signedBlock v c u l).velocity n i j =ᶠ[𝓝 x] fun _ => 0) |
| 9558 | (hP0 : ∀ l n x, x ∈ p.strip.domain → 0 ≤ P l n x) |
| 9559 | (hP1 : ∀ l n x, x ∈ p.strip.domain → P l n x ≤ 1) |
| 9560 | (hlinearP : ∀ i j, j ≠ 0 → UniformWaveClass p.strip P (1+σ-3*κ) |
| 9561 | (fun l n x => |
| 9562 | (HarmonicResidual.residualBlock c u (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)).velocity n i j x + |
| 9563 | (HarmonicWaveInteraction.linearGoodBlock c (v.blocks l) (p.particularBlock v c u l) |
| 9564 | (p.particularGaussianBlock v c u l).velocity).velocity n i j x)) |
| 9565 | (hlinearS : UniformVelocity p.strip P (1+σ-4*κ) |
| 9566 | (fun l => HarmonicWaveInteraction.linearGoodBlock c (p.beforeSignedBlock v c u l) |
| 9567 | (p.signedBlock v c u l) (p.signedGaussianBlock v c u l).velocity)) : |
| 9568 | UniformVelocity p.strip P (1/2+σ+1/10) |
| 9569 | (fun l => HarmonicResidual.residualBlock c (p.afterSigned v c u) (p.finalBlock v c u l) |
| 9570 | ((p.nextCoefficients v c u).gaussian l) (v.aliasCoefficients l)) ∧ |
| 9571 | (∀ l, HarmonicWaveInteraction.ModeSolenoidal p.strip c (p.finalBlock v c u l)) := by |
| 9572 | have hκhalf : κ ≤ 1/2 := by linarith |
| 9573 | have hpart0 l := p.particularBlock_zero v c u l |
| 9574 | have hsigned0 l := (p.signed l).exactBlock_zero p.strip (p.signedRequest v c u) |
| 9575 | have hpartc l := p.particular_carrier v c u l |
| 9576 | have hpartdiv l : HarmonicWaveInteraction.ModeSolenoidal p.strip c |
| 9577 | (HarmonicWaveInteraction.withCarrier (v.blocks l) (p.particularBlock v c u l)) := by |
| 9578 | rw [withCarrier_of_same (hpartc l)] |
| 9579 | exact hdivpart l |
| 9580 | have hfirst := waveStage_residual_uniform c ho hκhalf hR u (p.afterParticular v c u) |
| 9581 | (p.afterParticular_mean v c u) (meanIncrement_of_cumulative hu) hbase.smooth |
| 9582 | v.blocks (p.particularBlock v c u) (fun i j _ => hold i j) (fun i j _ => hpart i j) |
| 9583 | hzero hpart0 hband (p.particularBlock_band v c u) hphase hk hkp hdiv hpartdiv |
| 9584 | hNormal hFreq hAng hzpart hP0 hP1 hpold hppart v.gaussian |
| 9585 | (fun l => (p.particularGaussianBlock v c u l).velocity) v.aliasCoefficients v.aliasCoefficients |
| 9586 | (fun _ _ _ => by rw [sub_self]; exact HarmonicResidual.band_zero _) |
| 9587 | (fun i j hj => (hlinearP i j hj).mono_exponent (show 1/2+σ+1/10 ≤ 1+σ-3*κ by linarith)) |
| 9588 | (by linarith) (by linarith) (by linarith) |
| 9589 | have hbefore : ∀ i j, UniformWaveClass p.strip P (1/2) |
| 9590 | (fun l n x => (p.beforeSignedBlock v c u l).velocity n i j x) := by |
| 9591 | intro i j |
| 9592 | exact (hold i j).add ((hpart i j).mono_exponent (by linarith)) |
| 9593 | have hbzero l : HarmonicWaveInteraction.ZeroMode (p.beforeSignedBlock v c u l) := |
| 9594 | HarmonicStructurePreservation.zeroMode_addBlock (hzero l) (hpart0 l) |
| 9595 | have hbband l : (p.beforeSignedBlock v c u l).BandLimited v.residualBand := by |
| 9596 | have hb := addBlock_band (hband l) (p.particularBlock_band v c u l) |
| 9597 | simp only [max_self] at hb |
| 9598 | exact hb |
| 9599 | have hbdiv l : HarmonicWaveInteraction.ModeSolenoidal p.strip c (p.beforeSignedBlock v c u l) := |
| 9600 | HarmonicStructurePreservation.modeSolenoidal_addBlock (hpartc l).frequency (hpartc l).phase |
| 9601 | (hpartc l).angular (fun n i j => (hold i j).smooth l n) |
| 9602 | (fun n i j => (hpart i j).smooth l n) (hphase l) (hdiv l) (hdivpart l) |
| 9603 | have hbpressure l n : HarmonicResidual.SmoothCoefficients p.strip.domain |
| 9604 | ((p.beforeSignedBlock v c u l).pressure n) := by |
| 9605 | intro j |
| 9606 | exact (hpold l n j).add (hppart l n j) |
| 9607 | have hbsame l : SameCarrier (p.beforeSignedBlock v c u l) (p.signedBlock v c u l) := |
| 9608 | ⟨(hc l).frequency,(hc l).phase,(hc l).angular⟩ |
| 9609 | have hsdiv l : HarmonicWaveInteraction.ModeSolenoidal p.strip c |
| 9610 | (HarmonicWaveInteraction.withCarrier (p.beforeSignedBlock v c u l) (p.signedBlock v c u l)) := by |
| 9611 | rw [withCarrier_of_same (hbsame l)] |
| 9612 | exact hdivsigned l |
| 9613 | have hm : (p.afterSigned v c u).mean = (p.afterParticular v c u).mean := by |
| 9614 | rw [p.afterSigned_mean v c u, p.afterParticular_mean v c u] |
| 9615 | have hmean : IncrementBounds p.strip (9/10) (p.afterParticular v c u).mean := by |
| 9616 | rw [p.afterParticular_mean v c u] |
| 9617 | exact meanIncrement_of_cumulative hu |
| 9618 | have hsecond := waveStage_residual_uniform c ho hκhalf hR (p.afterParticular v c u) |
| 9619 | (p.afterSigned v c u) hm hmean hbase.smooth (p.beforeSignedBlock v c u) (p.signedBlock v c u) |
| 9620 | (fun i j _ => hbefore i j) (fun i j _ => hsigned i j) hbzero hsigned0 hbband |
| 9621 | (fun l => (p.signed l).exactBlock_band p.strip (p.signedRequest v c u)) |
| 9622 | hphase hk hkp hbdiv hsdiv hNormal hFreq hAng hzsigned hP0 hP1 hbpressure hpsigned |
| 9623 | (fun l => v.gaussian l + (p.particularGaussianBlock v c u l).velocity) |
| 9624 | (fun l => (p.signedGaussianBlock v c u l).velocity) v.aliasCoefficients v.aliasCoefficients |
| 9625 | (fun _ _ _ => by rw [sub_self]; exact HarmonicResidual.band_zero _) |
| 9626 | (fun i j hj => (hfirst i j hj).add ((hlinearS i j hj).mono_exponent |
| 9627 | (show 1/2+σ+1/10 ≤ 1+σ-4*κ by linarith))) |
| 9628 | (by linarith) (by linarith) (by linarith) |
| 9629 | refine ⟨hsecond, ?_⟩ |
| 9630 | intro l |
| 9631 | exact HarmonicStructurePreservation.modeSolenoidal_addBlock (hbsame l).frequency (hbsame l).phase |
| 9632 | (hbsame l).angular (fun n i j => (hbefore i j).smooth l n) |
| 9633 | (fun n i j => (hsigned i j).smooth l n) (hphase l) (hbdiv l) (hdivsigned l) |
| 9634 | |
| 9635 | end CycleParameters |
| 9636 | end ActualWaveCycleGain |
| 9637 | |
| 9638 | section DerivedRequestGain |
| 9639 | open Set WeightedClasses MeanIncrementBounds CorrectionState VariableGaugeMean LocalSignedRequest |
| 9640 | open scoped ContDiff |
| 9641 | |
| 9642 | /-- The actual full signed request is controlled by the current raw |
| 9643 | residuals. Their smoothness and support are derived from primitive state |
| 9644 | regularity and the actual pressure reconstruction. -/ |
| 9645 | theorem fullRequest_bounds_of_primitive (G : SignedMeanGain.Geometry) |
| 9646 | (c : Context Point) (u : State Point) |
| 9647 | (H : MeanStateRegularity.PrimitiveData G.region G.patch.a G.patch.b c u) |
| 9648 | (hfixed : (reconstructState G.gauge c u).pressure = u.pressure) |
| 9649 | {α : ℝ} (hθ : MeanClass G.strip α (u.thetaResidual c)) |
| 9650 | (hz : MeanClass G.strip α (u.axialResidual c)) : |
| 9651 | ∀ i, MeanClass (HarmonicWaveInteraction.productStrip G.strip) (α-1) |
| 9652 | (fun n x => fullRequest G.strip G.patch G.coord c u n x i) := by |
| 9653 | have H₀ : MeanStateRegularity.PrimitiveData G.region G.gauge.radial.inner G.gauge.radial.outer c u := by |
| 9654 | simpa only [G.inner_eq, G.outer_eq] using H |
| 9655 | have ht := H.theta G.patch.a_pos G.patch.a_lt_b |
| 9656 | have hz' := H₀.axial_reconstructed G.inner_pos G.exponent_pos G.length_eq hfixed |
| 9657 | have hs : ∀ n, MovingSupport G.patch.a G.patch.b G.coord G.region.carrier (u.axialResidual c n) := by |
| 9658 | simpa only [G.inner_eq, G.outer_eq] using fun n => MeanStateRegularity.MovingField.movingSupport hz' n |
| 9659 | exact fullRequest_class G.strip G.patch G.coord c u |
| 9660 | (normalizedRequest_class G.region G.patch G.left_pos G.right_pos G.epsilon G.slow |
| 9661 | G.epsilon_pos G.epsilon_le_one G.slow_ge_one c u α ht.smooth hz'.smooth (fun n => MeanStateRegularity.MovingField.movingSupport ht n) hs hθ hz) |
| 9662 | |
| 9663 | /-- The first actual wave supplies the current raw residuals and debt |
| 9664 | used by the signed request. No post-wave residual estimate is assumed. -/ |
| 9665 | theorem waveStage_mean_gain (G : SignedMeanGain.Geometry) |
| 9666 | (c : Context Point) (u : State Point) (w : Oscillation Point) |
| 9667 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 9668 | {σ κ : ℝ} (hσ : 1/5 ≤ σ) (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1/100000) |
| 9669 | (H : MeanStateRegularity.PrimitiveData G.region G.patch.a G.patch.b c u) |
| 9670 | (ho : OperatorBounds G.strip c.operators κ) (hb : BaseBounds G.strip c.base) |
| 9671 | (hu : CorrectionState.CumulativeBounds G.strip u) |
| 9672 | (hfixed : (reconstructState G.gauge c u).pressure = u.pressure) |
| 9673 | (hθ : MeanClass G.strip (1+σ) (u.thetaResidual c)) |
| 9674 | (hz : MeanClass G.strip (1+σ) (u.axialResidual c)) |
| 9675 | (hd : DefectBounds G.slowStrip σ c u) |
| 9676 | (hX : ∀ i j, GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b |
| 9677 | (SignedMeanGain.covarianceIncrement u.oscillation w i j)) |
| 9678 | (hXC : SignedMeanGain.TensorClass G.strip (1+σ) |
| 9679 | (SignedMeanGain.covarianceIncrement u.oscillation w)) : |
| 9680 | let next := SignedMeanGain.waveStage G.gauge c u w q gaussian |
| 9681 | MeanClass G.strip (1+σ-κ) (next.pressure-u.pressure) ∧ |
| 9682 | CorrectionState.CumulativeBounds G.strip next ∧ |
| 9683 | MeanClass G.strip (1+σ-κ) (next.thetaResidual c) ∧ |
| 9684 | MeanClass G.strip (1+σ-κ) (next.axialResidual c) ∧ |
| 9685 | DefectBounds G.slowStrip (σ-κ) c next ∧ |
| 9686 | (∀ i, MeanClass (HarmonicWaveInteraction.productStrip G.strip) (σ-κ) |
| 9687 | (fun n x => fullRequest G.strip G.patch G.coord c next n x i)) := by |
| 9688 | dsimp only |
| 9689 | have hs : movingStripData G.region G.gauge.radial.inner G.gauge.radial.outer |
| 9690 | G.leftWeight G.rightWeight G.inner_pos G.left_pos G.right_pos |
| 9691 | G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one = G.strip := by |
| 9692 | simp only [SignedMeanGain.Geometry.strip, G.inner_eq, G.outer_eq] |
| 9693 | have H₀ : MeanStateRegularity.PrimitiveData G.region G.gauge.radial.inner G.gauge.radial.outer c u := by |
| 9694 | simpa only [G.inner_eq, G.outer_eq] using H |
| 9695 | have HX : ∀ i j, GaugeDebtIncrement.Regular G.region G.gauge.radial.inner G.gauge.radial.outer |
| 9696 | (SignedMeanGain.covarianceIncrement u.oscillation w i j) := by |
| 9697 | simpa only [G.inner_eq, G.outer_eq] using |
| 9698 | (fun i j => MeanStateRegularity.MovingField.regular (hX i j)) |
| 9699 | have hf := gaugeWaveStage_mean_from_covariance G.region G.gauge G.inner_pos G.exponent_pos |
| 9700 | G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one G.length_eq |
| 9701 | c u w q gaussian H.operators.regular H.base.smooth H₀.mean.regular |
| 9702 | (fun i j => MeanStateRegularity.MovingField.regular (H₀.covariance i j)) HX |
| 9703 | (hs.symm ▸ ho) (hs.symm ▸ hXC) hfixed (hs.symm ▸ hb) (hs.symm ▸ hu) |
| 9704 | (show 9/10 ≤ (1+σ)-κ by linarith) le_rfl |
| 9705 | (hs.symm ▸ hθ.mono_exponent (by linarith)) (hs.symm ▸ hz.mono_exponent (by linarith)) |
| 9706 | (fun i => (hd i).mono_exponent (by linarith)) |
| 9707 | rw [hs] at hf |
| 9708 | obtain ⟨hp, hcum, htheta, haxial, hdebt⟩ := hf |
| 9709 | have Hn := H.waveStage G.gauge w q gaussian hX |
| 9710 | refine ⟨hp, hcum, htheta, haxial, ?_, ?_⟩ |
| 9711 | · simpa only [DefectBounds, SignedMeanGain.Geometry.slowStrip, |
| 9712 | show 1+(σ-κ) = 1+σ-κ by ring] using hdebt |
| 9713 | · have hr := fullRequest_bounds_of_primitive G c _ Hn |
| 9714 | (congrArg (fun a : State Point => a.pressure) |
| 9715 | (GaugeMomentBalances.reconstructState_idempotent _ _ _)) htheta haxial |
| 9716 | simpa only [show (1+σ-κ)-1 = σ-κ by ring] using hr |
| 9717 | |
| 9718 | end DerivedRequestGain |
| 9719 | |
| 9720 | section FurtherPreservation |
| 9721 | open Set WeightedClasses MeanIncrementBounds CorrectionState |
| 9722 | open scoped ContDiff |
| 9723 | |
| 9724 | namespace CycleParameters |
| 9725 | variable {ι : Type} (p : CycleParameters ι) (v : CycleCoefficients ι) |
| 9726 | (c : Context CyclePoint) (u : State CyclePoint) |
| 9727 | |
| 9728 | /-- Mean stages and the alias refresh leave the actual wave covariance |
| 9729 | unchanged. Both finite wave increments are retained in this identity. -/ |
| 9730 | theorem next_covariance : |
| 9731 | (p.next v c u).covariance = u.covariance + |
| 9732 | SignedMeanGain.covarianceIncrement u.oscillation (p.particularVelocity v c u) + |
| 9733 | SignedMeanGain.covarianceIncrement (p.afterParticular v c u).oscillation (p.signedVelocity v c u) := by |
| 9734 | change bilinearCovariance (p.next v c u).oscillation (p.next v c u).oscillation = _ |
| 9735 | rw [p.next_oscillation] |
| 9736 | change bilinearCovariance (u.oscillation + p.particularVelocity v c u + p.signedVelocity v c u) |
| 9737 | (u.oscillation + p.particularVelocity v c u + p.signedVelocity v c u) = |
| 9738 | bilinearCovariance u.oscillation u.oscillation + |
| 9739 | (bilinearCovariance (u.oscillation + p.particularVelocity v c u) |
| 9740 | (u.oscillation + p.particularVelocity v c u) - bilinearCovariance u.oscillation u.oscillation) + |
| 9741 | (bilinearCovariance (u.oscillation + p.particularVelocity v c u + p.signedVelocity v c u) |
| 9742 | (u.oscillation + p.particularVelocity v c u + p.signedVelocity v c u) - |
| 9743 | bilinearCovariance (u.oscillation + p.particularVelocity v c u) |
| 9744 | (u.oscillation + p.particularVelocity v c u)) |
| 9745 | abel |
| 9746 | |
| 9747 | theorem next_covariance_mem {α β γ : ℝ} |
| 9748 | (hα : γ ≤ α) (hβ : γ ≤ β) |
| 9749 | (hold : ∀ i j, MeanClass p.strip γ (u.covariance i j)) |
| 9750 | (hp : SignedMeanGain.TensorClass p.strip α |
| 9751 | (SignedMeanGain.covarianceIncrement u.oscillation (p.particularVelocity v c u))) |
| 9752 | (hs : SignedMeanGain.TensorClass p.strip β |
| 9753 | (SignedMeanGain.covarianceIncrement (p.afterParticular v c u).oscillation (p.signedVelocity v c u))) : |
| 9754 | ∀ i j, MeanClass p.strip γ ((p.next v c u).covariance i j) := by |
| 9755 | intro i j |
| 9756 | rw [p.next_covariance v c u] |
| 9757 | exact ((hold i j).add ((hp i j).mono_exponent hα)).add ((hs i j).mono_exponent hβ) |
| 9758 | |
| 9759 | theorem nextAxisymmetricAlias_mem (axis : AxisymmetricAlias) {β : ℝ} |
| 9760 | (hold : MeanClass p.strip β axis) |
| 9761 | (ht : MeanClass p.strip β (fun n z => VariableGaugeMean.temporalAliasState |
| 9762 | p.gauge p.timeExponent p.commonIndex c (p.afterSigned v c u) n (z,0))) |
| 9763 | (hpn : MeanClass p.strip β (fun n z => VariableGaugeMean.pressureAliasState |
| 9764 | p.gauge c (p.afterRank v c u) n (z,0))) |
| 9765 | (hpo : MeanClass p.strip β (fun n z => VariableGaugeMean.pressureAliasState p.gauge c u n (z,0))) : |
| 9766 | MeanClass p.strip β (p.nextAxisymmetricAlias v c u axis) := by |
| 9767 | have hd := hpn.add (hpo.map (-ContinuousLinearMap.id ℝ (Fin 3 → ℝ))) |
| 9768 | convert! (hold.add ht).add hd using 1 |
| 9769 | |
| 9770 | /-- The edge weight is retained in all new Gaussian coefficients. -/ |
| 9771 | theorem next_gaussian_mem {w : ι → ℕ → CyclePoint → ℝ} {β : ℝ} |
| 9772 | (hold : ∀ i j, LabelSumBounds.UniformClass p.strip w β |
| 9773 | (fun l n z => v.gaussian l n i j z)) |
| 9774 | (hp : ∀ i j, LabelSumBounds.UniformClass p.strip w β |
| 9775 | (fun l n z => (p.particularGaussianBlock v c u l).velocity n i j z)) |
| 9776 | (hs : ∀ i j, LabelSumBounds.UniformClass p.strip w β |
| 9777 | (fun l n z => (p.signedGaussianBlock v c u l).velocity n i j z)) : |
| 9778 | ∀ i j, LabelSumBounds.UniformClass p.strip w β |
| 9779 | (fun l n z => (p.nextCoefficients v c u).gaussian l n i j z) := |
| 9780 | fun i j => ((hold i j).add (hp i j)).add (hs i j) |
| 9781 | |
| 9782 | theorem next_inputSupport {U : Set CyclePoint} {S : ι → ℕ → Set CyclePoint} |
| 9783 | (hold : ∀ l, HarmonicSourceSupport.InputSupportOn U (S l) |
| 9784 | (v.blocks l) (v.gaussian l) (v.aliasCoefficients l)) |
| 9785 | (hp : ∀ l, HarmonicSourceSupport.InputSupportOn U (S l) |
| 9786 | (p.particularBlock v c u l) (p.particularGaussianBlock v c u l).velocity 0) |
| 9787 | (hs : ∀ l, HarmonicSourceSupport.InputSupportOn U (S l) |
| 9788 | (p.signedBlock v c u l) (p.signedGaussianBlock v c u l).velocity 0) : |
| 9789 | ∀ l, HarmonicSourceSupport.InputSupportOn U (S l) ((p.nextCoefficients v c u).blocks l) |
| 9790 | ((p.nextCoefficients v c u).gaussian l) ((p.nextCoefficients v c u).aliasCoefficients l) := |
| 9791 | fun l => LabelSupportPreservation.inputSupport_two_updates (hold l) (hp l) (hs l) |
| 9792 | |
| 9793 | theorem next_oscillation_smooth {U : Set CyclePoint} |
| 9794 | (hold : WaveStateRegularity.AngularSmooth U u.oscillation) |
| 9795 | (hp : WaveStateRegularity.AngularSmooth U (p.particularVelocity v c u)) |
| 9796 | (hs : WaveStateRegularity.AngularSmooth U (p.signedVelocity v c u)) : |
| 9797 | WaveStateRegularity.AngularSmooth U (p.next v c u).oscillation := by |
| 9798 | rw [p.next_oscillation] |
| 9799 | exact (hold.add hp).add hs |
| 9800 | |
| 9801 | theorem next_oscillation_periodic {U : Set PressureStream.Plane} |
| 9802 | (hold : OscillationPeriodic U u.oscillation) |
| 9803 | (hp : OscillationPeriodic U (p.particularVelocity v c u)) |
| 9804 | (hs : OscillationPeriodic U (p.signedVelocity v c u)) : |
| 9805 | OscillationPeriodic U (p.next v c u).oscillation := by |
| 9806 | rw [p.next_oscillation] |
| 9807 | exact (hold.add hp).add hs |
| 9808 | |
| 9809 | theorem next_oscillation_support {coord a b : ℝ} {U : LocalSignedRequest.SlowRegion coord} |
| 9810 | (hold : WaveStateRegularity.WaveSupport U a b u.oscillation) |
| 9811 | (hp : WaveStateRegularity.WaveSupport U a b (p.particularVelocity v c u)) |
| 9812 | (hs : WaveStateRegularity.WaveSupport U a b (p.signedVelocity v c u)) : |
| 9813 | WaveStateRegularity.WaveSupport U a b (p.next v c u).oscillation := by |
| 9814 | rw [p.next_oscillation] |
| 9815 | exact (hold.add hp).add hs |
| 9816 | |
| 9817 | theorem finalBlock_zero (hold : ∀ l, HarmonicWaveInteraction.ZeroMode (v.blocks l)) : |
| 9818 | ∀ l, HarmonicWaveInteraction.ZeroMode (p.finalBlock v c u l) := |
| 9819 | fun l => HarmonicStructurePreservation.zeroMode_addBlock |
| 9820 | (HarmonicStructurePreservation.zeroMode_addBlock (hold l) (p.particularBlock_zero v c u l)) |
| 9821 | ((p.signed l).exactBlock_zero p.strip (p.signedRequest v c u)) |
| 9822 | |
| 9823 | theorem finalBlock_pressure_zero (hold : ∀ l n, (v.blocks l).pressure n 0 = 0) : |
| 9824 | ∀ l n, (p.finalBlock v c u l).pressure n 0 = 0 := by |
| 9825 | intro l |
| 9826 | apply HarmonicStructurePreservation.zeroPressure_addBlock |
| 9827 | (HarmonicStructurePreservation.zeroPressure_addBlock (hold l) ?_) |
| 9828 | ((p.signed l).exactBlock_pressure_zero p.strip (p.signedRequest v c u)) |
| 9829 | intro n |
| 9830 | funext x |
| 9831 | exact congrFun ((ParticularWaveAssembly.assembledBlock_zero _ _ _ _ _ _).2 n) (cycleAssoc x) |
| 9832 | |
| 9833 | theorem finalBlock_pressure_cumulative {P : ι → ℕ → CyclePoint → ℝ} {σ κ : ℝ} |
| 9834 | (hσ : 1/5 ≤ σ) (hκsmall : κ ≤ 1/100000) |
| 9835 | (hold : ∀ j, LabelSumBounds.UniformWaveClass p.strip P 1 |
| 9836 | (fun l n z => (v.blocks l).pressure n j z)) |
| 9837 | (hp : ∀ j, LabelSumBounds.UniformWaveClass p.strip P (1+σ) |
| 9838 | (fun l n z => (p.particularBlock v c u l).pressure n j z)) |
| 9839 | (hs : ∀ j, LabelSumBounds.UniformWaveClass p.strip P (1+σ-κ) |
| 9840 | (fun l n z => (p.signedBlock v c u l).pressure n j z)) : |
| 9841 | ∀ j, LabelSumBounds.UniformWaveClass p.strip P 1 |
| 9842 | (fun l n z => (p.finalBlock v c u l).pressure n j z) := |
| 9843 | fun j => ((hold j).add ((hp j).mono_exponent (by linarith))).add |
| 9844 | ((hs j).mono_exponent (by linarith)) |
| 9845 | |
| 9846 | end CycleParameters |
| 9847 | end FurtherPreservation |
| 9848 | |
| 9849 | end NavierStokes.CorrectionStep |