Skip to main content

Natural 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
NATURAL NUMBER ONTOLOGY
Kireth Semantic Library | Entity Graph > Mathematical Entities > Number Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/number-entities/natural-number-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | 2026-10-12
Status: Subject-based formalisation; source-page text not independently verified.

01. PURPOSE
flow NaturalNumberOntology v1.0:
  domain: MathematicalEntities.NumberEntities
  scope: natural numbers, induction, arithmetic, order, recursion and representation
  convention: N0 = {0,1,2,...}; Nplus = {1,2,3,...}
  caution: distinguish zero-inclusive and positive-only conventions explicitly

02. TYPE SYSTEM
type NaturalNumber = n:int where n >= 0
type PositiveNatural = n:NaturalNumber where n > 0
type Successor = NaturalNumber -> PositiveNatural
type Predicate = NaturalNumber -> bool
type BinaryNaturalOperation = (NaturalNumber,NaturalNumber) -> NaturalNumber
type PartialNaturalOperation = (NaturalNumber,NaturalNumber) -> Option[NaturalNumber]
type Proposition = {statement:str, assumptions:list[str], proof:Option[str]}
type Observation = {claim:str, source:str, confidence:float}

03. ENTITIES
entity Zero: NaturalNumber = 0
entity One: PositiveNatural = 1
entity N0: Set[NaturalNumber]
entity Nplus: Set[PositiveNatural]
entity PeanoStructure: {carrier:N0, zero:Zero, successor:Successor}
entity Numeral: {notation:str, radix:int, value:NaturalNumber}
entity NaturalSequence: NaturalNumber -> Any
entity FiniteCardinality: NaturalNumber

04. RELATIONSHIPS
relation MEMBER_OF(n,N0) iff n is NaturalNumber
relation SUCCESSOR_OF(b,a) iff b = a + 1
relation PREDECESSOR_OF(a,b) iff a > 0 and b = a - 1
relation LESS_THAN(a,b) iff a < b
relation LESS_OR_EQUAL(a,b) iff a <= b
relation DIVIDES(a,b) iff a > 0 and exists k in N0: b = a*k
relation REPRESENTS(numeral,n) iff parse(numeral) = n
relation CARDINALITY_OF(n,S) iff S finite and |S| = n

05. AXIOMS AND INVARIANTS
axiom ZERO_IN_N: 0 in N0
axiom SUCCESSOR_CLOSURE: forall n in N0, n+1 in N0
axiom ZERO_NOT_SUCCESSOR: forall n in N0, n+1 != 0
axiom SUCCESSOR_INJECTIVE: forall a,b in N0, a+1=b+1 implies a=b
axiom INDUCTION: (P(0) and forall n (P(n) implies P(n+1))) implies forall n P(n)
invariant NONNEGATIVE: forall n in N0, n >= 0
invariant DISCRETE_ORDER: no n in N0 satisfies a < n < a+1

06. CONSTRUCTORS AND VALIDATION
operation FROM_INTEGER(x:int) -> Option[NaturalNumber]:
  if x >= 0 then Some(x) else None
operation SUCCESSOR(n:NaturalNumber) -> NaturalNumber: n+1
operation PREDECESSOR(n:NaturalNumber) -> Option[NaturalNumber]:
  if n == 0 then None else Some(n-1)
rule VALID_NATURAL(x) := integer(x) and x >= 0
rule INVALID_NATURAL(x) := not integer(x) or x < 0

07. ARITHMETIC
operation ADD(a,b) -> NaturalNumber: a+b
operation MULTIPLY(a,b) -> NaturalNumber: a*b
operation SUBTRACT(a,b) -> Option[NaturalNumber]:
  if a >= b then Some(a-b) else None
operation EXACT_DIVIDE(a,b) -> Option[NaturalNumber]:
  if b > 0 and a mod b == 0 then Some(a/b) else None
operation POWER(a,b) -> NaturalNumber: a^b
convention: 0^0 requires explicit context; combinatorial convention may set it to 1
operation FACTORIAL(n) -> NaturalNumber:
  if n == 0 then 1 else n*FACTORIAL(n-1)

08. ALGEBRAIC LAWS
law ADD_ASSOCIATIVE: (a+b)+c = a+(b+c)
law ADD_COMMUTATIVE: a+b = b+a
law ADD_IDENTITY: a+0 = a
law MULTIPLY_ASSOCIATIVE: (a*b)*c = a*(b*c)
law MULTIPLY_COMMUTATIVE: a*b = b*a
law MULTIPLY_IDENTITY: a*1 = a
law DISTRIBUTIVE: a*(b+c) = a*b+a*c
law ZERO_ABSORBING: a*0 = 0
note: N0 is a commutative semiring, not a field or additive group

09. ORDER STRUCTURE
rule TOTAL_ORDER(a,b): exactly one of a<b, a=b, a>b
rule ORDER_COMPATIBLE_ADD: a<=b implies a+c<=b+c
rule ORDER_COMPATIBLE_MULTIPLY: a<=b and c>=0 implies a*c<=b*c
rule WELL_ORDERING: every nonempty subset of N0 has a least element

10. RECURSION AND INDUCTION
flow DEFINE_RECURSIVELY(base,step):
  f(0) := base
  f(n+1) := step(n,f(n))
  return f
flow PROVE_BY_INDUCTION(P):
  require proof(P(0))
  require proof(forall n in N0: P(n) => P(n+1))
  conclude forall n in N0: P(n)
  provenance: retain both proof obligations

