Skip to main content

Number Ontology

Number Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 October 2026
Audio Overview
FLOW ALGEBRA
NUMBER ONTOLOGY
Kireth Semantic Library | Entity Graph | Mathematical Entities | Number Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/number-entities/number-ontology.html
Version: 1.0 | Date: 2026-10-12 | Locale: en-GB
Authors: Mark Higgins — Sky (Recursive AI)
Status: Subject-based formalisation; source webpage content not independently verified.

01. PURPOSE
flow NumberOntology v1.0:
  objective: represent, classify, compare and reason about mathematical numbers
  domain: mathematics.number_theory
  output: typed knowledge graph + validated derivations

02. TYPE SYSTEM
type Number = Natural | Whole | Integer | Rational | Irrational | Real | Complex
type NumericExpression = Literal | Variable | ArithmeticExpression | SymbolicConstant
type TruthValue = TRUE | FALSE | UNKNOWN
type ProofStatus = PROVED | REFUTED | UNDETERMINED
type Confidence = Real[0,1]
type Evidence = Axiom | Definition | Theorem | Computation | Observation

03. NUMBER DOMAINS
N = {1,2,3,...}                    # convention: positive natural numbers
W = {0,1,2,3,...}
Z = {...,-2,-1,0,1,2,...}
Q = {p/q | p in Z, q in Z, q != 0}
R = real numbers
C = {a + bi | a,b in R, i*i = -1}
N subset W subset Z subset Q subset R subset C
Irrational = R \ Q
ImaginaryPure = {bi | b in R, b != 0}

04. ENTITY SCHEMA
entity NumberEntity:
  id: URI
  value: NumericExpression
  canonical_form: string?
  domain_memberships: Set[NumberDomain]
  exactness: EXACT | APPROXIMATE | SYMBOLIC
  unit: optional Unit
  provenance: Evidence[]
  valid_at: optional Timestamp
  confidence: Confidence

05. RELATIONSHIPS
relation IS_MEMBER_OF(NumberEntity, NumberDomain)
relation IS_SUBSET_OF(NumberDomain, NumberDomain)
relation EQUALS(NumberEntity, NumberEntity)
relation LESS_THAN(Real, Real)
relation GREATER_THAN(Real, Real)
relation IS_SUCCESSOR_OF(Integer, Integer)
relation IS_FACTOR_OF(Integer, Integer)
relation IS_MULTIPLE_OF(Integer, Integer)
relation IS_APPROXIMATION_OF(NumberEntity, NumberEntity)
relation DERIVED_FROM(NumberEntity, NumericExpression)
relation HAS_REPRESENTATION(NumberEntity, string)

06. IDENTITY AND CANONICALISATION
rule rational_normalise(p,q):
  require q != 0
  d = gcd(abs(p),abs(q))
  return (sign(q)*p/d, abs(q)/d)
rule equal_rationals(a/b,c/d):
  require b != 0 and d != 0
  return a*d == b*c
rule canonical_complex(a,b): return (canonical(a), canonical(b))
constraint: representation equality is not necessarily mathematical identity

07. ARITHMETIC OPERATIONS
operator ADD: Number x Number -> Number
operator SUBTRACT: Number x Number -> Number
operator MULTIPLY: Number x Number -> Number
operator DIVIDE: Number x NonZeroNumber -> Number
operator NEGATE: Number -> Number
operator ABS: Real -> NonNegativeReal
operator POWER: Number x Exponent -> Number where defined
operator SQRT: NonNegativeReal -> NonNegativeReal
operator CONJUGATE: Complex -> Complex

08. OPERATIONAL LAWS
forall a,b,c in C:
  a+b = b+a
  (a+b)+c = a+(b+c)
  a*b = b*a
  (a*b)*c = a*(b*c)
  a*(b+c) = a*b+a*c
  a+0 = a
  a*1 = a
  a+(-a) = 0
  if a != 0 then a*(1/a) = 1
note: closure depends on the selected domain and operation

09. DOMAIN CLOSURE
closure(N, ADD) = TRUE
closure(N, SUBTRACT) = FALSE
closure(Z, ADD) = TRUE
closure(Z, DIVIDE) = FALSE
closure(Q, DIVIDE_NONZERO) = TRUE
closure(R, SQRT) = FALSE unless input >= 0
closure(C, ADD) = TRUE

10. ORDERING AND MAGNITUDE
rule real_trichotomy(a,b): exactly_one(a<b, a=b, a>b)
rule transitive_less(a,b,c): if a<b and b<c then a<c
rule absolute_value(x): if x>=0 then x else -x
constraint: no canonical total order on C compatible with field operations

11. NUMBER CLASSIFICATION
predicate EVEN(n:Integer) := exists k in Z: n=2*k
predicate ODD(n:Integer) := exists k in Z: n=2*k+1
predicate PRIME(n:Integer) := n>1 and divisors_positive(n)={1,n}
predicate COMPOSITE(n:Integer) := n>1 and not PRIME(n)
predicate POSITIVE(x:Real) := x>0
predicate NEGATIVE(x:Real) := x<0
predicate ZERO(x:Number) := x=0
predicate ALGEBRAIC(z:Complex) := exists nonzero p in Z[x]: p(z)=0
predicate TRANSCENDENTAL(z:Complex) := not ALGEBRAIC(z)

