Skip to main content

Unit Entity Graph Ontology

AI Semantic Library Mathematical Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 15 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Unit Entity Graph Ontology
VERSION: 1.0
DATE: 2026-10-15
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/ai-semantic-library-mathematical-entities/unit-entity-graph-ontology.html
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Research Semantic Library

PURPOSE
Represent measurement units as typed, linked mathematical entities with dimensional constraints, conversions, provenance, and machine-checkable semantic relationships. This is a proposed formalisation of the named ontology, not a verbatim transcription of its webpage.

ENTITY TYPES
UnitEntity := {id, name, symbol, dimension, system, kind, scale, offset, status, provenance}
DimensionEntity := {id, exponent_vector, base_dimension_order}
QuantityEntity := {id, magnitude, unit_id, uncertainty?, context?}
ConversionEntity := {source_unit, target_unit, transform, domain, evidence}
UnitSystem := {id, name, base_units, conventions}
UnitAlias := {lexeme, language, unit_id, context}

TYPE RULES
UNIT(u) -> ENTITY(u) AND HAS_DIMENSION(u, d).
QUANTITY(q) -> HAS_MAGNITUDE(q, m) AND MEASURED_IN(q, u).
CONVERTIBLE(u, v) -> DIMENSION(u) = DIMENSION(v) AND COMPATIBLE_KIND(u, v).
DIMENSIONLESS(u) -> DIMENSION(u) = (0,0,0,0,0,0,0).
SYMBOL(u, s) does not imply UNIQUE(s): resolve symbols by context and system.

DIMENSION ALGEBRA
Use the SI base-dimension ordering (L, M, T, I, Theta, N, J).
DIM(u * v) = DIM(u) + DIM(v).
DIM(u / v) = DIM(u) - DIM(v).
DIM(u ^ n) = n * DIM(u), for admissible exponent n.
DIM(1) = (0,0,0,0,0,0,0).
Equality of dimensions is necessary, but not always sufficient, for quantity-kind equivalence.

GRAPH RELATIONSHIPS
IS_UNIT_OF(u, quantity_kind)
BELONGS_TO_SYSTEM(u, system)
HAS_DIMENSION(u, dimension)
HAS_SYMBOL(u, symbol)
HAS_ALIAS(u, alias)
DERIVED_FROM(u, components)
CONVERTS_TO(u, v, transform)
EQUIVALENT_UNIT(u, v, context)
USED_IN(u, domain)
DEFINED_BY(u, authority)
VALIDATED_BY(u, method)
PROVENANCE_OF(source, assertion)

CANONICALISATION
1. Parse unit expression into symbols, prefixes, operators, and exponents.
2. Resolve each symbol against vocabulary, unit system, and domain context.
3. Normalise prefixes and compound expressions without discarding quantity kind.
4. Compute dimension vector and canonical unit representation.
5. Preserve original spelling, notation, and source for traceability.
6. Reject unresolved or ambiguous symbols rather than guessing.

CONVERSION ALGEBRA
For compatible linear units, canonical_value = scale(u) * value.
For affine units, canonical_value = scale(u) * value + offset(u).
Convert u to v via inverse of the target transform, if defined and valid.
Do not apply affine offsets to temperature intervals or multiply absolute affine units as ordinary linear units.
Nonlinear or context-dependent conversions require an explicit named transform and domain restrictions.
EXAMPLE: 1 km = 1000 m; both share dimension L.
EXAMPLE: 1 N = 1 kg*m/s^2; dimension (1,1,-2,0,0,0,0).
EXAMPLE: Celsius absolute temperature to kelvin: K = degC + 273.15.

