import Euler.CoefficientCostMonotone import Euler.PacketInitializedRadius import Euler.PacketParentTransverseCosts /-! Polynomial formulas for the fixed-order inverse and for a common source-radius envelope. No target radius, forcing amplitude or grade occurs in the primitive envelope. -/ /-! ## From `Euler/PacketInitializedCanonicalRadius.lean` The text of `Euler/PacketInitializedCanonicalRadius.lean`, folded into this file, which was its only importer. -/ section /-! The literal common radius of the initialized packet, with named budgets that retain it. Quantitative bounds must concern this radius, rather than an arbitrary witness of a radius-existence theorem. -/ noncomputable section namespace EulerPacketTerminalDatum open EulerPacketCylinderField EulerPacketProfileRecursion EulerParameterWordGevrey variable {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] {D : EulerTransversePacketProvider.Data U} {τ : ℝ} {hτ : 0 < τ} {hτT : τ < D.T} {B : EulerTransversePacketProvider.HistoryData (D.initial τ hτ hτT.le)} {M : EulerMeanPacketProvider.Data} {Rm Tc : ℝ} {O : Operators} {C : CoefficientData period Tc O} (LM : EulerMeanPacketProvider.Budget M 6 Rm) (L : EulerTransversePacketJoin.Budget D τ hτ hτT B (Fin 4) 6) (NB : EulerTransversePacketJoin.NormalBudget D 6 L.R) (BC : CoefficientBudget C) (δ : ℝ) (ξ : U) abbrev primaryRadiusBudget := EulerTransversePacketPrimary.enlargeForPrimary L (wordRadius (Fin 4) δ) abbrev primaryRadiusNormal := NB.enlargeRadius (primaryRadiusBudget L δ).R (EulerTransversePacketPrimary.le_requiredRadius L _) abbrev primaryRadiusPrimary := EulerTransversePacketPrimary.requiredBudget L (wordRadius (Fin 4) δ) def initializedRadius : ℝ := max (EulerPacketCommonRadius.commonRadius LM (primaryRadiusBudget L δ) (primaryRadiusNormal L NB δ) BC) ((primaryRadiusPrimary L δ).gradeRadius (P := period) (primaryRadiusNormal L NB δ) (wordCost (Fin 4) 6 δ*‖ξ‖)) include NB BC ξ in theorem primary_le_initializedRadius : (primaryRadiusBudget L δ).R ≤ initializedRadius LM L NB BC δ ξ := (EulerPacketCommonRadius.commonRadius_bounds LM (primaryRadiusBudget L δ) (primaryRadiusNormal L NB δ) BC).2.1.trans (le_max_left _ _) include L NB BC δ ξ in theorem mean_le_initializedRadius : Rm ≤ initializedRadius LM L NB BC δ ξ := (EulerPacketCommonRadius.commonRadius_bounds LM (primaryRadiusBudget L δ) (primaryRadiusNormal L NB δ) BC).1.trans (le_max_left _ _) def initializedJoinedBudget : EulerTransversePacketJoin.Budget D τ hτ hτT B (Fin 4) 6 := (primaryRadiusBudget L δ).enlargeRadius (initializedRadius LM L NB BC δ ξ) (primary_le_initializedRadius LM L NB BC δ ξ) theorem initializedPrimaryBudget : EulerTransversePacketPrimary.Budget (initializedJoinedBudget LM L NB BC δ ξ) := (primaryRadiusPrimary L δ).enlargeRadius (initializedRadius LM L NB BC δ ξ) (primary_le_initializedRadius LM L NB BC δ ξ) def initializedNormalBudget : EulerTransversePacketJoin.NormalBudget D 6 (initializedRadius LM L NB BC δ ξ) := (primaryRadiusNormal L NB δ).enlargeRadius (initializedRadius LM L NB BC δ ξ) (primary_le_initializedRadius LM L NB BC δ ξ) def initializedMeanBudget : EulerMeanPacketProvider.Budget M 6 (initializedRadius LM L NB BC δ ξ) := LM.enlargeRadius (initializedRadius LM L NB BC δ ξ) (mean_le_initializedRadius LM L NB BC δ ξ) @[simp] theorem initializedJoinedBudget_radius : (initializedJoinedBudget LM L NB BC δ ξ).R=initializedRadius LM L NB BC δ ξ := rfl @[simp] theorem initializedJoinedBudget_profile : (initializedJoinedBudget LM L NB BC δ ξ).fullProfile=L.fullProfile := rfl /-- All the actual constructed budgets use the named canonical radius. The profile and every coefficient cost are unchanged by enlargement. -/ theorem initializedRadius_guards : EulerTransversePacketJoin.Budget.GradeGuards (P := period) (initializedJoinedBudget LM L NB BC δ ξ) (initializedNormalBudget LM L NB BC δ ξ) ∧ EulerMeanPacketProvider.Budget.GradeGuards (initializedMeanBudget LM L NB BC δ ξ) ∧ EulerTransversePacketPrimary.Budget.GradeGuards (P := period) (initializedPrimaryBudget LM L NB BC δ ξ) (initializedNormalBudget LM L NB BC δ ξ) (wordCost (Fin 4) 6 δ*‖ξ‖) ∧ wordRadius (Fin 4) δ ≤ initializedRadius LM L NB BC δ ξ ∧ BC.termCost ≤ initializedRadius LM L NB BC δ ξ ∧ sobolevCoefficientRadius (Fin 4) BC.Rc ≤ initializedRadius LM L NB BC δ ξ := by have hc := EulerPacketCommonRadius.commonRadius_guards LM (primaryRadiusBudget L δ) (primaryRadiusNormal L NB δ) BC (initializedRadius LM L NB BC δ ξ) (le_max_left _ _) have hp := (primaryRadiusPrimary L δ).gradeRadius_guards (primaryRadiusNormal L NB δ) (wordCost (Fin 4) 6 δ*‖ξ‖) (mul_nonneg (wordCost_nonneg 6 δ) (norm_nonneg ξ)) (initializedRadius LM L NB BC δ ξ) (le_max_right _ _) obtain ⟨hm,hl,wm,wl,hcost,hrc⟩ := hc obtain ⟨hl',wp⟩ := hp exact ⟨wl,wm,wp,(EulerTransversePacketPrimary.extra_le_requiredRadius L _).trans (primary_le_initializedRadius LM L NB BC δ ξ),hcost,hrc⟩ end EulerPacketTerminalDatum end end noncomputable section namespace EulerParameterWordGevrey def inversePolynomial (I B : Polynomial ℝ) : ℕ → Polynomial ℝ | 0 => I | n+1 => I+inversePolynomial I B n+2^n*B*(inversePolynomial I B n)^2 theorem inversePolynomial_eval (I B : Polynomial ℝ) (n : ℕ) (x : ℝ) : (inversePolynomial I B n).eval x=sobolevInverseCost (I.eval x) (B.eval x) n := by induction n with | zero => rfl | succ n ih => simp only [inversePolynomial,sobolevInverseCost,Polynomial.eval_add, Polynomial.eval_mul,Polynomial.eval_pow,Polynomial.eval_ofNat,ih] def inverseBlockPolynomial (q : ℕ) (I R C D : Polynomial ℝ) : Polynomial ℝ := 1+inversePolynomial I (coefficientPolynomial q R C) q*(coefficientPolynomial q R C+D) theorem inverseBlockPolynomial_eval (q : ℕ) (I R C D : Polynomial ℝ) (x : ℝ) : (inverseBlockPolynomial q I R C D).eval x= inverseBlockCost (Fin 4) q (I.eval x) (R.eval x) (C.eval x) (D.eval x) := by simp only [inverseBlockPolynomial,Polynomial.eval_add,Polynomial.eval_mul,Polynomial.eval_one, inversePolynomial_eval,coefficientPolynomial_eval,inverseBlockCost] theorem inverseBlockCost_mono_all {ι : Type*} [Fintype ι] (q : ℕ) {I R C D I' R' C' D' : ℝ} (hI : 0 ≤ I) (hR : 0 ≤ R) (hC : 0 ≤ C) (hD : 0 ≤ D) (hi : I ≤ I') (hr : R ≤ R') (hc : C ≤ C') (hd : D ≤ D') : inverseBlockCost ι q I R C D ≤ inverseBlockCost ι q I' R' C' D' := by have hB := sobolevCoefficientAmplitude_nonneg (ι := ι) q R C hR hC have hb := sobolevCoefficientAmplitude_mono_all (ι := ι) q hR hC hr hc have hS := sobolevInverseCost_mono hI hB hi hb q have hS' := sobolevInverseCost_nonneg I' (sobolevCoefficientAmplitude ι q R' C') (hI.trans hi) (hB.trans hb) q unfold inverseBlockCost exact add_le_add le_rfl (mul_le_mul hS (add_le_add hb hd) (add_nonneg hB hD) hS') theorem inverseBlockCost_one_le {ι : Type*} [Fintype ι] (q : ℕ) {I R C D : ℝ} (hI : 0 ≤ I) (hR : 0 ≤ R) (hC : 0 ≤ C) (hD : 0 ≤ D) : 1 ≤ inverseBlockCost ι q I R C D := by have hb := sobolevCoefficientAmplitude_nonneg (ι := ι) q R C hR hC have hs := sobolevInverseCost_nonneg I (sobolevCoefficientAmplitude ι q R C) hI hb q unfold inverseBlockCost exact le_add_of_nonneg_right (mul_nonneg hs (add_nonneg hb hD)) end EulerParameterWordGevrey namespace EulerPacketRadiusPolynomial open EulerParameterWordGevrey EulerPacketTerminalDatum EulerGevreyCutoff EulerPolynomialCost abbrev coeff (R C : ℝ) : ℝ := sobolevCoefficientAmplitude (Fin 4) 6 R C abbrev coeffPoly (R C : Polynomial ℝ) : Polynomial ℝ := coefficientPolynomial 6 R C def inverseEnvelope (W : ℝ) : ℝ := 2*(1+2*W^5+2*W^2)^2 def formEnvelope (W : ℝ) : ℝ := 36*W^2*(1+W) def endpointEnvelope (W : ℝ) : ℝ := 6*coeff W W*W def weakEnvelope (W : ℝ) : ℝ := inverseBlockCost (Fin 4) 6 (inverseEnvelope W) W (formEnvelope W) (3*coeff W (2*W)*endpointEnvelope W) def strongEnvelope (W : ℝ) : ℝ := inverseBlockCost (Fin 4) 6 W W (3*W^2) (3*coeff W W*(endpointEnvelope W+6*coeff W W*(2*W+2))) def forwardEnvelope (W : ℝ) : ℝ := let b := coeff (4*W) (1+36*W^4) 1+sobolevInverseCost 1 b 6*(b+W*(2*W+2)) def jetEnvelope (W : ℝ) : ℝ := 64+40*W^2 def requiredEnvelope (W : ℝ) : ℝ := W+16*jetEnvelope W+2*(weakEnvelope W+strongEnvelope W)*(16*W+1)+ 2*forwardEnvelope W*(64*W+1) def physicalEnvelope (W : ℝ) : ℝ := let a := coeff (4*W) W 3*a+3*a*(3*coeff (4*W) (18*W^3)+3*coeff (4*W) (3*W^2)) def commonEnvelope (W : ℝ) : ℝ := 6*coeff W W*(2*W+2)+6*coeff W W+physicalEnvelope W def normalEnvelope (W : ℝ) : ℝ := coeff (5*W+1) (1+W+6*W^2+729*W^6) def pressureEnvelope (W : ℝ) : ℝ := 3*coeff (4*W) (3*W^2)*(1+6*coeff (4*W) W*commonEnvelope W) def gradeEnvelope (W : ℝ) : ℝ := commonEnvelope W+135*(normalEnvelope W)^2*(period*commonEnvelope W)+ 3*period*pressureEnvelope W def meanEnvelope (W : ℝ) : ℝ := let a := coeff W W 3*a*(W+2)+3*(a*(W+2)+a)+3*a*(W+3*a+6*a*(W+2)) def terminalEnvelope (W : ℝ) : ℝ := coeff (jetEnvelope W) (300*(9/rawBump 0)^3*W^2*terminalMass)*W def radiusEnvelope (W : ℝ) : ℝ := 18*W+2*requiredEnvelope W+meanEnvelope W+gradeEnvelope W*(1+terminalEnvelope W) def radiusPolynomial : Polynomial ℝ := let X : Polynomial ℝ := Polynomial.X let a := coeffPoly X X let endpoint := 6*a*X let weak := inverseBlockPolynomial 6 (2*(1+2*X^5+2*X^2)^2) X (36*X^2*(1+X)) (3*coeffPoly X (2*X)*endpoint) let strong := inverseBlockPolynomial 6 X X (3*X^2) (3*a*(endpoint+6*a*(2*X+2))) let b := coeffPoly (4*X) (1+36*X^4) let forward := 1+inversePolynomial 1 b 6*(b+X*(2*X+2)) let jet := 64+40*X^2 let required := X+16*jet+2*(weak+strong)*(16*X+1)+2*forward*(64*X+1) let a4 := coeffPoly (4*X) X let physical := 3*a4+3*a4*(3*coeffPoly (4*X) (18*X^3)+3*coeffPoly (4*X) (3*X^2)) let common := 6*a*(2*X+2)+6*a+physical let normal := coeffPoly (5*X+1) (1+X+6*X^2+729*X^6) let pressure := 3*coeffPoly (4*X) (3*X^2)*(1+6*a4*common) let grade := common+135*normal^2*(Polynomial.C period*common)+3*Polynomial.C period*pressure let mean := 3*a*(X+2)+3*(a*(X+2)+a)+3*a*(X+3*a+6*a*(X+2)) let terminal := coeffPoly jet (Polynomial.C (300*(9/rawBump 0)^3*terminalMass)*X^2)*X 18*X+2*required+mean+grade*(1+terminal) theorem radiusPolynomial_eval (W : ℝ) : radiusPolynomial.eval W=radiusEnvelope W := by simp only [radiusPolynomial,radiusEnvelope,requiredEnvelope,weakEnvelope,strongEnvelope, formEnvelope,endpointEnvelope,forwardEnvelope,jetEnvelope,meanEnvelope, gradeEnvelope,commonEnvelope,physicalEnvelope,normalEnvelope,pressureEnvelope,terminalEnvelope, coeffPoly,Polynomial.eval_add,Polynomial.eval_mul,Polynomial.eval_pow,Polynomial.eval_ofNat, Polynomial.eval_one,Polynomial.eval_X,Polynomial.eval_C,inversePolynomial_eval, inverseBlockPolynomial_eval,coefficientPolynomial_eval,coeff] congr 3 ring_nf end EulerPacketRadiusPolynomial