PhysLean Documentation

PhysLean.SpaceAndTime.Space.Derivatives.Grad

Gradient of functions and distributions on Space d #

i. Overview #

This module defines and proves basic properties of the gradient operator on functions from Space d to and on distributions from Space d to .

The gradient operator returns a vector field whose components are the partial derivatives of the input function with respect to each spatial coordinate.

ii. Key results #

iii. Table of contents #

iv. References #

A. The gradient of functions on Space d #

noncomputable def Space.grad {d : } (f : Space d) :

The vector calculus operator grad.

Equations
Instances For

    The vector calculus operator grad.

    Equations
    Instances For

      A.1. Gradient of the zero function #

      @[simp]
      theorem Space.grad_zero {d : } :
      grad 0 = 0

      A.2. Gradient distributes over addition #

      theorem Space.grad_add {d : } (f1 f2 : Space d) (hf1 : Differentiable f1) (hf2 : Differentiable f2) :
      grad (f1 + f2) = grad f1 + grad f2

      A.3. Gradient of a constant function #

      @[simp]
      theorem Space.grad_const {d : } {c : } :
      (grad fun (x : Space d) => c) = 0

      A.4. Gradient distributes over scalar multiplication #

      theorem Space.grad_smul {d : } (f : Space d) (k : ) (hf : Differentiable f) :
      grad (k f) = k grad f

      A.5. Gradient distributes over negation #

      theorem Space.grad_neg {d : } (f : Space d) :
      grad (-f) = -grad f

      A.6. Expansion in terms of basis vectors #

      theorem Space.grad_eq_sum {d : } (f : Space d) (x : Space d) :
      grad f x = i : Fin d, deriv i f x basis i

      A.7. Components of the gradient #

      theorem Space.grad_apply {d : } (f : Space d) (x : Space d) (i : Fin d) :
      grad f x i = deriv i f x

      A.8. Inner product with a gradient #

      theorem Space.grad_inner_eq {d : } (f : Space d) (x y : Space d) :
      inner (grad f x) y = (fderiv f x) y
      theorem Space.inner_grad_eq {d : } (f : Space d) (x y : Space d) :
      inner x (grad f y) = (fderiv f y) x

      A.9. Gradient is equal to gradient from Mathlib #

      theorem Space.grad_eq_gradiant {d : } (f : Space d) :

      A.10. Value of gradient in the direction of the position vector #

      theorem Space.grad_inner_space_unit_vector {d : } (x : Space d) (f : Space d) (hd : Differentiable f) :
      inner (grad f x) (x⁻¹ x) = _root_.deriv (fun (r : ) => f (r x⁻¹ x)) x

      The gradient in the direction of the space position.

      theorem Space.grad_inner_space {d : } (x : Space d) (f : Space d) (hd : Differentiable f) :
      inner (grad f x) x = x * _root_.deriv (fun (r : ) => f (r x⁻¹ x)) x

      A.11. Gradient of the norm squared function #

      theorem Space.grad_norm_sq {d : } (x : Space d) :
      grad (fun (x : Space d) => x ^ 2) x = 2 x

      A.12. Gradient of the inner product function #

      theorem Space.grad_inner {d : } :
      (grad fun (y : Space d) => inner y y) = fun (z : Space d) => 2 z

      The gradient of the inner product is given by 2 • x.

      theorem Space.grad_inner_left {d : } (x : Space d) :
      (grad fun (y : Space d) => inner y x) = fun (x_1 : Space d) => x
      theorem Space.grad_inner_right {d : } (x : Space d) :
      (grad fun (y : Space d) => inner x y) = fun (x_1 : Space d) => x

      A.13. Integrability with bounded functions #

      B. Gradient of distributions #

      B.1. The definition #

      The gradient of a distribution (Space d) →d[ℝ] ℝ as a distribution (Space d) →d[ℝ] (EuclideanSpace ℝ (Fin d)).

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        B.2. The gradient of inner products #

        theorem Space.distGrad_eq_of_inner {d : } (f : (Space d)→d[] ) (g : (Space d)→d[] EuclideanSpace (Fin d)) (h : ∀ (η : SchwartzMap (Space d) ) (y : Space d), (((Distribution.fderivD ) f) η) y = inner (g η) y) :

        B.3. The gradient as a sum over basis vectors #

        B.4. The underlying function of the gradient distribution #

        theorem Space.distGrad_toFun_eq_distDeriv {d : } (f : (Space d)→d[] ) :
        (↑(distGrad f)).toFun = fun (ε : SchwartzMap (Space d) ) (i : Fin d) => ((distDeriv i) f) ε

        B.5. The gradient applied to a Schwartz function #

        theorem Space.distGrad_apply {d : } (f : (Space d)→d[] ) (ε : SchwartzMap (Space d) ) :
        (distGrad f) ε = fun (i : Fin d) => ((distDeriv i) f) ε