import NavierStokes.R3.H3Approximation /-! # Whole-space integration by parts for Sobolev competitors The limiting fields need not be classically differentiable. Integration by parts follows from their actual L² weak-derivative approximations. -/ noncomputable section open Set Filter MeasureTheory open scoped ContDiff Topology BigOperators InnerProductSpace namespace NavierStokesR3.H3Comparison open NavierStokes.ProblemStatement open NavierStokes.PeriodicIntegration (spatialPartial) open NavierStokes.PeriodicUniqueness (spatial_partial_contDiff) variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] theorem integrable_inner_of_memLp {f g : Space → E} (hf : MemLp f 2 volume) (hg : MemLp g 2 volume) : Integrable (fun x => ⟪f x, g x⟫_ℝ) := by apply (L2.integrable_inner (𝕜 := ℝ) (hf.toLp f) (hg.toLp g)).congr filter_upwards [hf.coeFn_toLp, hg.coeFn_toLp] with x hx hy rw [hx, hy] private theorem compact_inner_partial {f g : Space → E} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (hcf : HasCompactSupport f) (hcg : HasCompactSupport g) (i : Fin 3) : (∫ x, ⟪f x, spatialPartial i g x⟫_ℝ) = -(∫ x, ⟪spatialPartial i f x, g x⟫_ℝ) := by have hfl := smooth_compact_memLp hf hcf have hgl := smooth_compact_memLp hg hcg have hdfl := smooth_compact_memLp (spatial_partial_contDiff hf i) (hcf.fderiv_apply ℝ (coordinateVector i)) have hdgl := smooth_compact_memLp (spatial_partial_contDiff hg i) (hcg.fderiv_apply ℝ (coordinateVector i)) exact integral_bilinear_fderiv_right_eq_neg_left_of_integrable (B := innerSL ℝ) (integrable_inner_of_memLp hdfl hgl) (integrable_inner_of_memLp hfl hdgl) (integrable_inner_of_memLp hfl hgl) (fun x _ => hf.differentiable (by simp) x) (fun x _ => hg.differentiable (by simp) x) end NavierStokesR3.H3Comparison