Physlib.Units.SIUnitChoices
A typed unit choice over the ISQ base quantities (the SI units)
`LTMCTUnitChoices` is the typed unit choice over PhysLib's default dimension basis `LTMCTDimensionBase`. This module gives the *second* typed unit choice — over the seven ISQ base quantities `ISQDimensionBase` — realised through the basis-generic `UnitMagnitudeCatalog` / `UnitSystem` machinery of `Physlib.Units.UnitSystem`. It is the concrete payoff of parametrising the unit side: the same generic layer produces a fully *typed* unit choice over a different basis, and the scaling homomorphism comes for free from `UnitScale.dimScale` — nothing is re-proved by hand.
The ISQ base quantities are length, mass, time, electric current, thermodynamic temperature, amount of substance and luminous intensity. Four of the corresponding typed unit types already exist (`LengthUnit`, `MassUnit`, `TimeUnit`, `TemperatureUnit`); the remaining three — `CurrentUnit`, `AmountUnit`, `LuminousIntensityUnit` — are introduced here. (They follow the `LengthUnit` convention of a positive-real magnitude; the full division/scaling API can be filled in later and, following PhysLib's layout, they would ultimately live under the relevant physics directories.)
`SIUnitChoices := UnitSystem ISQDimensionBase` is then the typed SI unit choice, and `SIUnitChoices.SI` is the coherent SI choice (metre, kilogram, second, ampere, kelvin, mole, candela). Contrast `SIUnitChoices` (current-based, seven typed slots) with `LTMCTUnitChoices` (charge-based, five typed slots): the machinery supports both, and the `Dimension.ltmctToISQ` / `Dimension.isqToLTMCT` bridge relates their bases.
Typed unit types for the ISQ base quantities not already present
The ISQ `UnitMagnitudeCatalog` instance
Each ISQ base quantity is assigned its typed unit type; the magnitude layer is the positive-real `val`, exactly as for the `LTMCTDimensionBase` instance.
Folding over the ISQ base quantities
`SIUnitChoices`
29 declarations
The magnitude of any current unit is non-zero ()
For any unit of electric current (of type `CurrentUnit`), its numerical magnitude is non-zero.
The magnitude of a current unit is positive
For any electric current unit , its numerical magnitude is strictly greater than zero ().
Default current unit with magnitude
The type `CurrentUnit` is inhabited, meaning it has a designated default element. This default current unit is defined to have a magnitude of .
Division of `CurrentUnit` into
For any two current units and of type `CurrentUnit`, their division is defined as the ratio of their numerical magnitudes, , resulting in a non-negative real number in .
Division of electric current units equals the ratio of their magnitudes
For any two electric current units and of type `CurrentUnit`, the quotient is equal to the ratio of their numerical magnitudes , expressed as a non-negative real number in .
The ampere () as the coherent SI unit of electric current
The constant `CurrentUnit.amperes` represents the ampere, which is the coherent SI unit of electric current. It is defined as an element of the type `CurrentUnit` with a numerical magnitude of .
The magnitude of an amount unit is non-zero ()
For any unit of amount of substance (an element of the type `AmountUnit`), its numerical magnitude is non-zero, i.e., .
The magnitude of an amount of substance unit is strictly positive ()
For any unit of amount of substance , its numerical magnitude is strictly positive, such that .
is inhabited
The type , which represents units for the amount of substance, is inhabited. Its default element is defined as the unit with a numerical magnitude of .
Division of units of amount of substance
The division of two units of amount of substance is defined as the ratio of their magnitudes, resulting in a non-negative real number .
The ratio of two units of amount of substance equals the ratio of their magnitudes
For any two units of amount of substance and , their quotient is equal to the non-negative real number formed by the ratio of their numerical magnitudes, .
The mole as a unit of amount of substance
The mole () is defined as the coherent SI unit for the base quantity of amount of substance, represented as an element of `AmountUnit` with a magnitude of .
The magnitude of a luminous intensity unit is non-zero
For any unit of luminous intensity , its numerical magnitude is non-zero.
The magnitude of a luminous intensity unit is positive
For any luminous intensity unit , its numerical magnitude is strictly greater than zero ().
Default `LuminousIntensityUnit` is
The type `LuminousIntensityUnit`, which represents units of luminous intensity, is inhabited. Its default element is defined as the unit with a magnitude of .
Division of Luminous Intensity Units resulting in
The division operator between two units of luminous intensity, and , results in a non-negative real number . The value of is defined as the ratio of their underlying magnitudes .
The ratio of two luminous intensity units is the ratio of their magnitudes
For any two units of luminous intensity and , the result of the division is the non-negative real number obtained by taking the ratio of their respective numerical magnitudes, .
The candela unit of luminous intensity
The constant represents the candela, which is the coherent SI unit for luminous intensity. It is defined as an element of the `LuminousIntensityUnit` type with a numerical magnitude of .
Unit Magnitude Catalog for ISQ Base Dimensions
This instance defines the `UnitMagnitudeCatalog` for the seven base quantities of the International System of Quantities (ISQ). It maps each base dimension in `ISQDimensionBase` to its corresponding unit type: - Length `LengthUnit` - Mass `MassUnit` - Time `TimeUnit` - Electric current `CurrentUnit` - Thermodynamic temperature `TemperatureUnit` - Amount of substance `AmountUnit` - Luminous intensity `LuminousIntensityUnit` For any unit belonging to one of these types, the magnitude function returns its underlying value as a positive real number in .
The product of over all equals the product of its seven elements
Let be a commutative monoid and be a function. The product of over all base quantities in the International System of Quantities (ISQ) is given by: Here, is the set of the seven fundamental base quantities: length, mass, time, electric current, thermodynamic temperature, amount of substance, and luminous intensity.
Typed Choice of SI Base Units
`SIUnitChoices` is the type of unit systems defined over the seven base quantities of the International System of Quantities (ISQ). An element of this type is a function that assigns a specific typed unit to each of the seven fundamental dimensions: 1. Length () 2. Mass () 3. Time () 4. Electric current () 5. Thermodynamic temperature () 6. Amount of substance () 7. Luminous intensity () This structure allows for the formal representation of specific unit systems (such as the coherent SI system) by providing a "slot" for a unit of the appropriate type for every ISQ base dimension.
The coherent SI base unit system
The coherent SI unit choice is the specific element of `SIUnitChoices` that maps each of the seven base quantities of the International System of Quantities (ISQ) to its standard coherent SI base unit. This mapping is defined as: - - - - - - -
Dimension scaling homomorphism for SI unit systems and
For two unit systems defined over the seven ISQ base quantities (length, mass, time, electric current, thermodynamic temperature, amount of substance, and luminous intensity), `SIUnitChoices.dimScale u1 u2` is the group homomorphism from the group of physical dimensions to the non-negative real numbers . For any dimension , this homomorphism returns the numerical scaling factor between the units chosen by system and those chosen by system .
The dimension scaling factor from a unit system to itself is
For any unit system and any physical dimension defined over the seven ISQ base quantities (length, mass, time, electric current, thermodynamic temperature, amount of substance, and luminous intensity), the numerical scaling factor between the unit system and itself for the dimension is . That is, .
for luminous intensity units
For any unit of luminous intensity and any positive real number , the ratio of the unit scaled by (denoted ) to the original unit is equal to . Here, the division of two units results in a non-negative real number .
The ratio of a unit of luminous intensity to its scaled version equals
For any unit of luminous intensity and any positive real number , the ratio of to the unit scaled by (denoted by ) is equal to the non-negative real number .
for units of luminous intensity
For any unit of luminous intensity , scaling by a factor of is equal to .
Ratio of scaled luminous intensity units equals
For any units of luminous intensity and , and any positive real numbers , the ratio of the scaled units is given by where denotes the unit scaled by the factor , and the division of units results in a value in the non-negative real numbers .
for Luminous Intensity Units
Let be a unit of luminous intensity. For any positive real numbers , scaling the unit by and then scaling the resulting unit by is equivalent to scaling the original unit by the product . That is,
