import NavierStokes.R3WeakPressure /-! # The smooth momentum equation supplies the pressure representation All representation identities use compact test functions. Only the velocity and stress, rather than their derivatives or the pressure, require global integrability. -/ noncomputable section namespace NavierStokes.R3WeakPressure open Set Filter MeasureTheory TemperedDistribution FourierTransform open R3SpaceTime R3SpaceTimePressure open scoped SchwartzMap LineDeriv Topology ContDiff ENNReal theorem represents_zero : Represents (0 : ๐“ข'(Domain, โ„‚)) (fun _ => 0) := by intro ฯ† _ simp theorem Represents.congr {T : ๐“ข'(Domain, โ„‚)} {f g : Domain โ†’ โ„‚} (hT : Represents T f) (he : f = g) : Represents T g := he โ–ธ hT theorem Represents.add {S T : ๐“ข'(Domain, โ„‚)} {f g : Domain โ†’ โ„‚} (hS : Represents S f) (hT : Represents T g) (hf : Continuous f) (hg : Continuous g) : Represents (S + T) (fun z => f z + g z) := by intro ฯ† hฯ† rw [add_apply, hS ฯ† hฯ†, hT ฯ† hฯ†] simp_rw [mul_add] exact (integral_add ((ฯ†.continuous.mul hf).integrable_of_hasCompactSupport hฯ†.mul_right) ((ฯ†.continuous.mul hg).integrable_of_hasCompactSupport hฯ†.mul_right)).symm theorem Represents.neg {T : ๐“ข'(Domain, โ„‚)} {f : Domain โ†’ โ„‚} (hT : Represents T f) : Represents (-T) (fun z => -f z) := by intro ฯ† hฯ† rw [neg_apply, hT ฯ† hฯ†] simp only [mul_neg, integral_neg] theorem Represents.sub {S T : ๐“ข'(Domain, โ„‚)} {f g : Domain โ†’ โ„‚} (hS : Represents S f) (hT : Represents T g) (hf : Continuous f) (hg : Continuous g) : Represents (S - T) (fun z => f z - g z) := by simpa only [sub_eq_add_neg] using hS.add hT.neg hf hg.neg theorem Represents.sum {ฮน : Type*} (s : Finset ฮน) (T : ฮน โ†’ ๐“ข'(Domain, โ„‚)) (f : ฮน โ†’ Domain โ†’ โ„‚) (hT : โˆ€ i โˆˆ s, Represents (T i) (f i)) (hf : โˆ€ i โˆˆ s, Continuous (f i)) : Represents (โˆ‘ i โˆˆ s, T i) (fun z => โˆ‘ i โˆˆ s, f i z) := by intro ฯ† hฯ† simp only [sum_apply, Finset.mul_sum] rw [integral_finsetSum _ (fun i hi => show Integrable (fun z => ฯ† z * f i z) from (ฯ†.continuous.mul (hf i hi)).integrable_of_hasCompactSupport hฯ†.mul_right)] apply Finset.sum_congr rfl intro i hi exact hT i hi ฯ† hฯ† def functionLaplacian (f : Domain โ†’ โ„‚) (z : Domain) : โ„‚ := โˆ‘ i, directional (spaceDirection i) (directional (spaceDirection i) f) z theorem functionLaplacian_contDiff {f : Domain โ†’ โ„‚} (hf : ContDiff โ„ โˆž f) : ContDiff โ„ โˆž (functionLaplacian f) := by exact ContDiff.sum fun i _ => partial_contDiff (partial_contDiff hf _) _ theorem Represents.spatialLaplacian {T : ๐“ข'(Domain, โ„‚)} {f : Domain โ†’ โ„‚} (hT : Represents T f) (hf : ContDiff โ„ โˆž f) : Represents (spatialLaplacian T) (functionLaplacian f) := by apply Represents.sum ยท intro i _ exact (hT.lineDeriv (hf.of_le (by simp)) _).lineDeriv ((partial_contDiff hf _).of_le (by simp)) _ ยท intro i _ exact (partial_contDiff (partial_contDiff hf _) _).continuous def functionDivergence (U : Fin 3 โ†’ Domain โ†’ โ„‚) (z : Domain) : โ„‚ := โˆ‘ i, directional (spaceDirection i) (U i) z theorem divergence_zero_of_smooth (U : Fin 3 โ†’ Domain โ†’ โ„‚) (hU : โˆ€ i, MemLp (U i) 2) (hs : โˆ€ i, ContDiff โ„ โˆž (U i)) (hd : โˆ€ z, functionDivergence U z = 0) : divergence (fun i => ((hU i).toLp (U i) : ๐“ข'(Domain, โ„‚))) = 0 := by have hr : Represents (divergence (fun i => ((hU i).toLp (U i) : ๐“ข'(Domain, โ„‚)))) (functionDivergence U) := by apply Represents.sum ยท intro i _ exact (represents_lp (hU i)).lineDeriv ((hs i).of_le (by simp)) _ ยท intro i _ exact (partial_contDiff (hs i) _).continuous exact (hr.congr (funext hd)).ext represents_zero def functionMomentum (U V : Fin 3 โ†’ Domain โ†’ โ„‚) (G : Fin 3 โ†’ Fin 3 โ†’ Domain โ†’ โ„‚) (i : Fin 3) (z : Domain) : โ„‚ := functionLaplacian (U i) z - directional timeDirection (U i) z + V i z - โˆ‘ j, directional (spaceDirection j) (G i j) z theorem represents_momentumGradient (U V : Fin 3 โ†’ Domain โ†’ โ„‚) (G : Fin 3 โ†’ Fin 3 โ†’ Domain โ†’ โ„‚) (hU : โˆ€ i, MemLp (U i) 2) (hV : โˆ€ i, MemLp (V i) 2) (hG : โˆ€ i j, MemLp (G i j) 1) (sU : โˆ€ i, ContDiff โ„ โˆž (U i)) (sV : โˆ€ i, ContDiff โ„ โˆž (V i)) (sG : โˆ€ i j, ContDiff โ„ โˆž (G i j)) (i : Fin 3) : Represents (momentumGradient (fun i => (hU i).toLp (U i)) (fun i => (hV i).toLp (V i)) (fun i j => (hG i j).toLp (G i j)) i) (functionMomentum U V G i) := by apply Represents.sub ยท apply Represents.add ยท exact ((represents_lp (hU i)).spatialLaplacian (sU i)).sub ((represents_lp (hU i)).lineDeriv ((sU i).of_le (by simp)) _) (functionLaplacian_contDiff (sU i)).continuous (partial_contDiff (sU i) _).continuous ยท exact represents_lp (hV i) ยท exact (functionLaplacian_contDiff (sU i)).continuous.sub (partial_contDiff (sU i) _).continuous ยท exact (sV i).continuous ยท apply Represents.sum ยท intro j _ exact (represents_lp (hG i j)).lineDeriv ((sG i j).of_le (by simp)) _ ยท intro j _ exact (partial_contDiff (sG i j) _).continuous ยท exact ((functionLaplacian_contDiff (sU i)).continuous.sub (partial_contDiff (sU i) _).continuous).add (sV i).continuous ยท exact continuous_finsetSum _ fun j _ => (partial_contDiff (sG i j) _).continuous /-- Direct pressure recovery from a smooth, divergence-free momentum identity. This is the form used after multiplying the equation by a compact time cutoff. -/ theorem smooth_pressure_gradient (U V : Fin 3 โ†’ Domain โ†’ โ„‚) (G : Fin 3 โ†’ Fin 3 โ†’ Domain โ†’ โ„‚) (p : Domain โ†’ โ„‚) (hU : โˆ€ i, MemLp (U i) 2) (hV : โˆ€ i, MemLp (V i) 2) (hG : โˆ€ i j, MemLp (G i j) 1) (sU : โˆ€ i, ContDiff โ„ โˆž (U i)) (sV : โˆ€ i, ContDiff โ„ โˆž (V i)) (sG : โˆ€ i j, ContDiff โ„ โˆž (G i j)) (sp : ContDiff โ„ โˆž p) (dU : โˆ€ z, functionDivergence U z = 0) (dV : โˆ€ z, functionDivergence V z = 0) (heq : โˆ€ i z, functionMomentum U V G i z = directional (spaceDirection i) p z) (i : Fin 3) : Represents (โˆ‚_{spaceDirection i} (stressPressure (fun i j => (hG i j).toLp (G i j)))) (directional (spaceDirection i) p) := by let UL i := (hU i).toLp (U i) let VL i := (hV i).toLp (V i) let stressLp (i j : Fin 3) := (hG i j).toLp (G i j) have hrep i : Represents (momentumGradient UL VL stressLp i) (directional (spaceDirection i) p) := (represents_momentumGradient U V G hU hV hG sU sV sG i).congr (funext (heq i)) have hn i := pressure_gradient_unique UL VL stressLp p (divergence_zero_of_smooth U hU sU dU) (divergence_zero_of_smooth V hV sV dV) (fun i ฯ† hฯ† => (hrep i ฯ† hฯ†).trans (integration_by_parts (sp.of_le (by simp)) ฯ† hฯ† _)) i rw [โ† hn i] exact hrep i end NavierStokes.R3WeakPressure