Physlib

Physlib.Thermodynamics.Temperature.TemperatureUnits

Units on Temperature

A unit of temperature corresponds to a choice of translationally-invariant metric on the temperature manifold (to be defined diffeomorphic to `ℝ≥0`). Such a choice is (non-canonically) equivalent to a choice of positive real number. We define the type `TemperatureUnit` to be equivalent to the positive reals.

On `TemperatureUnit` there is an instance of division giving a real number, corresponding to the ratio of the two scales of temperature unit.

To define specific temperature units, we first state the existence of a a given temperature unit, and then construct all other temperature units from it. We choose to state the existence of the temperature unit of kelvin, and construct all other temperature units from that.

Division of TemperatureUnit

The scaling of a temperature unit

Specific choices of temperature units

To define a specific temperature units. We first define the notion of a kelvin to correspond to the temperature unit with underlying value equal to `1`. This is really down to a choice in the isomorphism between the set of metrics on the temperature manifold and the positive reals.

Once we have defined kelvin, we can define other temperature units by scaling kelvin.

20 declarations

theorem

The numerical value of a temperature unit xx is non-zero (x.val0x.\text{val} \neq 0)

For any temperature unit xx, its underlying numerical value x.valx.\text{val} is not equal to zero (x.val0x.\text{val} \neq 0).

theorem

The value of a temperature unit is positive (x.val>0x.\text{val} > 0)

For any temperature unit xx, its underlying numerical value x.valx.\text{val} is strictly greater than zero (x.val>0x.\text{val} > 0).

instance

Default temperature unit

The type of temperature units, TemperatureUnit\text{TemperatureUnit}, has a default element. This default value is defined as the temperature unit whose underlying positive real value is 11.

instance

Ratio of two temperature units x/yR0x / y \in \mathbb{R}_{\ge 0}

For any two temperature units xx and yy, their division x/yx / y is defined as the ratio of their underlying positive real values, x.valy.val\frac{x.\text{val}}{y.\text{val}}, yielding a non-negative real number in R0\mathbb{R}_{\ge 0}.

theorem

Ratio of temperature units x/y=x.valy.valx/y = \frac{x.\text{val}}{y.\text{val}}

For any two temperature units xx and yy, the ratio x/yx/y is equal to the quotient of their underlying numerical values x.valy.val\frac{x.\text{val}}{y.\text{val}}, considered as a non-negative real number in R0\mathbb{R}_{\ge 0}.

theorem

The ratio of temperature units x/y0x / y \neq 0

For any two temperature units xx and yy, their ratio x/yx/y is not equal to zero in the set of non-negative real numbers R0\mathbb{R}_{\ge 0}.

theorem

The ratio of temperature units x/yx/y is strictly positive

For any two temperature units xx and yy, the ratio of their underlying values x/yx/y is strictly greater than zero in the set of non-negative real numbers R0\mathbb{R}_{\ge 0}.

theorem

x/x=1x / x = 1 for temperature units

For any temperature unit xx, the ratio of the unit to itself is equal to one, expressed as x/x=1x / x = 1 in the non-negative real numbers R0\mathbb{R}_{\ge 0}.

theorem

x/y=(y/x)1x / y = (y / x)^{-1} for temperature units

For any two temperature units xx and yy, the ratio of xx to yy is equal to the multiplicative inverse of the ratio of yy to xx. Mathematically, this is expressed as: x/y=(y/x)1x / y = (y / x)^{-1} where the division u1/u2u_1 / u_2 represents the ratio of the underlying scales of the temperature units as a non-negative real number in R0\mathbb{R}_{\ge 0}.

theorem

(x/y)(y/z)=x/z(x/y) \cdot (y/z) = x/z for temperature units x,y,zx, y, z

For any three temperature units x,y,x, y, and zz, the product of the ratio of xx to yy and the ratio of yy to zz is equal to the ratio of xx to zz. Expressed as real numbers, this holds as (x/y)(y/z)=x/z(x/y) \cdot (y/z) = x/z, where the division u1/u2u_1 / u_2 represents the ratio of the scales of the temperature units.

theorem

scale(r,x)/x=r\text{scale}(r, x) / x = r for temperature units

For any temperature unit xx and any positive real number r>0r > 0, the ratio of the temperature unit xx scaled by rr to the original unit xx is equal to rr. Mathematically, this is expressed as: scale(r,x)x=r\frac{\text{scale}(r, x)}{x} = r where scale(r,x)\text{scale}(r, x) denotes the temperature unit xx scaled by the factor rr, and the division u1/u2u_1 / u_2 represents the ratio of the scales of the temperature units as a non-negative real number.

