Physlib.SpaceAndTime.Time.Basic
Time
i. Overview
In this module we define the type `Time`, corresponding to time in a given (but arbitrary) set of units, with a given (but arbitrary) 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.
ii. Key results
- `Time` : The type representing time with a choice of units and origin.
iii. Table of contents
- A. The definition of `Time` - B. Instances on Time - B.1. Natural numbers as elements of `Time` - B.2. Real numbers as elements of `Time` - B.3. Time is inhabited - B.4. The order on `Time` - B.5. Addition of times - B.6. Negation of times - B.7. Subtraction of times - B.8. Scalar multiplication of time - B.9. Module on `Time` - B.10. Norm of time - B.11. Inner product on `Time` - B.12. Decidability of `Time` - B.13. Measurability of `Time` - C. Basis of `Time` - D. Maps from `Time` to `ℝ`
iv. References
A. The definition of `Time`
B. Instances on Time
B.1. Natural numbers as elements of `Time`
B.2. Real numbers as elements of `Time`
B.3. Time is inhabited
B.4. The order on `Time`
B.5. Addition of times
B.6. Negation of times
B.7. Subtraction of times
B.8. Scalar multiplication of time
B.9. Module on `Time`
B.10. Norm of time
B.11. Inner product on `Time`
B.12. Decidability of `Time`
B.13. Measurability of `Time`
C. Basis of `Time`
D. Maps from `Time` to `ℝ`
59 declarations
The `val` function for `Time` is injective
The function , which assigns a numerical value to an element of type `Time`, is injective. That is, for any two time points , if , then .
Natural numbers as elements of `Time`
The type `Time` admits a canonical coercion from the natural numbers. For any natural number , it can be interpreted as an element of `Time` representing units of time relative to the chosen origin and orientation.
Natural number literals as `Time`
The type `Time` allows for the interpretation of natural number literals as elements of `Time`. This interpretation is based on a fixed choice of a zero point (origin) and a fixed unit of duration (defining the value ).
for in
For any natural number , the numerical value of when interpreted as an element of the type is equal to .
The natural number cast to is
The natural number , when interpreted as an element of the type via the canonical coercion, is equal to the zero element of .
The natural number cast to is
The natural number , when interpreted as an element of the type via the canonical coercion, is equal to the element of .
for any natural number cast to
For any natural number , let be interpreted as an element of the type (using the natural number literal coercion). The numerical value associated with this element, denoted by the function , is equal to .
in
In the type , which represents time with a fixed choice of units and origin, the element is not equal to the element .
The numerical value associated with the zero element (the origin) of the type `Time` is equal to . That is, .
for
The numerical value of the constant in the type is equal to . Specifically, , where is the function that returns the numerical representation of a element.
Coercion from to Time
This definition provides a coercion from the real numbers to the type `Time`. It allows any real number to be treated as an instance of `Time`, where the numerical value representing the time is set to .
Coercion from Time to
This definition provides a coercion from the type `Time` to the real numbers . It allows any instance of `Time` to be treated as a real number by extracting its underlying numerical value.
The value of cast as `Time` is
For any real number , the underlying numerical value of when cast into the type `Time` is equal to .
Casting to `Time` via is equivalent to direct casting
For any natural number , the value obtained by first casting to a real number and then to the type `Time` is equal to the value obtained by casting directly to `Time`.
`Time` is inhabited with default
The type is inhabited, meaning it has a designated default element. This default element is defined to be .
The default value of `Time` is
The default value of the type `Time` is equal to .
relation on `Time`
The type `Time` is equipped with a less-than-or-equal-to relation that defines the orientation of time. For any two time points , the relation holds if and only if their underlying numerical values satisfy the inequality .
For any two time points , the relation holds if and only if their underlying numerical values satisfy the inequality .
Partial order on
The type is equipped with a partial order structure. For any elements , the relation (defined by the inequality of their underlying numerical values) satisfies the following properties: 1. **Reflexivity**: . 2. **Transitivity**: If and , then . 3. **Antisymmetry**: If and , then .
For any two time instances , the relation holds if and only if their underlying numerical values satisfy the inequality .
Addition of `Time` values
The addition operation on the type `Time` is defined by summing the underlying numerical values of two time instances. For any , their sum is the element of `Time` whose value is the sum of the values of and , such that .
For any two time instances of type `Time`, the underlying numerical value of their sum is equal to the sum of their individual numerical values: .
Negation of `Time`
The negation operation on the type `Time` is defined by negating the underlying numerical value of a time . Specifically, for any , its negation is the element of `Time` whose value is the negative of the value of (i.e., ).
For any time instance of type `Time`, the underlying numerical value of its negation is equal to the negative of the numerical value of . That is, .
Subtraction of `Time`
For any two elements of the type , the subtraction is defined as the element of whose underlying numerical value is the difference between the value of and the value of (i.e., ).
For any two time instances , the underlying numerical value of their difference is equal to the difference between the numerical value of and the numerical value of . That is, .
Scalar multiplication of by
For any real number and any element of the type , the scalar multiplication is defined by multiplying the underlying real-valued magnitude of (denoted ) by .
In the context of the type, which represents time with a fixed choice of units and origin, for any real number and any , the underlying numerical value of the scalar product is equal to the product of and the underlying value of . That is, .
forms an additive group
The type , representing time with a fixed choice of units and origin, is endowed with the structure of an additive group. Under this structure, addition is associative, i.e., for all . The element (origin) serves as the additive identity such that and , and every time has an additive inverse satisfying . These properties are derived from the arithmetic of the underlying numerical values representing the time instances.
forms an additive commutative group
The type , which represents time with a fixed choice of units and origin, is endowed with the structure of an additive commutative group (Abelian group). This structure implies that, in addition to the properties of an additive group (associativity, identity, and inverses), addition is commutative: for all . These properties are inherited from the arithmetic of the underlying numerical values representing the time instances.
is a vector space over
The type is endowed with the structure of a module over the real numbers . This confirms that functions as a one-dimensional real vector space, where scalar multiplication for and satisfies the standard axioms: , , and distributivity over both scalar and time addition.
Norm of is
The norm on the space is defined such that for any element , its norm is equal to the absolute value (norm) of its underlying real-valued representation .
for
For any element in the space , the norm is equal to the norm (absolute value) of its underlying real-valued representation .
Distance in as
The type is equipped with a metric space structure where the distance function between two time points is defined as the norm of their difference, .
for
For any two time points in the space , the distance between them is equal to the norm of the difference of their underlying real-valued representations, .
For any two time points , the distance between them is equal to the standard Euclidean distance between their underlying real-valued representations.
as a seminormed additive commutative group
The type is equipped with the structure of a seminormed additive commutative group. This means that satisfies the axioms of an abelian group under addition and is endowed with a seminorm such that the distance between any two time points is given by . These properties, including the triangle inequality and the symmetry of the distance function, are inherited from the underlying real-valued representation of the time instances.
as a normed additive commutative group
The type is equipped with the structure of a normed additive commutative group. This means that satisfies the axioms of an abelian group under addition and is endowed with a norm such that the distance between any two time points , defined as , satisfies the identity of indiscernibles (). These properties are inherited from the underlying real-valued representation of the time instances.
is a normed space over
The type is endowed with the structure of a normed space over the field of real numbers . This means that is a real vector space equipped with a norm such that for any scalar and any , the property is satisfied. This structure ensures that the algebraic operations on (addition and scalar multiplication) are compatible with the topology induced by its norm.
Inner product on `Time`
The type `Time` is equipped with an inner product structure over the real numbers . For any two time values , the inner product is defined as the product of their underlying real values:
Definition of the inner product on :
For any two time values , their inner product over the real numbers is equal to the product of their underlying numerical values. That is, where represents the real number associated with the time in a given system of units and origin.
is an inner product space over
The type is endowed with the structure of an inner product space over the field of real numbers . This structure defines an inner product that is compatible with the norm on , such that for any , the relation holds. It further satisfies the standard axioms of a real inner product space, including linearity in the first argument and symmetry ().
Decidability of for
For any two time values , the equality is decidable.
as a measurable space
The type is equipped with a measurable space structure. This structure is defined by the Borel -algebra , which is the -algebra generated by the open sets of the topology on .
is a Borel Space
The type is a Borel space, meaning that its measurable space structure is identical to the Borel -algebra generated by the open sets of the topology on .
Orthonormal basis for
The definition provides an orthonormal basis for the space as a one-dimensional real inner product space. This basis is indexed by a single element (from the set , represented by `Fin 1`) and is defined by the unit element .
in
For the unique index in the set (represented by `Fin 1`), the orthonormal basis element of the space is equal to .
The dimension (rank) of the space as a vector space over the real numbers is 1.
The finite dimension of the space as a vector space over the real numbers is equal to .
is finite-dimensional over
The space , representing time with a fixed choice of units and origin, is a finite-dimensional vector space over the real numbers .
equals the basis-normalized Haar measure
The canonical volume measure on the space is equal to the additive Haar measure normalized with respect to the standard orthonormal basis of .
Continuous linear map from to
The definition `Time.toRealCLM` is the continuous linear map from the space to the real numbers . It associates each element with its corresponding real-valued representation . This map preserves the vector space structure (addition and scalar multiplication) and is continuous with respect to the standard topologies on and .
Continuous linear equivalence between and
The mapping is a continuous linear equivalence between the space and the real numbers . This equivalence identifies a time instance with its underlying numerical value in via the valuation function . As a continuous linear equivalence, the map preserves the additive and scalar multiplication structure of the 1-dimensional real vector space and serves as a homeomorphism between and .
Linear isometry equivalence between and
The definition establishes a linear isometry equivalence between the space and the real numbers . This mapping identifies a time instance with its numerical value in via the valuation function . As a linear isometry, this equivalence preserves the vector space structure (addition and scalar multiplication) and the norm, such that the norm of a time is equal to the absolute value of its real-valued representation.
The valuation function on is measurable
The valuation function , which assigns to each instance of time its corresponding numerical value in the real numbers, is a measurable function.
The valuation function is a measurable embedding
The valuation function , which assigns to each instance of time its corresponding numerical value in the real numbers, is a measurable embedding. This means that is an injective function such that a set is measurable if and only if its image is measurable in .
The valuation function on is measure-preserving
The valuation function , which identifies an element of the space with its corresponding real number, is measure-preserving with respect to the canonical volume measures on and . Specifically, for any measurable set , the volume of its preimage in is equal to the Lebesgue measure (volume) of in .
The valuation function on is differentiable
The valuation function , which maps an element of the space to its corresponding real-valued representation, is differentiable at all points with respect to the real numbers .
The Fréchet derivative of the valuation function at applied to is
For any point in the space , the Fréchet derivative of the valuation function at , when applied to the unit vector , is equal to .
