PhysLean Documentation

PhysLean.ClassicalMechanics.Space.VectorIdentities

VectorIdentities #

In this file we define common vector calculus identities based on Space.

General auxiliary lemmas #

theorem fderiv_pi' {𝕜 : Type u_3} [NontriviallyNormedField 𝕜] {X : Type u_4} [NormedAddCommGroup X] [NormedSpace 𝕜 X] {ι : Type u_1} [Fintype ι] {Y' : ιType u_2} [(i : ι) → NormedAddCommGroup (Y' i)] [(i : ι) → NormedSpace 𝕜 (Y' i)] {Φ : X(i : ι) → Y' i} {x : X} (h : DifferentiableAt 𝕜 Φ x) :
fderiv 𝕜 Φ x = ContinuousLinearMap.pi fun (i : ι) => fderiv 𝕜 (fun (x : X) => Φ x i) x
theorem ContDiff.differentiable_fderiv {𝕜 : Type u_3} [NontriviallyNormedField 𝕜] {X : Type u_4} [NormedAddCommGroup X] [NormedSpace 𝕜 X] {Y : Type u_5} [NormedAddCommGroup Y] [NormedSpace 𝕜 Y] (f : XY) (hf : ContDiff 𝕜 2 f) :
Differentiable 𝕜 fun (x : X) => fderiv 𝕜 f x
theorem fderiv_coord_eq_proj_comp {𝕜 : Type u_3} [NontriviallyNormedField 𝕜] {X : Type u_4} [NormedAddCommGroup X] [NormedSpace 𝕜 X] {ι : Type u_1} [Fintype ι] {Y' : ιType u_2} [(i : ι) → NormedAddCommGroup (Y' i)] [(i : ι) → NormedSpace 𝕜 (Y' i)] {Φ : X(i : ι) → Y' i} {x : X} {i : ι} (h : DifferentiableAt 𝕜 Φ x) :
fderiv 𝕜 (fun (x : X) => Φ x i) x = (ContinuousLinearMap.proj i).comp (fderiv 𝕜 Φ x)

Space.deriv lemmas #

theorem Space.deriv_add {M : Type u_1} {d : } {u : Fin d} [NormedAddCommGroup M] [NormedSpace M] (f1 f2 : Space dM) (hf1 : Differentiable f1) (hf2 : Differentiable f2) :
deriv u (f1 + f2) = deriv u f1 + deriv u f2

Derivatives on space distiribute over addition.

theorem Space.deriv_coord_add {d : } {u i : Fin d} (f1 f2 : Space dEuclideanSpace (Fin d)) (hf1 : Differentiable f1) (hf2 : Differentiable f2) :
(deriv u fun (x : Space d) => f1 x i + f2 x i) = (deriv u fun (x : Space d) => f1 x i) + deriv u fun (x : Space d) => f2 x i

Derivatives on space distiribute coordinate-wise over addition.

theorem Space.deriv_smul {M : Type u_1} {d : } {u : Fin d} [NormedAddCommGroup M] [NormedSpace M] (f : Space dM) (k : ) (hf : Differentiable f) :
deriv u (k f) = k deriv u f

Scalar multiplication on space derivatives.

theorem Space.deriv_coord_smul {d : } {u i : Fin d} {x : Space d} (f : Space dEuclideanSpace (Fin d)) (k : ) (hf : Differentiable f) :
deriv u (fun (x : Space d) => k * f x i) x = (k deriv u fun (x : Space d) => f x i) x

Coordinate-wise scalar multiplication on space derivatives.

theorem Space.deriv_commute {M : Type u_1} {d : } {u v : Fin d} [NormedAddCommGroup M] [NormedSpace M] (f : Space dM) (hf : ContDiff 2 f) :
deriv u (deriv v f) = deriv v (deriv u f)

Derivatives on space commute with one another.

theorem Space.differentiable_fderiv_coord {i : Fin 3} (f : SpaceEuclideanSpace (Fin 3)) (hf : ContDiff 2 f) :
Differentiable (fderiv fun (x : Space) => f x i)

Coordiate functions of fderiv is differentiable.

theorem Space.deriv_coord_2nd_add {i u v w : Fin 3} (f : SpaceEuclideanSpace (Fin 3)) (hf : ContDiff 2 f) :
(deriv i fun (x : Space) => deriv u (fun (x : Space) => f x u) x + (deriv v (fun (x : Space) => f x v) x + deriv w (fun (x : Space) => f x w) x)) = deriv i (deriv u fun (x : Space) => f x u) + deriv i (deriv v fun (x : Space) => f x v) + deriv i (deriv w fun (x : Space) => f x w)

Second derivatives distiribute coordinate-wise over addition (all three components for div).

theorem Space.deriv_coord_2nd_sub {u v w : Fin 3} (f : SpaceEuclideanSpace (Fin 3)) (hf : ContDiff 2 f) :
(deriv u fun (x : Space) => deriv v (fun (x : Space) => f x w) x - deriv w (fun (x : Space) => f x v) x) = deriv u (deriv v fun (x : Space) => f x w) - deriv u (deriv w fun (x : Space) => f x v)

Second derivatives distiribute coordinate-wise over subtraction (two components for curl).

Vector calculus identities #

Addition of ∇ operations #

theorem Space.grad_add {d : } (f1 f2 : Space d) (hf1 : Differentiable f1) (hf2 : Differentiable f2) :
grad (f1 + f2) = grad f1 + grad f2
theorem Space.div_add (f1 f2 : SpaceEuclideanSpace (Fin 3)) (hf1 : Differentiable f1) (hf2 : Differentiable f2) :
div (f1 + f2) = div f1 + div f2
theorem Space.curl_add (f1 f2 : SpaceEuclideanSpace (Fin 3)) (hf1 : Differentiable f1) (hf2 : Differentiable f2) :
curl (f1 + f2) = curl f1 + curl f2

Scalar multiplication of ∇ operations #

theorem Space.grad_smul {d : } (f : Space d) (k : ) (hf : Differentiable f) :
grad (k f) = k grad f
theorem Space.div_smul (f : SpaceEuclideanSpace (Fin 3)) (k : ) (hf : Differentiable f) :
div (k f) = k div f
theorem Space.curl_smul (f : SpaceEuclideanSpace (Fin 3)) (k : ) (hf : Differentiable f) :
curl (k f) = k curl f

Linearity of div and curl #

theorem Space.div_linear_map {W : Type u_1} [NormedAddCommGroup W] [NormedSpace W] (f : WSpaceEuclideanSpace (Fin 3)) (hf : ∀ (w : W), Differentiable (f w)) (hf' : IsLinearMap f) :
IsLinearMap fun (w : W) => div (f w)
theorem Space.curl_linear_map {W : Type u_1} [NormedAddCommGroup W] [NormedSpace W] (f : WSpaceEuclideanSpace (Fin 3)) (hf : ∀ (w : W), Differentiable (f w)) (hf' : IsLinearMap f) :
IsLinearMap fun (w : W) => curl (f w)