theorem

x/scale(r,x)=1/rx / \text{scale}(r, x) = 1/r for temperature units xx and scale factor rr

For any temperature unit xx and any positive real number r>0r > 0, the ratio of the unit xx to the unit xx scaled by the factor rr is equal to 1/r1/r. Expressed mathematically: x/scale(r,x)=1/r x / \text{scale}(r, x) = 1/r In this identity, the division u1/u2u_1 / u_2 represents the ratio of the scales of the temperature units, resulting in a non-negative real number in R0\mathbb{R}_{\ge 0}.

theorem

Scaling a temperature unit by 11 is the identity operation: scale(1,x)=x\text{scale}(1, x) = x

For any temperature unit xx, scaling xx by a factor of 11 results in the same temperature unit xx. Mathematically, this is expressed as: scale(1,x)=x \text{scale}(1, x) = x where scale\text{scale} is the operation that scales a given temperature unit by a positive real number.

theorem

Ratio of Scaled Temperature Units: scale(r1,x1)scale(r2,x2)=r1r2x1x2\frac{\text{scale}(r_1, x_1)}{\text{scale}(r_2, x_2)} = \frac{r_1}{r_2} \cdot \frac{x_1}{x_2}

Let x1x_1 and x2x_2 be two temperature units, and let r1,r2r_1, r_2 be positive real numbers (r1>0r_1 > 0 and r2>0r_2 > 0). The ratio of the unit x1x_1 scaled by r1r_1 to the unit x2x_2 scaled by r2r_2 is equal to the ratio of the scaling factors multiplied by the ratio of the original units: scale(r1,x1,hr1)scale(r2,x2,hr2)=r1r2x1x2 \frac{\text{scale}(r_1, x_1, hr_1)}{\text{scale}(r_2, x_2, hr_2)} = \frac{r_1}{r_2} \cdot \frac{x_1}{x_2} In this expression, the division of temperature units results in a non-negative real number in R0\mathbb{R}_{\ge 0} representing the ratio of their underlying values.

theorem

Composition of Scaling for Temperature Units: scale(r1,scale(r2,x))=scale(r1r2,x)\text{scale}(r_1, \text{scale}(r_2, x)) = \text{scale}(r_1 \cdot r_2, x)

For any temperature unit xx and any two positive real numbers r1,r2r_1, r_2 (where r1>0r_1 > 0 and r2>0r_2 > 0), scaling the unit xx first by r2r_2 and then scaling the resulting unit by r1r_1 is equivalent to scaling the original unit xx by the product r1r2r_1 \cdot r_2. This is expressed as: scale(r1,scale(r2,x,hr2),hr1)=scale(r1r2,x,hr12) \text{scale}(r_1, \text{scale}(r_2, x, hr_2), hr_1) = \text{scale}(r_1 \cdot r_2, x, hr_{1 \cdot 2}) where scale\text{scale} is the operation that scales a temperature unit by a positive factor, and hr1,hr2,hr12hr_1, hr_2, hr_{1 \cdot 2} are the proofs that the scaling factors are positive.

definition

Kelvin temperature unit

The temperature unit of Kelvin is defined as the base unit of temperature, corresponding to the value 1 in the representation of `TemperatureUnit` as positive real numbers R>0\mathbb{R}_{>0}.

definition

nanokelvin=109 kelvin\text{nanokelvin} = 10^{-9} \text{ kelvin}

The temperature unit of nanokelvin is defined as the unit obtained by scaling the kelvin unit by a factor of 10910^{-9}.

definition

microkelvin=106 kelvin\text{microkelvin} = 10^{-6} \text{ kelvin}

The temperature unit of microkelvin\text{microkelvin} is defined as the unit obtained by scaling the kelvin\text{kelvin} unit by a factor of 10610^{-6}.

definition

millikelvin=103 kelvin\text{millikelvin} = 10^{-3} \text{ kelvin}

The temperature unit of millikelvin\text{millikelvin} is defined as the unit obtained by scaling the kelvin\text{kelvin} unit by a factor of 10310^{-3}.

definition

absoluteFahrenheit=59kelvin\text{absoluteFahrenheit} = \frac{5}{9} \text{kelvin}

The temperature unit absoluteFahrenheit\text{absoluteFahrenheit} is defined as the unit obtained by scaling the kelvin\text{kelvin} unit by a factor of 59\frac{5}{9}. This represents a temperature scale where the unit magnitude is equal to one degree Fahrenheit, measured from absolute zero.