Skip to main content

Decimal Ontology

Numeric Value Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 October 2026
Audio Overview
FLOW ALGEBRA
DECIMAL ONTOLOGY
Kireth Semantic Library | Entity Graph / Mathematical Entities / Numeric Value Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/numeric-value-entities/decimal-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-12 | Language: en-GB
Status: Mathematical ontology model; source-page wording not independently verified.

01. PURPOSE
flow DecimalOntology v1.0:
  domain: MathematicalEntities.NumericValueEntities
  concept: Decimal
  intent: represent, classify, parse, compare and reason about base-ten numeric expressions
  distinction: a decimal numeral is a representation; its mathematical value is a number

02. CORE ENTITY MODEL
entity DecimalRepresentation:
  fields: [lexeme, sign, integer_digits, fractional_digits, decimal_separator, exponent, radix, value, precision_metadata]
  radix: 10
  decimal_separator: '.' # canonical machine representation; locale display may vary
  lexeme: string
  value: exact rational for finite decimal expressions
entity DecimalValue:
  number_domain: Rational | Real
  note: repeating infinite decimals are rational; non-repeating infinite decimals may be irrational

03. FORMAL SEMANTICS
let s in {-1,+1}; let A be the non-negative integer represented by concatenated digits
let k = number of fractional digits; let e = optional base-ten exponent, default 0
value(s,A,k,e) := s * A * 10^(e-k)
example: value('+',12345,2,0) = 123.45
example: value('-',125,2,0) = -1.25
example: value('+',125,2,3) = 1250

04. FINITE DECIMAL CLASSIFICATION
FiniteDecimal(x) := exists n in Z, k in N0: x = n / 10^k
FiniteDecimal(x) => Rational(x)
TerminatingBase10(q) iff reduced_denominator(q) has no prime factors other than 2 or 5
Zero is a finite decimal value and is neither positive nor negative.

05. INFINITE DECIMAL CLASSIFICATION
EventuallyPeriodicDecimal(x) iff Rational(x) [for real decimal expansions]
NonEventuallyPeriodicDecimal(x) iff Irrational(x) [for real decimal expansions]
example: 0.333... = 1/3
example: 0.999... = 1
warning: an infinite expansion is a mathematical object, not a finite stored string

06. REPRESENTATION AND IDENTITY
semantic_equivalence('1.0','1.00') = true, as numeric values
lexical_identity('1.0','1.00') = false
semantic_equivalence('0.999...','1') = true
normalise_exact('001.2500') -> '1.25' when display precision is not significant
preserve_lexeme: true when trailing zeroes encode measurement precision or source formatting

07. ARITHMETIC
add(a,b) := exact_rational(a) + exact_rational(b)
subtract(a,b) := exact_rational(a) - exact_rational(b)
multiply(a,b) := exact_rational(a) * exact_rational(b)
divide(a,b) := exact_rational(a) / exact_rational(b) provided b != 0
exact_decimal_closure: addition, subtraction and multiplication of finite decimals yield finite decimals
division_of_finite_decimals: may yield repeating decimal; not necessarily finite

08. ORDER AND COMPARISON
compare(a,b) := compare(exact_value(a), exact_value(b))
negative_order: -1.2 < -1.1
leading_zeroes: do not change numeric value
trailing_zeroes: do not change numeric value

09. ROUNDING AND PRECISION
round(x,places,mode) -> decimal representation
rounding_modes: [half_even, half_up, towards_zero, floor, ceiling]
rounding_requires: explicitly declared mode and precision
rounded_result: approximate unless exact value is unchanged
significant_digits: distinct from decimal_places
uncertainty: optional contextual metadata; not intrinsic to every decimal number

10. COMPUTATIONAL SAFETY
binary_float_warning: many finite base-ten fractions lack exact finite binary representations
example: 0.1 + 0.2 may not equal 0.3 under binary floating-point evaluation
preferred_exact_implementation: integer coefficient + base-ten scale, or rational arithmetic
avoid: implicit float conversion during exact validation

