import Euler.OrdinarySmoothingOperator import Euler.OrdinaryAdvectionLimit import Euler.HilbertQuadraticFlow import Euler.OrdinaryStrongTime import Euler.ContinuousTimeIntegral /-! The regularized L² flow has genuine smooth spatial representatives, continuous jets of every order, and its true time derivative. -/ /-! ## From `Euler/OrdinaryRegularizedEquation.lean` The text of `Euler/OrdinaryRegularizedEquation.lean`, folded into this file, which was its only importer. -/ section /-! A genuine global L² solution of the symmetric regularized Euler equation. The vector field is a bounded bilinear map and its actual L² energy vanishes by noncompact transport cancellation. -/ noncomputable section namespace EulerOrdinarySobolev open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSolenoidal EulerMeanClassical Finset open scoped ContDiff Topology theorem advection_add_left (A B C : SmoothL2Field Space) : advectionField (addField A B) C=addField (advectionField A C) (advectionField B C) := by apply field_ext exact funext (fun x => by simp only [advectionField_field,addField_field,map_add]) theorem advection_add_right (A B C : SmoothL2Field Space) : advectionField A (addField B C)=addField (advectionField A B) (advectionField A C) := by apply field_ext funext x have he : (addField B C).field=B.field+C.field := rfl simp only [advectionField_field,addField_field,he, fderiv_add (B.smooth.differentiable (by simp) x) (C.smooth.differentiable (by simp) x),add_apply] theorem advection_smul_left (c : ℝ) (A B : SmoothL2Field Space) : advectionField (scaleField c A) B=scaleField c (advectionField A B) := by apply field_ext exact funext (fun x => by simp only [advectionField_field,scaleField_field,map_smul]) theorem advection_smul_right (c : ℝ) (A B : SmoothL2Field Space) : advectionField A (scaleField c B)=scaleField c (advectionField A B) := by apply field_ext exact funext (fun x => by simp only [advectionField_field,scaleField_field,scaleField_fderiv,smul_apply]) namespace SmoothingOperator variable (S : SmoothingOperator) def advectionLinear : L2 →ₗ[ℝ] L2 →ₗ[ℝ] L2 where toFun u := { toFun v := (advectionField (S.field u) (S.field v)).toLp map_add' v w := by rw [S.field_add,advection_add_right,toLp_addField] map_smul' c v := by rw [S.field_smul,advection_smul_right,scaleField_toLp]; rfl } map_add' u v := by apply LinearMap.ext intro w change (advectionField (S.field (u+v)) (S.field w)).toLp = (advectionField (S.field u) (S.field w)).toLp + (advectionField (S.field v) (S.field w)).toLp rw [S.field_add,advection_add_left,toLp_addField] map_smul' c u := by apply LinearMap.ext intro v change (advectionField (S.field (c • u)) (S.field v)).toLp = c • (advectionField (S.field u) (S.field v)).toLp rw [S.field_smul,advection_smul_left,scaleField_toLp] def advectionCost : ℝ := S.pointwiseCost*‖S.jetMap 1‖ theorem advectionLinear_bound (u v : L2) : ‖S.advectionLinear u v‖ ≤ S.advectionCost*‖u‖*‖v‖ := by change ‖(advectionField (S.field u) (S.field v)).toLp‖ ≤ _ apply (advection_norm_velocity (S.field u) (S.field v) _ (S.field_pointwise u)).trans rw [← (S.field v).derivative.norm_jetLp_zero,(S.field v).norm_derivative_jetLp] apply (mul_le_mul_of_nonneg_left (S.field_jet_norm v 1) (mul_nonneg S.pointwiseCost_nonneg (norm_nonneg u))).trans_eq dsimp [advectionCost] ring def advection : L2 →L[ℝ] L2 →L[ℝ] L2 := S.advectionLinear.mkContinuous₂ S.advectionCost S.advectionLinear_bound @[simp] theorem advection_apply (u v : L2) : S.advection u v=(advectionField (S.field u) (S.field v)).toLp := rfl def quadratic : L2 →L[ℝ] L2 →L[ℝ] L2 := (ContinuousLinearMap.compL ℝ L2 L2 L2 (-S.op)).comp S.advection @[simp] theorem quadratic_apply (u v : L2) : S.quadratic u v= -S.op (advectionField (S.field u) (S.field v)).toLp := rfl theorem field_divergence (u : L2) (x : Space) : divergence (S.field u).field x=0 := solenoidal_representative_divergence _ (S.solenoidal u) _ (S.field u).smooth (by simpa only [field_toLp] using (S.field u).toLp_ae) x theorem quadratic_energy (u : L2) : ⟪u,S.quadratic u u⟫_ℝ=0 := by rw [quadratic_apply,inner_neg_right,← S.symmetric,← field_toLp] rw [real_inner_comm,advection_inner_zero (S.field u) (S.field u) (S.field_divergence u),neg_zero] theorem exists_global (u₀ : L2) : ∃ u : ℝ → L2, u 0=u₀ ∧ (∀ t, HasDerivAt u (S.quadratic (u t) (u t)) t) ∧ ∀ t, ‖u t‖=‖u₀‖ := EulerHilbertQuadraticFlow.exists_global_quadratic S.quadratic S.quadratic_energy u₀ end SmoothingOperator end EulerOrdinarySobolev end end noncomputable section namespace EulerOrdinarySobolev open Set Filter MeasureTheory InnerProductSpace ContinuousLinearMap EulerSmoothLimit EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSolenoidal EulerMeanClassical EulerVolterraConvolution EulerContinuousTimeIntegral Finset open scoped ContDiff Topology namespace SmoothingOperator variable (S : SmoothingOperator) def rhs (u : L2) : SmoothL2Field Space := fieldNeg (S.field (advectionField (S.field u) (S.field u)).toLp) theorem rhs_toLp (u : L2) : (S.rhs u).toLp=S.quadratic u u := by simp only [rhs,toLp_fieldNeg,field_toLp,quadratic_apply] theorem rhs_continuous {K : Type*} [TopologicalSpace K] (u : K → L2) (hu : Continuous u) (n : ℕ) : Continuous (fun t => (S.rhs (u t)).jetLp n) := by apply continuous_jetLp_mapField apply S.field_jet_continuous exact (S.advection.continuous.comp hu).clm_apply hu end SmoothingOperator structure RegularizedEvolution (S : SmoothingOperator) (T : ℝ) (hT : 0 ≤ T) where velocity : Icc (0 : ℝ) T → SmoothL2Field Space velocity_continuous : ∀ n, Continuous (fun t => (velocity t).jetLp n) solenoidal : ∀ t, (velocity t).toLp ∈ solenoidalSpace time_law : ∀ t (ht : t ∈ Ioo 0 T), HasDerivAt (fun r => (velocity (projIcc 0 T hT r)).toLp) (S.quadratic (velocity ⟨t,ht.1.le,ht.2.le⟩).toLp (velocity ⟨t,ht.1.le,ht.2.le⟩).toLp) t namespace RegularizedEvolution variable {S : SmoothingOperator} {T : ℝ} {hT : 0 ≤ T} (U : RegularizedEvolution S T hT) def derivative (t : Icc (0 : ℝ) T) : SmoothL2Field Space := S.rhs (U.velocity t).toLp theorem derivative_continuous (n : ℕ) : Continuous (fun t => (U.derivative t).jetLp n) := S.rhs_continuous _ (fieldPath U.velocity U.velocity_continuous).continuous n theorem pointwise_time (t : Icc (0 : ℝ) T) (x : Space) : HasDerivWithinAt (fun r => (U.velocity (projIcc 0 T hT r)).field x) ((U.derivative t).field x) (Icc (0 : ℝ) T) t := by apply pointwise_derivative_of_l2 T hT U.velocity U.derivative U.velocity_continuous U.derivative_continuous _ t x intro r hr simpa only [derivative,SmoothingOperator.rhs_toLp] using U.time_law r hr theorem l2_time (t : Icc (0 : ℝ) T) : HasDerivWithinAt (fun r => (U.velocity (projIcc 0 T hT r)).toLp) (U.derivative t).toLp (Icc (0 : ℝ) T) t := by have h := ordinaryWord_hasDerivWithinAt T hT U.velocity U.derivative U.velocity_continuous U.derivative_continuous (fun r hr x => (U.pointwise_time ⟨r,hr.1.le,hr.2.le⟩ x).hasDerivAt (Icc_mem_nhds hr.1 hr.2)) (n := 0) Fin.elim0 t simpa only [wordField_zero] using h end RegularizedEvolution namespace SmoothingOperator variable (S : SmoothingOperator) (T : ℝ) (hT : 0 ≤ T) theorem exists_smooth (A : SmoothL2Field Space) (hA : A.toLp ∈ solenoidalSpace) : ∃ U : RegularizedEvolution S T hT, U.velocity ⟨0,le_rfl,hT⟩=A := by obtain ⟨u,hu0,hu,_huNorm⟩ := S.exists_global A.toLp have huc : Continuous u := (show Differentiable ℝ u from fun t => (hu t).differentiableAt).continuous let a : C(Icc (0 : ℝ) T,L2) := ⟨fun t => S.advection (u t) (u t), (S.advection.continuous.comp (huc.comp continuous_subtype_val)).clm_apply (huc.comp continuous_subtype_val)⟩ let z : C(Icc (0 : ℝ) T,L2) := -integral T hT a let v : Icc (0 : ℝ) T → SmoothL2Field Space := fun t => addField A (S.field (z t)) have hv : ∀ t, (v t).toLp=u t := by intro t have he := eq_initial_add_integral T hT ((-S.op).compLeftContinuous ℝ (Icc (0 : ℝ) T) a) u (fun s => by change HasDerivWithinAt u (-S.op (S.advection (u s) (u s))) _ _ exact (hu (s : ℝ)).hasDerivWithinAt) t have hi : integral T hT ((-S.op).compLeftContinuous ℝ (Icc (0 : ℝ) T) a) t= S.op (z t) := by change (∫ r in (0 : ℝ)..(t : ℝ), (-S.op) (extendPath T hT a r))=S.op (z t) rw [(-S.op).intervalIntegral_comp_comm ((extendPath_continuous T hT a).intervalIntegrable 0 t)] change -S.op (realIntegral T hT a t)=S.op (-realIntegral T hT a t) rw [map_neg] rw [hu0,hi] at he simpa only [v,toLp_addField,field_toLp] using he.symm have hvcont : ∀ n, Continuous (fun t => (v t).jetLp n) := fun n => continuous_jetLp_addField _ _ (fun _ => continuous_const) (S.field_jet_continuous z z.continuous) n have hv0 : v ⟨0,le_rfl,hT⟩=A := by apply smoothField_eq_of_toLp_eq rw [hv,hu0] refine ⟨{ velocity := v velocity_continuous := hvcont solenoidal := fun t => ?_ time_law := fun t ht => ?_ },hv0⟩ · simpa only [v,toLp_addField,field_toLp] using solenoidalSpace.add_mem hA (S.solenoidal (z t)) · simp only [hv] have he : (fun r => u (projIcc 0 T hT r : ℝ)) =ᶠ[𝓝 t] u := by filter_upwards [Ioo_mem_nhds ht.1 ht.2] with r hr simp only [projIcc_of_mem hT (show r ∈ Icc 0 T from ⟨hr.1.le,hr.2.le⟩)] exact (hu t).congr_of_eventuallyEq he end SmoothingOperator end EulerOrdinarySobolev