import NavierStokes.R3.CompactEnergy import Mathlib.MeasureTheory.Function.L2Space import Mathlib.MeasureTheory.Function.LpSpace.Indicator /-! # Sobolev fields represented by smooth compact approximations The derivatives in these records are genuine weak derivatives: each is the L² limit of the corresponding derivatives of one smooth compact sequence. No pointwise differentiability is required of the limiting field. -/ noncomputable section open Set Filter MeasureTheory open scoped ContDiff Topology namespace NavierStokesR3.H3Comparison open NavierStokes.ProblemStatement open NavierStokes.PeriodicIntegration (spatialPartial) open NavierStokes.PeriodicUniqueness (spatial_partial_contDiff) variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] /-- Compact smooth fields are in the ordinary whole-space L² space. -/ theorem smooth_compact_memLp {f : Space → E} (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) : MemLp f 2 volume := hf.continuous.memLp_of_hasCompactSupport hc /-- The standard completion definition of a first-order Sobolev field. -/ structure H1Approximation (f : Space → E) (df : Fin 3 → Space → E) where memLp : MemLp f 2 volume derivative_memLp : ∀ i, MemLp (df i) 2 volume approx : ℕ → Space → E smooth : ∀ n, ContDiff ℝ ∞ (approx n) compact : ∀ n, HasCompactSupport (approx n) approx_memLp : ∀ n, MemLp (approx n) 2 volume derivative_approx_memLp : ∀ n i, MemLp (spatialPartial i (approx n)) 2 volume tendsto : Tendsto (fun n => (approx_memLp n).toLp (approx n)) atTop (𝓝 (memLp.toLp f)) derivative_tendsto : ∀ i, Tendsto (fun n => (derivative_approx_memLp n i).toLp (spatialPartial i (approx n))) atTop (𝓝 ((derivative_memLp i).toLp (df i))) variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] private theorem partial_comp (L : E →L[ℝ] F) {f : Space → E} (hf : ContDiff ℝ ∞ f) (i : Fin 3) : spatialPartial i (L ∘ f) = L ∘ spatialPartial i f := by funext x have hd := (L.hasFDerivAt.comp x (hf.differentiable (by simp) x).hasFDerivAt).fderiv exact congrArg (fun M => M (coordinateVector i)) hd /-- One smooth compact approximation controls all ordered derivatives through order three, the usual completion definition of H³ on Euclidean space. -/ structure H3Approximation (f : Space → E) (df : Fin 3 → Space → E) (ddf : Fin 3 → Fin 3 → Space → E) (dddf : Fin 3 → Fin 3 → Fin 3 → Space → E) extends H1Approximation f df where second_memLp : ∀ i j, MemLp (ddf i j) 2 volume third_memLp : ∀ i j k, MemLp (dddf i j k) 2 volume second_approx_memLp : ∀ n i j, MemLp (spatialPartial i (spatialPartial j (approx n))) 2 volume third_approx_memLp : ∀ n i j k, MemLp (spatialPartial i (spatialPartial j (spatialPartial k (approx n)))) 2 volume second_tendsto : ∀ i j, Tendsto (fun n => (second_approx_memLp n i j).toLp (spatialPartial i (spatialPartial j (approx n)))) atTop (𝓝 ((second_memLp i j).toLp (ddf i j))) third_tendsto : ∀ i j k, Tendsto (fun n => (third_approx_memLp n i j k).toLp (spatialPartial i (spatialPartial j (spatialPartial k (approx n))))) atTop (𝓝 ((third_memLp i j k).toLp (dddf i j k))) namespace H3Approximation variable {f : Space → E} {df : Fin 3 → Space → E} {ddf : Fin 3 → Fin 3 → Space → E} {dddf : Fin 3 → Fin 3 → Fin 3 → Space → E} end H3Approximation end NavierStokesR3.H3Comparison