11. KNOWLEDGE GRAPH
node: DecimalRepresentation
node: DecimalValue
node: RationalNumber
node: RealNumber
node: NumericPrecision
node: RoundingMode
edge: DecimalRepresentation --denotes--> DecimalValue
edge: FiniteDecimal --subclass_of--> RationalNumber
edge: RationalNumber --subclass_of--> RealNumber
edge: DecimalRepresentation --has_precision_metadata--> NumericPrecision
edge: RoundingOperation --uses--> RoundingMode
edge: DecimalRepresentation --has_radix--> 10

12. TYPED RELATIONSHIPS
DENOTES: DecimalRepresentation -> Number
EQUIVALENT_VALUE: DecimalRepresentation x DecimalRepresentation -> Boolean
HAS_SCALE: DecimalRepresentation -> Integer
HAS_SIGN: DecimalRepresentation -> Sign
HAS_EXPONENT: DecimalRepresentation -> Integer
HAS_ROUNDING_MODE: DecimalComputation -> RoundingMode
HAS_SOURCE: DecimalRepresentation -> ProvenanceRecord

13. INFERENCE RULES
rule finite_to_rational:
  if FiniteDecimal(x) then Rational(value(x))
rule trailing_zero_equivalence:
  if same_sign_and_digits_except_trailing_fractional_zeroes(a,b) then equivalent_value(a,b)
rule denominator_test:
  if q in Q and denominator_in_lowest_terms(q) = 2^m * 5^n then has_terminating_decimal(q)
rule repeat_to_rational:
  if eventually_periodic_base10_expansion(x) then Rational(x)
rule zero_division:
  if divisor = 0 then reject(division)

14. VALIDATION
require radix == 10
require lexeme conforms to documented decimal grammar
require separator policy is explicit
require exponent parses as signed integer if present
require finite coefficient and scale for finite representation
require arithmetic denominator != 0
require exact comparison uses exact numeric values
reject NaN and infinities as finite decimal values; handle as separate extended numeric types

15. CONFIDENCE
CONFIDENCE:
  mathematical_definition: high
  exact_arithmetic: high when using integer/rational semantics
  parsed_input: conditional on lexical validation
  measured_quantity: dependent on source uncertainty and provenance
  inferred_page_alignment: unverified

16. SEMANTIC_EQUIVALENCE
SEMANTIC_EQUIVALENCE:
  '0.5' == '0.50' == '1/2' under numeric-value semantics
  '1.20' != '1.2' under strict lexical or declared-precision semantics
  decimal_representation != decimal_value as ontology entity types
  canonical_numeric_comparison: compare exact rational values where applicable

17. FLOW_HASH
FLOW_HASH:
  algorithm: SHA-256
  input: canonical_serialisation(ontology_id, version, typed_entities, relationships, rules)
  digest: compute on implementation; do not fabricate a hash
  exclude: volatile execution timestamps unless explicitly versioned

18. UPDATE_MODEL
UPDATE_MODEL:
  versioning: semantic
  change_detection: schema, rules, examples, relationships, terminology
  preserve: historical versions and provenance
  recompute: FLOW_HASH after canonical content change
  revalidate: mathematical invariants and edge typing

19. AI_CONSUMPTION
AI_CONSUMPTION:
  parse: decimal lexical expression into typed representation
  resolve: exact mathematical value and base-ten scale
  classify: finite, recurring, non-recurring; rational or irrational as supported
  reason: apply typed mathematical rules
  emit: value, lexical form, precision metadata, provenance and confidence
  safety: never infer measurement precision solely from numeric equality

20. TEST VECTORS
assert parse('12.50').value == 25/2
assert parse('-0.125').value == -1/8
assert equivalent_value('0.50','0.5') == true
assert lexical_identity('0.50','0.5') == false
assert terminating_decimal(1/8) == true
assert terminating_decimal(1/3) == false
assert 0.999... == 1 [mathematical infinite expansion]
assert divide(1,0) -> error
assert round(2.345,2,half_even) == 2.34

21. PROVENANCE AND SCOPE
source_url: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/numeric-value-entities/decimal-ontology.html
source_status: not independently checked against live webpage
basis: established mathematical definitions and formal semantic modelling
licence: unspecified; do not infer
credits: Mark Higgins — Sky (Recursive AI)
END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