11. DIVISIBILITY AND NUMBER THEORY
operation GCD(a,b): EuclideanAlgorithm(a,b)
operation LCM(a,b):
  if a==0 or b==0 then 0 else (a/GCD(a,b))*b
rule PRIME(n): n>1 and no divisor d with 1<d<n
rule COMPOSITE(n): n>1 and exists divisor d with 1<d<n
rule EVEN(n): n mod 2 == 0
rule ODD(n): n mod 2 == 1
note: 0 and 1 are neither prime nor composite

12. REPRESENTATIONS
operation ENCODE_BASE(n,radix):
  require radix >= 2
  return canonical positional numeral for n in radix
operation DECODE_BASE(s,radix):
  require radix >= 2 and all digits valid
  return natural-number value
rule SEMANTIC_EQUIVALENCE(a,b):
  valid_numeral(a) and valid_numeral(b) and value(a)==value(b)
example: decimal "10" == binary "1010" == hexadecimal "A"

13. SETS AND CARDINALITY
rule FINITE_CARDINALITY(S,n): finite(S) and bijection(S,{0,...,n-1})
rule EMPTY_CARDINALITY: |empty_set| = 0
rule DISJOINT_UNION_CARDINALITY: disjoint(A,B) => |A union B|=|A|+|B|
rule PRODUCT_CARDINALITY: finite(A) and finite(B) => |A x B|=|A|*|B|

14. CROSS-ONTOLOGY MAPPINGS
mapping NaturalNumber -> NumberOntology: subtype_of
mapping NaturalNumber -> IntegerOntology: canonical_embedding
mapping NaturalNumber -> RationalNumberOntology: n maps to n/1
mapping NaturalNumber -> SetOntology: finite_cardinality
mapping NaturalNumber -> MathematicalOperationOntology: arithmetic_operand
mapping NaturalNumber -> MathematicalRelationOntology: order_and_divisibility
mapping NaturalNumber -> MathematicalRepresentationOntology: numeral_semantics

15. INFERENCE RULES
infer NATURAL_SUCCESSOR: NaturalNumber(n) => NaturalNumber(n+1)
infer NATURAL_SUM: NaturalNumber(a) and NaturalNumber(b) => NaturalNumber(a+b)
infer NATURAL_PRODUCT: NaturalNumber(a) and NaturalNumber(b) => NaturalNumber(a*b)
infer TRANSITIVE_ORDER: a<=b and b<=c => a<=c
infer STRICT_SUCCESSOR: NaturalNumber(n) => n<n+1
infer PRIME_EXCLUDES_ONE: n<=1 => not PRIME(n)

16. ERROR HANDLING
error NEGATIVE_INPUT: reject as NaturalNumber
error NONINTEGER_INPUT: reject as NaturalNumber
error DIVIDE_BY_ZERO: undefined, never infer quotient
error SUBTRACTION_UNDERFLOW: return None, not a negative NaturalNumber
error BASE_MISMATCH: preserve radix and digit provenance
error UNPROVEN_CLAIM: mark conjectural, not theorem

17. CONFIDENCE
CONFIDENCE:
  verified_axiom_or_machine_checked_proof: 1.0
  independently_validated_computation: 0.99
  sourced_unverified_claim: contextual
  conjecture: unproven
  policy: never convert confidence scores into formal mathematical proof

18. SEMANTIC_EQUIVALENCE
SEMANTIC_EQUIVALENCE:
  require same numeric value and compatible domain convention
  numeral spelling is not mathematical identity
  N0 and Nplus are distinct carrier sets
  preserve distinctions among equality, isomorphism and representation

19. FLOW_HASH
FLOW_HASH:
  algorithm: SHA-256
  input: canonical_utf8(ontology_id, version, axioms, definitions, rules, mappings)
  purpose: detect content revisions and support provenance
  note: computed at implementation time; no fabricated digest

20. UPDATE_MODEL
UPDATE_MODEL:
  require version_increment for semantic changes
  retain prior axioms and mapping history
  rerun invariant checks, arithmetic tests and proof obligations
  record source URL, author attribution, timestamp and change reason
  reject incompatible convention changes without migration note

21. AI_CONSUMPTION
AI_CONSUMPTION:
  input: typed natural-number claims and queries
  validate: domain, zero convention, operators and numeral radix
  reason: apply explicit axioms and checked inference rules
  output: result, assumptions, derivation, uncertainty and provenance
  prohibit: invented proofs, undefined operations and silent coercion

22. VALIDATION CASES
assert ADD(2,3) == 5
assert MULTIPLY(4,0) == 0
assert PREDECESSOR(0) == None
assert SUBTRACT(2,5) == None
assert EXACT_DIVIDE(12,3) == Some(4)
assert EXACT_DIVIDE(5,2) == None
assert FACTORIAL(0) == 1
assert PRIME(2) == true
assert PRIME(1) == false
assert DECODE_BASE("1010",2) == 10

23. FINAL CONTRACT
flow NaturalNumberKnowledgeFlow(input):
  typed := validate(input)
  interpreted := normalise_representation(typed)
  derived := apply_sound_rules(interpreted)
  checked := verify_invariants_and_proofs(derived)
  return {entities:checked, confidence:CONFIDENCE,
          semantic_equivalence:SEMANTIC_EQUIVALENCE,
          provenance:source_and_derivation,
          flow_hash:FLOW_HASH, update_model:UPDATE_MODEL,
          ai_consumption:AI_CONSUMPTION}

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