AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
Cardinality Ontology — Set Theory
Kireth Semantic Library
Source: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/set-theory/cardinality-ontology-2.html
Version: 1.0 | Locale: en-GB | Date: 2026-10-11
1. PURPOSE
Represent the size of sets, finite and infinite cardinal numbers, cardinal comparisons, and cardinal arithmetic with explicit semantic and logical constraints.
2. TYPED ENTITIES
Set: collection of distinct elements.
Element: object that may belong to a set.
Cardinality: equivalence class of sets under bijection; written |A|.
FiniteSet: set bijective with {0,...,n-1} for some natural number n.
InfiniteSet: set that is not finite.
CountablyInfiniteSet: set bijective with natural numbers N.
UncountableSet: infinite set not bijective with N.
Bijection: one-to-one and onto mapping.
Injection: one-to-one mapping.
Surjection: onto mapping.
CardinalNumber: representative of set size.
PowerSet: set of all subsets of a given set.
DisjointUnion: tagged union retaining distinctions between inputs.
CartesianProduct: set of ordered pairs.
3. RELATIONSHIPS
HAS_CARDINALITY(Set, CardinalNumber)
ELEMENT_OF(Element, Set)
EQUIPOTENT(A, B) iff EXISTS_BIJECTION(A, B)
CARDINAL_LEQ(A, B) iff EXISTS_INJECTION(A, B)
CARDINAL_LT(A, B) iff CARDINAL_LEQ(A, B) and NOT EQUIPOTENT(A, B)
SUBSET_OF(A, B) implies |A| <= |B|
FINITE(A) iff EXISTS n in N: |A| = n
COUNTABLY_INFINITE(A) iff |A| = aleph_0
UNCOUNTABLE(A) iff INFINITE(A) and NOT COUNTABLY_INFINITE(A)
4. CORE OPERATIONS
cardinality(A) -> |A|
equipotent(A, B) -> boolean
injects_into(A, B) -> boolean
compare_cardinality(A, B) -> {less,equal,greater,incomparable_or_unknown}
cardinal_sum(A, B) -> |A disjoint_union B|
cardinal_product(A, B) -> |A x B|
cardinal_exponent(A, B) -> |A^B| (functions B -> A)
5. FORMAL AXIOMS AND LAWS
|empty_set| = 0
|{x}| = 1
A bijective_to B => |A| = |B|
A subset_of B => |A| <= |B|
|A union B| = |A| + |B| - |A intersection B| for finite A,B
|A disjoint_union B| = |A| + |B|
|A x B| = |A| * |B|
|P(A)| = 2^|A| (cardinal exponentiation)
|P(A)| > |A| (Cantor's theorem)
|N| = aleph_0
|Z| = aleph_0
|Q| = aleph_0
|R| > aleph_0
|R| = |P(N)| = 2^aleph_0
For finite A: |P(A)| = 2^|A|
For finite A,B: |A^B| = |A|^|B|
Schroeder-Bernstein: injections A -> B and B -> A imply |A| = |B|
6. FINITE CARDINALITY INFERENCE
IF distinct_elements(A) = n THEN |A| = n.
IF A and B are finite and disjoint THEN |A union B| = |A| + |B|.
IF A and B are finite THEN |A setminus B| = |A| - |A intersection B|.
IF finite(A) and finite(B) THEN |A x B| = |A| * |B|.
IF finite(A) THEN |P(A)| = 2^|A|.
7. INFINITE CARDINALITY INFERENCE
IF bijection(A, N) THEN A is countably infinite.
IF bijection(A, R) THEN A is uncountable.
IF bijection(A, B) THEN equal_cardinality(A, B).
IF A is any set THEN cardinality(P(A)) strictly exceeds cardinality(A).
IF injection(A, B) THEN |A| <= |B|.
Do not infer equal cardinality from a surjection alone without the relevant set-theoretic assumptions; the axiom of choice matters for some general cardinal comparisons.
8. SEMANTIC EQUIVALENCE
"set size" ~= "cardinality" when referring to number of distinct elements.
"same cardinality" == "equipotent" == "exists a bijection".
"countably infinite" == "bijection with N".
"continuum cardinality" == "cardinality of R".
Distinguish cardinality from ordinal position, measure, multiplicity, and list length with duplicates.
9. VALIDATION RULES
V01: Count only distinct elements in a set.
V02: Empty set cardinality must equal zero.
V03: Finite cardinalities must be non-negative integers.
V04: For finite A, verify power-set cardinality equals 2^|A|.
V05: Cardinal equality claims require a bijection or an accepted theorem.
V06: Cardinal order claims require appropriate injections or established results.
V07: Never equate an infinite set with its power set.
V08: Mark undecidable-from-given-data comparisons as unknown.
V09: Specify set-theoretic assumptions (e.g. ZF versus ZFC) for general infinite cardinal arithmetic and comparability.
10. EXAMPLES
A = {a,b,c}; |A| = 3.
B = {1,2}; |B| = 2.
|A x B| = 6.
|P(B)| = 4.
N and even natural numbers have equal cardinality via n -> 2n.
N and R do not have equal cardinality.
11. CONFIDENCE
confidence.value: 1.0 for established definitions and theorems under stated assumptions.
confidence.method: formal mathematical proof or validated finite computation.
confidence.reduction: reduce for incomplete definitions, unstated axioms, or unverified inferred mappings.
12. FLOW_HASH
algorithm: SHA-256
scope: canonical UTF-8 representation of ontology entities, relations, axioms and version.
value: COMPUTE_ON_INGEST (not precomputed).
13. UPDATE_MODEL
version: 1.0
change_policy: append reviewed changes with provenance and timestamp.
revalidation: run validation rules and refresh FLOW_HASH after updates.
compatibility: preserve identifiers or publish explicit migration mappings.
14. AI_CONSUMPTION
parse_mode: typed semantic graph + formal inference rules.
primary_entity: Cardinality.
retrieval_keys: cardinality, set size, finite set, infinite set, bijection, countability, aleph-null, power set, cardinal arithmetic.
reasoning: distinguish proved facts, finite computations, assumptions, and unknown claims.
output: definitions, typed relationships, proof obligations, and provenance.
15. PROVENANCE
Authorship: Mark Higgins — Sky (Recursive AI)
Research: Kireth Research | https://kirethresearch.org
Note: Formal ontology generated from established set-theoretic concepts; not a verified transcription of the linked webpage.