Skip to main content

Composite 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
COMPOSITE NUMBER ONTOLOGY
Kireth Semantic Library | Mathematical Entities > Number Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/number-entities/composite-number-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-12
Status: Mathematical specification; source page content not independently verified.

01. ONTOLOGY IDENTITY
flow "CompositeNumberOntology" v1.0
namespace: kireth.entity_graph.mathematical_entities.number_entities.composite_number
entity_type: CompositeNumber
parent_type: PositiveInteger
related_types: [NaturalNumber, Integer, PrimeNumber, Factor, Divisor, PrimeFactorisation]

02. FORMAL DEFINITION
Let N+ = {1, 2, 3, ...}.
Composite(n) <=> n in N+ AND n > 1 AND EXISTS a,b in N+: 1 < a < n AND 1 < b < n AND n = a*b.
Equivalent: Composite(n) <=> n > 1 AND EXISTS d in N+: 1 < d < n AND d divides n.
Prime(n) <=> n > 1 AND NOT Composite(n).
Neither Prime(1) nor Composite(1).
Zero and negative integers are outside this ontology's standard composite-number domain.

03. TYPED ENTITIES
entity CompositeNumber {value: integer; minimum: 4; invariant: Composite(value)}
entity ProperDivisor {value: positive_integer; target: CompositeNumber; invariant: 1 < value < target.value AND target.value mod value = 0}
entity FactorPair {left: positive_integer; right: positive_integer; product: CompositeNumber; invariant: left*right = product.value AND left > 1 AND right > 1}
entity PrimeFactor {prime: positive_integer; exponent: positive_integer; invariant: Prime(prime)}
entity PrimeFactorisation {target: CompositeNumber; factors: nonempty_list<PrimeFactor>; invariant: product(prime^exponent) = target.value}

04. CLASSIFICATION
CompositeNumber SUBCLASS_OF PositiveInteger.
CompositeNumber DISJOINT_WITH PrimeNumber within N+.
EvenComposite(n) <=> Composite(n) AND n mod 2 = 0.
OddComposite(n) <=> Composite(n) AND n mod 2 = 1.
PerfectPowerComposite(n) <=> EXISTS a,k in N+: a >= 2 AND k >= 2 AND n = a^k.
SquareComposite(n) <=> EXISTS a in N+: a >= 2 AND n = a^2.
Semiprime(n) <=> n = p*q for primes p,q, including p = q.

05. EXAMPLES AND COUNTEREXAMPLES
Composite: 4=2*2; 6=2*3; 8=2*2*2; 9=3*3; 12=2*2*3; 15=3*5.
Not composite: 1 (unit); 2,3,5,7,11 (prime).
Out of domain: 0, -4, 2.5.

06. DIVISIBILITY AND FACTOR RELATIONS
DIVIDES(d,n) <=> EXISTS k in integers: n=d*k, with d != 0.
PROPER_FACTOR_OF(d,n) <=> 1 < d < n AND DIVIDES(d,n).
HAS_FACTOR_PAIR(n,a,b) <=> n=a*b AND a,b > 1.
HAS_PRIME_FACTOR(n,p) <=> Prime(p) AND DIVIDES(p,n).
HAS_UNIQUE_PRIME_FACTORS(n,F) holds up to permutation by the Fundamental Theorem of Arithmetic.

07. INFERENCE RULES
R1: n in N+ AND n > 1 AND EXISTS d (2 <= d <= floor(sqrt(n)) AND n mod d = 0) => Composite(n).
R2: n in N+ AND n > 1 AND NO d in [2,floor(sqrt(n))] divides n => Prime(n).
R3: a,b in N+ AND a > 1 AND b > 1 => Composite(a*b).
R4: n > 2 AND n mod 2 = 0 => Composite(n).
R5: Composite(n) => EXISTS prime p: p divides n AND p <= sqrt(n).
R6: n in N+ AND n > 1 => exactly one of Prime(n), Composite(n).
R7: n = product(p_i^e_i), each p_i prime, e_i >= 1, sum(e_i) >= 2 => Composite(n).
R8: n = p*q with p,q prime => Semiprime(n) AND Composite(n).

08. ALGORITHMIC CLASSIFIER
input: n : integer
precondition: n >= 1
if n == 1: return NEITHER_PRIME_NOR_COMPOSITE
if n == 2: return PRIME
for d from 2 through floor(sqrt(n)):
    if n mod d == 0:
        return COMPOSITE with witness (d, n/d)
return PRIME
note: Use exact integer arithmetic and integer square root; floating-point approximation is not required.

