| @@ -212,18 +212,6 @@ noncomputable def primaryBlock (s : StripData D) (c : CorrectionState.Context D) |
| 212 | 212 | (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) := |
| 213 | 213 | SignedWaveUpdate.blockOfCoefficients (corrected s c a ψ) kp |
| 214 | 214 | |
| 215 | | -noncomputable def gaussianCoefficients (c : CorrectionState.Context D) |
| 216 | | - (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) : |
| 217 | | - HarmonicResidual.BlockCoefficients D := |
| 218 | | - fun n i => ErrorHarmonics.conjugatePair 1 |
| 219 | | - (fun x => LinearWaveBounds.excludedSlotError (directions c) ψ a.amplitude 0 n (x, 0) i) |
| 220 | | - |
| 221 | | -noncomputable def goodCoefficients (s : StripData D) (c : CorrectionState.Context D) |
| 222 | | - (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) : |
| 223 | | - HarmonicResidual.BlockCoefficients D := |
| 224 | | - fun n i => ErrorHarmonics.conjugatePair 1 |
| 225 | | - (fun x => a.constructedGood (HarmonicWaveInteraction.productStrip s) (directions c) ψ n (x, 0) i) |
| 226 | | - |
| 227 | 215 | theorem wave_slice {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 228 | 216 | {s : StripData D} {P : ℕ → D → ℝ} {α : ℝ} {f : ℕ → D × ℝ → E} |
| 229 | 217 | (hf : WaveClass (HarmonicWaveInteraction.productStrip s) (fun n p => P n p.1) α f) : |
| @@ -246,24 +234,6 @@ theorem corrected_bounds : LinearWaveBounds.InputBounds (HarmonicWaveInteraction |
| 246 | 234 | exact (h.coefficients.with_cutoff h.cutoff).add_curl_amplitude (by linarith [h.loss_le]) |
| 247 | 235 | (fun i => CurlClassBounds.class_component hc i) |
| 248 | 236 | |
| 249 | | -theorem good_class : WaveClass (HarmonicWaveInteraction.productStrip s) (fun n p => P n p.1) |
| 250 | | - (1 - 3 * κ) (a.constructedGood (HarmonicWaveInteraction.productStrip s) (directions c) ψ) := by |
| 251 | | - obtain ⟨b, M, hb, hlo, hhi⟩ := h.normal_bounds |
| 252 | | - have hg := h.coefficients.constructed_goodCoefficient_class (by linarith [h.loss_le]) h.cutoff |
| 253 | | - h.matching.radius h.normal_jets hb hlo hhi h.inverse_frequency |
| 254 | | - convert! hg using 1 |
| 255 | | - ring |
| 256 | | - |
| 257 | | -theorem good_coefficients_class (j : ℤ) (i : Fin 3) : WaveClass s P (1 - 3 * κ) |
| 258 | | - (fun n x => goodCoefficients s c a ψ n i j x) := |
| 259 | | - SignedWaveUpdate.conjugatePair_class |
| 260 | | - (wave_slice (CurlClassBounds.class_component h.good_class i)) j |
| 261 | | - |
| 262 | | -theorem primary_bounds : (primaryBlock s c a ψ kp).WaveBounds s P (1 / 2) := by |
| 263 | | - intro i j _ |
| 264 | | - exact SignedWaveUpdate.conjugatePair_class |
| 265 | | - (wave_slice (h.corrected_bounds.amplitude i)) j |
| 266 | | - |
| 267 | 237 | theorem primary_pressure : (primaryBlock s c a ψ kp).PressureBounds s P 1 := by |
| 268 | 238 | intro j _ |
| 269 | 239 | have hp := SignedWaveUpdate.conjugatePair_class |
| @@ -271,70 +241,6 @@ theorem primary_pressure : (primaryBlock s c a ψ kp).PressureBounds s P 1 := by |
| 271 | 241 | simp only [show (1 / 2 : ℝ) + 1 / 2 = 1 by norm_num] at hp |
| 272 | 242 | exact hp |
| 273 | 243 | |
| 274 | | -theorem exact_conditions : LinearWaveBounds.ExactConditions (HarmonicWaveInteraction.productStrip s) |
| 275 | | - (directions c) (corrected s c a ψ) := |
| 276 | | - exactConditions_corrected_of_invariants ψ h.phase_smooth |
| 277 | | - (fun n => (h.geometry n).radius_ne) (fun n => (h.geometry n).radial_radius) |
| 278 | | - h.angular.radius h.angular.radialBase h.angular.frequencyBase h.angular.axialBase |
| 279 | | - (directions_radial_invariant c) (fun _ => Invariant.const _) h.angular.phase |
| 280 | | - h.angular.amplitude h.angular.pressure h.angular.cutoff |
| 281 | | - |
| 282 | | -theorem normal_ne (n : ℕ) (p : D × ℝ) (hp : p.1 ∈ s.domain) : |
| 283 | | - a.normal (HarmonicWaveInteraction.productStrip s) (directions c) n p ≠ 0 := by |
| 284 | | - obtain ⟨b, M, hb, hlo, hhi⟩ := h.normal_bounds |
| 285 | | - intro hn |
| 286 | | - have := hlo n p hp |
| 287 | | - rw [hn, norm_zero] at this |
| 288 | | - linarith |
| 289 | | - |
| 290 | | -theorem corrected_divergence (n : ℕ) (p : D × ℝ) (hp : p.1 ∈ s.domain) : |
| 291 | | - cylindricalDivergence (a.radius n) ((directions c).radialField n) |
| 292 | | - (fun _ => (directions c).angular) ((directions c).axialField (HarmonicWaveInteraction.productStrip s) n) |
| 293 | | - (vectorMode (a.frequency n) (a.phase n) ((corrected s c a ψ).amplitude n)) p = 0 := |
| 294 | | - LinearWaveBounds.corrected_divergence h.coefficients h.cutoff n (h.geometry n) |
| 295 | | - (h.frequency_ne n) (h.phase_smooth n) (h.normal_ne n) (h.tangent n) hp |
| 296 | | - |
| 297 | | -theorem linear_identity (n : ℕ) (p : D × ℝ) (hp : p.1 ∈ s.domain) : |
| 298 | | - (corrected s c a ψ).harmonicResidual (HarmonicWaveInteraction.productStrip s) (directions c) n p = |
| 299 | | - vectorMode (a.frequency n) (a.phase n) |
| 300 | | - (a.constructedGood (HarmonicWaveInteraction.productStrip s) (directions c) ψ n) p + |
| 301 | | - vectorMode (a.frequency n) (a.phase n) |
| 302 | | - (LinearWaveBounds.excludedSlotError (directions c) ψ a.amplitude 0 n) p := by |
| 303 | | - obtain ⟨b, M, hb, hlo, hhi⟩ := h.normal_bounds |
| 304 | | - let f := (a.withCutoff ψ).curlCorrection (HarmonicWaveInteraction.productStrip s) (directions c) |
| 305 | | - have hf : WaveClass (HarmonicWaveInteraction.productStrip s) (fun n p => P n p.1) |
| 306 | | - (1 / 2 + 1 / 2 - κ) f := |
| 307 | | - (h.coefficients.with_cutoff h.cutoff).curlCorrection_class h.matching.radius |
| 308 | | - h.normal_jets hb hlo hhi h.inverse_frequency |
| 309 | | - have hadd := (h.coefficients.with_cutoff h.cutoff).principal_add_curl |
| 310 | | - (fun i => CurlClassBounds.class_component hf i) n hp |
| 311 | | - have hcut := LinearWaveBounds.principal_cutoff h.coefficients ψ 0 n hp |
| 312 | | - (((h.cutoff.smooth n).contDiffAt |
| 313 | | - ((HarmonicWaveInteraction.productStrip s).isOpen_domain.mem_nhds hp)).differentiableAt (by simp)) |
| 314 | | - have hzero : ψ n p • a.principal (HarmonicWaveInteraction.productStrip s) (directions c) n p = 0 := by |
| 315 | | - by_cases hψ : ψ n p = 0 |
| 316 | | - · rw [hψ, zero_smul] |
| 317 | | - · rw [h.principal_zero n p hp hψ, smul_zero] |
| 318 | | - simp only [Pi.zero_apply, add_zero, hzero, zero_add] at hcut |
| 319 | | - have he : (corrected s c a ψ).principal (HarmonicWaveInteraction.productStrip s) (directions c) n p + |
| 320 | | - (corrected s c a ψ).remainder (HarmonicWaveInteraction.productStrip s) (directions c) n p = |
| 321 | | - a.constructedGood (HarmonicWaveInteraction.productStrip s) (directions c) ψ n p + |
| 322 | | - LinearWaveBounds.excludedSlotError (directions c) ψ a.amplitude 0 n p := by |
| 323 | | - change ((a.withCutoff ψ).addAmplitude f).principal _ _ n p + _ = _ |
| 324 | | - rw [hadd, hcut] |
| 325 | | - change _ + a.principalVelocity (HarmonicWaveInteraction.productStrip s) (directions c) f n p + |
| 326 | | - ((a.withCutoff ψ).addAmplitude f).remainder _ _ n p = |
| 327 | | - (a.principalVelocity (HarmonicWaveInteraction.productStrip s) (directions c) f n p + |
| 328 | | - ((a.withCutoff ψ).addAmplitude f).remainder _ _ n p) + _ |
| 329 | | - abel |
| 330 | | - rw [LinearWaveBounds.harmonicResidual_eq h.corrected_bounds h.exact_conditions n hp] |
| 331 | | - ext i |
| 332 | | - have hei := congrFun he i |
| 333 | | - simp only [Pi.add_apply] at hei |
| 334 | | - change ((_ + _) * carrier (a.frequency n) (a.phase n) p) = _ |
| 335 | | - rw [hei, add_mul] |
| 336 | | - rfl |
| 337 | | - |
| 338 | 244 | end Inputs |
| 339 | 245 | |
| 340 | 246 | noncomputable def realProjection : ℂ →L[ℝ] ℂ := Complex.ofRealCLM.comp Complex.reCLM |
| @@ -349,23 +255,6 @@ theorem divergence_map {X : Type} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 349 | 255 | L (cylindricalDivergence R Vr Vθ Vz v x) := by |
| 350 | 256 | simp only [cylindricalDivergence, LinearWaveResidual.along_map L _ (hv _), map_add, map_smul] |
| 351 | 257 | |
| 352 | | -theorem linearResidual_realProjection {X : Type} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 353 | | - {U : Set X} (hU : IsOpen U) (ε : ℝ) (R : X → ℝ) {Vr Vθ Vz : X → X} |
| 354 | | - (Vt : X → X) (hVr : ContDiffOn ℝ ∞ Vr U) (hVθ : ContDiffOn ℝ ∞ Vθ U) |
| 355 | | - (hVz : ContDiffOn ℝ ∞ Vz U) {B : X → Fin 3 → ℝ} {v : X → ComplexVector} {p : X → ℂ} |
| 356 | | - (hv : ∀ i, ContDiffOn ℝ ∞ (fun y => v y i) U) {x : X} |
| 357 | | - (hB : ∀ i, DifferentiableAt ℝ (fun y => B y i) x) |
| 358 | | - (hp : DifferentiableAt ℝ p x) (hx : x ∈ U) (i : Fin 3) : |
| 359 | | - (LinearWaveResidual.linearResidual ε R Vr Vθ Vz Vt (LinearWaveResidual.realLift B) |
| 360 | | - (fun y j => realProjection (v y j)) (fun y => realProjection (p y)) x i).re = |
| 361 | | - (LinearWaveResidual.linearResidual ε R Vr Vθ Vz Vt (LinearWaveResidual.realLift B) v p x i).re := by |
| 362 | | - have h0 := LinearWaveResidual.realMap_linearResidual Complex.reCLM ε R Vt hU hVr hVθ hVz |
| 363 | | - hv hB hp hx |
| 364 | | - have h1 := LinearWaveResidual.realMap_linearResidual Complex.reCLM ε R Vt hU hVr hVθ hVz |
| 365 | | - (fun j => realProjection.contDiff.comp_contDiffOn (hv j)) hB |
| 366 | | - (realProjection.differentiableAt.comp x hp) hx |
| 367 | | - exact (congrFun h1 i).trans (by simpa using (congrFun h0 i).symm) |
| 368 | | - |
| 369 | 258 | theorem pair_field_of_invariant {X : Type} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 370 | 259 | {f : X × ℝ → ℂ} {Φ : X × ℝ → ℝ} (k : ℝ) (kp : ℤ) |
| 371 | 260 | (hf : Invariant ((0 : X), 1) f) |
| @@ -379,16 +268,6 @@ theorem pair_field_of_invariant {X : Type} [NormedAddCommGroup X] [NormedSpace |
| 379 | 268 | change ((f (p.1, 0) * carrier k Φ p).re : ℂ) = ((f p * carrier k Φ p).re : ℂ) |
| 380 | 269 | rw [invariant_eq_zeroSlice hf p.1 p.2] |
| 381 | 270 | |
| 382 | | -theorem excluded_invariant {a : LinearWaveBounds.WaveCoefficients (D × ℝ)} |
| 383 | | - {ψ : ℕ → D × ℝ → ℝ} (ha : AngularData a ψ) (c : CorrectionState.Context D) (n : ℕ) : |
| 384 | | - Invariant ((0 : D), 1) (LinearWaveBounds.excludedSlotError (directions c) ψ a.amplitude 0 n) := by |
| 385 | | - have hf : Invariant ((0 : D), 1) ((directions c).fastField n) := |
| 386 | | - Invariant.const ((directions c).fastScale n • (directions c).fast) |
| 387 | | - intro x t |
| 388 | | - simp only [LinearWaveBounds.excludedSlotError, LinearWaveBounds.GraphDirections.Dfast, |
| 389 | | - (ha.cutoff n).along hf x t, ha.cutoff n x t, ha.amplitude n x t, |
| 390 | | - Pi.zero_apply] |
| 391 | | - |
| 392 | 271 | namespace Inputs |
| 393 | 272 | |
| 394 | 273 | variable {s : StripData D} {P : ℕ → D → ℝ} {κ : ℝ} {c : CorrectionState.Context D} |
| @@ -397,68 +276,14 @@ variable {s : StripData D} {P : ℕ → D → ℝ} {κ : ℝ} {c : CorrectionSta |
| 397 | 276 | |
| 398 | 277 | include h |
| 399 | 278 | |
| 400 | | -theorem primary_field (n : ℕ) (p : D × ℝ) (i : Fin 3) : |
| 401 | | - field ((primaryBlock s c a ψ kp).velocity n i) (a.frequency n) |
| 402 | | - (fun x => a.phase n (x, 0)) (kp n) p = |
| 403 | | - realProjection (vectorMode (a.frequency n) (a.phase n) ((corrected s c a ψ).amplitude n) p i) := |
| 404 | | - pair_field_of_invariant _ _ ((h.angular.corrected_amplitude s c n).component i) (h.phase_split n) p |
| 405 | | - |
| 406 | | -theorem pressure_field (n : ℕ) (p : D × ℝ) : |
| 407 | | - field ((primaryBlock s c a ψ kp).pressure n) (a.frequency n) |
| 408 | | - (fun x => a.phase n (x, 0)) (kp n) p = |
| 409 | | - realProjection (mode (a.frequency n) (a.phase n) ((corrected s c a ψ).pressure n) p) := |
| 410 | | - pair_field_of_invariant _ _ (h.angular.corrected_pressure s c n) (h.phase_split n) p |
| 411 | | - |
| 412 | | -theorem good_field (n : ℕ) (p : D × ℝ) (i : Fin 3) : |
| 413 | | - field (goodCoefficients s c a ψ n i) (a.frequency n) |
| 414 | | - (fun x => a.phase n (x, 0)) (kp n) p = |
| 415 | | - realProjection (vectorMode (a.frequency n) (a.phase n) |
| 416 | | - (a.constructedGood (HarmonicWaveInteraction.productStrip s) (directions c) ψ n) p i) := |
| 417 | | - pair_field_of_invariant _ _ ((h.angular.constructedGood s c n).component i) (h.phase_split n) p |
| 418 | | - |
| 419 | | -theorem gaussian_field (n : ℕ) (p : D × ℝ) (i : Fin 3) : |
| 420 | | - field (gaussianCoefficients c a ψ n i) (a.frequency n) |
| 421 | | - (fun x => a.phase n (x, 0)) (kp n) p = |
| 422 | | - realProjection (vectorMode (a.frequency n) (a.phase n) |
| 423 | | - (LinearWaveBounds.excludedSlotError (directions c) ψ a.amplitude 0 n) p i) := |
| 424 | | - pair_field_of_invariant _ _ ((excluded_invariant h.angular c n).component i) (h.phase_split n) p |
| 425 | | - |
| 426 | | -theorem phase_slow_smooth (n : ℕ) : ContDiffOn ℝ ∞ (fun x => a.phase n (x, 0)) s.domain := |
| 427 | | - (h.phase_smooth n).comp (HarmonicWaveInteraction.inclusion (D := D)).contDiff.contDiffOn |
| 428 | | - (fun _ hx => hx) |
| 429 | | - |
| 430 | | -theorem primary_smooth (n : ℕ) (i : Fin 3) : |
| 431 | | - HarmonicResidual.SmoothCoefficients s.domain ((primaryBlock s c a ψ kp).velocity n i) := by |
| 432 | | - intro j |
| 433 | | - exact (SignedWaveUpdate.conjugatePair_class |
| 434 | | - (wave_slice (h.corrected_bounds.amplitude i)) j).smooth n |
| 435 | | - |
| 436 | 279 | theorem pressure_smooth (n : ℕ) : |
| 437 | 280 | HarmonicResidual.SmoothCoefficients s.domain ((primaryBlock s c a ψ kp).pressure n) := by |
| 438 | 281 | intro j |
| 439 | 282 | exact (SignedWaveUpdate.conjugatePair_class |
| 440 | 283 | (wave_slice h.corrected_bounds.pressure) j).smooth n |
| 441 | 284 | |
| 442 | | -theorem raw_velocity_smooth (n : ℕ) (i : Fin 3) : |
| 443 | | - ContDiffOn ℝ ∞ (fun p => vectorMode (a.frequency n) (a.phase n) |
| 444 | | - ((corrected s c a ψ).amplitude n) p i) (HarmonicWaveInteraction.productStrip s).domain := |
| 445 | | - contDiffOn_mode _ (h.phase_smooth n) ((h.corrected_bounds.amplitude i).smooth n) |
| 446 | | - |
| 447 | | -theorem raw_pressure_smooth (n : ℕ) : |
| 448 | | - ContDiffOn ℝ ∞ (mode (a.frequency n) (a.phase n) ((corrected s c a ψ).pressure n)) |
| 449 | | - (HarmonicWaveInteraction.productStrip s).domain := |
| 450 | | - contDiffOn_mode _ (h.phase_smooth n) (h.corrected_bounds.pressure.smooth n) |
| 451 | | - |
| 452 | 285 | end Inputs |
| 453 | 286 | |
| 454 | | -noncomputable def linearCoefficients (s : StripData D) (c : CorrectionState.Context D) |
| 455 | | - (a : LinearWaveBounds.WaveCoefficients (D × ℝ)) (ψ : ℕ → D × ℝ → ℝ) (kp : ℕ → ℤ) : |
| 456 | | - HarmonicResidual.BlockCoefficients D := fun n => |
| 457 | | - HarmonicResidual.linearResidual (HarmonicResidual.contextFrame c n) (a.frequency n) |
| 458 | | - (fun x => a.phase n (x, 0)) (kp n) (HarmonicResidual.constantVector (HarmonicResidual.contextBase c n)) |
| 459 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) |
| 460 | | - (HarmonicResidual.realCoefficients ((primaryBlock s c a ψ kp).pressure n)) |
| 461 | | - |
| 462 | 287 | namespace Inputs |
| 463 | 288 | |
| 464 | 289 | variable {s : StripData D} {P : ℕ → D → ℝ} {κ : ℝ} {c : CorrectionState.Context D} |
| @@ -467,262 +292,6 @@ variable {s : StripData D} {P : ℕ → D → ℝ} {κ : ℝ} {c : CorrectionSta |
| 467 | 292 | |
| 468 | 293 | include h |
| 469 | 294 | |
| 470 | | -theorem base_smooth (n : ℕ) (i : Fin 3) : |
| 471 | | - ContDiffOn ℝ ∞ (fun x => HarmonicResidual.contextBase c n x i) s.domain := by |
| 472 | | - have hs : ContDiffOn ℝ ∞ (fun p => LinearWaveResidual.complexBase |
| 473 | | - (a.radius n) (a.radialBase n) (a.frequencyBase n) (a.axialBase n) p i) |
| 474 | | - (HarmonicWaveInteraction.productStrip s).domain := by |
| 475 | | - apply Complex.ofRealCLM.contDiff.comp_contDiffOn |
| 476 | | - fin_cases i |
| 477 | | - · exact h.coefficients.radial_base.smooth n |
| 478 | | - · exact (h.coefficients.radius.smooth n).mul (h.coefficients.frequency_base.smooth n) |
| 479 | | - · exact h.coefficients.axial_base.smooth n |
| 480 | | - rw [h.matching.base n] at hs |
| 481 | | - exact hs.comp (HarmonicWaveInteraction.inclusion (D := D)).contDiff.contDiffOn (fun _ hx => hx) |
| 482 | | - |
| 483 | | -theorem radial_smooth (n : ℕ) : |
| 484 | | - ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).radial s.domain := |
| 485 | | - (HarmonicMeanInteraction.slowGeometry c h.operators h.radius_pos).radial_class.smooth n |
| 486 | | - |
| 487 | | -theorem axial_smooth (n : ℕ) : |
| 488 | | - ContDiffOn ℝ ∞ (HarmonicResidual.contextFrame c n).axial s.domain := |
| 489 | | - (HarmonicMeanInteraction.slowGeometry c h.operators h.radius_pos).axial_class.smooth n |
| 490 | | - |
| 491 | | -omit h in |
| 492 | | -theorem primary_amplitude_real (n : ℕ) : |
| 493 | | - HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n = |
| 494 | | - (primaryBlock s c a ψ kp).velocity n := by |
| 495 | | - funext i |
| 496 | | - exact HarmonicResidual.realCoefficients_eq_self |
| 497 | | - (ErrorHarmonics.conjugatePair_symmetric 1 (fun x => (corrected s c a ψ).amplitude n (x, 0) i)) |
| 498 | | - |
| 499 | | -omit h in |
| 500 | | -theorem primary_pressure_real (n : ℕ) : |
| 501 | | - HarmonicResidual.realCoefficients ((primaryBlock s c a ψ kp).pressure n) = |
| 502 | | - (primaryBlock s c a ψ kp).pressure n := |
| 503 | | - HarmonicResidual.realCoefficients_eq_self |
| 504 | | - (ErrorHarmonics.conjugatePair_symmetric 1 (fun x => (corrected s c a ψ).pressure n (x, 0))) |
| 505 | | - |
| 506 | | -theorem harmonicResidual_context (n : ℕ) : |
| 507 | | - (corrected s c a ψ).harmonicResidual (HarmonicWaveInteraction.productStrip s) (directions c) n = |
| 508 | | - LinearWaveResidual.linearResidual (c.operators.epsilon n) |
| 509 | | - (fun p => c.operators.radius p.1) |
| 510 | | - (HarmonicResidual.liftDirection (HarmonicResidual.contextFrame c n).radial) |
| 511 | | - HarmonicResidual.angularDirection |
| 512 | | - (HarmonicResidual.liftDirection (HarmonicResidual.contextFrame c n).axial) |
| 513 | | - (HarmonicResidual.liftDirection (HarmonicResidual.contextFrame c n).time) |
| 514 | | - (fun p => HarmonicResidual.contextBase c n p.1) |
| 515 | | - (vectorMode (a.frequency n) (a.phase n) ((corrected s c a ψ).amplitude n)) |
| 516 | | - (mode (a.frequency n) (a.phase n) ((corrected s c a ψ).pressure n)) := by |
| 517 | | - change LinearWaveResidual.linearResidual (s.epsilon n) (a.radius n) |
| 518 | | - ((directions c).radialField n) (fun _ => (directions c).angular) |
| 519 | | - ((directions c).axialField (HarmonicWaveInteraction.productStrip s) n) |
| 520 | | - (LinearWaveResidual.timeDirection (s.epsilon n) ((directions c).fastField n) (fun _ => (directions c).slow)) |
| 521 | | - (LinearWaveResidual.complexBase (a.radius n) (a.radialBase n) (a.frequencyBase n) (a.axialBase n)) |
| 522 | | - _ _ = _ |
| 523 | | - have ht := directions_time s c h.matching.epsilon n |
| 524 | | - change LinearWaveResidual.timeDirection (s.epsilon n) ((directions c).fastField n) |
| 525 | | - (fun _ => (directions c).slow) = _ at ht |
| 526 | | - rw [h.matching.base n, h.matching.radius, directions_radial, |
| 527 | | - directions_axial s c h.matching.epsilon, ht] |
| 528 | | - rw [h.matching.epsilon] |
| 529 | | - rfl |
| 530 | | - |
| 531 | | -theorem linear_field_re (n : ℕ) (p : D × ℝ) (hp : p.1 ∈ s.domain) (i : Fin 3) : |
| 532 | | - (field (linearCoefficients s c a ψ kp n i) (a.frequency n) |
| 533 | | - (fun x => a.phase n (x, 0)) (kp n) p).re = |
| 534 | | - ((corrected s c a ψ).harmonicResidual (HarmonicWaveInteraction.productStrip s) (directions c) n p i).re := by |
| 535 | | - have he := HarmonicResidual.field_linearResidual s.isOpen_domain |
| 536 | | - (HarmonicResidual.contextFrame c n) (h.radial_smooth n) (h.axial_smooth n) |
| 537 | | - (B := HarmonicResidual.constantVector (HarmonicResidual.contextBase c n)) |
| 538 | | - (fun j => HarmonicResidual.smoothCoefficients_constant (h.base_smooth n j)) |
| 539 | | - (h.primary_smooth n) (h.pressure_smooth n) (h.phase_slow_smooth n) |
| 540 | | - (a.frequency n) (kp n) (p := p) ⟨hp, trivial⟩ |
| 541 | | - have hv : HarmonicResidual.vectorField ((primaryBlock s c a ψ kp).velocity n) |
| 542 | | - (a.frequency n) (fun x => a.phase n (x, 0)) (kp n) = |
| 543 | | - fun y j => realProjection (vectorMode (a.frequency n) (a.phase n) |
| 544 | | - ((corrected s c a ψ).amplitude n) y j) := by |
| 545 | | - funext y j |
| 546 | | - exact h.primary_field n y j |
| 547 | | - have hpr : field ((primaryBlock s c a ψ kp).pressure n) |
| 548 | | - (a.frequency n) (fun x => a.phase n (x, 0)) (kp n) = |
| 549 | | - fun y => realProjection (mode (a.frequency n) (a.phase n) |
| 550 | | - ((corrected s c a ψ).pressure n) y) := by |
| 551 | | - funext y |
| 552 | | - exact h.pressure_field n y |
| 553 | | - have hbase : HarmonicResidual.vectorField |
| 554 | | - (HarmonicResidual.constantVector (HarmonicResidual.contextBase c n)) |
| 555 | | - (a.frequency n) (fun x => a.phase n (x, 0)) (kp n) = |
| 556 | | - LinearWaveResidual.realLift (fun y j => (HarmonicResidual.contextBase c n y.1 j).re) := by |
| 557 | | - funext y j |
| 558 | | - rw [HarmonicResidual.vectorField_constantVector] |
| 559 | | - fin_cases j <;> simp [HarmonicResidual.contextBase, LinearWaveResidual.realLift] |
| 560 | | - rw [hv, hpr, hbase] at he |
| 561 | | - have hd := linearResidual_realProjection |
| 562 | | - (HarmonicWaveInteraction.productStrip s).isOpen_domain (c.operators.epsilon n) |
| 563 | | - (fun y => c.operators.radius y.1) |
| 564 | | - (HarmonicResidual.liftDirection (HarmonicResidual.contextFrame c n).time) |
| 565 | | - (by simpa only [directions_radial] using (h.geometry n).radial_smooth) |
| 566 | | - (h.geometry n).angular_smooth |
| 567 | | - (by simpa only [directions_axial s c h.matching.epsilon] using (h.geometry n).axial_smooth) |
| 568 | | - (B := fun (y : D × ℝ) j => (HarmonicResidual.contextBase c n y.1 j).re) |
| 569 | | - (h.raw_velocity_smooth n) |
| 570 | | - (fun j => (((Complex.reCLM.contDiff.comp_contDiffOn |
| 571 | | - ((h.base_smooth n j).comp contDiffOn_fst (fun _ hx => hx))).contDiffAt |
| 572 | | - ((HarmonicWaveInteraction.productStrip s).isOpen_domain.mem_nhds hp)).differentiableAt (by simp))) |
| 573 | | - (((h.raw_pressure_smooth n).contDiffAt |
| 574 | | - ((HarmonicWaveInteraction.productStrip s).isOpen_domain.mem_nhds hp)).differentiableAt (by simp)) hp i |
| 575 | | - have hbase' : LinearWaveResidual.realLift (fun (y : D × ℝ) j => (HarmonicResidual.contextBase c n y.1 j).re) = |
| 576 | | - fun y => HarmonicResidual.contextBase c n y.1 := by |
| 577 | | - funext y j |
| 578 | | - fin_cases j <;> simp [HarmonicResidual.contextBase, LinearWaveResidual.realLift] |
| 579 | | - rw [hbase'] at he hd |
| 580 | | - rw [linearCoefficients, |
| 581 | | - primary_amplitude_real (s := s) (c := c) (a := a) (ψ := ψ) (kp := kp) n, |
| 582 | | - primary_pressure_real (s := s) (c := c) (a := a) (ψ := ψ) (kp := kp) n] |
| 583 | | - exact (congrArg Complex.re (congrFun he i)).trans (hd.trans (by |
| 584 | | - rw [h.harmonicResidual_context n] |
| 585 | | - rfl)) |
| 586 | | - |
| 587 | | -theorem linear_gaussian_coefficient (n : ℕ) (x : D) (hx : x ∈ s.domain) (i : Fin 3) (j : ℤ) : |
| 588 | | - HarmonicResidual.realCoefficients |
| 589 | | - (linearCoefficients s c a ψ kp n i - gaussianCoefficients c a ψ n i) j x = |
| 590 | | - goodCoefficients s c a ψ n i j x := by |
| 591 | | - apply HarmonicWaveInteraction.coefficient_eq_of_field_eq_at _ _ (a.frequency n) |
| 592 | | - (fun y => a.phase n (y, 0)) (h.angular_ne n) j x |
| 593 | | - intro θ |
| 594 | | - rw [HarmonicResidual.field_realCoefficients, HarmonicResidual.field_sub, Complex.sub_re, |
| 595 | | - h.linear_field_re n (x, θ) hx i, h.gaussian_field n (x, θ) i, |
| 596 | | - h.good_field n (x, θ) i, h.linear_identity n (x, θ) hx] |
| 597 | | - simp only [Pi.add_apply, Complex.add_re, realProjection_apply, Complex.ofReal_re, |
| 598 | | - add_sub_cancel_right] |
| 599 | | - |
| 600 | | -theorem full_primary_divergence (n : ℕ) (p : D × ℝ) (hp : p.1 ∈ s.domain) : |
| 601 | | - cylindricalDivergence (fun q => c.operators.radius q.1) |
| 602 | | - (HarmonicResidual.liftDirection (HarmonicResidual.contextFrame c n).radial) |
| 603 | | - HarmonicResidual.angularDirection |
| 604 | | - (HarmonicResidual.liftDirection (HarmonicResidual.contextFrame c n).axial) |
| 605 | | - (fun q i => ((primaryBlock s c a ψ kp).oscillation n q i : ℂ)) p = 0 := by |
| 606 | | - have he : (fun q i => ((primaryBlock s c a ψ kp).oscillation n q i : ℂ)) = |
| 607 | | - fun q i => realProjection (vectorMode (a.frequency n) (a.phase n) |
| 608 | | - ((corrected s c a ψ).amplitude n) q i) := by |
| 609 | | - funext q i |
| 610 | | - change ((field ((primaryBlock s c a ψ kp).velocity n i) (a.frequency n) |
| 611 | | - (fun x => a.phase n (x, 0)) (kp n) q).re : ℂ) = _ |
| 612 | | - rw [h.primary_field] |
| 613 | | - rfl |
| 614 | | - rw [he, divergence_map realProjection _ _ _ _ (fun i => |
| 615 | | - ((h.raw_velocity_smooth n i).contDiffAt |
| 616 | | - ((HarmonicWaveInteraction.productStrip s).isOpen_domain.mem_nhds hp)).differentiableAt (by simp))] |
| 617 | | - have hd := h.corrected_divergence n p hp |
| 618 | | - rw [h.matching.radius, directions_radial, directions_axial s c h.matching.epsilon] at hd |
| 619 | | - change cylindricalDivergence _ _ HarmonicResidual.angularDirection _ _ p = 0 at hd |
| 620 | | - rw [hd, map_zero] |
| 621 | | - |
| 622 | | -theorem primary_modeSolenoidal : |
| 623 | | - HarmonicWaveInteraction.ModeSolenoidal s c (primaryBlock s c a ψ kp) := |
| 624 | | - HarmonicWaveInteraction.modeSolenoidal_of_full c (primaryBlock s c a ψ kp) |
| 625 | | - h.phase_slow_smooth h.angular_ne h.primary_smooth h.full_primary_divergence |
| 626 | | - |
| 627 | | -omit h in |
| 628 | | -theorem primary_band : (primaryBlock s c a ψ kp).BandLimited 1 := |
| 629 | | - SignedWaveUpdate.coefficientBlock_band a.frequency (fun n x => a.phase n (x, 0)) kp |
| 630 | | - (fun n x => (corrected s c a ψ).amplitude n (x, 0)) |
| 631 | | - (fun n x => (corrected s c a ψ).pressure n (x, 0)) |
| 632 | | - |
| 633 | | -omit h in |
| 634 | | -theorem primary_zeroMode : HarmonicWaveInteraction.ZeroMode (primaryBlock s c a ψ kp) := |
| 635 | | - (SignedWaveUpdate.coefficientBlock_zero_coefficient a.frequency (fun n x => a.phase n (x, 0)) kp |
| 636 | | - (fun n x => (corrected s c a ψ).amplitude n (x, 0)) |
| 637 | | - (fun n x => (corrected s c a ψ).pressure n (x, 0))).1 |
| 638 | | - |
| 639 | | -theorem convection_class (j : ℤ) (i : Fin 3) : |
| 640 | | - WaveClass s P (1 - κ) (fun n x => |
| 641 | | - HarmonicResidual.transport (HarmonicResidual.contextFrame c n) |
| 642 | | - (a.frequency n) (fun y => a.phase n (y, 0)) (kp n) |
| 643 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) |
| 644 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) i j x) := by |
| 645 | | - have hc := HarmonicWaveInteraction.transport_wave_class c h.operators h.radius_pos |
| 646 | | - h.primary_bounds h.primary_bounds |
| 647 | | - (primary_zeroMode (s := s) (c := c) (a := a) (ψ := ψ) (kp := kp)) |
| 648 | | - (primary_zeroMode (s := s) (c := c) (a := a) (ψ := ψ) (kp := kp)) |
| 649 | | - (primary_band (s := s) (c := c) (a := a) (ψ := ψ) (kp := kp)) |
| 650 | | - h.phase_slow_smooth h.frequency_ne h.primary_modeSolenoidal h.profile_nonneg h.profile_le_one j i |
| 651 | | - convert! hc using 1 |
| 652 | | - ring |
| 653 | | - |
| 654 | | -theorem linear_good_class (j : ℤ) (i : Fin 3) : |
| 655 | | - WaveClass s P (1 - 3 * κ) (fun n x => HarmonicResidual.realCoefficients |
| 656 | | - (linearCoefficients s c a ψ kp n i - gaussianCoefficients c a ψ n i) j x) := by |
| 657 | | - apply LinearWaveBounds.class_congr (h.good_coefficients_class j i) |
| 658 | | - intro n x hx |
| 659 | | - exact (h.linear_gaussian_coefficient n x hx i j).symm |
| 660 | | - |
| 661 | | -/-- The actual extracted residual of the initial primary wave. The alias is |
| 662 | | -retained in the literal formula; its proved zero-mode property is used only |
| 663 | | -after the nonconstant coefficient is selected. -/ |
| 664 | | -theorem initial_residual_class (u : CorrectionState.State D) |
| 665 | | - (hmean : u.mean = ⟨0, 0, 0⟩) (A : HarmonicResidual.BlockCoefficients D) |
| 666 | | - (hA : ∀ n i j, j ≠ 0 → A n i j = 0) : |
| 667 | | - (HarmonicResidual.residualBlock c u (primaryBlock s c a ψ kp) |
| 668 | | - (gaussianCoefficients c a ψ) A).WaveBounds s P (7 / 10) := by |
| 669 | | - intro i j hj |
| 670 | | - have hl := (h.linear_good_class j i).mono_exponent (show (7 / 10 : ℝ) ≤ 1 - 3 * κ by linarith [h.loss_le]) |
| 671 | | - have hc (m : ℤ) := (h.convection_class m i).mono_exponent |
| 672 | | - (show (7 / 10 : ℝ) ≤ 1 - κ by linarith [h.loss_le]) |
| 673 | | - have hcr := HarmonicMeanInteraction.realCoefficient_class |
| 674 | | - (fun n => HarmonicResidual.transport (HarmonicResidual.contextFrame c n) |
| 675 | | - (a.frequency n) (fun y => a.phase n (y, 0)) (kp n) |
| 676 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) |
| 677 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) i) |
| 678 | | - j (hc j) (hc (-j)) |
| 679 | | - apply LinearWaveBounds.class_congr (hl.add hcr) |
| 680 | | - intro n x hx |
| 681 | | - have hz : HarmonicResidual.stateMean u n = 0 := by |
| 682 | | - funext y k |
| 683 | | - fin_cases k <;> simp [HarmonicResidual.stateMean, hmean] |
| 684 | | - change _ = HarmonicResidual.nonconstant |
| 685 | | - ((HarmonicResidual.ofBlock (primaryBlock s c a ψ kp) (gaussianCoefficients c a ψ) A n).residualCoefficients |
| 686 | | - (HarmonicResidual.contextFrame c n) (HarmonicResidual.contextBase c n) (HarmonicResidual.stateMean u n) i) j x |
| 687 | | - rw [HarmonicMeanInteraction.nonconstant_apply_of_ne _ hj, hz, HarmonicResidual.LabelData.residualCoefficients] |
| 688 | | - simp only [add_zero] |
| 689 | | - let L := linearCoefficients s c a ψ kp n i |
| 690 | | - let T := HarmonicResidual.transport (HarmonicResidual.contextFrame c n) |
| 691 | | - (a.frequency n) (fun y => a.phase n (y, 0)) (kp n) |
| 692 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) |
| 693 | | - (HarmonicMeanInteraction.blockAmplitude (primaryBlock s c a ψ kp) n) i |
| 694 | | - change HarmonicResidual.realCoefficients (L - gaussianCoefficients c a ψ n i) j x + |
| 695 | | - HarmonicResidual.realCoefficients T j x = |
| 696 | | - HarmonicResidual.realCoefficients (L + T - gaussianCoefficients c a ψ n i - A n i) j x |
| 697 | | - simp only [ |
| 698 | | - HarmonicResidual.realCoefficients_apply, HarmonicMeanInteraction.coeff_add, |
| 699 | | - HarmonicMeanInteraction.coeff_sub, hA n i j hj, hA n i (-j) (neg_ne_zero.mpr hj), |
| 700 | | - Pi.zero_apply, map_sub, map_add, sub_zero] |
| 701 | | - ring |
| 702 | | - |
| 703 | | -theorem initial_residual_class_of_zero_mode (u : CorrectionState.State D) |
| 704 | | - (hmean : u.mean = ⟨0, 0, 0⟩) (A : HarmonicResidual.BlockCoefficients D) |
| 705 | | - (hA : ∀ n i, HarmonicFields.BandLimited (A n i) 0) : |
| 706 | | - (HarmonicResidual.residualBlock c u (primaryBlock s c a ψ kp) |
| 707 | | - (gaussianCoefficients c a ψ) A).WaveBounds s P (7 / 10) := by |
| 708 | | - apply h.initial_residual_class u hmean A |
| 709 | | - intro n i j hj |
| 710 | | - rw [HarmonicResidual.band_zero_eq_constant (hA n i)] |
| 711 | | - simp [constantCoefficient, hj] |
| 712 | | - |
| 713 | | -omit h in |
| 714 | | -theorem initial_residual_band (u : CorrectionState.State D) |
| 715 | | - (A : HarmonicResidual.BlockCoefficients D) |
| 716 | | - (hA : ∀ n i, HarmonicFields.BandLimited (A n i) 0) : |
| 717 | | - (HarmonicResidual.residualBlock c u (primaryBlock s c a ψ kp) |
| 718 | | - (gaussianCoefficients c a ψ) A).BandLimited 2 := by |
| 719 | | - have hg : ∀ n i, HarmonicFields.BandLimited (gaussianCoefficients c a ψ n i) 1 := |
| 720 | | - fun n i => ErrorHarmonics.band_conjugatePair 1 _ |
| 721 | | - have ha : ∀ n i, HarmonicFields.BandLimited (A n i) 1 := fun n i => (hA n i).mono (by decide) |
| 722 | | - simpa using HarmonicResidual.residualBlock_band c u (primaryBlock s c a ψ kp) |
| 723 | | - (gaussianCoefficients c a ψ) A |
| 724 | | - (primary_band (s := s) (c := c) (a := a) (ψ := ψ) (kp := kp)) hg ha |
| 725 | | - |
| 726 | 295 | end Inputs |
| 727 | 296 | |
| 728 | 297 | end NavierStokes.PrimaryResidualClass |