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 : X → Y) (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 d → M) (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 d → EuclideanSpace ā„ (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 d → M) (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 d → EuclideanSpace ā„ (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 d → M) (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 : Space → EuclideanSpace ā„ (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 : Space → EuclideanSpace ā„ (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 : Space → EuclideanSpace ā„ (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 #

@[simp]
theorem Space.grad_zero {d : ā„•} :
grad 0 = 0
@[simp]
theorem Space.div_zero {d : ā„•} :
div 0 = 0
@[simp]
theorem Space.curl_zero :
curl 0 = 0
@[simp]
theorem Space.grad_const {d : ā„•} (c : ā„) :
(grad fun (x : Space d) => c) = 0
@[simp]
theorem Space.div_const {d : ā„•} (v : EuclideanSpace ā„ (Fin d)) :
(div fun (x : Space d) => v) = 0
@[simp]
theorem Space.curl_const (vā‚ƒ : EuclideanSpace ā„ (Fin 3)) :
(curl fun (x : Space) => vā‚ƒ) = 0

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 : Space → EuclideanSpace ā„ (Fin 3)) (hf1 : Differentiable ā„ f1) (hf2 : Differentiable ā„ f2) :
div (f1 + f2) = div f1 + div f2
theorem Space.curl_add (f1 f2 : Space → EuclideanSpace ā„ (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 : Space → EuclideanSpace ā„ (Fin 3)) (k : ā„) (hf : Differentiable ā„ f) :
div (k • f) = k • div f

Linearity of div and curl #

theorem Space.div_linear_map {W : Type u_1} [NormedAddCommGroup W] [NormedSpace ā„ W] (f : W → Space → EuclideanSpace ā„ (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 : W → Space → EuclideanSpace ā„ (Fin 3)) (hf : āˆ€ (w : W), Differentiable ā„ (f w)) (hf' : IsLinearMap ā„ f) :
IsLinearMap ā„ fun (w : W) => curl (f w)