PhysLean Documentation

PhysLean.ClassicalMechanics.Space.Basic

Space #

This file contains d-dimensional space.

Note on implementation #

The definition of Space d currently inherits all instances of EuclideanSpace ℝ (Fin d).

This, in particular, automatically equips Space d with a norm. This norm induces a metric on Space d which is the standard Euclidean metric. Thus Space d automatically corresponds to flat space.

The definition of deriv through fderiv explicitly uses this metric.

Space d also inherits instances of EuclideanSpace ℝ (Fin d) such as a zero vector, the ability to add two space positions etc, which are not really allowed operations on Space d.

@[reducible, inline]
abbrev Space (d : := 3) :

The type Space d representes d dimensional Euclidean space. The default value of d is 3. Thus Space = Space 3.

Equations
Instances For
    noncomputable def Space.basis {d : } :

    The standard basis of Space based on Fin d.

    Equations
    Instances For
      noncomputable def Space.coord {d : } (μ : Fin d) (p : Space d) :

      The standard coordinate functions of Space based on Fin d.

      The notation 𝔁 μ p can be used for this.

      Equations
      Instances For

        The standard coordinate functions of Space based on Fin d.

        The notation 𝔁 μ p can be used for this.

        Equations
        Instances For

          Calculus #

          noncomputable def Space.deriv {M : Type u_1} {d : } [AddCommGroup M] [Module M] [TopologicalSpace M] (μ : Fin d) (f : Space dM) :
          Space dM

          Given a function f : Space d → M the derivative of f in direction μ.

          Equations
          Instances For
            theorem Space.deriv_eq {M : Type u_1} {d : } [AddCommGroup M] [Module M] [TopologicalSpace M] (μ : Fin d) (f : Space dM) (x : Space d) :
            deriv μ f x = (fderiv f x) (EuclideanSpace.single μ 1)

            Given a function f : Space d → M the derivative of f in direction μ.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              noncomputable def Space.grad {d : } (f : Space d) :

              The vector calculus operator grad.

              Equations
              Instances For

                The vector calculus operator grad.

                Equations
                Instances For
                  noncomputable def Space.curl (f : SpaceEuclideanSpace (Fin 3)) :

                  The vector calculus operator curl.

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

                    The vector calculus operator curl.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def Space.div {d : } (f : Space dEuclideanSpace (Fin d)) :
                      Space d

                      The vector calculus operator div.

                      Equations
                      Instances For

                        The vector calculus operator div.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          noncomputable def Space.laplacian {d : } (f : Space d) :
                          Space d

                          The scalar laplacian operator.

                          Equations
                          Instances For

                            The scalar laplacian operator.

                            Equations
                            Instances For
                              noncomputable def Space.laplacian_vec {d : } (f : Space dEuclideanSpace (Fin d)) :

                              The vector laplacian_vec operator.

                              Equations
                              Instances For

                                The vector laplacian_vec operator.

                                Equations
                                Instances For
                                  structure Space.Direction (d : := 3) :

                                  Notion of direction where unit returns a unit vector in the direction specified.

                                  Instances For
                                    noncomputable def Space.toDirection {d : } (x : Space d) (h : x 0) :

                                    Direction of a Space value with respect to the origin.

                                    Equations
                                    Instances For