KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
SET THEORY → SET ONTOLOGY
Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory/set-ontology.html
FLOW_ALGEBRA SetOntology_v1.0
BEGIN_FLOW
DEFINE DOMAIN SetOntology := {
Set,
Element,
Membership,
NonMembership,
EmptySet,
Singleton,
PairSet,
FiniteSet,
InfiniteSet,
UniversalSet,
Subset,
ProperSubset,
Superset,
Equality,
Extensionality,
PowerSet,
Union,
Intersection,
Difference,
SymmetricDifference,
Complement,
CartesianProduct,
FamilyOfSets,
IndexedFamily,
Partition,
Cardinality,
Relation,
Function,
Ordinal,
Cardinal,
SetBuilderNotation
}
DEFINE ENTITY_TYPES := {
SET,
ELEMENT,
SET_RELATION,
SET_OPERATION,
SET_FAMILY,
CARDINAL_OBJECT,
ORDERED_OBJECT,
SEMANTIC_OBJECT
}
DEFINE RELATION_TYPES := {
MEMBER_OF,
NOT_MEMBER_OF,
CONTAINS,
SUBSET_OF,
PROPER_SUBSET_OF,
SUPERSET_OF,
EQUAL_TO,
DISJOINT_WITH,
INTERSECTS,
HAS_CARDINALITY,
INDEXED_BY,
PARTITIONS,
IS_INSTANCE_OF,
IS_SUBTYPE_OF,
DEPENDS_ON
}
SET Set.type = SET
SET Set.context = SetTheory
SET Set.role =
"represent a mathematically defined collection whose identity is determined by its members"
RULE membership:
Object(x)
∧ Set(A)
∧ x ∈ A
-> MEMBER_OF(x,A)
∧ CONTAINS(A,x)
RULE nonmembership:
Object(x)
∧ Set(A)
∧ x ∉ A
-> NOT_MEMBER_OF(x,A)
RULE extensional_identity:
Set(A)
∧ Set(B)
∧ FOR_ALL x [
x ∈ A <=> x ∈ B
]
-> EQUAL_TO(A,B)
RULE equality_via_subsets:
SUBSET_OF(A,B)
∧ SUBSET_OF(B,A)
-> EQUAL_TO(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 superset:
SUBSET_OF(A,B)
-> SUPERSET_OF(B,A)
RULE empty_set:
Set(E)
∧ NOT EXISTS x [
x ∈ E
]
-> E = ∅
RULE empty_subset:
Set(A)
-> SUBSET_OF(∅,A)
RULE reflexive_subset:
Set(A)
-> SUBSET_OF(A,A)
RULE singleton:
Object(a)
-> Singleton({a})
∧ HAS_CARDINALITY({a},1)
RULE pair_set:
Object(a)
∧ Object(b)
-> PairSet({a,b})
RULE finite_set:
Set(A)
∧ Cardinality(A)=n
∧ n ∈ NaturalNumbers
-> FiniteSet(A)
RULE infinite_set:
Set(A)
∧ NOT FiniteSet(A)
-> InfiniteSet(A)
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 intersection_relation:
Set(A)
∧ Set(B)
∧ A ∩ B != ∅
-> INTERSECTS(A,B)
RULE power_set:
Set(A)
-> PowerSet(A) = {
X | X ⊆ A
}
RULE finite_power_set_cardinality:
FiniteSet(A)
∧ Cardinality(A)=n
-> Cardinality(PowerSet(A))=2^n
RULE cartesian_product:
Set(A)
∧ Set(B)
-> CartesianProduct(A,B) = {
(a,b) | a ∈ A AND b ∈ B
}
RULE finite_union_cardinality:
FiniteSet(A)
∧ FiniteSet(B)
-> |A ∪ B|
= |A| + |B| - |A ∩ B|
DEFINE SET_IDENTITY_MODEL := {
principle: Extensionality,
expression:
"A = B iff every object is a member of A exactly when it is a member of B",
consequence:
"ordering, repetition and presentation do not create different sets when membership is unchanged"
}
DEFINE MEMBERSHIP_MODEL := {
expression: "x ∈ A",
subject: Element,
object: Set,
inverse_view: "A contains x",
critical_distinction:
"x ∈ A is membership; A ⊆ B is a relation between sets"
}
DEFINE CORE_SET_TYPES := {
EmptySet:
"set with no members",
Singleton:
"set with exactly one member",
FiniteSet:
"set with finite cardinality",
InfiniteSet:
"set that is not finite",
UniversalSet:
"context-relative set containing every object under consideration",
PowerSet:
"set containing every subset of a given set"
}
DEFINE CORE_OPERATIONS := {
Union: "A ∪ B",
Intersection: "A ∩ B",
Difference: "A \ B",
SymmetricDifference: "A △ B",
Complement: "U \ A",
PowerSet: "P(A)",
CartesianProduct: "A × B"
}
DEFINE SET_NOTATION := {
roster: "{a,b,c}",
membership: "a ∈ A",
nonmembership: "a ∉ A",
subset: "A ⊆ B",
proper_subset: "A ⊂ B",
set_builder: "{x | condition(x)}",
cardinality: "|A|"
}
DEFINE EXAMPLE_1 := {
set: "A = {1,2,3}",
members: {1,2,3},
cardinality: 3
}
DEFINE EXAMPLE_2 := {
A: "{1,2}",
B: "{2,1}",
result: "A = B",
reason: Extensionality
}
DEFINE EXAMPLE_3 := {
A: "{1,2}",
B: "{1,2,3}",
relation: "A ⊂ B"
}
DEFINE EXAMPLE_4 := {
A: "{a,b}",
power_set: {
"∅",
"{a}",
"{b}",
"{a,b}"
},
power_set_cardinality: 4
}
DEFINE SEMANTIC_PIPELINE :=
MathematicalExpression
-> IdentifySetExpressions
-> IdentifyCandidateElements
-> ResolveMembership
-> CanonicaliseSetMembers
-> ApplyExtensionalIdentity
-> DetermineSubsetRelations
-> ClassifySetType
-> ApplySetOperations
-> ComputeCardinalityWhenDefined
-> ConstructSemanticSetRepresentation
DEFINE REASONING_PIPELINE :=
InputSetExpression
-> ParseNotation
-> BuildMembershipMap
-> RemovePresentationDependence
-> ApplyExtensionality
-> InferSubsetAndSupersetRelations
-> EvaluateRequestedOperations
-> DetermineCardinality
-> ReturnDerivedRelationsAndSets
DEFINE NORMALISATION_PIPELINE :=
SetExpression
-> ParseMembers
-> IdentifyDuplicateRepresentations
-> CollapseDuplicateMembership
-> IgnoreMemberOrdering
-> PreserveDistinctElements
-> CanonicalSetRepresentation
DEFINE ONTOLOGY_RELATIONS := {
Set IS_COMPONENT_OF SetTheory,
Set CONTAINS Element,
Element MEMBER_OF Set,
EmptySet IS_SUBTYPE_OF Set,
Singleton IS_SUBTYPE_OF Set,
FiniteSet IS_SUBTYPE_OF Set,
InfiniteSet IS_SUBTYPE_OF Set,
UniversalSet IS_SUBTYPE_OF Set,
Subset SUBSET_OF Set,
ProperSubset PROPER_SUBSET_OF Set,
PowerSet CONTAINS Subsets,
Set HAS_CARDINALITY Cardinality,
Relation DEPENDS_ON CartesianProduct,
Function IS_SUBTYPE_OF Relation,
SetIdentity DEPENDS_ON Extensionality
}
DEFINE SEMANTIC_EQUIVALENCE := {
"set" <=> Set WHEN mathematical_context=TRUE,
"collection" <=> Set WHEN formally_defined_set_context=TRUE,
"member" <=> Element WHEN set_membership_context=TRUE,
"element" <=> Element,
"belongs to" <=> MEMBER_OF,
"is in" <=> MEMBER_OF WHEN mathematical_set_context=TRUE,
"contained in" <=> SUBSET_OF WHEN both_arguments_are_sets=TRUE,
"power set" <=> PowerSet
}
DEFINE AI_CONSUMPTION := {
purpose: "machine-readable representation of the mathematical concept of a set",
preserve_set_identity: TRUE,
preserve_element_identity: TRUE,
ignore_member_order: TRUE,
collapse_duplicate_membership: TRUE,
distinguish_membership_from_subset: TRUE,
enforce_extensional_identity: TRUE,
preserve_set_type: TRUE,
preserve_operation_semantics: TRUE,
support_recursive_set_membership: TRUE,
support_cardinality_reasoning: TRUE,
reasoning_mode: "symbolic + extensional + relational"
}
DEFINE CONFIDENCE := {
ontology_identity: 1.00,
set_detection_formal_notation: 0.99,
membership_mapping: 0.99,
subset_mapping: 0.99,
extensional_equality: 0.99,
finite_operation_evaluation: 0.99,
finite_cardinality: 0.99,
natural_language_set_detection: context_dependent
}
DEFINE UPDATE_MODEL := {
version: "1.0",
update_policy: "append-compatible",
immutable_core: {
membership,
extensionality,
subset_relation,
empty_set,
set_operations,
power_set,
cartesian_product
},
extensible_layers: {
infinite_sets,
countability,
cardinal_numbers,
ordinal_sets,
transitive_sets,
axiomatic_set_theory,
fuzzy_sets,
computational_set_representations
}
}
DEFINE FLOW_HASH_INPUT :=
CanonicalURL
+ DOMAIN
+ ENTITY_TYPES
+ RELATION_TYPES
+ RULES
+ SET_IDENTITY_MODEL
+ MEMBERSHIP_MODEL
+ CORE_SET_TYPES
+ CORE_OPERATIONS
+ SET_NOTATION
+ SEMANTIC_PIPELINE
+ REASONING_PIPELINE
+ NORMALISATION_PIPELINE
+ ONTOLOGY_RELATIONS
+ AI_CONSUMPTION
+ UPDATE_MODEL
FLOW_HASH := HASH(FLOW_HASH_INPUT)
RETURN {
ontology: SetOntology,
canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory/set-ontology.html",
parent_domain: SetTheory,
semantic_domain: MathematicalLogic,
primary_entity: Set,
membership_sensitive: TRUE,
extensional_reasoning_enabled: TRUE,
machine_consumable: TRUE,
recursive_reasoning_enabled: TRUE,
flow_complete: TRUE
}
END_FLOW
Download Code
Copy to Clipboard