Skip to main content

Composite Number Ontology

Number Theory
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Composite Number Ontology
DOMAIN: Discrete Mathematics / Number Theory
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/number-theory/composite-number-ontology.html
VERSION: 1.0
DATE: 2026-10-11
AUTHORS: Mark Higgins — Sky (Recursive AI)
SITE: https://kirethresearch.org
SOURCE_STATUS: Formal mathematical synthesis; live page not independently verified.

1. ONTOLOGY
ontology CompositeNumberOntology extends NumberTheoryOntology
entity Integer: Z
entity NaturalNumber: N
entity PrimeNumber: {n in N | n > 1 and divisors(n) = {1,n}}
entity CompositeNumber: {n in N | n > 1 and exists a,b in N: 1 < a < n and 1 < b < n and n = a*b}
entity ProperDivisor: {d in N | d divides n and 1 < d < n}
entity PrimeFactorisation: finite multiset of primes with positive integer exponents
entity DivisorCount: N
entity PrimalityCertificate: structured evidence

2. TYPED RELATIONSHIPS
IS_A(CompositeNumber, NaturalNumber)
DISJOINT(CompositeNumber, PrimeNumber)
HAS_PROPER_DIVISOR(n: CompositeNumber, d: ProperDivisor)
HAS_PRIME_FACTOR(n: CompositeNumber, p: PrimeNumber)
FACTORS_AS(n: CompositeNumber, factors: PrimeFactorisation)
DIVIDES(d: NaturalNumber, n: NaturalNumber)

3. FORMAL DEFINITIONS
COMPOSITE(n) := n in N and n > 1 and exists d in N: 1 < d < n and n mod d = 0
PRIME(n) := n in N and n > 1 and not exists d in N: 1 < d < n and n mod d = 0
CLASSIFY(n):
  n <= 1 -> NEITHER_PRIME_NOR_COMPOSITE (for n in N)
  n > 1 and PRIME(n) -> PRIME
  n > 1 and COMPOSITE(n) -> COMPOSITE
NOTE: 0 and 1 are not composite; negative integers are not classified as composite under this ontology's natural-number convention.

4. OPERATIONS
FACTOR(n: CompositeNumber) -> (a: NaturalNumber, b: NaturalNumber)
  precondition: 1 < a < n and 1 < b < n
  postcondition: a*b = n
PRIME_FACTORISE(n: NaturalNumber, n >= 2) -> [(p_i, e_i)]
  postcondition: n = product(p_i ^ e_i), each p_i prime, each e_i >= 1
COUNT_DIVISORS(n: NaturalNumber, n >= 1) -> NaturalNumber
  given n = product(p_i ^ e_i), result = product(e_i + 1)
IS_COMPOSITE(n: NaturalNumber) -> Boolean
  for n > 1, search d from 2 through floor(sqrt(n)); return true if d divides n

5. MATHEMATICAL LAWS
L1: Every composite n has a divisor d with 2 <= d <= floor(sqrt(n)).
L2: Every composite n admits a unique prime factorisation up to ordering.
L3: Every even n > 2 is composite.
L4: If a > 1 and b > 1 then a*b is composite.
L5: For n > 1, exactly one of PRIME(n) and COMPOSITE(n) holds.
L6: If n = product(p_i ^ e_i), then divisor_count(n) = product(e_i + 1).
L7: A composite n has at least three positive divisors.
L8: The least composite natural number is 4.
L9: For n > 1, composite(n) iff there is a prime p <= sqrt(n) dividing n.

6. INFERENCE RULES
R1: n = a*b and a,b > 1 => COMPOSITE(n).
R2: n > 2 and n mod 2 = 0 => COMPOSITE(n).
R3: n > 1 and exists p prime with p <= sqrt(n) and p divides n => COMPOSITE(n).
R4: COMPOSITE(n) => not PRIME(n).
R5: PRIME_FACTORISE(n) has at least two prime factors counted with multiplicity => COMPOSITE(n).
R6: n > 1 and no integer d in [2,floor(sqrt(n))] divides n => PRIME(n).

7. EXAMPLES AND COUNTEREXAMPLES
COMPOSITE(4) = true; 4 = 2*2.
COMPOSITE(6) = true; 6 = 2*3.
COMPOSITE(9) = true; 9 = 3*3.
COMPOSITE(12) = true; 12 = 2^2*3; divisor_count(12) = 6.
COMPOSITE(2) = false; 2 is prime.
COMPOSITE(1) = false; 1 is neither prime nor composite.
COMPOSITE(0) = false; 0 is neither prime nor composite.

8. VALIDATION
V1: Reject composite classification unless n is an integer > 1.
V2: For factor witness (a,b), require integers a,b > 1 and a*b = n.
V3: For prime-factor claims, verify every base prime and the product equals n.
V4: Verify divisor-count identities using canonical prime factorisation.
V5: Distinguish mathematical proof from probabilistic primality/compositeness heuristics.
V6: Do not infer COMPOSITE from mere divisibility by 1 or n.

9. SEMANTIC_EQUIVALENCE
"composite integer" ~= "composite natural number" only under the positive-integer convention.
"non-prime natural number" != "composite number" because 0 and 1 are non-prime but not composite.
"factorable number" is ambiguous and is not a safe exact synonym.
"nontrivial factorisation" <=> composite witness for integer n > 1.

10. CONFIDENCE
CONFIDENCE(formal_definition) = 1.00
CONFIDENCE(verified_factor_witness) = 1.00
CONFIDENCE(verified_prime_factorisation) = 1.00
CONFIDENCE(unverified_computational_claim) = UNDETERMINED
NOTE: Confidence values represent proof/verification status, not empirical likelihood.

11. FLOW_HASH
FLOW_HASH.algorithm = SHA-256
FLOW_HASH.input = canonical_UTF8(normalised_ontology_content_excluding_FLOW_HASH_value)
FLOW_HASH.value = COMPUTE_AT_PUBLICATION
FLOW_HASH.purpose = integrity_and_version_identification

12. UPDATE_MODEL
UPDATE_MODEL.version = 1.0
UPDATE_MODEL.trigger = [definition_change, new_inference_rule, corrected_example, validation_revision]
UPDATE_MODEL.require = [semantic_diff, proof_review, version_increment, hash_recomputation]
UPDATE_MODEL.preserve = [source_url, provenance, prior_version_reference]

13. AI_CONSUMPTION
AI_CONSUMPTION.mode = typed_formal_reasoning
AI_CONSUMPTION.inputs = [integer, factor_witness?, factorisation?]
AI_CONSUMPTION.outputs = [classification, proof_witness, validated_factors, confidence, provenance]
AI_CONSUMPTION.constraints = [natural_number_convention, exact_integer_arithmetic, proof_before_assertion]
AI_CONSUMPTION.failure_modes = [invalid_domain, unverified_factor, arithmetic_overflow, ambiguous_terminology]
AI_CONSUMPTION.interoperability = [IntegerOntology, PrimeNumberOntology, DivisibilityOntology, FactorisationOntology]

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