Set Theory
Authors:
MArk Anthony Higgins - Sky Recursive Ai
MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: July 6th 2026
Revised Date: July 6th 2026
KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
SET THEORY
Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory.html
FLOW_ALGEBRA SetTheory_v1.0
BEGIN_FLOW
DEFINE DOMAIN SetTheory := {
Set,
Element,
Membership,
EmptySet,
Singleton,
FiniteSet,
InfiniteSet,
UniversalSet,
Subset,
ProperSubset,
Superset,
ProperSuperset,
PowerSet,
Union,
Intersection,
Difference,
SymmetricDifference,
Complement,
CartesianProduct,
OrderedPair,
Relation,
Function,
Domain,
Codomain,
Range,
Cardinality,
FiniteCardinality,
InfiniteCardinality,
CountableSet,
UncountableSet,
Equinumerosity,
Injection,
Surjection,
Bijection,
Partition,
EquivalenceRelation,
EquivalenceClass,
FamilyOfSets,
IndexedFamily,
Sequence,
SetBuilderNotation,
Extensionality,
Foundation,
Pairing,
UnionAxiom,
PowerSetAxiom,
InfinityAxiom,
Separation,
Replacement,
Choice,
ZermeloFraenkelSetTheory,
ZFC,
Ordinal,
Cardinal,
TransitiveSet,
WellOrdering
}
DEFINE ENTITY_TYPES := {
SET,
ELEMENT,
SET_RELATION,
SET_OPERATION,
ORDERED_STRUCTURE,
FUNCTION,
CARDINAL_OBJECT,
ORDINAL_OBJECT,
AXIOM,
FORMAL_SYSTEM,
CONSTRUCTION,
SEMANTIC_OBJECT
}
DEFINE RELATION_TYPES := {
MEMBER_OF,
CONTAINS,
SUBSET_OF,
PROPER_SUBSET_OF,
SUPERSET_OF,
EQUAL_TO,
DISJOINT_WITH,
INTERSECTS,
UNION_WITH,
MAPS_TO,
HAS_DOMAIN,
HAS_CODOMAIN,
HAS_RANGE,
HAS_CARDINALITY,
EQUINUMEROUS_WITH,
PARTITIONS,
INDEXED_BY,
ORDERED_BY,
IS_INSTANCE_OF,
IS_SUBTYPE_OF,
DEPENDS_ON
}
SET SetTheory.type = FORMAL_SYSTEM
SET SetTheory.domain = MathematicalLogic
SET SetTheory.role =
"provide a formal framework for describing collections, membership, set operations, relations, functions, cardinality, ordinals and foundational mathematical constructions"
RULE membership:
Object(x)
∧ Set(A)
∧ x ∈ A
-> MEMBER_OF(x,A)
RULE containment:
MEMBER_OF(x,A)
-> CONTAINS(A,x)
RULE set_equality_extensional:
Set(A)
∧ Set(B)
∧ FOR_ALL x [x ∈ A <=> x ∈ B]
-> A = B
RULE subset:
Set(A)
∧ Set(B)
∧ FOR_ALL x [x ∈ A -> x ∈ B]
-> SUBSET_OF(A,B)
RULE proper_subset:
SUBSET_OF(A,B)
∧ A != B
-> PROPER_SUBSET_OF(A,B)
RULE empty_set:
Set(E)
∧ NOT EXISTS x [x ∈ E]
-> E = ∅
RULE singleton:
Object(a)
-> Singleton({a})
∧ Cardinality({a})=1
RULE pair_set:
Object(a)
∧ Object(b)
-> Set({a,b})
RULE union:
Set(A)
∧ Set(B)
-> A ∪ B = {x | x ∈ A OR x ∈ B}
RULE intersection:
Set(A)
∧ Set(B)
-> A ∩ B = {x | x ∈ A AND x ∈ B}
RULE difference:
Set(A)
∧ Set(B)
-> A \ B = {x | x ∈ A AND x ∉ B}
RULE symmetric_difference:
Set(A)
∧ Set(B)
-> A △ B = (A \ B) ∪ (B \ A)
RULE complement:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> Complement_U(A) = U \ A
RULE disjoint:
Set(A)
∧ Set(B)
∧ A ∩ B = ∅
-> DISJOINT_WITH(A,B)
RULE power_set:
Set(A)
-> P(A) = {X | X ⊆ A}
RULE finite_power_set_cardinality:
FiniteSet(A)
∧ Cardinality(A)=n
-> Cardinality(P(A)) = 2^n
RULE cartesian_product:
Set(A)
∧ Set(B)
-> A × B = {(a,b) | a ∈ A AND b ∈ B}
RULE ordered_pair:
Object(a)
∧ Object(b)
-> OrderedPair(a,b)
RULE relation:
Set(A)
∧ Set(B)
∧ R ⊆ A × B
-> Relation(R,A,B)
RULE function:
Relation(f,A,B)
∧ FOR_ALL a IN A [
EXISTS_UNIQUE b IN B [(a,b) ∈ f]
]
-> Function(f:A->B)
RULE injective:
Function(f:A->B)
∧ FOR_ALL x1,x2 IN A [
f(x1)=f(x2) -> x1=x2
]
-> Injection(f)
RULE surjective:
Function(f:A->B)
∧ FOR_ALL y IN B [
EXISTS x IN A [f(x)=y]
]
-> Surjection(f)
RULE bijective:
Injection(f)
∧ Surjection(f)
-> Bijection(f)
RULE equinumerosity:
Set(A)
∧ Set(B)
∧ EXISTS bijection f:A->B
-> EQUINUMEROUS_WITH(A,B)
RULE finite_cardinality:
FiniteSet(A)
-> HAS_CARDINALITY(A,n)
WHERE n = number_of_distinct_elements(A)
RULE countable:
Set(A)
∧ EXISTS injection f:A->NaturalNumbers
-> CountableSet(A)
RULE countably_infinite:
Set(A)
∧ EXISTS bijection f:NaturalNumbers->A
-> CountablyInfinite(A)
RULE uncountable:
InfiniteSet(A)
∧ NOT CountableSet(A)
-> UncountableSet(A)
RULE partition:
Set(A)
∧ FamilyOfSets(P)
∧ FOR_ALL X IN P [X != ∅]
∧ FOR_ALL X,Y IN P [X != Y -> X ∩ Y = ∅]
∧ UNION(P)=A
-> Partition(P,A)
RULE equivalence_class:
EquivalenceRelation(R,A)
∧ a ∈ A
-> EquivalenceClass([a]_R)
= {x ∈ A | x R a}
DEFINE CORE_OPERATIONS := {
union: "A ∪ B",
intersection: "A ∩ B",
difference: "A \ B",
symmetric_difference: "A △ B",
complement: "Aᶜ relative to a specified universe",
power_set: "P(A)",
cartesian_product: "A × B"
}
DEFINE CORE_RELATIONS := {
membership: "x ∈ A",
nonmembership: "x ∉ A",
subset: "A ⊆ B",
proper_subset: "A ⊂ B",
equality: "A = B",
disjointness: "A ∩ B = ∅"
}
DEFINE ZF_CORE_AXIOMS := {
Extensionality,
EmptySet,
Pairing,
UnionAxiom,
PowerSetAxiom,
InfinityAxiom,
SeparationSchema,
ReplacementSchema,
Foundation
}
DEFINE ZFC_EXTENSION := {
base: ZermeloFraenkelSetTheory,
additional_axiom: AxiomOfChoice
}
RULE axiom_extensionality:
FOR_ALL A,B [
(FOR_ALL x [x ∈ A <=> x ∈ B])
-> A=B
]
RULE axiom_pairing:
FOR_ALL a,b [
EXISTS C [
FOR_ALL x [
x ∈ C <=> (x=a OR x=b)
]
]
]
RULE axiom_union:
FOR_ALL A [
EXISTS U [
FOR_ALL x [
x ∈ U
<=> EXISTS B [
B ∈ A AND x ∈ B
]
]
]
]
RULE axiom_power_set:
FOR_ALL A [
EXISTS P [
FOR_ALL X [
X ∈ P <=> X ⊆ A
]
]
]
RULE axiom_infinity:
EXISTS I [
∅ ∈ I
∧ FOR_ALL x [
x ∈ I -> x ∪ {x} ∈ I
]
]
RULE axiom_foundation:
FOR_ALL nonempty_set A [
EXISTS x ∈ A [
x ∩ A = ∅
]
]
RULE axiom_choice:
FamilyOfNonemptySets(F)
-> EXISTS choice_function c [
FOR_ALL A ∈ F [
c(A) ∈ A
]
]
DEFINE ORDINAL_MODEL := {
ordinal:
"a transitive set well-ordered by membership in the von Neumann representation",
zero: "0 = ∅",
successor: "S(α) = α ∪ {α}",
finite_ordinals: {
"0 = ∅",
"1 = {0}",
"2 = {0,1}",
"3 = {0,1,2}"
}
}
DEFINE CARDINAL_MODEL := {
cardinal:
"a representative of an equinumerosity class of sets",
finite_cardinality:
"number of elements in a finite set",
infinite_cardinality:
"size classification for infinite sets via bijection"
}
DEFINE EXAMPLE_1 := {
A: "{1,2,3}",
B: "{3,4}",
union: "{1,2,3,4}",
intersection: "{3}",
difference_A_B: "{1,2}"
}
DEFINE EXAMPLE_2 := {
A: "{a,b}",
power_set: "{∅,{a},{b},{a,b}}",
cardinality_A: 2,
cardinality_power_set: 4
}
DEFINE EXAMPLE_3 := {
A: "{1,2}",
B: "{x,y,z}",
cartesian_product_cardinality: 6
}
DEFINE SEMANTIC_PIPELINE :=
MathematicalObjects
-> IdentifySetsAndElements
-> ResolveMembership
-> ResolveSubsetRelations
-> ApplySetOperations
-> ConstructRelationsAndFunctions
-> DetermineCardinality
-> ResolvePartitionsAndEquivalenceClasses
-> ApplyAxiomaticConstraints
-> ConstructHigherMathematicalObjects
DEFINE REASONING_PIPELINE :=
InputExpression
-> ParseSetNotation
-> IdentifyObjects
-> DetermineMembershipClaims
-> ApplyExtensionalEquality
-> ApplySubsetLogic
-> EvaluateSetOperations
-> EvaluateCardinalityOrMappingProperties
-> ApplyRelevantAxioms
-> ReturnDerivedSetRelations
DEFINE CONSTRUCTION_PIPELINE :=
EmptySet
-> Pairing
-> Union
-> PowerSet
-> CartesianProducts
-> Relations
-> Functions
-> NaturalNumberConstructions
-> Ordinals
-> Cardinals
-> GeneralMathematicalStructures
DEFINE ONTOLOGY_RELATIONS := {
SetTheory IS_SUBTYPE_OF MathematicalLogic,
Set CONTAINS Element,
Element MEMBER_OF Set,
Subset SUBSET_OF Set,
ProperSubset PROPER_SUBSET_OF Set,
PowerSet CONTAINS Subsets,
Relation IS_SUBSET_OF CartesianProduct,
Function IS_SUBTYPE_OF Relation,
Injection IS_SUBTYPE_OF Function,
Surjection IS_SUBTYPE_OF Function,
Bijection IS_SUBTYPE_OF Function,
Cardinality DEPENDS_ON Equinumerosity,
Partition PARTITIONS Set,
EquivalenceClass DEPENDS_ON EquivalenceRelation,
ZFC DEPENDS_ON ZermeloFraenkelSetTheory,
ZFC CONTAINS AxiomOfChoice
}
DEFINE SEMANTIC_EQUIVALENCE := {
"set theory" <=> SetTheory,
"set" <=> Set WHEN mathematical_context=TRUE,
"member" <=> Element WHEN membership_context=TRUE,
"element of" <=> MEMBER_OF,
"contained in" <=> SUBSET_OF WHEN set_to_set_context=TRUE,
"power set" <=> PowerSet,
"Cartesian product" <=> CartesianProduct,
"same cardinality" <=> Equinumerous WHEN set_context=TRUE,
"ZF" <=> ZermeloFraenkelSetTheory,
"ZFC" <=> "ZF + Axiom of Choice"
}
DEFINE AI_CONSUMPTION := {
purpose: "machine-readable semantic and axiomatic representation of set theory",
preserve_set_identity: TRUE,
preserve_element_identity: TRUE,
distinguish_membership_from_subset: TRUE,
preserve_extensional_equality: TRUE,
preserve_operation_semantics: TRUE,
preserve_relation_function_distinction: TRUE,
support_cardinality_reasoning: TRUE,
support_axiomatic_reasoning: TRUE,
support_recursive_set_construction: TRUE,
distinguish_ZF_from_ZFC: TRUE,
reasoning_mode: "symbolic + extensional + axiomatic + relational"
}
DEFINE CONFIDENCE := {
ontology_identity: 1.00,
membership_mapping: 0.99,
subset_mapping: 0.99,
finite_set_operations: 0.99,
function_relation_mapping: 0.99,
cardinality_reasoning: context_dependent,
axiomatic_reasoning: axiom_system_dependent,
natural_language_set_mapping: context_dependent
}
DEFINE UPDATE_MODEL := {
version: "1.0",
update_policy: "append-compatible",
immutable_core: {
membership,
extensionality,
subset_relation,
core_set_operations,
relation_as_cartesian_subset,
function_uniqueness,
cardinality_via_bijection
},
extensible_layers: {
axiomatic_set_theories,
ZF,
ZFC,
NBG,
MK_set_theory,
ordinal_arithmetic,
cardinal_arithmetic,
forcing,
large_cardinals,
descriptive_set_theory
}
}
DEFINE FLOW_HASH_INPUT :=
CanonicalURL
+ DOMAIN
+ ENTITY_TYPES
+ RELATION_TYPES
+ RULES
+ CORE_OPERATIONS
+ CORE_RELATIONS
+ ZF_CORE_AXIOMS
+ ZFC_EXTENSION
+ ORDINAL_MODEL
+ CARDINAL_MODEL
+ SEMANTIC_PIPELINE
+ REASONING_PIPELINE
+ CONSTRUCTION_PIPELINE
+ ONTOLOGY_RELATIONS
+ AI_CONSUMPTION
+ UPDATE_MODEL
FLOW_HASH := HASH(FLOW_HASH_INPUT)
RETURN {
ontology: SetTheory,
canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory.html",
parent_domain: MathematicalLogicOntologies,
semantic_domain: MathematicalLogic,
primary_entity: Set,
axiomatic_reasoning_enabled: TRUE,
extensional_reasoning_enabled: TRUE,
machine_consumable: TRUE,
recursive_reasoning_enabled: TRUE,
flow_complete: TRUE
}
END_FLOW