Physlib.Units.WithDim.Analysis
A. Analysis of dimension-tagged quantities
The numerical value of `WithDim d M` identifies it with `M`. We use that explicit identification to induce a norm on the existing additive group, not to replace its addition, natural/integer scalar multiplication, or the existing `NNReal` action.
The norm measures a numerical representation in fixed units. It is not asserted to be invariant under a change of units. The coordinate equivalence is explicit: no coercion silently discards a dimension tag. No `Ring` or `Field` on a nontrivial physical dimension is introduced.
`transport` and `transportLinearMap` lift a function and its derivative between tagged coordinates. They do not assert that the function is dimensionally correct. In particular, changing the units of model parameters is a separate question. `hasFDerivAt_transport` uses the existing calculus of continuous linear equivalences.
A.1. Coordinates and the induced norm
A.2. Transport of existing functions and derivatives
13 declarations
Additive equivalence
For a physical dimension and a commutative additive monoid , let be the type of values in tagged with dimension . This definition provides the additive equivalence that maps a dimension-tagged quantity to its underlying numerical value in .
Normed additive commutative group structure on
For a physical dimension and a type that is a normed additive commutative group, the type (representing quantities of type tagged with dimension ) is equipped with a normed additive commutative group structure. The norm on is induced from the norm on via the additive equivalence , such that the norm of a dimension-tagged quantity is equal to the norm of its underlying numerical value in .
Linear equivalence
For a physical dimension and a type equipped with the structure of an additive commutative monoid and a module over the real numbers , let be the type of values in tagged with dimension . This definition provides the linear equivalence that maps a dimension-tagged quantity to its underlying numerical value in . This equivalence identifies the coordinates of the dimension-tagged quantity as being linear over dimensionless real scalars.
Normed space structure on over
For a physical dimension and a normed space over the real numbers , the type (representing quantities of type tagged with dimension ) is equipped with a normed space structure over . This structure inherits the norm from such that for any , its norm is , where is the underlying numerical value in . This definition ensures that the norm is compatible with real scalar multiplication, satisfying the property for all and .
for dimension-tagged quantities
Let be a physical dimension and be a normed additive commutative group. For any dimension-tagged quantity of type , the norm of is equal to the norm of its underlying numerical value , such that .
Linear isometry equivalence
Given a physical dimension and a type that is a normed space over the real numbers , this definition establishes a linear isometry equivalence . It maps a quantity of type tagged with dimension to its underlying numerical value in . This equivalence preserves the linear structure and the norm, such that for any , the norm is equal to the norm of its numerical value in .
for dimension-tagged quantities
For a physical dimension and a type that is a normed space over the real numbers , let be an element of the dimension-tagged type . The linear isometry equivalence from to maps to its underlying numerical value , such that .
Inverse of maps to
Let be a physical dimension and be a normed space over . The inverse of the linear isometry equivalence maps an element to its dimension-tagged representation in .
Transport of a function to dimension-tagged types
Given a function and physical dimensions and (within a base system ), the transport of is a function from the dimension-tagged type to . It maps an element with dimension and numerical value to an element with dimension and numerical value .
Numerical Value of Transported Function:
Let and be types, and let and be physical dimensions in a base system . For any function and any dimension-tagged quantity , the numerical value of the quantity obtained by applying the transported function to is equal to the result of applying to the numerical value of . That is, where denotes the underlying numerical representation of the quantity .
Transport of a continuous linear map to
Let and be normed spaces over , and let and be physical dimensions. Given a continuous linear map , this definition constructs a corresponding continuous linear map from to . It is defined by taking a quantity , extracting its underlying numerical value in via the canonical linear isometry , applying , and then tagging the resulting value in with the dimension using the inverse isometry .
Numerical Value of Transported Linear Map:
Let and be normed spaces over , and let and be physical dimensions in a base system . For any continuous linear map and any dimension-tagged quantity , the underlying numerical value of the result obtained by applying the transported linear map to is equal to the result of applying to the numerical value of . That is, where denotes the underlying numerical representation of the quantity in .
Fréchet Derivative of Transported Dimension-Tagged Functions
Let and be normed spaces over , and let and be physical dimensions. Suppose a function has a Fréchet derivative at a point . Then, for any dimension-tagged quantity whose underlying numerical value is (i.e., ), the transported function has a Fréchet derivative at . This derivative is the transported continuous linear map .
