introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.65 kB
import OAI.MathematicalPhysics.NavierStokes.ForcedComputation.Flow.FlowMixedPartials
namespace OAI
/-! The first and second variational equations follow by differentiating
the actual ODE after joint smoothness has been proved. -/
noncomputable section
namespace ForcedComputation.Flow
open scoped ContDiff
variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E]
theorem first_variation {V Ξ© : ℝ β†’ E β†’ E}
(hΞ© : ContDiff ℝ ∞ (Function.uncurry Ξ©))
(hV : βˆ€ t, ContDiff ℝ ∞ (V t))
(hode : βˆ€ t x, HasDerivAt (fun s => Ξ© s x) (V t (Ξ© t x)) t)
(t : ℝ) (x v : E) :
HasDerivAt (fun s => fderiv ℝ (Ξ© s) x v)
(fderiv ℝ (V t) (Ξ© t x) (fderiv ℝ (Ξ© t) x v)) t := by
have h := time_space_commute hΞ© t x v
have he : (fun y => deriv (fun s => Ξ© s y) t) = fun y => V t (Ξ© t y) :=
funext fun y => (hode t y).deriv
change HasDerivAt (fun s => fderiv ℝ (Ξ© s) x v)
(fderiv ℝ (fun y => deriv (fun s => Ξ© s y) t) x v) t at h
rw [he] at h
have hx : ContDiff ℝ ∞ (Ξ© t) :=
hΞ©.comp (contDiff_const.prodMk contDiff_id)
have hd := (hV t).differentiable (by simp) (Ξ© t x)
have hg := hx.differentiable (by simp) x
have hchain : fderiv ℝ (fun y => V t (Ξ© t y)) x =
(fderiv ℝ (V t) (Ξ© t x)).comp (fderiv ℝ (Ξ© t) x) :=
(hd.hasFDerivAt.comp x hg.hasFDerivAt).fderiv
rw [hchain] at h
exact h
theorem second_variation {V Ξ© : ℝ β†’ E β†’ E}
(hΞ© : ContDiff ℝ ∞ (Function.uncurry Ξ©))
(hV : βˆ€ t, ContDiff ℝ ∞ (V t))
(hode : βˆ€ t x, HasDerivAt (fun s => Ξ© s x) (V t (Ξ© t x)) t)
(t : ℝ) (x v w : E) :
HasDerivAt (fun s => fderiv ℝ (fderiv ℝ (Ξ© s)) x v w)
(fderiv ℝ (V t) (Ξ© t x) (fderiv ℝ (fderiv ℝ (Ξ© t)) x v w) +
fderiv ℝ (fderiv ℝ (V t)) (Ξ© t x)
(fderiv ℝ (Ξ© t) x v) (fderiv ℝ (Ξ© t) x w)) t := by
let G : ℝ Γ— E β†’ E := fun p => fderiv ℝ (Ξ© p.1) p.2 w
have hG : ContDiff ℝ ∞ G := spaceDerivative_smooth hΞ© w
have h := time_space_commute hG t x v
have he : (fun y => deriv (fun s => G (s, y)) t) =
fun y => fderiv ℝ (V t) (Ξ© t y) (fderiv ℝ (Ξ© t) y w) := by
funext y
exact (first_variation hΞ© hV hode t y w).deriv
rw [he] at h
have hx : ContDiff ℝ ∞ (Ξ© t) :=
hΞ©.comp (contDiff_const.prodMk contDiff_id)
have hDx : ContDiff ℝ ∞ (fderiv ℝ (Ξ© t)) := hx.fderiv_right (by simp)
have hDV : ContDiff ℝ ∞ (fderiv ℝ (V t)) := (hV t).fderiv_right (by simp)
have ha := (hDV.differentiable (by simp) (Ξ© t x)).hasFDerivAt.comp x
((hx.differentiable (by simp) x).hasFDerivAt)
have hb := ((hDx.differentiable (by simp) x).hasFDerivAt).clm_apply
(hasFDerivAt_const w x)
have hab := congrArg (fun A : E β†’L[ℝ] E => A v) (ha.clm_apply hb).fderiv
simp only [add_apply, ContinuousLinearMap.comp_apply,
zero_apply, map_zero, zero_add, ContinuousLinearMap.flip_apply, Function.comp_def] at hab
rw [hab] at h
have hleft (s : ℝ) :
fderiv ℝ (fun y => G (s, y)) x v = fderiv ℝ (fderiv ℝ (Ξ© s)) x v w := by
have hs : ContDiff ℝ ∞ (Ξ© s) := hΞ©.comp (contDiff_const.prodMk contDiff_id)
have hds : DifferentiableAt ℝ (fderiv ℝ (Ξ© s)) x :=
(hs.fderiv_right (m := ∞) (by simp)).differentiable (by simp) x
have hh := congrArg (fun A : E β†’L[ℝ] E => A v)
(hds.hasFDerivAt.clm_apply (hasFDerivAt_const w x)).fderiv
simpa only [G, add_apply, ContinuousLinearMap.comp_apply,
zero_apply, map_zero, zero_add, ContinuousLinearMap.flip_apply, Function.comp_def] using hh
simpa only [hleft] using h
end ForcedComputation.Flow
end
end OAI