import Euler.PacketForwardRadiusPolynomial import Euler.PacketInitializedParameterBounds import Euler.PacketForwardInitializedAllOrderBudget import Euler.PacketInitializedUniformBounds import Euler.PacketProfileEnvelope /-! The actual zero-history correction from the same fixed polynomial frequency comparison, together with its uniform weighted output bounds. -/ /-! ## From `Euler/PacketForwardCanonicalRadius.lean` The text of `Euler/PacketForwardCanonicalRadius.lean`, folded into this file, which was its only importer. -/ section /-! Named direct-forward budgets at the literal canonical source radius. -/ noncomputable section namespace EulerPacketTerminalDatum open EulerPacketCylinderField EulerPacketProfileRecursion EulerParameterWordGevrey EulerPacketForwardCommonRadius variable {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] {D : EulerTransversePacketProvider.Data U} {M : EulerMeanPacketProvider.Data} {Rm Tc : ℝ} {O : Operators} {C : CoefficientData period Tc O} (LM : EulerMeanPacketProvider.Budget M 6 Rm) (L : EulerTransversePacketForward.Budget D (Fin 4) 6) (NB : EulerTransversePacketJoin.NormalBudget D 6 L.R) (BC : CoefficientBudget C) (δ : ℝ) (ξ : U) abbrev forwardInitializedRadius : ℝ := EulerPacketForwardRadius.canonicalRadius L LM NB BC δ ξ theorem forward_le_initializedRadius : L.R ≤ forwardInitializedRadius LM L NB BC δ ξ := (commonRadius_bounds LM L NB BC (wordCost (Fin 4) 6 δ*‖ξ‖) (wordRadius (Fin 4) δ)).2.1 theorem mean_le_forwardInitializedRadius : Rm ≤ forwardInitializedRadius LM L NB BC δ ξ := (commonRadius_bounds LM L NB BC (wordCost (Fin 4) 6 δ*‖ξ‖) (wordRadius (Fin 4) δ)).1 def forwardInitializedLinearBudget : EulerTransversePacketForward.Budget D (Fin 4) 6 := L.enlargeRadius (forwardInitializedRadius LM L NB BC δ ξ) (forward_le_initializedRadius LM L NB BC δ ξ) def forwardInitializedNormalBudget : EulerTransversePacketJoin.NormalBudget D 6 (forwardInitializedRadius LM L NB BC δ ξ) := NB.enlargeRadius (forwardInitializedRadius LM L NB BC δ ξ) (forward_le_initializedRadius LM L NB BC δ ξ) def forwardInitializedMeanBudget : EulerMeanPacketProvider.Budget M 6 (forwardInitializedRadius LM L NB BC δ ξ) := LM.enlargeRadius (forwardInitializedRadius LM L NB BC δ ξ) (mean_le_forwardInitializedRadius LM L NB BC δ ξ) theorem forwardInitializedRadius_guards : EulerTransversePacketForward.Budget.GradeGuards (P := period) (forwardInitializedLinearBudget LM L NB BC δ ξ) (forwardInitializedNormalBudget LM L NB BC δ ξ) 1 ∧ EulerMeanPacketProvider.Budget.GradeGuards (forwardInitializedMeanBudget LM L NB BC δ ξ) ∧ EulerTransversePacketForward.Budget.GradeGuards (P := period) (forwardInitializedLinearBudget LM L NB BC δ ξ) (forwardInitializedNormalBudget LM L NB BC δ ξ) (wordCost (Fin 4) 6 δ*‖ξ‖) ∧ wordRadius (Fin 4) δ ≤ forwardInitializedRadius LM L NB BC δ ξ ∧ BC.termCost ≤ forwardInitializedRadius LM L NB BC δ ξ ∧ sobolevCoefficientRadius (Fin 4) BC.Rc ≤ forwardInitializedRadius LM L NB BC δ ξ := by obtain ⟨_,_,hm,hf,hp,hc,hr,ht⟩ := commonRadius_guards LM L NB BC (wordCost (Fin 4) 6 δ*‖ξ‖) (wordRadius (Fin 4) δ) (mul_nonneg (wordCost_nonneg 6 δ) (norm_nonneg ξ)) (forwardInitializedRadius LM L NB BC δ ξ) le_rfl exact ⟨hf,hm,hp,ht,hc,hr⟩ end EulerPacketTerminalDatum end end /-! ## From `Euler/PacketForwardUniformCosts.lean` The text of `Euler/PacketForwardUniformCosts.lean`, folded into this file, which was its only importer. -/ section /-! The direct-forward branch uses the identical fixed polynomial cost envelope as the positive-history branch. -/ noncomputable section namespace EulerPacketInitializedCost open EulerPacketTerminalDatum EulerPacketProfileRecursion EulerPacketCylinderField EulerPacketCorrectionCoefficients EulerPacketCorrectionConstants EulerPacketCorrectionScalar EulerPacketCoarseMajorant EulerPolynomialCost EulerPacketCorrectionPrimitive variable {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] {D : EulerTransversePacketProvider.Data U} {M : EulerMeanPacketProvider.Data} {Rm Tc : ℝ} {O : Operators} {C : CoefficientData period Tc O} (LM : EulerMeanPacketProvider.Budget M 6 Rm) (L : EulerTransversePacketForward.Budget D (Fin 4) 6) (NB : EulerTransversePacketJoin.NormalBudget D 6 L.R) (BC : CoefficientBudget C) (δ : ℝ) (ξ : U) theorem forward_actual_parameters (W H0 : ℝ) (hδ : 0 < δ) (H : EulerPacketForwardRadius.RadiusPrimitives L LM NB BC δ ξ W) (hH0 : H0 ≤ W) : 1 ≤ envelope W ∧ forwardInitializedRadius LM L NB BC δ ξ ≤ envelope W ∧ H0 ≤ envelope W ∧ BC.multiplierCost ≤ envelope W ∧ CorrectionBounds D period (L.correctionCoefficients NB period) (envelope W) := by obtain ⟨h1,hW,hR,hP⟩ := envelope_bounds W (zero_le_one.trans H.one) have hr := (EulerPacketForwardRadius.canonicalRadius_le_envelope L LM NB BC δ ξ W hδ H).trans hR have hc : BC.multiplierCost ≤ W := by have ht := BC.twice_multiplierCost_le have hn := BC.multiplierCost_nonneg linarith only [ht,hn,H.coefficient_cost] exact ⟨h1,hr,hH0.trans hW,hc.trans hW, (L.correctionCoefficients_primitive_bound NB period W H.one H.forward_radius H.normal_radius H.forward_frame H.forward_first H.normal_amplitude).mono D period hP⟩ theorem forward_five_costs_bound (W H0 : ℝ) (hδ : 0 < δ) (H : EulerPacketForwardRadius.RadiusPrimitives L LM NB BC δ ξ W) (hH0 : 0 ≤ H0) (hHW : H0 ≤ W) : let R := forwardInitializedRadius LM L NB BC δ ξ let Kc := L.correctionCoefficients NB period tailPolynomialConstant R H0 BC.termCost ≤ uniformConstant*W^uniformPower ∧ BC.multiplierCost ≤ uniformConstant*W^uniformPower ∧ 12*growth D period Kc R H0 BC.multiplierCost*D.T ≤ uniformConstant*W^uniformPower ∧ 8*growth D period Kc R H0 BC.multiplierCost*D.T*drift R H0 BC.multiplierCost/ initialRadius R Kc.M Kc.Rc ≤ uniformConstant*W^uniformPower ∧ 8*growth D period Kc R H0 BC.multiplierCost*D.T/ initialRadius R Kc.M Kc.Rc ≤ uniformConstant*W^uniformPower := by obtain ⟨he,hr,hh,hc,hK⟩ := forward_actual_parameters LM L NB BC δ ξ W H0 hδ H hHW have hR0 := zero_le_one.trans (forwardInitializedLinearBudget LM L NB BC δ ξ).radius_one have hEW := (envelope_bounds W (zero_le_one.trans H.one)).2.1 obtain ⟨h₁,h₂,h₃,h₄,h₅⟩ := EulerPacketFiveCost.five_costs_bound period D (L.correctionCoefficients NB period) (forwardInitializedRadius LM L NB BC δ ξ) H0 BC.multiplierCost BC.termCost (envelope W) he hR0 hH0 BC.multiplierCost_nonneg hr hh hc (H.coefficient_cost.trans hEW) hK.inverse hK.metric hK.first hK.time hK.base hK.pressure hK.linear hK.quadratic hK.radius (H.total_time.trans (H.one.trans hEW)) have h := envelope_bound W H.one exact ⟨h₁.trans h,h₂.trans h,h₃.trans h,h₄.trans h,h₅.trans h⟩ end EulerPacketInitializedCost end end noncomputable section namespace EulerPacketTerminalDatum open Set EulerSmoothLimit EulerSpatialCutoffs EulerTransversePacketProvider EulerPacketCylinderField EulerPacketProfileRecursion EulerPacketTimeProfile EulerPacketCorrectionConstants EulerPacketCorrectionScalar EulerPacketSourceFrequency EulerPacketCorrectionCoefficients open scoped ContDiff variable (M : EulerMeanPacketProvider.Data) {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] (D : Data U) (hTime : M.T=D.T) (δ : ℝ) (hδ : 0 < δ) (hδ1 : δ ≤ 1) (ξ : U) (hs : tsupport innerCutoff ⊆ D.support) (α : ℝ) (hα : 0 < α) (L : EulerTransversePacketForward.Budget D (Fin 4) 6) (NB : EulerTransversePacketJoin.NormalBudget D 6 L.R) {Rm : ℝ} (LM : EulerMeanPacketProvider.Budget M 6 Rm) (Cagree : SourceCoefficientAgreement M D) (W : ℝ) (hW : EulerPacketForwardRadius.RadiusPrimitives L LM NB (forwardCoefficientBudget period M D hTime NB) δ ξ W) (hprofile : ∀ t, α*L.g t ≤ W) (k : ℝ) (hk : 4 ≤ k) (hX : 64 ≤ expansion k) (hlog : 1 ≤ Real.log k) (hfrequency : EulerPacketInitializedCost.uniformConstant*W^EulerPacketInitializedCost.uniformPower ≤ smallPower k) (Ξ : Icc (0 : ℝ) D.T → Space → Space) (hΞ : ∀ t, ContDiff ℝ ∞ (Ξ t)) (hF : ∀ t x, fderiv ℝ (Ξ t) x=D.F.field t x) (hdet : ∀ t x, (EulerPacketPiola.operatorMatrix (D.F.field t x)).det=1) def forwardUniformBudget : EulerAllOrderDriftCorrection.Budget period D.T_pos (forwardInitializedCorrectionData M D hTime δ hδ ξ hs α Cagree (truncation k) (truncation_bounds k (by linarith)).1 k hk) := by let BC := forwardCoefficientBudget period M D hTime NB let L' := forwardInitializedLinearBudget LM L NB BC δ ξ let NB' := forwardInitializedNormalBudget LM L NB BC δ ξ let LM' := forwardInitializedMeanBudget LM L NB BC δ ξ have guards := forwardInitializedRadius_guards LM L NB BC δ ξ let S := Scales.ofTimeProfile L.g L.positive hTime.symm α hα have hH0 : S.H0 ≤ W := Scales.ofTimeProfile_H0_le L.g L.positive hTime.symm α hα W hW.one hprofile have hprofile' : timeProfileChange S.growth hTime=α • L'.g := by change timeProfileChange S.growth hTime=α • L.g exact Scales.ofTimeProfile_growth L.g L.positive hTime.symm α hα let Kc := L.correctionCoefficients NB period have costs := EulerPacketInitializedCost.forward_five_costs_bound LM L NB BC δ ξ W S.H0 hδ hW S.H0_pos.le hH0 exact forwardInitializedAllOrderBudget M D hTime δ hδ ξ hs α Cagree L' NB' guards.1 LM' guards.2.1 BC guards.2.2.2.2.2 guards.2.2.2.2.1 hδ1 hα guards.2.2.2.1 guards.2.2.1 S hprofile' Kc k hk hX hlog (costs.1.trans hfrequency) (costs.2.1.trans hfrequency) (costs.2.2.1.trans hfrequency) (costs.2.2.2.1.trans hfrequency) (costs.2.2.2.2.trans hfrequency) Ξ hΞ hF hdet open EulerPacketCorrectionOutput EulerSobolevGevreyOperators EulerAllOrderDriftCorrection local notation "Q" => forwardUniformBudget M D hTime δ hδ hδ1 ξ hs α hα L NB LM Cagree W hW hprofile k hk hX hlog hfrequency Ξ hΞ hF hdet theorem forwardUniformBudget_weighted (s N : ℕ) (hN : N+6 ≤ s) (t : Icc (0 : ℝ) D.T) : weightedNorm period 6 N ((Q).initialRadius/4) (((Q).fieldTower period).realization s t) ≤ EulerPacketInitializedCost.weightSize W*delta (expansion k) ∧ weightedNorm period 6 N ((Q).initialRadius/4) (((Q).pressureTower period).realization s t) ≤ EulerPacketInitializedCost.weightSize W*delta (expansion k) ∧ weightedNorm period 6 N ((Q).initialRadius/4) (((Q).timeDerivativeTower period).realization s t) ≤ EulerPacketInitializedCost.weightSize W*delta (expansion k) := by let BC := forwardCoefficientBudget period M D hTime NB let R := forwardInitializedRadius LM L NB BC δ ξ let S := Scales.ofTimeProfile L.g L.positive hTime.symm α hα let Kc := L.correctionCoefficients NB period have hH0 : S.H0 ≤ W := Scales.ofTimeProfile_H0_le L.g L.positive hTime.symm α hα W hW.one hprofile obtain ⟨_,hR,hH,hC,hK⟩ := EulerPacketInitializedCost.forward_actual_parameters LM L NB BC δ ξ W S.H0 hδ hW hH0 have hR0 : 0 ≤ R := zero_le_one.trans (forwardInitializedLinearBudget LM L NB BC δ ξ).radius_one obtain ⟨_,_,_,he,hp,ht⟩ := correction_output_bound period D Kc R S.H0 BC.multiplierCost (EulerPacketInitializedCost.envelope W) hR0 S.H0_pos.le BC.multiplierCost_nonneg hR hH hC hK.inverse hK.base hK.pressure hK.linear hK.quadratic hK.radius have hsize : (Q).correctionSize period=correctionBase D*delta (expansion k) := by change EulerGevreyMetricEstimate.metricAmplification D.inverseBound⁻¹*(delta (expansion k)/2)=_ unfold correctionBase ring have hpressure : (Q).pressureCost period (N+6) (by omega)= correctionPressureCost D period Kc R S.H0 BC.multiplierCost := by rfl have htime : (Q).timeDerivativeCost period (N+6) (by omega)= correctionTimeCost D period Kc R S.H0 BC.multiplierCost := by rfl have hqe := (Q).fieldTower_reducedNorm period s N hN t have hqp := (Q).pressureTower_reducedNorm_delta period (N+6) (by omega) N (by omega) s hN t have hqt := (Q).timeDerivativeTower_reducedNorm_delta period (N+6) (by omega) N (by omega) s hN t rw [hsize] at hqe rw [hpressure] at hqp rw [htime] at hqt exact ⟨hqe.trans (mul_le_mul_of_nonneg_right he (delta_pos _).le), hqp.trans (mul_le_mul_of_nonneg_right hp (delta_pos _).le), hqt.trans (mul_le_mul_of_nonneg_right ht (delta_pos _).le)⟩ end EulerPacketTerminalDatum