import Euler.MeanTimeTranslation import Euler.LpSmoothField import Euler.IsometricActionDerivativeBound import Euler.OrdinarySmoothingOperator import Euler.OrdinaryHelmholtzField import Euler.OrdinaryRegularizedFlow import Euler.OrdinaryH3Commutator import Euler.OrdinaryRegularizedEnergy /-! The true smooth regularized Euler flows are Cauchy in continuous L² on the common energy-controlled interval. -/ /-! ## From `Euler/OrdinaryMollifier.lean` The text of `Euler/OrdinaryMollifier.lean`, folded into this file, which was its only importer. -/ section /-! Symmetric compact smooth approximate identities on ordinary spatial L². -/ noncomputable section namespace EulerOrdinaryMollifier open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerMeanSolenoidal EulerNoncompactTransport EulerLpTranslation.SmoothL2Field open scoped ContDiff Topology Convolution def bump (n : ℕ) : ContDiffBump (0 : Space) where rIn := cutoffScale n rOut := 2*cutoffScale n rIn_pos := cutoffScale_pos n rIn_lt_rOut := by have h := cutoffScale_pos n; linarith def kernel (n : ℕ) : Space → ℝ := (bump n).normed volume theorem kernel_smooth (n : ℕ) : ContDiff ℝ ∞ (kernel n) := (bump n).contDiff_normed theorem kernel_compact (n : ℕ) : HasCompactSupport (kernel n) := (bump n).hasCompactSupport_normed theorem kernel_nonneg (n : ℕ) (x : Space) : 0 ≤ kernel n x := (bump n).nonneg_normed x theorem kernel_integral (n : ℕ) : ∫ x, kernel n x = 1 := (bump n).integral_normed theorem kernel_integrable (n : ℕ) : Integrable (kernel n) := (bump n).integrable_normed theorem kernel_neg (n : ℕ) (x : Space) : kernel n (-x)=kernel n x := (bump n).normed_neg x def smoothOrbit (n : ℕ) (u : L2) : Space → L2 := convolution (kernel n) (fun a => translation a u) (ContinuousLinearMap.lsmul ℝ ℝ) volume def mollify (n : ℕ) (u : L2) : L2 := smoothOrbit n u 0 theorem smoothOrbit_contDiff (n : ℕ) (u : L2) : ContDiff ℝ ∞ (smoothOrbit n u) := (kernel_compact n).contDiff_convolution_left (ContinuousLinearMap.lsmul ℝ ℝ) (kernel_smooth n) (EulerMeanTimeTranslation.translation_continuous u).locallyIntegrable theorem mollify_eq_integral (n : ℕ) (u : L2) : mollify n u=∫ y : Space, kernel n y • translation (-y) u := by simp only [mollify,smoothOrbit,convolution_def,ContinuousLinearMap.lsmul_apply,zero_sub] theorem kernel_orbit_integrable (n : ℕ) (u : L2) : Integrable (fun y : Space => kernel n y • translation (-y) u) := ((kernel_smooth n).continuous.smul ((EulerMeanTimeTranslation.translation_continuous u).comp continuous_neg)).integrable_of_hasCompactSupport (kernel_compact n).smul_right theorem mollify_norm_le (n : ℕ) (u : L2) : ‖mollify n u‖ ≤ ‖u‖ := by rw [mollify_eq_integral] have h := norm_integral_le_of_norm_le ((kernel_integrable n).mul_const ‖u‖) (f := fun y : Space => kernel n y • translation (-y) u) ?_ · simpa only [integral_mul_const,kernel_integral,one_mul] using h exact Eventually.of_forall (fun y => by rw [norm_smul,LinearIsometry.norm_map,Real.norm_eq_abs,abs_of_nonneg (kernel_nonneg n y)]) theorem mollify_add (n : ℕ) (u v : L2) : mollify n (u+v)=mollify n u+mollify n v := by simp only [mollify_eq_integral,map_add,smul_add] exact integral_add (kernel_orbit_integrable n u) (kernel_orbit_integrable n v) theorem mollify_smul (n : ℕ) (c : ℝ) (u : L2) : mollify n (c • u)=c • mollify n u := by simp only [mollify_eq_integral,map_smul] simp_rw [smul_comm (kernel n _) c] exact integral_smul c _ def mollifierLinear (n : ℕ) : L2 →ₗ[ℝ] L2 where toFun := mollify n map_add' := mollify_add n map_smul' := mollify_smul n def mollifier (n : ℕ) : L2 →L[ℝ] L2 := (mollifierLinear n).mkContinuous 1 (fun u => by change ‖mollify n u‖ ≤ 1*‖u‖ simpa only [one_mul] using mollify_norm_le n u) @[simp] theorem mollifier_apply (n : ℕ) (u : L2) : mollifier n u=mollify n u := rfl theorem mollify_translation (n : ℕ) (a : Space) (u : L2) : translation a (mollify n u)=mollify n (translation a u) := by rw [mollify_eq_integral,mollify_eq_integral] change (translation a).toContinuousLinearMap (∫ y : Space, kernel n y • translation (-y) u)=_ rw [← (translation a).toContinuousLinearMap.integral_comp_comm (kernel_orbit_integrable n u)] apply integral_congr_ae exact Eventually.of_forall (fun y => by simp only [map_smul,LinearIsometry.coe_toContinuousLinearMap] rw [translation_add,translation_add,add_comm a]) theorem smoothOrbit_eq (n : ℕ) (u : L2) (x : Space) : smoothOrbit n u x=translation x (mollify n u) := by rw [mollify_eq_integral] change _=(translation x).toContinuousLinearMap (∫ y : Space, kernel n y • translation (-y) u) rw [← (translation x).toContinuousLinearMap.integral_comp_comm (kernel_orbit_integrable n u)] simp only [smoothOrbit,convolution_def,ContinuousLinearMap.lsmul_apply] apply integral_congr_ae exact Eventually.of_forall (fun y => by simp only [map_smul,LinearIsometry.coe_toContinuousLinearMap,translation_add,sub_eq_add_neg]) theorem mollify_smooth (n : ℕ) (u : L2) : ContDiff ℝ ∞ (fun a => translation a (mollify n u)) := by convert smoothOrbit_contDiff n u using 1 exact funext (fun a => (smoothOrbit_eq n u a).symm) theorem translation_inner_shift (a : Space) (u v : L2) : ⟪translation a u,v⟫_ℝ=⟪u,translation (-a) v⟫_ℝ := by calc _=⟪translation a u,translation a (translation (-a) v)⟫_ℝ := by rw [translation_add,add_neg_cancel,translation_zero] _=_ := (translation a).inner_map_map _ _ theorem mollify_symmetric (n : ℕ) (u v : L2) : ⟪mollify n u,v⟫_ℝ=⟪u,mollify n v⟫_ℝ := by rw [mollify_eq_integral,mollify_eq_integral] rw [real_inner_comm v _,← integral_inner (kernel_orbit_integrable n u) v, ← integral_inner (kernel_orbit_integrable n v) u] rw [← integral_neg_eq_self (fun y : Space => ⟪v,kernel n y • translation (-y) u⟫_ℝ)] apply integral_congr_ae exact Eventually.of_forall (fun y => by dsimp only rw [kernel_neg,neg_neg,real_inner_smul_right,real_inner_smul_right, real_inner_comm _ v,translation_inner_shift]) theorem translation_increment (A : EulerLpTranslation.SmoothL2Field Space) (a : Space) : ‖translation a A.toLp-A.toLp‖ ≤ ‖A.derivative.toLp‖*‖a‖ := by have h := A.translation_hasFDerivAt 0 simp only [EulerLpTranslation.translation_zero] at h exact (EulerIsometricAction.norm_sub_le_of_hasFDerivAt translation translation_add translation_zero A.toLp _ h a).trans (mul_le_mul_of_nonneg_right (EulerLpDerivative.derivativeMap_norm_le _ _) (norm_nonneg _)) theorem mollify_error (n : ℕ) (A : EulerLpTranslation.SmoothL2Field Space) : ‖mollify n A.toLp-A.toLp‖ ≤ (2*cutoffScale n)*‖A.derivative.toLp‖ := by have he : mollify n A.toLp-A.toLp= ∫ y : Space, kernel n y • (translation (-y) A.toLp-A.toLp) := by simp only [smul_sub,integral_sub (kernel_orbit_integrable n A.toLp) ((kernel_integrable n).smul_const A.toLp),integral_smul_const,kernel_integral, one_smul,mollify_eq_integral] rw [he] have h := norm_integral_le_of_norm_le ((kernel_integrable n).mul_const ((2*cutoffScale n)*‖A.derivative.toLp‖)) (f := fun y : Space => kernel n y • (translation (-y) A.toLp-A.toLp)) ?_ · simpa only [integral_mul_const,kernel_integral,one_mul] using h apply Eventually.of_forall intro y rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (kernel_nonneg n y)] by_cases hy : kernel n y=0 · simp only [hy,zero_mul,le_refl] apply mul_le_mul_of_nonneg_left _ (kernel_nonneg n y) apply (translation_increment A (-y)).trans rw [norm_neg,mul_comm (2*cutoffScale n)] apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) have hs : y ∈ Function.support ((bump n).normed volume) := hy rw [(bump n).support_normed_eq,Metric.mem_ball,dist_zero_right] at hs exact hs.le end EulerOrdinaryMollifier end end /-! ## From `Euler/OrdinaryRegularizer.lean` The text of `Euler/OrdinaryRegularizer.lean`, folded into this file, which was its only importer. -/ section /-! Actual symmetric, solenoidal smoothing operators. They converge to Helmholtz projection, with an explicit H¹ approximation error. -/ noncomputable section namespace EulerOrdinarySobolev open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSolenoidal EulerMeanSmoothRepresentative EulerOrdinaryMollifier open scoped ContDiff Topology theorem projection_inner (u v : L2) : ⟪solenoidalProjection u,v⟫_ℝ=⟪u,solenoidalProjection v⟫_ℝ := solenoidalSpace.inner_starProjection_left_eq_right u v theorem projection_idempotent (u : L2) : solenoidalProjection (solenoidalProjection u)=solenoidalProjection u := solenoidalSpace.starProjection_eq_self_iff.mpr (solenoidalProjection_mem u) def regularizerMap (n : ℕ) : L2 →L[ℝ] L2 := solenoidalProjection.comp ((mollifier n).comp solenoidalProjection) @[simp] theorem regularizerMap_apply (n : ℕ) (u : L2) : regularizerMap n u=solenoidalProjection (mollify n (solenoidalProjection u)) := rfl theorem regularizerMap_translation (n : ℕ) (a : Space) (u : L2) : EulerMeanSolenoidal.translation a (regularizerMap n u)= regularizerMap n (EulerMeanSolenoidal.translation a u) := by simp only [regularizerMap_apply,solenoidalProjection_translation,mollify_translation] theorem regularizerMap_smooth (n : ℕ) (u : L2) : SmoothOrbit (regularizerMap n u) := by have h := solenoidalProjection.contDiff.comp (mollify_smooth n (solenoidalProjection u)) simpa only [Function.comp_def,← solenoidalProjection_translation,← regularizerMap_apply] using h theorem regularizerMap_symmetric (n : ℕ) (u v : L2) : ⟪regularizerMap n u,v⟫_ℝ=⟪u,regularizerMap n v⟫_ℝ := by simp only [regularizerMap_apply,projection_inner,mollify_symmetric] theorem regularizerMap_contract (n : ℕ) (u : L2) : ‖regularizerMap n u‖ ≤ ‖u‖ := (solenoidalProjection_apply_norm_le _).trans ((mollify_norm_le n _).trans (solenoidalProjection_apply_norm_le u)) def regularizer (n : ℕ) : SmoothingOperator where op := regularizerMap n smooth := regularizerMap_smooth n translation := regularizerMap_translation n symmetric := regularizerMap_symmetric n contraction := regularizerMap_contract n solenoidal _u := solenoidalProjection_mem _ theorem regularizer_error (n : ℕ) (A : SmoothL2Field Space) : ‖(regularizer n).op A.toLp-solenoidalProjection A.toLp‖ ≤ (2*EulerNoncompactTransport.cutoffScale n)*‖(solenoidalField A).derivative.toLp‖ := by change ‖solenoidalProjection (mollify n (solenoidalProjection A.toLp))- solenoidalProjection A.toLp‖ ≤ _ have he : solenoidalProjection (mollify n (solenoidalProjection A.toLp))- solenoidalProjection A.toLp=solenoidalProjection (mollify n (solenoidalProjection A.toLp)-solenoidalProjection A.toLp) := by rw [map_sub,projection_idempotent] rw [he] apply (solenoidalProjection_apply_norm_le _).trans simpa only [solenoidalField_toLp] using mollify_error n (solenoidalField A) theorem solenoidalField_wordBound (A : SmoothL2Field Space) (q : ℕ) (M : ℝ) (hM : WordBound q M A) : WordBound q M (solenoidalField A) := by intro k hk w rw [solenoidalField_word] exact (solenoidalProjection_apply_norm_le _).trans (hM k hk w) def regularizerError (n : ℕ) : ℝ := 6*EulerNoncompactTransport.cutoffScale n theorem regularizerError_nonneg (n : ℕ) : 0 ≤ regularizerError n := mul_nonneg (by norm_num) (EulerNoncompactTransport.cutoffScale_pos n).le theorem regularizerError_tendsto : Tendsto regularizerError atTop (𝓝 (0 : ℝ)) := by change Tendsto (fun n => 6*EulerNoncompactTransport.cutoffScale n) atTop (𝓝 (0 : ℝ)) simpa only [regularizerError,mul_zero] using EulerNoncompactTransport.cutoffScale_tendsto.const_mul 6 theorem regularizer_error_wordBound (n : ℕ) (A : SmoothL2Field Space) (M : ℝ) (hM : WordBound 1 M A) : ‖(regularizer n).op A.toLp-solenoidalProjection A.toLp‖ ≤ regularizerError n*M := by apply (regularizer_error n A).trans have hb := wordBound_jet_norm (solenoidalField_wordBound A 1 M hM) (le_refl 1) rw [← (solenoidalField A).derivative.norm_jetLp_zero,(solenoidalField A).norm_derivative_jetLp] exact (mul_le_mul_of_nonneg_left hb (mul_nonneg (by norm_num) (EulerNoncompactTransport.cutoffScale_pos n).le)).trans_eq (by simp only [regularizerError,pow_one] ring) end EulerOrdinarySobolev end end /-! ## From `Euler/OrdinaryRegularizationError.lean` The text of `Euler/OrdinaryRegularizationError.lean`, folded into this file, which was its only importer. -/ section /-! The actual regularized Euler right-hand side converges to the projected Euler right-hand side, uniformly on bounded H⁴ sets. -/ noncomputable section namespace EulerOrdinarySobolev open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSolenoidal EulerSmoothSobolev Finset open scoped ContDiff Topology theorem regularizer_error_words (n : ℕ) (A : SmoothL2Field Space) (hA : A.toLp ∈ solenoidalSpace) (q : ℕ) (M : ℝ) (hM : WordBound (q+1) M A) : WordBound q (regularizerError n*M) (fieldSub ((regularizer n).field A.toLp) A) := by intro k hk w simp only [fieldSub,wordField_add,wordField_neg,toLp_addField,toLp_fieldNeg, SmoothingOperator.field_word,← sub_eq_add_neg] have hp : solenoidalProjection (wordField A w).toLp=(wordField A w).toLp := solenoidalSpace.starProjection_eq_self_iff.mpr (word_solenoidal A hA w) have h := regularizer_error_wordBound n (wordField A w) M (wordBound_wordField (wordBound_mono hM (by omega : k+1 ≤ q+1)) w) simpa only [hp] using h theorem wordBound_gradient {A : SmoothL2Field Space} {M : ℝ} (hM : WordBound 3 M A) (x : Space) : ‖fderiv ℝ A.field x‖ ≤ (360*smoothEmbeddingConstant)*M := by have h := real_smooth_fderiv_le_H3 3 A.field A.smooth (fun j _ => A.integrable j) x rw [← tensorNorm_eq] at h exact (h.trans (mul_le_mul_of_nonneg_left (tensorNorm_three_le A M hM) (mul_nonneg (by norm_num) smoothEmbeddingConstant_nonneg))).trans_eq (by ring) theorem advection_low_words (A : SmoothL2Field Space) (M : ℝ) (hM : WordBound 4 M A) : WordBound 1 (6*h3ProductConstant*M^2) (advectionField A A) := by intro k hk w apply (source_advection_outer A A M M (wordBound_mono hM (by omega)) hM (by omega) w).trans have hcoef : 3*(2 : ℝ)^k ≤ 6 := by interval_cases k <;> norm_num exact (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hcoef h3ProductConstant_nonneg) (wordBound_nonneg hM)) (wordBound_nonneg hM)).trans_eq (by ring) def regularizationCost (M : ℝ) : ℝ := (6*h3ProductConstant+399*smoothEmbeddingConstant)*M^2 theorem regularizationCost_nonneg (M : ℝ) : 0 ≤ regularizationCost M := by have := h3ProductConstant_nonneg have := smoothEmbeddingConstant_nonneg unfold regularizationCost positivity theorem regularized_rhs_error (n : ℕ) (A : SmoothL2Field Space) (hA : A.toLp ∈ solenoidalSpace) (M : ℝ) (hM : WordBound 4 M A) : ‖((regularizer n).rhs A.toLp).toLp-(projectedRhs A).toLp‖ ≤ regularizerError n*regularizationCost M := by let S := regularizer n let B := S.field A.toLp have hB : WordBound 4 M B := S.field_wordBound A 4 M hM have he := regularizer_error_words n A hA 1 M (wordBound_mono hM (by omega)) have he0 : ‖B.toLp-A.toLp‖ ≤ regularizerError n*M := by simpa only [toLp_fieldSub] using wordBound_toLp he have he1 : ‖B.jetLp 1-A.jetLp 1‖ ≤ 3*(regularizerError n*M) := by simpa only [jetLp_fieldSub,pow_one] using wordBound_jet_norm he (le_refl 1) have hadv : ‖(advectionField B B).toLp-(advectionField A A).toLp‖ ≤ ((360*smoothEmbeddingConstant)*M)*(regularizerError n*M)+ ((13*smoothEmbeddingConstant)*M)*(3*(regularizerError n*M)) := by apply (advection_sub_norm B A _ _ (wordBound_gradient (wordBound_mono hB (by omega))) (wordBound_pointwise (wordBound_mono hM (by omega)))).trans exact add_le_add (mul_le_mul_of_nonneg_left he0 (mul_nonneg (mul_nonneg (by norm_num) smoothEmbeddingConstant_nonneg) (wordBound_nonneg hM))) (mul_le_mul_of_nonneg_left he1 (mul_nonneg (mul_nonneg (by norm_num) smoothEmbeddingConstant_nonneg) (wordBound_nonneg hM))) have hp := regularizer_error_wordBound n (advectionField B B) _ (advection_low_words B M hB) have hq : ‖solenoidalProjection (advectionField B B).toLp- solenoidalProjection (advectionField A A).toLp‖ ≤ ‖(advectionField B B).toLp-(advectionField A A).toLp‖ := by rw [← map_sub] exact solenoidalProjection_apply_norm_le _ have heq : ((regularizer n).rhs A.toLp).toLp-(projectedRhs A).toLp= -(S.op (advectionField B B).toLp-solenoidalProjection (advectionField A A).toLp) := by simp only [SmoothingOperator.rhs_toLp,SmoothingOperator.quadratic_apply,projectedRhs_toLp,S,B] abel rw [heq,norm_neg] apply (norm_sub_le_norm_sub_add_norm_sub (S.op (advectionField B B).toLp) (solenoidalProjection (advectionField B B).toLp) (solenoidalProjection (advectionField A A).toLp)).trans exact (add_le_add hp (hq.trans hadv)).trans_eq (by unfold regularizationCost; ring) end EulerOrdinarySobolev end end /-! ## From `Euler/OrdinaryPerturbedEnergy.lean` The text of `Euler/OrdinaryPerturbedEnergy.lean`, folded into this file, which was its only importer. -/ section /-! Actual L² stability of projected Euler with a small additive defect. The reference gradient is the only solution coefficient. -/ noncomputable section namespace EulerOrdinarySobolev open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSolenoidal EulerMeanClassical EulerVolterraConvolution Finset open scoped ContDiff Topology theorem projected_difference_energy (A B : SmoothL2Field Space) (hA : A.toLp ∈ solenoidalSpace) (hB : B.toLp ∈ solenoidalSpace) (K : ℝ) (hK : ∀ x, ‖fderiv ℝ A.field x‖ ≤ K) : 2*⟪B.toLp-A.toLp,(projectedRhs B).toLp-(projectedRhs A).toLp⟫_ℝ ≤ 2*K*‖B.toLp-A.toLp‖^2 := by let W := fieldSub B A let P := fieldSub (pressureField B) (pressureField A) have he : fieldSub (projectedRhs B) (projectedRhs A)=differenceRhs A W P := by apply field_ext funext x have hw : W.field=B.field-A.field := funext (fieldSub_field B A) simp only [fieldSub_field,projectedRhs_field,differenceRhs_field,hw,P] rw [fderiv_sub (B.smooth.differentiable (by simp) x) (A.smooth.differentiable (by simp) x)] simp only [Pi.sub_apply,sub_apply,map_sub] abel_nf have hd : ∀ x, divergence (addField A W).field x=0 := by have hw : (addField A W).field=B.field := by funext x simp only [addField_field,W,fieldSub_field] abel rw [hw] exact solenoidal_representative_divergence _ hB _ B.smooth B.toLp_ae have hs : W.toLp ∈ solenoidalSpace := by rw [toLp_fieldSub] exact solenoidalSpace.sub_mem hB hA have hp : P.toLp ∈ gradientSpace := by rw [toLp_fieldSub] exact gradientSpace.sub_mem (pressureField_mem_gradient B) (pressureField_mem_gradient A) have h := differenceRhs_l2_bound A W P K hK hd hs hp rw [← he] at h simpa only [toLp_fieldSub,W] using h theorem perturbed_difference_energy (A B : SmoothL2Field Space) (hA : A.toLp ∈ solenoidalSpace) (hB : B.toLp ∈ solenoidalSpace) (RA RB : L2) (K ea eb : ℝ) (hK : ∀ x, ‖fderiv ℝ A.field x‖ ≤ K) (ha : ‖RA-(projectedRhs A).toLp‖ ≤ ea) (hb : ‖RB-(projectedRhs B).toLp‖ ≤ eb) : 2*⟪B.toLp-A.toLp,RB-RA⟫_ℝ ≤ (2*K+1)*‖B.toLp-A.toLp‖^2+(ea+eb)^2 := by let W := B.toLp-A.toLp let e := (RB-(projectedRhs B).toLp)-(RA-(projectedRhs A).toLp) have he : RB-RA=((projectedRhs B).toLp-(projectedRhs A).toLp)+e := by dsimp [e]; abel have hn : ‖e‖ ≤ ea+eb := by exact (norm_sub_le _ _).trans ((add_le_add hb ha).trans_eq (add_comm eb ea)) have he0 : 0 ≤ ea+eb := (norm_nonneg e).trans hn have hpair : 2*⟪W,e⟫_ℝ ≤ ‖W‖^2+(ea+eb)^2 := by have hi : ⟪W,e⟫_ℝ ≤ ‖W‖*(ea+eb) := (real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_left hn (norm_nonneg W)) linarith [sq_nonneg (‖W‖-(ea+eb))] rw [he,inner_add_right,mul_add] exact (add_le_add (projected_difference_energy A B hA hB K hK) hpair).trans_eq (by dsimp [W]; ring) theorem forced_linear_zero_bound (T C E : ℝ) (hC : 1 ≤ C) (X X' : ℝ → ℝ) (hX : ContinuousOn X (Icc 0 T)) (hX0 : X 0=0) (hd : ∀ t ∈ Icc 0 T, HasDerivWithinAt X (X' t) (Icc 0 T) t) (hb : ∀ t ∈ Icc 0 T, X' t ≤ C*X t+E^2) (t : ℝ) (ht : t ∈ Icc 0 T) : X t ≤ E^2*Real.exp (C*T) := by have hh := linear_stability_within (fun r => X r+E^2) X' C T (hX.add continuousOn_const) (fun r hr => (hd r ⟨hr.1,hr.2.le⟩).add_const _) (fun r hr => (hb r ⟨hr.1,hr.2.le⟩).trans (by nlinarith [sq_nonneg E])) t ht rw [hX0,zero_add] at hh have he : E^2*Real.exp (C*t) ≤ E^2*Real.exp (C*T) := by apply mul_le_mul_of_nonneg_left _ (sq_nonneg E) exact Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 (by linarith)) linarith [sq_nonneg E] end EulerOrdinarySobolev end end noncomputable section namespace EulerOrdinarySobolev open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSolenoidal EulerSmoothSobolev EulerVolterraConvolution Finset open scoped ContDiff Topology def regularizedComparisonCost (T M : ℝ) : ℝ := regularizationCost M*Real.sqrt (Real.exp ((2*((360*smoothEmbeddingConstant)*M)+1)*T)) theorem regularizedComparisonCost_nonneg (T M : ℝ) : 0 ≤ regularizedComparisonCost T M := mul_nonneg (regularizationCost_nonneg M) (Real.sqrt_nonneg _) theorem regularized_l2_comparison {T : ℝ} {hT : 0 ≤ T} {j k : ℕ} (U : RegularizedEvolution (regularizer j) T hT) (V : RegularizedEvolution (regularizer k) T hT) (M : ℝ) (hU : ∀ t, WordBound 4 M (U.velocity t)) (hV : ∀ t, WordBound 4 M (V.velocity t)) (hinit : (V.velocity ⟨0,le_rfl,hT⟩).toLp=(U.velocity ⟨0,le_rfl,hT⟩).toLp) : ‖fieldPath V.velocity V.velocity_continuous-fieldPath U.velocity U.velocity_continuous‖ ≤ (regularizerError j+regularizerError k)*regularizedComparisonCost T M := by let G := (360*smoothEmbeddingConstant)*M let C := 2*G+1 let E := (regularizerError j+regularizerError k)*regularizationCost M have hM : 0 ≤ M := wordBound_nonneg (hU ⟨0,le_rfl,hT⟩) have hG : 0 ≤ G := mul_nonneg (mul_nonneg (by norm_num) smoothEmbeddingConstant_nonneg) hM have hC : 1 ≤ C := by dsimp [C]; linarith have hE : 0 ≤ E := mul_nonneg (add_nonneg (regularizerError_nonneg j) (regularizerError_nonneg k)) (regularizationCost_nonneg M) let X (r : ℝ) := ‖(V.velocity (projIcc 0 T hT r)).toLp-(U.velocity (projIcc 0 T hT r)).toLp‖^2 let X' (r : ℝ) := 2*⟪(V.velocity (projIcc 0 T hT r)).toLp-(U.velocity (projIcc 0 T hT r)).toLp, (V.derivative (projIcc 0 T hT r)).toLp-(U.derivative (projIcc 0 T hT r)).toLp⟫_ℝ have hc : ContinuousOn X (Icc 0 T) := by exact ((((fieldPath V.velocity V.velocity_continuous).continuous.sub (fieldPath U.velocity U.velocity_continuous).continuous).comp continuous_projIcc).norm.pow 2).continuousOn have hx0 : X 0=0 := by simp only [X,projIcc_of_mem hT (show (0 : ℝ) ∈ Icc 0 T from ⟨le_rfl,hT⟩), hinit,sub_self,norm_zero,zero_pow (by decide : 2 ≠ 0)] have hd (r : ℝ) (hr : r ∈ Icc 0 T) : HasDerivWithinAt X (X' r) (Icc 0 T) r := by have h := ((V.l2_time ⟨r,hr⟩).sub (U.l2_time ⟨r,hr⟩)).norm_sq simpa only [X,X',Pi.sub_apply,projIcc_of_mem hT hr] using h have hb (r : ℝ) (_hr : r ∈ Icc 0 T) : X' r ≤ C*X r+E^2 := by have h := perturbed_difference_energy (U.velocity (projIcc 0 T hT r)) (V.velocity (projIcc 0 T hT r)) (U.solenoidal _) (V.solenoidal _) (U.derivative (projIcc 0 T hT r)).toLp (V.derivative (projIcc 0 T hT r)).toLp G (regularizerError j*regularizationCost M) (regularizerError k*regularizationCost M) (wordBound_gradient (wordBound_mono (hU _) (by omega))) (regularized_rhs_error j _ (U.solenoidal _) M (hU _)) (regularized_rhs_error k _ (V.solenoidal _) M (hV _)) simpa only [X,C,E,add_mul] using h have hnorm (t : Icc (0 : ℝ) T) : ‖(V.velocity t).toLp-(U.velocity t).toLp‖ ≤ E*Real.sqrt (Real.exp (C*T)) := by have h := forced_linear_zero_bound T C E hC X X' hc hx0 hd hb t t.property simp only [X,projIcc_of_mem hT t.property] at h have hs := Real.sq_sqrt ((Real.exp_pos (C*T)).le) have he : 0 ≤ E*Real.sqrt (Real.exp (C*T)) := mul_nonneg hE (Real.sqrt_nonneg _) nlinarith [norm_nonneg ((V.velocity t).toLp-(U.velocity t).toLp)] apply (ContinuousMap.norm_le _ (mul_nonneg (add_nonneg (regularizerError_nonneg j) (regularizerError_nonneg k)) (regularizedComparisonCost_nonneg T M))).mpr intro t exact (hnorm t).trans_eq (by dsimp [E,C,G,regularizedComparisonCost]; ring) theorem regularized_cauchy {T : ℝ} {hT : 0 ≤ T} (U : ∀ n, RegularizedEvolution (regularizer n) T hT) (M : ℝ) (hM : ∀ n t, WordBound 4 M ((U n).velocity t)) (hinit : ∀ j k, ((U k).velocity ⟨0,le_rfl,hT⟩).toLp=((U j).velocity ⟨0,le_rfl,hT⟩).toLp) : CauchySeq (fun n => fieldPath (U n).velocity (U n).velocity_continuous) := by have he : Tendsto (fun n => regularizerError n*regularizedComparisonCost T M) atTop (𝓝 (0 : ℝ)) := by simpa only [zero_mul] using regularizerError_tendsto.mul_const (regularizedComparisonCost T M) apply Metric.cauchySeq_iff.mpr intro ε hε have hh : ∀ᶠ n in atTop, regularizerError n*regularizedComparisonCost T M < ε/2 := (tendsto_order.mp he).2 _ (half_pos hε) obtain ⟨N,hN⟩ := eventually_atTop.mp hh refine ⟨N,fun j hj k hk => ?_⟩ rw [dist_eq_norm,norm_sub_rev] apply (regularized_l2_comparison (U j) (U k) M (hM j) (hM k) (hinit j k)).trans_lt have hj' := hN j hj have hk' := hN k hk linarith end EulerOrdinarySobolev