import Euler.PacketForwardInitializedCorrectionData import Euler.PacketForwardInitializedProfiles import Euler.PacketSourceProfiles import Euler.PacketProfileParity import Euler.TransversePacketPressureGradientProperties import Euler.PacketProfilesRegularity import Euler.PacketPrimaryParity import Euler.PacketTerminalAdmissible import Euler.PacketFieldParityAlgebra import Euler.PacketCorrectionCoefficientParity /-! The actual zero-history correction data have all the joint parities required by the drift-aware correction and pressure construction. -/ /-! ## From `Euler/PacketProfileStepParity.lean` The text of `Euler/PacketProfileStepParity.lean`, folded into this file, which was its only importer. -/ section /-! One actual mean/transverse solve preserves every joint profile symmetry. -/ noncomputable section namespace EulerPacketCylinderField.ProfileParity open Set EulerSmoothLimit EulerPacketPointJets EulerPacketProfileRecursion EulerLpCylinderTranslation EulerCylinderFieldReflection variable {P : ℝ} [Fact (0 < P)] (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : EulerTransversePacketProvider.Data U) (hT : M.T = D.T) (I : EulerTransversePacketProvider.InitialData P D) {O : Operators} (C : CoefficientData P M.T O) (hmean : O.meanSolve = EulerMeanPacketProvider.meanSolve M) (hhigh : O.highSolve = EulerTransversePacketProvider.highSolve P D I) (hcorrector : O.curlCorrector = D.curlCorrector P) (E : CoefficientEven M.T O) (eM : EulerMeanPacketProvider.EvenData M) (hSym : ∀ x, -x ∈ D.support ↔ x ∈ D.support) (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hDM : ∀ t x, D.M.field t (-x) = D.M.field t x) (hI : reflection P (I.value : CylinderL2 P U) = -(I.value : CylinderL2 P U)) {p : ℕ} {a : ℕ → Profile} include hT I C hmean hhigh hcorrector E eM hSym hF hDM hI in theorem step (hp : 2 ≤ p) (G : ∀ i, i < p → ProfileRegularity P M.T M.T_pos.le D.support (a i)) (H : ∀ i, i < p → ProfileParity M.T (a i)) : ProfileParity M.T (EulerPacketProfileRecursion.step O p a) := by let F := ProfileRegularity.prefixFields G let W := G (p-1) (by omega) have Hpre := prefixOdd H let hm : Nonempty (EulerMeanPacketProvider.Forcing M (EulerPacketProfileRecursion.meanForce O p a)) := ⟨F.meanForcing M C (by omega) W.correctorDerivative W.corrector_time W.pressure⟩ let hh : Nonempty (EulerTransversePacketProvider.Forcing P D (EulerPacketProfileRecursion.highForce O p a)) := ⟨F.highForcing M D hT C hp W.correctorDerivative W.corrector_time W.pressure hmean (ProfileRegularity.prefixLocality G) W.pressure_zero⟩ let GH := Classical.choice hh have hmOdd := F.meanForce_odd Hpre C E (by omega) M.T_pos W.correctorDerivative W.corrector_time W.pressure (H (p-1) (by omega)).pressure have hm0 (t : Icc (0 : ℝ) M.T) (x : Space) : EulerPacketProfileRecursion.meanForce O p a (t,(-x,0)) = -EulerPacketProfileRecursion.meanForce O p a (t,(x,0)) := by simpa only [neg_zero] using hmOdd t x 0 have hhOdd : JointOdd D.T (EulerPacketProfileRecursion.highForce O p a) := (F.actualHighForce_odd M Hpre C E eM hp W.correctorDerivative W.corrector_time W.pressure (H (p-1) (by omega)).pressure hmean).changeTime hT refine { high := ?_, mean := ?_, corrector := ?_, pressure := ?_, highPressure := ?_, meanPressure := ?_ } · intro t x θ let td : Icc (0 : ℝ) D.T := ⟨t,by rw [← hT]; exact t.property⟩ change (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).1 (t,(-x,-θ)) = -(O.highSolve (EulerPacketProfileRecursion.highForce O p a)).1 (t,(x,θ)) rw [hhigh,EulerTransversePacketProvider.highSolve_of_admissible D I _ hh] exact GH.vector_odd I hSym hF hDM hhOdd hI td x θ · intro t x θ change (O.meanSolve (EulerPacketProfileRecursion.meanForce O p a)).1 (t,(-x,-θ)) = -(O.meanSolve (EulerPacketProfileRecursion.meanForce O p a)).1 (t,(x,θ)) rw [hmean] exact EulerMeanPacketProvider.meanSolve_odd M eM _ hm hm0 t x θ · intro t x θ let td : Icc (0 : ℝ) D.T := ⟨t,by rw [← hT]; exact t.property⟩ change O.curlCorrector (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).1 (t,(-x,-θ)) = -O.curlCorrector (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).1 (t,(x,θ)) rw [hcorrector,hhigh,EulerTransversePacketProvider.highSolve_of_admissible D I _ hh, GH.curlCorrector_eq I td (-x) (-θ),GH.curlCorrector_eq I td x θ] exact GH.corrector_odd_of_data I hSym hF hDM hhOdd hI td x θ · intro t x θ let td : Icc (0 : ℝ) D.T := ⟨t,by rw [← hT]; exact t.property⟩ change pressureGradient (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).2 (t,(-x,-θ)) = -pressureGradient (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).2 (t,(x,θ)) rw [hhigh,EulerTransversePacketProvider.highSolve_of_admissible D I _ hh] exact GH.scalarGradient_odd I hSym hF hDM hhOdd hI td x θ · intro t x θ let td : Icc (0 : ℝ) D.T := ⟨t,by rw [← hT]; exact t.property⟩ change (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).2 (t,(-x,-θ)) = (O.highSolve (EulerPacketProfileRecursion.highForce O p a)).2 (t,(x,θ)) rw [hhigh,EulerTransversePacketProvider.highSolve_of_admissible D I _ hh] exact GH.scalar_even I hSym hF hDM hhOdd hI td x θ · intro t x θ change (O.meanSolve (EulerPacketProfileRecursion.meanForce O p a)).2 (t,(-x,-θ)) = (O.meanSolve (EulerPacketProfileRecursion.meanForce O p a)).2 (t,(x,θ)) rw [hmean] exact EulerMeanPacketProvider.meanSolve_even M eM _ hm hm0 t x θ end EulerPacketCylinderField.ProfileParity end end /-! ## From `Euler/PacketProfilesParity.lean` The text of `Euler/PacketProfilesParity.lean`, folded into this file, which was its only importer. -/ section /-! Every profile in the literal recursively generated family has the source parity. -/ noncomputable section namespace EulerPacketCylinderField open Set EulerSmoothLimit EulerPacketPointJets EulerPacketProfileRecursion EulerLpCylinderTranslation EulerCylinderFieldReflection variable {P : ℝ} [Fact (0 < P)] (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : EulerTransversePacketProvider.Data U) (hT : M.T = D.T) (I : EulerTransversePacketProvider.InitialData P D) {O : Operators} (C : CoefficientData P M.T O) (hmean : O.meanSolve = EulerMeanPacketProvider.meanSolve M) (hhigh : O.highSolve = EulerTransversePacketProvider.highSolve P D I) (hcorrector : O.curlCorrector = D.curlCorrector P) (E : CoefficientEven M.T O) (eM : EulerMeanPacketProvider.EvenData M) (hSym : ∀ x, -x ∈ D.support ↔ x ∈ D.support) (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hDM : ∀ t x, D.M.field t (-x) = D.M.field t x) (hI : reflection P (I.value : CylinderL2 P U) = -(I.value : CylinderL2 P U)) (primary : Profile) (hprimary : ProfileRegularity P M.T M.T_pos.le D.support primary) (hprimaryParity : ProfileParity M.T primary) include hT I C hmean hhigh hcorrector E eM hSym hF hDM hI hprimary hprimaryParity in theorem profiles_parity (p : ℕ) : ProfileParity M.T (profiles O primary p) := by induction p using Nat.strong_induction_on with | h p ih => by_cases hp0 : p = 0 · subst p rw [profiles_zero] exact ProfileParity.zero M.T by_cases hp1 : p = 1 · subst p rw [profiles_one] exact hprimaryParity have hp : 2 ≤ p := by omega let G : ∀ i, i < p → ProfileRegularity P M.T M.T_pos.le D.support (profiles O primary i) := fun i _ => profileWitness M D hT I C hmean hhigh hcorrector primary hprimary i rw [profiles_step O primary p hp] exact ProfileParity.step M D hT I C hmean hhigh hcorrector E eM hSym hF hDM hI hp G ih end EulerPacketCylinderField end end /-! ## From `Euler/PacketSourceParity.lean` The text of `Euler/PacketSourceParity.lean`, folded into this file, which was its only importer. -/ section /-! Joint parity of every profile generated by the literal source operators. -/ noncomputable section namespace EulerPacketCylinderField open Set EulerSmoothLimit EulerPacketProfileRecursion EulerLpCylinderTranslation EulerCylinderFieldReflection variable (P : ℝ) [Fact (0 < P)] (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : EulerTransversePacketProvider.Data U) (I Iprimary : EulerTransversePacketProvider.InitialData P D) theorem sourceCoefficientEven (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hM : ∀ t x, D.M.field t (-x) = D.M.field t x) : CoefficientEven M.T (sourceOperators P M D I) where inverse t x _ := D.inverse_even hF (D.clamp t) x strain t x _ := hM (D.clamp t) x normal t x _ := D.normal_even hF (D.clamp t) x theorem sourceProfiles_parity (hT : M.T = D.T) (eM : EulerMeanPacketProvider.EvenData M) (hSym : ∀ x, -x ∈ D.support ↔ x ∈ D.support) (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hDM : ∀ t x, D.M.field t (-x) = D.M.field t x) (hI : reflection P (I.value : CylinderL2 P U) = -(I.value : CylinderL2 P U)) (hIprimary : reflection P (Iprimary.value : CylinderL2 P U) = -(Iprimary.value : CylinderL2 P U)) (p : ℕ) : ProfileParity M.T (sourceProfiles P M D I Iprimary p) := profiles_parity M D hT I (sourceCoefficientData P M D I hT) rfl rfl rfl (sourceCoefficientEven P M D I hF hDM) eM hSym hF hDM hI (homogeneousPrimary D Iprimary (sourceOperators P M D I)) ((homogeneousPrimaryRegularity D Iprimary (sourceOperators P M D I) rfl).changeTime hT.symm M.T_pos.le) ((homogeneousPrimaryParity D Iprimary (sourceOperators P M D I) rfl hSym hF hDM hIprimary).changeTime hT.symm) p end EulerPacketCylinderField end end /-! ## From `Euler/PacketForwardInitializedProfilesParity.lean` The text of `Euler/PacketForwardInitializedProfilesParity.lean`, folded into this file, which was its only importer. -/ section /-! Reflection parity of every zero-history profile, derived from the literal terminal wave and the prescribed coefficient symmetries. -/ noncomputable section namespace EulerPacketTerminalDatum open Set EulerSmoothLimit EulerSpatialCutoffs EulerTransversePacketProvider EulerPacketCylinderField EulerPacketProfileRecursion EulerCylinderFieldReflection EulerLpCylinderTranslation variable (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : Data U) (hTime : M.T = D.T) (δ : ℝ) (hδ : 0 < δ) (ξ : U) (hs : tsupport innerCutoff ⊆ D.support) (α : ℝ) include hTime in theorem forwardInitializedProfiles_parity (eM : EulerMeanPacketProvider.EvenData M) (hSym : ∀ x, -x ∈ D.support ↔ x ∈ D.support) (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hDM : ∀ t x, D.M.field t (-x) = D.M.field t x) (p : ℕ) : ProfileParity M.T (forwardInitializedProfiles M D δ hδ ξ hs α p) := by apply sourceProfiles_parity period M D (InitialData.zero period D) (initialData D δ hδ (α • ξ) hs) hTime eM hSym hF hDM · change reflection period (0 : CylinderL2 period U) = -0 simp only [map_zero,neg_zero] · exact terminal_reflection δ hδ (α • ξ) end EulerPacketTerminalDatum end end /-! ## From `Euler/PacketForwardInitializedFieldParity.lean` The text of `Euler/PacketForwardInitializedFieldParity.lean`, folded into this file, which was its only importer. -/ section /-! The literal zero-history initialized packet and its exact residual tail are odd as actual cylinder L² paths, before and after coordinate normalization. -/ noncomputable section namespace EulerPacketTerminalDatum open Set EulerSmoothLimit EulerSpatialCutoffs EulerTransversePacketProvider EulerPacketCylinderField EulerPacketProfileRecursion EulerPacketPointJets EulerCylinderFieldReflection variable (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : Data U) (hTime : M.T = D.T) (δ : ℝ) (hδ : 0 < δ) (ξ : U) (hs : tsupport innerCutoff ⊆ D.support) (α : ℝ) (eM : EulerMeanPacketProvider.EvenData M) (hSym : ∀ x, -x ∈ D.support ↔ x ∈ D.support) (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hDM : ∀ t x, D.M.field t (-x) = D.M.field t x) include hTime eM hSym hF hDM theorem forwardInitializedVelocity_odd (N : ℕ) (κ : ℝ) : JointOdd M.T (fieldSum (N+1) κ (assembledVelocity N (forwardInitializedProfiles M D δ hδ ξ hs α))) := ProfileParity.velocity_odd (fun i _ => forwardInitializedProfiles_parity M D hTime δ hδ ξ hs α eM hSym hF hDM i) κ theorem forwardInitializedPacketField_odd (N : ℕ) (κ : ℝ) : (forwardInitializedPacketField M D hTime δ hδ ξ hs α N κ).ReflectionOdd := by apply Field.reflectionOdd_of_raw exact (forwardInitializedVelocity_odd M D hTime δ hδ ξ hs α eM hSym hF hDM N κ).matrix_apply _ (sourceCoefficientEven period M D (InitialData.zero period D) hF hDM).inverse theorem forwardInitializedNormalizedField_odd (N : ℕ) (k : ℝ) : (forwardInitializedNormalizedField M D hTime δ hδ ξ hs α N k).ReflectionOdd := ((forwardInitializedPacketField_odd M D hTime δ hδ ξ hs α eM hSym hF hDM N k⁻¹).smul k).changeTime hTime theorem forwardInitializedResidualField_odd (Cagree : SourceCoefficientAgreement M D) (N : ℕ) (hN : 1 ≤ N) (κ : ℝ) (hκ : κ ≠ 0) : (forwardInitializedResidualField M D hTime δ hδ ξ hs α Cagree N hN κ hκ).ReflectionOdd := by let a := forwardInitializedProfiles M D δ hδ ξ hs α let G := fun (i : ℕ) (_ : i ≤ N) => forwardInitializedProfileWitness M D hTime δ hδ ξ hs α i have H : ∀ i, i ≤ N → ProfileParity M.T (a i) := fun i _ => forwardInitializedProfiles_parity M D hTime δ hδ ξ hs α eM hSym hF hDM i have ha : a 0 = 0 := profiles_zero _ _ have htail := ProfileRegularity.residualTail_odd M.T_pos G H (sourceCoefficientData period M D (InitialData.zero period D) hTime) (sourceCoefficientEven period M D (InitialData.zero period D) hF hDM) ha κ intro t exact (ProfileRegularity.tailSumField M.T_pos G (sourceCoefficientData period M D (InitialData.zero period D) hTime) ha κ).reflection_neg_of_raw_odd t (htail t) theorem forwardInitializedNormalizedResidualField_odd (Cagree : SourceCoefficientAgreement M D) (N : ℕ) (hN : 1 ≤ N) (k : ℝ) (hk : 4 ≤ k) : (forwardInitializedNormalizedResidualField M D hTime δ hδ ξ hs α Cagree N hN k hk).ReflectionOdd := by have h := forwardInitializedResidualField_odd M D hTime δ hδ ξ hs α eM hSym hF hDM Cagree N hN k⁻¹ (inv_ne_zero (by linarith)) exact ((h.multiply (sourceCoefficientData period M D (InitialData.zero period D) hTime).inverse (sourceCoefficientEven period M D (InitialData.zero period D) hF hDM).inverse).smul k).changeTime hTime end EulerPacketTerminalDatum end end noncomputable section namespace EulerPacketTerminalDatum open Set EulerSmoothLimit EulerSpatialCutoffs EulerTransversePacketProvider EulerPacketCylinderField EulerPacketProfileRecursion EulerPacketCorrectionCoefficients EulerCylinderFieldReflection variable (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : Data U) (hTime : M.T = D.T) (δ : ℝ) (hδ : 0 < δ) (ξ : U) (hs : tsupport innerCutoff ⊆ D.support) (α : ℝ) theorem forwardInitializedCorrectionParityData (eM : EulerMeanPacketProvider.EvenData M) (hSym : ∀ x, -x ∈ D.support ↔ x ∈ D.support) (hF : ∀ t x, D.F.field t (-x) = D.F.field t x) (hDM : ∀ t x, D.M.field t (-x) = D.M.field t x) (Cagree : SourceCoefficientAgreement M D) (N : ℕ) (hN : 1 ≤ N) (k : ℝ) (hk : 4 ≤ k) : EulerCorrectionAssembly.ParityData period (forwardInitializedCorrectionData M D hTime δ hδ ξ hs α Cagree N hN k hk) := by refine { metric := metricTower_even D hF period linear := linearTower_even D hF hDM period quadratic := quadraticTower_odd D hF period k⁻¹ approximation := ?_ residual := ?_ } · intro t change -reflection period ((forwardInitializedNormalizedField M D hTime δ hδ ξ hs α N k).path t) = _ rw [forwardInitializedNormalizedField_odd M D hTime δ hδ ξ hs α eM hSym hF hDM N k t,neg_neg] rfl · intro t change -reflection period ((forwardInitializedNormalizedResidualField M D hTime δ hδ ξ hs α Cagree N hN k hk).path t) = _ rw [forwardInitializedNormalizedResidualField_odd M D hTime δ hδ ξ hs α eM hSym hF hDM Cagree N hN k hk t,neg_neg] rfl end EulerPacketTerminalDatum