File size: 3,648 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | 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
|