import Euler.CorrectionTime import Euler.QuadraticHeatConstraint import Euler.LiftedTransportComponents /-! A genuine local divergence-free viscous correction for the transformed Euler equation. -/ noncomputable section namespace EulerCorrectionOperators open MeasureTheory InnerProductSpace Set EulerLiftedGradientSpace EulerPressureSpatialRegularity EulerSpatialSobolevInverse EulerCylinderSobolev EulerCylinderSobolevSpace EulerSobolevTransport EulerSobolevCoefficientPressure EulerQuadraticSource open scoped Topology variable (period : ℝ) [Fact (0 < period)] local instance dataSobolevGroup (q : ℕ) : NormedAddCommGroup (SobolevSpace period q) := inferInstance local instance dataSobolevSpace (q : ℕ) : NormedSpace ℝ (SobolevSpace period q) := inferInstance /-- An actual smooth spatial coefficient with its genuine finite Sobolev jet and continuous time action. -/ structure CoefficientPath (q : ℕ) (T : Type*) [TopologicalSpace T] where coefficient : T → SmoothCoefficient period jet : ∀ t, CoefficientJet period standardDirection q (coefficient t) continuous : Continuous (fun t => coefficientSobolevOperator period (jet t)) /-- The path acts by actual pointwise multiplication at each time. -/ def CoefficientPath.operatorPath {q : ℕ} {T : Type*} [TopologicalSpace T] (A : CoefficientPath period q T) : C(T, SobolevSpace period q →L[ℝ] SobolevSpace period q) := ⟨fun t => coefficientSobolevOperator period (A.jet t), A.continuous⟩ /-- The concrete coefficient and approximate-solution data of the viscous Euler error equation. -/ structure CorrectionData (q : ℕ) (T : Type*) [TopologicalSpace T] where κ : ℝ direction : Vector3 scale_bound : |κ| ≤ 1 direction_bound : ‖direction‖ ≤ 1 metric : CoefficientPath period q T coercivity : ℝ coercivity_pos : 0 < coercivity metric_pos : ∀ t x v, coercivity * ‖v‖^2 ≤ ⟪(metric.coefficient t).coefficient x v,v⟫_ℝ linear : CoefficientPath period q T quadratic : Fin 3 → CoefficientPath period q T approximation : C(T, SobolevSpace period (q+1)) residual : C(T, SobolevSpace period q) /-- The actual pressure-projected nonlinear correction source generated by the concrete data. -/ def CorrectionData.coefficients {q : ℕ} {T : Type*} [TopologicalSpace T] (D : CorrectionData period q T) (hq : 6 ≤ q) : Coefficients T (SobolevSpace period (q+1)) (SobolevSpace period q) := correctionCoefficients period hq D.metric.coefficient D.metric.jet D.κ D.direction D.coercivity D.coercivity_pos D.metric_pos D.metric.continuous (velocityComponents D.κ D.direction) (velocityComponents_norm D.κ D.direction D.scale_bound D.direction_bound) D.linear.operatorPath (fun i => (D.quadratic i).operatorPath) D.approximation D.residual /-- The actual error source is exactly divergence-free; this property is derived from pressure coercivity. -/ theorem CorrectionData.source_gradient_zero {q : ℕ} {T : Type*} [TopologicalSpace T] (D : CorrectionData period q T) (hq : 6 ≤ q) (t : T) (u : SobolevSpace period (q+1)) : gradientProjection period D.κ D.direction (value period ((D.coefficients period hq).apply t u)) = 0 := correction_source_gradient_zero period hq D.metric.coefficient D.metric.jet D.κ D.direction D.coercivity D.coercivity_pos D.metric_pos D.metric.continuous (velocityComponents D.κ D.direction) (velocityComponents_norm D.κ D.direction D.scale_bound D.direction_bound) D.linear.operatorPath (fun i => (D.quadratic i).operatorPath) D.approximation D.residual t u /-- The actual Euler correction equation has a positive-time mild solution with zero initial error and the genuine divergence constraint. -/ theorem exists_local_euler_correction {q : ℕ} (hq : 6 ≤ q) (ν : ℝ) (hν : 0 < ν) (S : ℝ) (hS : 0 < S) (D : CorrectionData period q (Icc (0 : ℝ) S)) : ∃ (T : ℝ) (hT : 0 < T) (hTS : T ≤ S), ∃ e : C(Icc (0 : ℝ) T, SobolevSpace period (q+1)), ‖e‖ ≤ 1 ∧ e ⟨0, le_rfl, hT.le⟩ = 0 ∧ (∀ t, value period (e t) ∈ divergenceFreeSpace period D.κ D.direction) ∧ ∀ t, e t = quadraticDuhamel period ν hν hT.le hTS (D.coefficients period hq) 0 e t := by have hzero : gradientProjection period D.κ D.direction (value period (0 : SobolevSpace period (q+1))) = 0 := map_zero _ obtain ⟨T, hT, hTS, e, he, hi, hd, hsol⟩ := exists_local_quadratic_divergenceFree period q ν hν S hS D.κ D.direction 0 hzero (D.coefficients period hq) (D.source_gradient_zero period hq) exact ⟨T, hT, hTS, e, by simpa only [norm_zero, zero_add] using he, hi, hd, hsol⟩ end EulerCorrectionOperators