math / data /lean /OAI /MathematicalPhysics /NavierStokes /ForcedComputation /Flow /FlowVariational.lean
Download data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/FlowVariational.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.65 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/FlowVariational.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/FlowVariational.lean
-
curl -L -o FlowVariational.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MathematicalPhysics/NavierStokes/ForcedComputation/Flow/FlowVariational.lean
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 | |