File size: 4,362 Bytes
fac6777 | 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | import OAI.MathematicalPhysics.DefocusingNLS.Profile.RadialCartesianCalculus
import Mathlib.Analysis.Calculus.FDeriv.Symmetric
namespace OAI
/-! Constant Cartesian derivatives commute with each other and the Laplacian. -/
open scoped ContDiff Laplacian
namespace DefocusingNLS
local notation "E" => EuclideanSpace ℝ (Fin 12)
noncomputable def cartesianDerivative (v : E) (f : E → ℂ) (x : E) : ℂ :=
fderiv ℝ f x v
theorem cartesianDerivative_contDiff (f : E → ℂ) (hf : ContDiff ℝ ∞ f) (v : E) :
ContDiff ℝ ∞ (cartesianDerivative v f) :=
(contDiff_infty_iff_fderiv.mp hf).2.clm_apply contDiff_const
theorem cartesianDerivative_second (f : E → ℂ) (hf : ContDiff ℝ ∞ f)
(x v w : E) :
cartesianDerivative v (cartesianDerivative w f) x=
fderiv ℝ (fderiv ℝ f) x v w := by
have hd := (contDiff_infty_iff_fderiv.mp hf).2.differentiable (by simp) x
unfold cartesianDerivative
rw [fderiv_clm_apply hd (differentiableAt_const w)]
simp
theorem cartesianDerivative_commute (f : E → ℂ) (hf : ContDiff ℝ ∞ f) (v w : E) :
cartesianDerivative v (cartesianDerivative w f)=
cartesianDerivative w (cartesianDerivative v f) := by
funext x
rw [cartesianDerivative_second f hf,cartesianDerivative_second f hf]
exact (hf.contDiffAt.isSymmSndFDerivAt (by simp)).eq v w
theorem cartesianDerivative_sum (F : Fin 12 → E → ℂ)
(hF : ∀ j, ContDiff ℝ ∞ (F j)) (v : E) :
cartesianDerivative v (fun x => ∑ j : Fin 12, F j x)=
fun x => ∑ j : Fin 12, cartesianDerivative v (F j) x := by
funext x
unfold cartesianDerivative
rw [fderiv_fun_sum (fun j _ => (hF j).differentiable (by simp) x)]
simp
theorem laplacian_eq_cartesianDerivatives (f : E → ℂ) (hf : ContDiff ℝ ∞ f) :
Δ f=fun x => ∑ j : Fin 12,
cartesianDerivative (EuclideanSpace.basisFun (Fin 12) ℝ j)
(cartesianDerivative (EuclideanSpace.basisFun (Fin 12) ℝ j) f) x := by
funext x
rw [InnerProductSpace.laplacian_eq_iteratedFDeriv_orthonormalBasis _
(EuclideanSpace.basisFun (Fin 12) ℝ)]
apply Finset.sum_congr rfl
intro j _
exact radial_second_directional_eq f x _ (hf.contDiffAt.of_le (by simp))
theorem laplacian_cartesianDerivative (f : E → ℂ) (hf : ContDiff ℝ ∞ f) (v : E) :
Δ (cartesianDerivative v f)=cartesianDerivative v (Δ f) := by
let e := EuclideanSpace.basisFun (Fin 12) ℝ
have hi (j : Fin 12) :
cartesianDerivative (e j) (cartesianDerivative (e j) (cartesianDerivative v f))=
cartesianDerivative v (cartesianDerivative (e j) (cartesianDerivative (e j) f)) := by
rw [cartesianDerivative_commute f hf (e j) v]
exact cartesianDerivative_commute _ (cartesianDerivative_contDiff f hf (e j)) (e j) v
rw [laplacian_eq_cartesianDerivatives _ (cartesianDerivative_contDiff f hf v),
laplacian_eq_cartesianDerivatives f hf,
cartesianDerivative_sum _ (fun j => cartesianDerivative_contDiff _
(cartesianDerivative_contDiff f hf (e j)) (e j)) v]
funext x
exact Finset.sum_congr rfl (fun j _ => congrFun (hi j) x)
theorem laplacian_contDiff (f : E → ℂ) (hf : ContDiff ℝ ∞ f) :
ContDiff ℝ ∞ (Δ f) := by
rw [laplacian_eq_cartesianDerivatives f hf]
exact ContDiff.sum fun j _ => cartesianDerivative_contDiff _
(cartesianDerivative_contDiff f hf (EuclideanSpace.basisFun (Fin 12) ℝ j)) _
theorem cartesianDerivative_transport (f : E → ℂ) (hf : ContDiff ℝ ∞ f) (x v : E) :
fderiv ℝ (fun y => fderiv ℝ f y ((1/2 : ℝ) • y)) x v=
fderiv ℝ (cartesianDerivative v f) x ((1/2 : ℝ) • x)+
(1/2 : ℂ)*cartesianDerivative v f x := by
have hd := (contDiff_infty_iff_fderiv.mp hf).2.differentiable (by simp) x
have hv : HasFDerivAt (fun y : E => (1/2 : ℝ) • y)
((1/2 : ℝ) • ContinuousLinearMap.id ℝ E) x :=
(hasFDerivAt_id (𝕜 := ℝ) x).const_smul (1/2 : ℝ)
rw [fderiv_clm_apply hd hv.differentiableAt,hv.fderiv]
simp only [add_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.flip_apply,
smul_apply,ContinuousLinearMap.id_apply,map_smul,Complex.real_smul]
have hs := ((hf.contDiffAt (x := x)).isSymmSndFDerivAt (by simp)).eq v x
have hsecond := cartesianDerivative_second f hf x x v
unfold cartesianDerivative at hsecond ⊢
rw [hsecond,hs]
push_cast
ring
end DefocusingNLS
end OAI
|