CONSTRAINTS AND VALIDATION
ASSERT UNIT_ID_UNIQUE.
ASSERT UNIT_REFERENCE_RESOLVES.
ASSERT DIMENSION_VECTOR_WELL_FORMED.
ASSERT CONVERSION_ENDPOINTS_COMPATIBLE.
ASSERT CONVERSION_SCALE_NONZERO_FOR_INVERTIBLE_AFFINE_TRANSFORM.
ASSERT COMPOSED_CONVERSIONS_AGREE_WITH_DIRECT_CONVERSION_WITHIN_TOLERANCE.
ASSERT UNIT_EXPRESSIONS_RESPECT_AFFINE_AND_NONLINEAR_RESTRICTIONS.
ASSERT NO_UNJUSTIFIED_DIMENSIONAL_EQUIVALENCE.
ASSERT EXPLICIT_CONTEXT_FOR_AMBIGUOUS_SYMBOLS.
ASSERT SOURCE_AND_VERSION_PRESENT_FOR_AUTHORITATIVE_DEFINITIONS.

INFERENCE
HAS_DIMENSION(u, d) AND HAS_DIMENSION(v, d) -> SAME_DIMENSION(u, v).
SAME_DIMENSION(u, v) AND COMPATIBLE_KIND(u, v) AND VALID_TRANSFORM(u, v)
  -> CONVERTIBLE(u, v).
CONVERTS_TO(u, v, f) AND CONVERTS_TO(v, w, g)
  -> CANDIDATE_CONVERSION(u, w, g o f), subject to domain compatibility.
DERIVED_FROM(u, expression) -> INFER_DIMENSION(u, DIM(expression)).
Conflicting definitions remain separate assertions until reconciled.

SEMANTIC_EQUIVALENCE
Exact unit identity: same stable canonical unit identifier.
Conversion equivalence: quantities represent the same magnitude after a valid transform.
Dimensional equivalence: dimension vectors match; does not establish identical meaning.
Lexical equivalence: alternate names or symbols refer to the same unit only with supporting context.
Record equivalence_type, conditions, evidence, and confidence for each mapping.

CONFIDENCE
CONFIDENCE(assertion) := {score: 0..1, method, evidence, assessed_at}.
Scores are evidence assessments, not mathematical proofs.
Formal definition with authoritative reference may support high confidence.
Ambiguous notation, missing context, or inconsistent transforms reduce confidence.
Never promote a tentative mapping to verified equivalence solely from a score.

PROVENANCE
For each unit definition or graph edge retain:
{source_uri, authority, citation, retrieved_at, definition_version, method, editor}.
Keep historical definitions when units or conventions change.
Distinguish asserted, derived, inferred, and externally validated facts.

FLOW_HASH
FLOW_HASH(record) = SHA256(canonical_serialisation(record_without_hash)).
Canonical serialisation fixes key ordering, Unicode normalisation, numeric representation,
unit-expression normalisation, and schema version before hashing.
Hashes detect changes; they do not independently prove correctness or authorship.

UPDATE_MODEL
INPUT: incoming_unit_assertions, existing_graph, authority_registry.
STEPS:
  validate_schema -> resolve_entities -> check_dimensions -> check_conversions
  -> compare_versions -> detect_conflicts -> attach_provenance
  -> calculate_confidence -> recompute_flow_hash -> publish_version.
OUTPUT: updated_graph, change_log, unresolved_conflicts, validation_report.
Never overwrite a disputed definition without retaining its history.

AI_CONSUMPTION
INPUT: quantity text, symbolic equation, dataset schema, or unit query.
PROCESS:
  extract_quantity_and_unit -> disambiguate -> link_graph_entities
  -> validate_dimension_and_kind -> convert_if_requested
  -> return canonical_result_with_provenance.
OUTPUT: {entity_ids, original_expression, normalised_expression,
         dimension, conversion?, confidence, provenance, warnings}.
If units are incompatible, return a typed error and explanatory constraint.
If a symbol is ambiguous, request or infer only explicitly supported context.

APPLICATIONS
Scientific datasets; dimensional analysis; symbolic mathematics;
engineering simulations; measurement interoperability; knowledge graphs;
AI-assisted equation validation; semantic search; educational systems.

LIMITATIONS
Dimension matching alone does not prove physical equivalence.
Units can have overloaded symbols and domain-specific meanings.
Logarithmic, calendar, currency, and contextual units require specialised semantics.
Numeric precision, uncertainty propagation, and conversion authority must be handled explicitly.

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