09. PRIME FACTORISATION
For every composite n, there exist primes p1 < ... < pk and exponents e1,...,ek >= 1 such that n = product_i(p_i^e_i) and sum_i(e_i) >= 2.
Canonical form: ascending primes with positive integer exponents.
Example: 360 = 2^3 * 3^2 * 5.
Derived divisor count: tau(n) = product_i(e_i + 1).
Derived sum of positive divisors: sigma(n) = product_i((p_i^(e_i+1)-1)/(p_i-1)).

10. MATHEMATICAL PROPERTIES
The smallest composite number is 4.
Every composite number has at least one prime divisor.
Every composite number has a nontrivial factor pair.
Composite numbers are infinite: for every integer m >= 2, m(m+1) is composite.
Composite numbers are not closed under addition (4+9=13, prime).
Composite numbers are closed under multiplication (if a,b are composite, ab is composite).
A composite number need not be even (9 is odd).

11. SEMANTIC RELATIONSHIPS
CompositeNumber IS_A PositiveInteger.
CompositeNumber CONTRASTS_WITH PrimeNumber.
CompositeNumber HAS_PROPERTY NontrivialDivisor.
CompositeNumber HAS_DECOMPOSITION PrimeFactorisation.
CompositeNumber PARTICIPATES_IN Divisibility.
CompositeNumber RELATED_TO FundamentalTheoremOfArithmetic.
CompositeNumber RELATED_TO NumberTheory.

12. SEMANTIC EQUIVALENCE
"composite integer" EQUIVALENT_TO "composite number" when the domain is positive integers.
"non-prime positive integer" NOT EQUIVALENT_TO "composite number" without excluding 1.
"factorable integer" AMBIGUOUS; do not infer compositeness without nontrivial factors.
"semiprime" SUBCLASS_OF "composite number", not synonymous.

13. KNOWLEDGE GRAPH TRIPLES
(12, rdf:type, CompositeNumber)
(12, hasProperDivisor, 2)
(12, hasProperDivisor, 3)
(12, hasPrimeFactorisation, "2^2*3")
(9, rdf:type, OddCompositeNumber)
(4, rdf:type, EvenCompositeNumber)
(1, rdf:type, NeitherPrimeNorComposite)

14. CONSTRAINTS AND VALIDATION
C1: composite.value MUST be a positive integer >= 4.
C2: each claimed witness divisor MUST satisfy 1 < d < n AND n mod d = 0.
C3: factorisation product MUST equal n exactly.
C4: every claimed prime factor MUST be prime.
C5: factorisation representation MUST be canonical for stable identity.
C6: reject simultaneous Prime(n) and Composite(n) classifications.
C7: reject inference that 1 is composite.
C8: unknown primality is NOT evidence of compositeness.

15. CONFIDENCE
confidence.levels: [PROVEN, VERIFIED_COMPUTATION, PROBABLE, UNKNOWN]
A valid nontrivial divisor is a deterministic proof of compositeness.
A probabilistic primality test result alone must not be labelled PROVEN.
Record algorithm, witness, numerical domain and precision as evidence.

16. FLOW HASH
FLOW_HASH = SHA256(canonical_utf8(ontology_id + version + normalised_rules + constraints))
Canonicalisation: stable field ordering, normalised line endings, explicit UTF-8, no volatile timestamps in hash input.
Hash is a reproducibility identifier, not a mathematical proof.

17. UPDATE MODEL
update.trigger: [definition_change, rule_revision, evidence_correction, schema_change]
update.policy: semantic_versioning
update.requirements: preserve_prior_version; rerun_validation; regenerate_FLOW_HASH; record_provenance

18. AI CONSUMPTION
inputs: integer n; optional factorisation evidence.
outputs: classification; proof witness; prime factors if computed; confidence; provenance.
reasoning: exact arithmetic preferred; do not infer from decimal appearance.
explainability: show a divisor pair or certified factorisation when declaring composite.
interoperability: typed graph entities, machine-readable predicates, deterministic validation.

19. TEST VECTORS
n=1 => NEITHER_PRIME_NOR_COMPOSITE
n=2 => PRIME
n=4 => COMPOSITE; witness=(2,2)
n=9 => COMPOSITE; witness=(3,3)
n=13 => PRIME
n=21 => COMPOSITE; witness=(3,7)
n=49 => COMPOSITE; witness=(7,7)
n=97 => PRIME
n=121 => COMPOSITE; witness=(11,11)

20. PROVENANCE AND AUTHORSHIP
project: Kireth Semantic Library
website: https://kirethresearch.org
joint_authors: Mark Higgins — Sky (Recursive AI)
source_page: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/number-entities/composite-number-ontology-2.html
source_verification: not performed; specification grounded in standard number theory.
END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