12. REPRESENTATIONS
representation Decimal(number, precision, rounding_mode)
representation Fraction(numerator, denominator_nonzero)
representation ScientificNotation(coefficient, exponent)
representation BinaryDigits(bits)
representation ComplexCartesian(real, imaginary)
representation ComplexPolar(magnitude, angle)
rule representation_to_value: parse -> validate -> canonicalise
rule value_to_representation: format -> retain exactness metadata

13. APPROXIMATION AND ERROR
entity Approximation:
  estimate: Real
  target: NumberEntity
  absolute_error_bound: NonNegativeReal?
  relative_error_bound: NonNegativeReal?
  rounding_mode: string
rule absolute_error(x_hat,x) := abs(x_hat-x)
rule relative_error(x_hat,x) := abs(x_hat-x)/abs(x) if x != 0
constraint: floating-point equality requires explicitly chosen semantics

14. INFERENCE RULES
infer NATURAL_TO_INTEGER: n in N => n in Z
infer INTEGER_TO_RATIONAL: n in Z => n/1 in Q
infer RATIONAL_TO_REAL: q in Q => q in R
infer REAL_TO_COMPLEX: r in R => r+0i in C
infer PRIME_IMPLIES_POSITIVE: PRIME(n) => n>1
infer EVEN_SUM: EVEN(a) and EVEN(b) => EVEN(a+b)
infer ORDER_CHAIN: a<b and b<c => a<c
infer NONZERO_DIVISION: b!=0 => (a/b)*b=a

15. FORMAL VALIDATION
validate type_membership(value, domain)
validate denominator_nonzero(fraction)
validate expression_domain(operation, operands)
validate canonical_equivalence(left, right)
validate proof_dependencies(derivation)
reject undefined expressions unless extended-number semantics explicitly selected

16. SEMANTIC_EQUIVALENCE
SEMANTIC_EQUIVALENCE("one half", "1/2") = TRUE under rational interpretation
SEMANTIC_EQUIVALENCE("0.5", "1/2") = TRUE under exact decimal interpretation
SEMANTIC_EQUIVALENCE("sqrt(2)", "1.414") = FALSE as exact values
rule: compare canonical mathematical values, not surface strings

17. CONFIDENCE
CONFIDENCE(axiom_or_verified_proof) = 1.0 conditional on declared formal system
CONFIDENCE(approximate_numerical_claim) = evidence_dependent
CONFIDENCE(unverified_symbolic_inference) = UNKNOWN
constraint: confidence is not a substitute for proof

18. FLOW EXECUTION
flow CLASSIFY_NUMBER(input):
  parsed = parse(input)
  checked = validate(parsed)
  canonical = normalise(checked)
  memberships = infer_domain_memberships(canonical)
  properties = derive_provable_properties(canonical)
  return {canonical, memberships, properties, provenance}

flow COMPARE_NUMBERS(a,b):
  x = normalise(validate(parse(a)))
  y = normalise(validate(parse(b)))
  if provable_equal(x,y): return EQUAL
  if both_real(x,y): return order_or_undetermined(x,y)
  return {equal: UNKNOWN, ordering: NOT_APPLICABLE}

19. PROVENANCE
provenance fields:
  source_uri: URI
  formal_system: string
  axioms_used: string[]
  proof_steps: string[]
  computation_method: string?
  timestamp: ISO8601
  author: string

20. FLOW_HASH
FLOW_HASH = SHA256(canonical_utf8(
  {flow_name, version, types, rules, constraints, operations}
))
rule: sort unordered collections before serialisation
rule: exclude volatile timestamps from semantic-content hash

21. UPDATE_MODEL
UPDATE_MODEL(new_definition):
  verify schema and type consistency
  compare semantic hashes
  identify affected inferences
  invalidate stale derived claims
  recompute affected graph nodes
  record version and provenance
  publish only after validation

22. AI_CONSUMPTION
AI_CONSUMPTION:
  encoding: UTF-8
  graph: typed nodes and directed labelled edges
  interpretation: mathematical, not linguistic, equivalence
  uncertainty: preserve UNKNOWN and approximation bounds
  safety: reject division by zero and unsupported domain coercions
  outputs: JSON-compatible records, proof traces, canonical values
  cross_links:
    - Mathematical Entity Ontology
    - Mathematical Object Ontology
    - Mathematical Operation Ontology
    - Mathematical Relation Ontology
    - Mathematical Representation Ontology

23. EXAMPLE DERIVATIONS
example A:
  input: 6
  infer: 6 in N, W, Z, Q, R, C
  infer: EVEN(6) = TRUE
  infer: COMPOSITE(6) = TRUE
example B:
  input: 1/3
  canonical: (1,3)
  infer: rational, real, complex
  representation: repeating decimal; exactness preserved as fraction
example C:
  input: sqrt(2)
  infer: irrational, real, algebraic, complex
  note: decimal approximations are not identical to exact sqrt(2)

24. VALIDATION CHECKLIST
[ ] Type declarations are coherent
[ ] Domain inclusion rules preserve definitions
[ ] Zero denominators are rejected
[ ] Exact and approximate values are distinguished
[ ] Complex numbers are not improperly ordered
[ ] Proofs carry their assumptions and provenance
[ ] Semantic hashes are reproducible
[ ] Updates invalidate affected derived facts

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