AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Integer Ontology
DOMAIN: Discrete Mathematics / Number Theory
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/number-theory/integer-ontology.html
VERSION: 1.0
LANGUAGE: en-GB
AUTHORS: Mark Higgins — Sky (Recursive AI)
SOURCE_STATUS: Mathematical synthesis; live page not independently verified.
1. PURPOSE
Represent integers as exact, discrete mathematical entities with typed arithmetic, order, divisibility, congruence, inference, and validation for semantic retrieval and machine reasoning.
2. TYPED ENTITIES
Integer := {...,-2,-1,0,1,2,...}
NaturalNumber := {0,1,2,...} (convention explicitly declared)
PositiveInteger := {n in Integer | n > 0}
NegativeInteger := {n in Integer | n < 0}
Zero := 0
NonzeroInteger := Integer \ {0}
Parity := {Even, Odd}
Divisor := (d,n) in Integer^2 with d != 0 and exists k in Integer: n=d*k
Congruence := (a,b,m) in Integer^3 with m>0 and m divides (a-b)
3. CORE RELATIONSHIPS
IS_A(Integer, RationalNumber)
SUBSET_OF(NaturalNumber, Integer)
HAS_ADDITIVE_IDENTITY(Integer, 0)
HAS_MULTIPLICATIVE_IDENTITY(Integer, 1)
CLOSED_UNDER(Integer, Addition)
CLOSED_UNDER(Integer, Subtraction)
CLOSED_UNDER(Integer, Multiplication)
NOT_CLOSED_UNDER(Integer, Division)
ORDERED_BY(Integer, <=)
4. OPERATIONS AND SEMANTICS
add(a,b) = a+b
subtract(a,b) = a-b
multiply(a,b) = a*b
negate(a) = -a
absolute(a) = max(a,-a)
divides(d,n) := d != 0 AND exists k in Integer: n=d*k
quotient_remainder(a,b) for b != 0 := unique q,r with a=b*q+r and 0<=r<|b|
mod(a,m) for m>0 := unique r in {0,...,m-1} with a congruent r (mod m)
gcd(a,b) := unique nonnegative greatest common divisor when (a,b)!=(0,0)
5. ALGEBRAIC LAWS
For all a,b,c in Integer:
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
a*b=0 => a=0 OR b=0
If a<=b then a+c<=b+c
If a<=b and c>=0 then a*c<=b*c
Integer forms a commutative ring with unity, an integral domain, and a total order compatible with its operations.
6. PARITY AND DIVISIBILITY RULES
even(n) iff exists k in Integer: n=2*k
odd(n) iff exists k in Integer: n=2*k+1
even(a) AND even(b) => even(a+b)
odd(a) AND odd(b) => even(a+b)
odd(a) AND even(b) => odd(a+b)
divides(d,a) AND divides(d,b) => divides(d,a+b)
divides(d,a) AND divides(d,b) => divides(d,a-b)
divides(d,a) => divides(d,a*k) for every integer k
7. CONGRUENCE AND INFERENCE
congruent(a,b,m) iff m>0 AND divides(m,a-b)
congruent(a,b,m) AND congruent(b,c,m) => congruent(a,c,m)
congruent(a,b,m) AND congruent(c,d,m) => congruent(a+c,b+d,m)
congruent(a,b,m) AND congruent(c,d,m) => congruent(a*c,b*d,m)
Do not infer integer closure for a/b unless b!=0 and b divides a.
8. SEMANTIC_EQUIVALENCE
"integer" <=> "whole-number value with possible negative sign" (contextual paraphrase; not identical to the ambiguous term "whole number")
"Z" <=> "set of integers" (when Z denotes the conventional number set)
"even integer" <=> "integer divisible by 2"
"odd integer" <=> "integer congruent to 1 modulo 2"
"a divides b" <=> "b is an integer multiple of a" (a != 0 in this ontology)
Preserve distinctions: integer != natural number; integer != rational number; divisibility != real-number division.
9. VALIDATION
CHECK type: inputs of integer arithmetic belong to Integer.
CHECK exactness: do not infer integer values from approximate floating-point equality.
CHECK division: reject divisor zero; require exact divisibility for integer quotient.
CHECK modulus: modulus m must be positive.
CHECK remainder: 0 <= r < |b|.
CHECK gcd: (0,0) excluded from the chosen gcd definition.
CHECK logical consistency: derived statements must satisfy all relevant preconditions.
10. CONFIDENCE
Mathematical definitions and proved identities: 1.00 within stated conventions.
Derived claims: 1.00 only when formally validated against premises.
Source-page alignment: unverified until the source page is checked.
Unverified empirical or contextual claims: do not assign certainty automatically.
11. FLOW_HASH
ALGORITHM: SHA-256
INPUT: canonical UTF-8 serialisation of the final ontology content excluding the FLOW_HASH value itself.
VALUE: TO_BE_COMPUTED_ON_PUBLICATION
PURPOSE: integrity and version comparison; no hash is asserted without calculation.
12. UPDATE_MODEL
TRIGGER: source content revision, ontology schema revision, corrected mathematical rule, or changed convention.
PROCESS: validate types -> verify theorems and preconditions -> update semantic mappings -> increment version -> compute new FLOW_HASH -> publish with provenance.
CONFLICT_POLICY: preserve formal mathematics; flag disagreements and convention changes rather than silently overwriting.
13. AI_CONSUMPTION
ENTRY_POINT: Integer Ontology
RETRIEVAL_KEYS: integer, Z, parity, divisibility, congruence, Euclidean division, ordered ring
OUTPUT_TYPES: typed facts, derivations, constraints, proofs, counterexamples
REASONING_POLICY: distinguish axioms, definitions, derived propositions, and contextual interpretations.
SAFETY_POLICY: no fabricated proofs, no unsupported numeric precision, no implicit division by zero.
END FLOW ALGEBRA