introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.98 kB
import OAI.MathematicalPhysics.NavierStokes.ForcedComputation.Detector.TriangularFluid
import OAI.MathematicalPhysics.NavierStokes.ForcedComputation.Flow.CompactPlanarFlow
namespace OAI
/-! A compact vertical cutoff of a planar incompressible processor. Its
horizontal trajectories at a cutoff plateau remain exact, and the cutoff
introduces no divergence because the lifted field has zero third component. -/
noncomputable section
namespace ForcedComputation.CompactLift
open ShearFlows VelocityDetector Set
open scoped ContDiff BigOperators
def spatial (Ο‡ : ℝ β†’ ℝ) (a : Plane β†’ Plane) (x : Space) : Space :=
Ο‡ (x 2) β€’ triangularLift a (fun _ => 0) x
def velocity (Ο‡ : ℝ β†’ ℝ) (V : ℝ β†’ Plane β†’ Plane) : Velocity :=
fun y => spatial Ο‡ (V y.1) y.2
theorem spatial_smooth {Ο‡ : ℝ β†’ ℝ} {a : Plane β†’ Plane}
(hΟ‡ : ContDiff ℝ ∞ Ο‡) (ha : ContDiff ℝ ∞ a) :
ContDiff ℝ ∞ (spatial Ο‡ a) :=
(hΟ‡.comp (contDiff_apply ℝ ℝ (2 : Fin 3))).smul
(triangularLift_smooth ha contDiff_const)
theorem velocity_smooth {Ο‡ : ℝ β†’ ℝ} {V : ℝ β†’ Plane β†’ Plane}
(hΟ‡ : ContDiff ℝ ∞ Ο‡) (hV : ContDiff ℝ ∞ (Function.uncurry V)) :
ContDiff ℝ ∞ (velocity Ο‡ V) := by
have hi : ContDiff ℝ ∞ (fun y : SpaceTime => (y.1, horizontalLinear y.2)) :=
contDiff_fst.prodMk (horizontalLinear.contDiff.comp contDiff_snd)
have hW : ContDiff ℝ ∞ (fun y : SpaceTime => planeInclusion (V y.1 (horizontalLinear y.2))) :=
planeInclusion.contDiff.comp (hV.comp hi)
have he : velocity Ο‡ V = fun y => Ο‡ (y.2 2) β€’ planeInclusion (V y.1 (horizontalLinear y.2)) := by
funext y
simp [velocity, spatial, triangularLift]
rw [he]
exact (hΟ‡.comp ((contDiff_apply ℝ ℝ (2 : Fin 3)).comp contDiff_snd)).smul hW
theorem spatial_third (Ο‡ : ℝ β†’ ℝ) (a : Plane β†’ Plane) (x : Space) :
spatial Ο‡ a x 2 = 0 := by
simp [spatial, triangularLift_eq, atHeight]
theorem spatial_atHeight {Ο‡ : ℝ β†’ ℝ} (a : Plane β†’ Plane) {z : ℝ}
(hz : Ο‡ z = 1) (x : Plane) : spatial Ο‡ a (atHeight x z) = planeInclusion (a x) := by
simp only [spatial, triangularLift, horizontalLinear_eq, atHeight_horizontal,
zero_smul, add_zero]
change Ο‡ z β€’ planeInclusion (a x) = _
rw [hz, one_smul]
theorem height_fderiv {Ο‡ : ℝ β†’ ℝ} (hΟ‡ : ContDiff ℝ ∞ Ο‡) (x : Space) (j : Fin 3) :
fderiv ℝ (fun y : Space => Ο‡ (y 2)) x (basis j) = deriv Ο‡ (x 2) * basis j 2 := by
have hd := ((hχ.differentiable (by simp) (x 2)).hasDerivAt).comp_hasFDerivAt x
(ContinuousLinearMap.proj (2 : Fin 3) : Space β†’L[ℝ] ℝ).hasFDerivAt
simpa only [Function.comp_def, smul_apply,
ContinuousLinearMap.proj_apply, smul_eq_mul] using
congrArg (fun L => L (basis j)) hd.fderiv
theorem spatial_divergence {Ο‡ : ℝ β†’ ℝ} {a : Plane β†’ Plane}
(hΟ‡ : ContDiff ℝ ∞ Ο‡) (ha : ContDiff ℝ ∞ a) (x : Space) :
divergence (spatial Ο‡ a) x = Ο‡ (x 2) * PlanarHamiltonian.divergence a (horizontal x) := by
let W := triangularLift a (fun _ => 0)
have hw : ContDiff ℝ ∞ W := triangularLift_smooth ha contDiff_const
have hc : ContDiff ℝ ∞ (fun y : Space => Ο‡ (y 2)) := hΟ‡.comp (contDiff_apply ℝ ℝ (2 : Fin 3))
have hd (j : Fin 3) : derivative (spatial Ο‡ a) j x j =
Ο‡ (x 2) * derivative W j x j +
(deriv Ο‡ (x 2) * basis j 2) * W x j := by
unfold derivative
rw [show spatial Ο‡ a = (fun y : Space => Ο‡ (y 2) β€’ W y) from rfl,
fderiv_fun_smul (hc.differentiable (by simp) x) (hw.differentiable (by simp) x)]
simp only [add_apply, smul_apply,
ContinuousLinearMap.smulRight_apply, Pi.add_apply, Pi.smul_apply, smul_eq_mul,
height_fderiv hχ]
have hz : W x 2 = 0 := by simp [W, triangularLift_eq, atHeight]
have he : divergence (spatial Ο‡ a) x = Ο‡ (x 2) * divergence W x := by
rw [divergence, divergence, Fin.sum_univ_three, Fin.sum_univ_three]
rw [hd, hd, hd]
simp only [basis, Pi.single_eq_of_ne (by decide : (2 : Fin 3) β‰  0),
Pi.single_eq_of_ne (by decide : (2 : Fin 3) β‰  1), Pi.single_eq_same,
hz, mul_zero, add_zero]
ring
rw [he, triangularLift_divergence ha contDiff_const]
theorem atHeight_hasDerivAt {Ξ³ : ℝ β†’ Plane} {v : Plane} {t z : ℝ}
(hΞ³ : HasDerivAt Ξ³ v t) :
HasDerivAt (fun s => atHeight (Ξ³ s) z) (planeInclusion v) t := by
have hd := (planeInclusion.hasFDerivAt.comp_hasDerivAt t hΞ³).add_const (z β€’ basis 2)
convert hd using 1
Β· funext s
ext j
fin_cases j <;> simp [planeInclusion, atHeight, basis]
theorem trajectory_atHeight {Ο‡ : ℝ β†’ ℝ} {V : ℝ β†’ Plane β†’ Plane}
{Ξ³ : ℝ β†’ Plane} {a t z : ℝ} (hz : Ο‡ z = 1)
(hΞ³ : HasDerivAt Ξ³ (V (a + t) (Ξ³ t)) t) :
HasDerivAt (fun s => atHeight (Ξ³ s) z)
(velocity Ο‡ V (a + t, atHeight (Ξ³ t) z)) t := by
simpa only [velocity, spatial_atHeight _ hz] using atHeight_hasDerivAt (z := z) hΞ³
end ForcedComputation.CompactLift
end
end OAI