Skip to main content

Quantity Value Ontology

Measurement and Dimensional Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 14 October 2026
Audio Overview
FLOW ALGEBRA
Quantity Value Ontology — Kireth Semantic Library
Version: 1.0
Date: 2026-10-14
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/measurement-and-dimensional-entities/quantity-value-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)

1. PURPOSE
Represent the value of a mathematical or measured quantity as a typed numerical magnitude associated, where applicable, with a unit, quantity kind, uncertainty, and provenance. Distinguish a quantity from its representation and a numerical value from a quantity value.

2. TYPE SYSTEM
entity QuantityValue {
  id: Identifier
  quantity_kind: QuantityKind?
  magnitude: Real | Complex | Rational | Interval | Vector | Tensor
  unit: Unit?                 # Required for dimensional values unless explicitly contextual
  dimension: DimensionVector?
  uncertainty: Uncertainty?
  precision: Precision?
  reference: ReferenceCondition?
  provenance: Provenance?
}
entity Quantity { id: Identifier; kind: QuantityKind; value: QuantityValue? }
entity Unit { symbol: String; dimension: DimensionVector; scale_to_reference: PositiveReal; offset_to_reference: Real? }
entity DimensionVector { exponents: Map<B-aseDimension,Rational> }
entity Uncertainty { standard: NonnegativeReal?; expanded: NonnegativeReal?; coverage_factor: PositiveReal? }
entity Provenance { source: Identifier?; method: String?; timestamp: DateTime? }

3. RELATIONSHIPS
Quantity --has_value--> QuantityValue
QuantityValue --expressed_in--> Unit
QuantityValue --has_dimension--> DimensionVector
QuantityValue --has_uncertainty--> Uncertainty
QuantityValue --derived_from--> Provenance
Unit --compatible_with--> Unit iff dimension vectors agree and quantity kinds permit conversion
QuantityValue --equivalent_under_conversion--> QuantityValue

4. CORE ALGEBRA
For linear units with common reference: reference_value = scale_to_reference * magnitude.
For affine units (e.g. Celsius to kelvin): reference_value = scale_to_reference * magnitude + offset_to_reference.
Conversion A -> B: magnitude_B = (scale_A * magnitude_A + offset_A - offset_B) / scale_B.
Pure multiplicative conversions use zero offsets.
Addition/subtraction of quantities requires compatible dimensions and semantically appropriate quantity kinds; convert units before operating.
Multiplication: (a U)*(b V) = (ab)(U*V), with dimension exponents added, for multiplicative units.
Division: (a U)/(b V) = (a/b)(U/V), b != 0, with dimension exponents subtracted.
Power: (a U)^p = a^p U^p, provided the numerical operation is defined and unit is multiplicative.
Do not multiply/divide affine absolute-temperature scales directly; convert to absolute or interval quantities as appropriate.

5. VALIDATION
RULE QV-01: Every QuantityValue must have a valid magnitude representation.
RULE QV-02: Unit dimension must match the declared quantity dimension.
RULE QV-03: Missing unit is permitted for dimensionless quantities or explicit contextual unit conventions only.
RULE QV-04: Uncertainty values must be nonnegative; expanded uncertainty requires documented coverage convention.
RULE QV-05: Unit conversions must preserve represented quantity and quantity kind.
RULE QV-06: Arithmetic must distinguish absolute quantities from differences (e.g. temperatures).
RULE QV-07: Reported precision must not imply unsupported measurement certainty.
RULE QV-08: Numeric equality is not sufficient for semantic equality when units or kinds differ.

6. INFERENCE RULES
IF values have equal dimensions AND compatible kinds THEN candidate_convertible=true.
IF converted reference magnitudes agree within specified tolerance THEN equivalent_under_conversion=true.
IF unit is dimensionless THEN dimension_vector={} (zero exponents); retain quantity kind where known.
IF independent quantities x,y have standard uncertainties ux,uy THEN for z=x+y, uz=sqrt(ux^2+uy^2), subject to stated assumptions.
IF covariance is known THEN include covariance terms in uncertainty propagation.
IF y=f(x) and f differentiable near x THEN first-order standard uncertainty uy≈abs(f'(x))*ux under local linear approximation.

7. WORKED EXAMPLES
EXAMPLE A: 2.5 m = 250 cm; quantity kind length; dimension L^1; values equivalent after conversion.
EXAMPLE B: 20 degC = 293.15 K (thermodynamic temperature); offset conversion, not simple scaling.
EXAMPLE C: 3 m * 4 m = 12 m^2; dimension L^2.
EXAMPLE D: 5.0 +/- 0.2 kg; quantity value with standard uncertainty 0.2 kg if specified as such.
EXAMPLE E: 10 m/s and 10 km/h have equal numbers but different physical values.

8. SEMANTIC EQUIVALENCE
Equivalent quantity values require compatible quantity kinds, compatible dimensions, successful unit conversion, and numerical agreement under the chosen exact or tolerance-based comparison. Never equate a bare number with a dimensional value without explicit unit context.

9. CONFIDENCE
confidence: [0,1]
Evidence: source quality, unit declaration, conversion validity, uncertainty completeness, and provenance. Confidence is metadata about the assertion, not a replacement for numerical uncertainty.

10. FLOW HASH
FLOW_HASH = SHA256(canonical_serialisation(ontology_id, version, typed_entities, relationships, rules, examples))
Canonicalisation: stable field order, UTF-8, explicit unit symbols, normalised numeric representations, and documented algorithm/version. Hash is to be computed at publication; no fabricated hash is asserted here.

11. UPDATE MODEL
On new measurements: preserve prior value as a versioned observation; append updated value, timestamp, method, calibration and provenance. Revalidate conversions and dependent derived quantities. Maintain traceability and avoid silently overwriting source evidence.

12. AI CONSUMPTION
parse -> type_check -> resolve_quantity_kind -> resolve_unit -> check_dimensions -> convert_if_needed -> propagate_uncertainty_if_applicable -> infer -> validate -> emit_traceable_result
Output schema: {quantity_id, magnitude, unit, quantity_kind, dimension, uncertainty, provenance, confidence, rule_trace, flow_version}
Fail closed on incompatible dimensions or ambiguous unit semantics; request clarification rather than inventing units.

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