PhysLean Documentation

PhysLean.SpaceAndTime.Time.Basic

Time #

In this module we define the type Time, corresponding to time in a given (but arbitary) set of units, with a given (but arbitary) choice of origin (time zero), and a choice of orientation (i.e. a positive time direction).

We note that this is the version of time most often used in undergraduate and non-mathematical physics.

The choice of units or origin can be made on a case-by-case basis, as long as they are done consistently. However, since the choice of units and origin is left implicit, Lean will not catch inconsistencies in the choice of units or origin when working with Time.

For example, for the classical mechanics system corresponding to the harmonic oscillator, one can take the origin of time to be the time at which the initial conditions are specified, and the units can be taken as anything as long as the units chosen for time t and the angular frequency ω are consistent.

With this notion of Time, becomes a 1d vector space over with an inner product.

Within other modules e.g. TimeMan and TimeTransMan, we define versions of time with less choices made, and relate them to Time via a choice of units or origin.

structure Time :

The type Time represents the time in a given (but arbitary) set of units, and with a given (but arbitary) choice of origin.

  • val :

    The underlying real number associated with a point in time.

Instances For
    theorem Time.ext_iff {x y : Time} :
    x = y x.val = y.val
    theorem Time.ext {x y : Time} (val : x.val = y.val) :
    x = y
    Equations
    instance Time.instOfNat {n : } :

    The casting of a natural number to an element of Time. This corresponds to a choice of (1) zero point in time, and (2) a choice of metric on time (defining 1).

    Equations
    Equations
    theorem Time.realCast_val {r : } :
    { val := r }.val = r

    Coercions #

    @[simp]
    theorem Time.natCast_val {n : } :
    (↑n).val = n
    @[simp]
    theorem Time.natCast_zero :
    0 = 0
    @[simp]
    theorem Time.natCast_one :
    1 = 1
    @[simp]
    theorem Time.ofNat_val {n : } :
    val (OfNat.ofNat n) = n
    @[simp]
    theorem Time.realCast_of_natCast {n : } :
    { val := n } = n

    The choice of zero, one, and orientation #

    @[simp]
    theorem Time.zero_val :
    val 0 = 0
    @[simp]
    theorem Time.eq_zero_iff (t : Time) :
    t = 0 t.val = 0
    @[simp]
    theorem Time.one_val :
    val 1 = 1
    @[simp]
    theorem Time.eq_one_iff (t : Time) :
    t = 1 t.val = 1
    instance Time.instLE :

    The choice of an orientation on Time.

    Equations
    theorem Time.le_def (t1 t2 : Time) :
    t1 t2 t1.val t2.val

    Basic operations on Time. #

    Equations
    @[simp]
    theorem Time.add_val (t1 t2 : Time) :
    (t1 + t2).val = t1.val + t2.val
    Equations
    @[simp]
    theorem Time.neg_val (t : Time) :
    (-t).val = -t.val
    Equations
    @[simp]
    theorem Time.sub_val (t1 t2 : Time) :
    (t1 - t2).val = t1.val - t2.val
    Equations
    @[simp]
    theorem Time.smul_real_val (k : ) (t : Time) :
    (k t).val = k * t.val
    Equations
    Equations
    theorem Time.dist_eq_val (t1 t2 : Time) :
    dist t1 t2 = t1.val - t2.val
    theorem Time.dist_eq_real_dist (t1 t2 : Time) :
    dist t1 t2 = dist t1.val t2.val
    Equations
    @[simp]
    theorem Time.inner_def (t1 t2 : Time) :
    inner t1 t2 = t1.val * t2.val

    Instances on Time. #

    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.
    theorem Time.lt_def (t1 t2 : Time) :
    t1 < t2 t1.val < t2.val
    noncomputable instance Time.instDecidableEq :
    Equations
    Equations
    • One or more equations did not get rendered due to their size.

    Maps from Time to . #

    noncomputable def Time.toRealCLM :

    The continuous linear map from Time to .

    Equations
    Instances For
      noncomputable def Time.toRealCLE :

      The continuous linear equivalence from Time to .

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

        The linear isomentry equivalence from Time to .

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem Time.eq_one_smul (t : Time) :
          t = t.val 1

          Derivatives #

          noncomputable def Time.deriv {M : Type} [AddCommGroup M] [Module M] [TopologicalSpace M] (f : TimeM) :
          TimeM

          Given a function f : Time → M the derivative of f.

          Equations
          Instances For

            Given a function f : Time → M the derivative of f.

            Equations
            Instances For
              theorem Time.deriv_eq {M : Type} [AddCommGroup M] [Module M] [TopologicalSpace M] (f : TimeM) (t : Time) :
              deriv f t = (fderiv f t) 1
              theorem Time.deriv_smul {d : } {t : Time} (f : TimeEuclideanSpace (Fin d)) (k : ) (hf : Differentiable f) :
              deriv (fun (t : Time) => k f t) t = k deriv (fun (t : Time) => f t) t
              theorem Time.deriv_neg {M : Type} {t : Time} [NormedAddCommGroup M] [NormedSpace M] (f : TimeM) :
              deriv (-f) t = -deriv f t
              @[simp]
              theorem Time.fderiv_val (t : Time) :
              (fderiv val t) 1 = 1