6.6. Metrological units (Dybkær Ch. 18, §13.3.3)
-
PropertyKindCalculus.MetrologicalUnit[complete]
A metrological unit (§18.12) carries the kind it
references and a terminological symbol (the unit id, e.g. "m", "kg"). A kind
bears a unit (BearsUnit, §13.3.3) iff its scale is at least differential, and a
unit is well-formed iff its kind bears one; measure u n builds the
property value "n × symbol".
Lean code for Definition6.6.1●1 definition
Associated Lean declarations
-
PropertyKindCalculus.MetrologicalUnit[complete]
-
PropertyKindCalculus.MetrologicalUnit[complete]
-
structuredefined in PropertyKindCalculus/Unit.leancomplete
structure PropertyKindCalculus.MetrologicalUnit : Type
structure PropertyKindCalculus.MetrologicalUnit : Type
**§18.12 metrological unit** — one quantity of a kind chosen as the reference, "with which any other quantity of the same kind can be compared". Carried as the kind it references together with its terminological `symbol` (the §18.12 unit id, e.g. `"m"`, `"kg"`). Like `KindOfProperty`, it is an open value so applications declare units as `def`s.
Fields
kind : PropertyKindCalculus.KindOfProperty
§18.12 / §13.3.3 — the kind whose quantities this unit references. A well-formed unit's kind must bear a unit (`WellFormed`).
symbol : String
§18.12 — the terminological identity of the unit (the unit id, e.g. `"m"`).
A structure with DecidableEq. BearsUnit is scale.AllowsDifference,
WellFormed is kind.BearsUnit, and measure fills the value's numeral and
reference fields from n and the unit's symbol.
Commensurability is an equivalence. Two units are commensurable iff they reference the same kind (§9.13.4); the relation is reflexive, symmetric, and transitive. A metre and a centimetre are commensurable; a metre and a kilogram are not — incommensurability across kinds is a fact of the types, not a runtime check. Transitivity is exactly the law a description logic cannot state.
Lean code for Theorem6.6.2●1 theorem
Associated Lean declarations
-
theoremdefined in PropertyKindCalculus/Unit.leancomplete
theorem PropertyKindCalculus.MetrologicalUnit.Commensurable.trans {u₁ u₂ u₃ : PropertyKindCalculus.MetrologicalUnit} (h₁ : u₁.Commensurable u₂) (h₂ : u₂.Commensurable u₃) : u₁.Commensurable u₃
theorem PropertyKindCalculus.MetrologicalUnit.Commensurable.trans {u₁ u₂ u₃ : PropertyKindCalculus.MetrologicalUnit} (h₁ : u₁.Commensurable u₂) (h₂ : u₂.Commensurable u₃) : u₁.Commensurable u₃
Commensurability is transitive — the law a description logic cannot state.
Commensurability unfolds to equality of the kind field, so reflexivity,
symmetry, and transitivity are those of Eq.
Only a unitary kind bears a unit. A nominal kind has no magnitude, and — the
distinctive §9.13.4 fact — an ordinal kind, though rankable, has no
reference-times-number magnitude either, so neither bears a metrological unit
(not_wellFormed_of_nominal, not_wellFormed_of_ordinal). Conversely a rational
kind does (rational_bears_unit), and bearing a unit implies being a
kind-of-quantity (bearsUnit_isQuantity). This gate is invisible to a
dimension-and-scale-only view that treats every magnitude alike. Uses the metrological unit.
Lean code for Theorem6.6.3●1 theorem
Associated Lean declarations
-
theoremdefined in PropertyKindCalculus/Unit.leancomplete
theorem PropertyKindCalculus.MetrologicalUnit.not_wellFormed_of_ordinal {u : PropertyKindCalculus.MetrologicalUnit} (h : u.kind.IsOrdinal) : ¬u.WellFormed
theorem PropertyKindCalculus.MetrologicalUnit.not_wellFormed_of_ordinal {u : PropertyKindCalculus.MetrologicalUnit} (h : u.kind.IsOrdinal) : ¬u.WellFormed
A metrological unit of an ordinal kind is ill-formed (§9.13.4).
BearsUnit is scale.AllowsDifference, which is False at nominal and ordinal;
substitute the scale from IsNominal/IsOrdinal and the goal is ¬ False. The
rational case and bearsUnit_isQuantity are the same four-way case split on the
scale.
The number-and-reference form is a faithful round-trip (§13.3.3). Measuring a
quantity in a unit yields a numeral, and re-applying the unit to that numeral
recovers the value:
\mathrm{numeral}\,(\mathrm{measure}\ u\ n) = n \qquad\text{and}\qquad \mathrm{measure}\ u\ (\mathrm{numeral}\ v) = v \;\text{ when } v \text{ is measured in } u.
So quantity / unit = number and number × unit = quantity invert one another —
the §13.3.3 "reference quantity multiplied by a number", checked as a law. Measuring
in a well-formed unit moreover yields a quantity value
(measure_isQuantityValue), and values measured in commensurable units are comparable. Builds on the metrological unit.
Lean code for Theorem6.6.4●1 theorem
Associated Lean declarations
-
theoremdefined in PropertyKindCalculus/Unit.leancomplete
theorem PropertyKindCalculus.MetrologicalUnit.measure_eq_of_measures {u : PropertyKindCalculus.MetrologicalUnit} {v : PropertyKindCalculus.PropertyValue} (h : u.Measures v) : u.measure v.numeral = v
theorem PropertyKindCalculus.MetrologicalUnit.measure_eq_of_measures {u : PropertyKindCalculus.MetrologicalUnit} {v : PropertyKindCalculus.PropertyValue} (h : u.Measures v) : u.measure v.numeral = v
**`number × unit = quantity`** — re-applying a unit to the numeral of a value measured in it recovers the value exactly. Together with `measure_numeral` this is the §13.3.3 number-and-reference *round-trip*: the unit is a faithful reference.
measure_numeral is rfl. For the converse, destructure "measured in u" into the
kind- and reference-equalities, unfold measure, and rewrite the unit's kind and
symbol back to the value's fields; structure eta closes the goal.