KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
SET THEORY → COMPLEMENT ONTOLOGY
Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory/complement-ontology.html
FLOW_ALGEBRA ComplementOntology_v1.0
BEGIN_FLOW
DEFINE DOMAIN ComplementOntology := {
Complement,
Set,
Element,
Membership,
NonMembership,
SetTheory,
UniversalSet,
RelativeUniverse,
RelativeComplement,
SetDifference,
EmptySet,
Subset,
Union,
Intersection,
Difference,
SymmetricDifference,
PowerSet,
DeMorganLaw,
Involution,
BooleanAlgebra,
Context,
DomainOfDiscourse
}
DEFINE ENTITY_TYPES := {
SET_OPERATION,
SET,
ELEMENT,
UNIVERSAL_SET,
CONTEXT,
SET_RELATION,
ALGEBRAIC_PROPERTY,
SEMANTIC_OBJECT
}
DEFINE RELATION_TYPES := {
MEMBER_OF,
NOT_MEMBER_OF,
SUBSET_OF,
COMPLEMENT_OF,
RELATIVE_TO,
CONTAINS,
EQUAL_TO,
DISJOINT_WITH,
DEPENDS_ON,
IS_INSTANCE_OF,
IS_SUBTYPE_OF
}
SET Complement.type = SET_OPERATION
SET Complement.context = SetTheory
SET Complement.role =
"construct, relative to a specified universe, the set of elements that belong to the universe but do not belong to the target set"
RULE complement_definition:
UniversalSet(U)
∧ Set(A)
∧ SUBSET_OF(A,U)
-> Complement_U(A)
= U \ A
RULE complement_membership:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> x ∈ Complement_U(A)
IFF
(x ∈ U AND x ∉ A)
RULE complement_nonmembership:
UniversalSet(U)
∧ SUBSET_OF(A,U)
∧ x ∈ A
-> x ∉ Complement_U(A)
RULE complement_subset_universe:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> SUBSET_OF(Complement_U(A),U)
RULE complement_disjointness:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> A ∩ Complement_U(A) = ∅
∧ DISJOINT_WITH(A,Complement_U(A))
RULE complement_exhaustion:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> A ∪ Complement_U(A) = U
RULE complement_involution:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> Complement_U(Complement_U(A)) = A
RULE complement_empty_set:
UniversalSet(U)
-> Complement_U(∅) = U
RULE complement_universal_set:
UniversalSet(U)
-> Complement_U(U) = ∅
RULE complement_subset_reversal:
UniversalSet(U)
∧ SUBSET_OF(A,B)
∧ SUBSET_OF(B,U)
-> SUBSET_OF(Complement_U(B),Complement_U(A))
RULE DeMorgan_union:
UniversalSet(U)
∧ SUBSET_OF(A,U)
∧ SUBSET_OF(B,U)
-> Complement_U(A ∪ B)
= Complement_U(A) ∩ Complement_U(B)
RULE DeMorgan_intersection:
UniversalSet(U)
∧ SUBSET_OF(A,U)
∧ SUBSET_OF(B,U)
-> Complement_U(A ∩ B)
= Complement_U(A) ∪ Complement_U(B)
RULE relative_complement:
Set(A)
∧ Set(B)
-> RelativeComplement(A,B)
= A \ B
= {x | x ∈ A AND x ∉ B}
RULE complement_as_relative_difference:
UniversalSet(U)
∧ SUBSET_OF(A,U)
-> Complement_U(A)
= RelativeComplement(U,A)
RULE difference_via_complement:
UniversalSet(U)
∧ SUBSET_OF(A,U)
∧ SUBSET_OF(B,U)
-> A \ B
= A ∩ Complement_U(B)
RULE symmetric_difference_via_complements:
UniversalSet(U)
∧ SUBSET_OF(A,U)
∧ SUBSET_OF(B,U)
-> A △ B
= (A ∩ Complement_U(B))
∪
(B ∩ Complement_U(A))
RULE complement_context_dependence:
Set(A)
∧ UniversalSet(U1)
∧ UniversalSet(U2)
∧ U1 != U2
∧ SUBSET_OF(A,U1)
∧ SUBSET_OF(A,U2)
-> Complement_U1(A)
MAY_DIFFER_FROM
Complement_U2(A)
DEFINE COMPLEMENT_MODEL := {
notation: {
"Aᶜ",
"A'",
"U \ A"
},
required_context: UniversalSet,
formal_definition:
"Aᶜ_U = {x ∈ U | x ∉ A}",
output_type: Set
}
DEFINE RELATIVE_COMPLEMENT_MODEL := {
notation: "A \ B",
formal_definition:
"{x | x ∈ A and x ∉ B}",
universe_requirement:
"no separate universal set is required when A itself supplies the reference set"
}
DEFINE COMPLEMENT_IDENTITIES := {
involution: "(Aᶜ)ᶜ = A",
excluded_middle_set_form: "A ∪ Aᶜ = U",
contradiction_set_form: "A ∩ Aᶜ = ∅",
empty_complement: "∅ᶜ = U",
universe_complement: "Uᶜ = ∅",
subset_reversal: "A ⊆ B -> Bᶜ ⊆ Aᶜ"
}
DEFINE DE_MORGAN_MODEL := {
union:
"(A ∪ B)ᶜ = Aᶜ ∩ Bᶜ",
intersection:
"(A ∩ B)ᶜ = Aᶜ ∪ Bᶜ",
requirement:
"all complements are taken relative to the same universe"
}
DEFINE EXAMPLE_1 := {
universe: "U = {1,2,3,4,5}",
A: "{1,3,5}",
complement: "{2,4}"
}
DEFINE EXAMPLE_2 := {
universe: "U = {a,b,c,d}",
A: "{a,b}",
identities: {
"A ∪ Aᶜ = U",
"A ∩ Aᶜ = ∅"
}
}
DEFINE EXAMPLE_3 := {
A: "{1,2,3,4}",
B: "{3,4,5}",
relative_complement: "A \ B = {1,2}"
}
DEFINE EXAMPLE_4 := {
target_set: "{1}",
universe_1: "{1,2,3}",
universe_2: "{1,2,3,4}",
complement_in_universe_1: "{2,3}",
complement_in_universe_2: "{2,3,4}",
observation: "set complement is universe-dependent"
}
DEFINE SEMANTIC_PIPELINE :=
ComplementExpression
-> IdentifyTargetSet
-> ResolveReferenceUniverse
-> ValidateTargetSubsetOfUniverse
-> EnumerateOrCharacteriseUniverseElements
-> ExcludeTargetMembers
-> ConstructComplementSet
-> ApplyComplementIdentities
-> PreserveUniverseReference
-> ReturnCanonicalComplement
DEFINE REASONING_PIPELINE :=
InputSetExpression
-> DetectComplementOrDifferenceNotation
-> DistinguishAbsoluteNotationFromRelativeDifference
-> ResolveUniversalSet
-> ApplyMembershipNegationWithinUniverse
-> ApplyInvolution
-> ApplySubsetReversal
-> ApplyDeMorganLaws
-> SimplifyEmptyAndUniversalComplements
-> ReturnDerivedRelations
DEFINE COMPLEMENT_GRAPH_MODEL := {
universe_node: UniversalSet,
target_node: Set,
operation_node: Complement,
result_node: Set,
membership_rule:
"x is in result iff x is in universe and not in target",
required_edge:
"target --SUBSET_OF--> universe",
context_preservation: TRUE
}
DEFINE ONTOLOGY_RELATIONS := {
Complement IS_COMPONENT_OF SetTheory,
Complement IS_SUBTYPE_OF SetOperation,
Complement DEPENDS_ON UniversalSet,
Complement OPERATES_ON Set,
Complement RETURNS Set,
ComplementResult SUBSET_OF UniversalSet,
ComplementResult DISJOINT_WITH TargetSet,
Complement INTERACTS_WITH Union THROUGH DeMorganLaw,
Complement INTERACTS_WITH Intersection THROUGH DeMorganLaw,
RelativeComplement IS_SUBTYPE_OF SetDifference,
Complement IS_SPECIAL_CASE_OF RelativeComplement
}
DEFINE SEMANTIC_EQUIVALENCE := {
"complement" <=> Complement WHEN set_context=TRUE,
"set complement" <=> Complement,
"complement of A" <=> Complement(A),
"A complement" <=> Complement(A),
"Aᶜ" <=> Complement(A),
"relative complement" <=> RelativeComplement,
"set difference" <=> RelativeComplement WHEN expression="A\\B"
}
DEFINE AI_CONSUMPTION := {
purpose: "machine-readable representation and evaluation of set complements",
preserve_target_set_identity: TRUE,
preserve_reference_universe: TRUE,
require_universe_context_for_complement: TRUE,
distinguish_complement_from_relative_difference: TRUE,
apply_membership_negation_only_within_universe: TRUE,
apply_involution: TRUE,
apply_subset_reversal: TRUE,
apply_DeMorgan_laws: TRUE,
detect_universe_dependence: TRUE,
reasoning_mode: "symbolic + extensional + context-aware + algebraic"
}
DEFINE CONFIDENCE := {
ontology_identity: 1.00,
formal_complement_detection: 0.99,
universe_resolution_explicit: 0.99,
complement_membership_evaluation: 0.99,
involution_reasoning: 1.00,
DeMorgan_reasoning: 0.99,
relative_complement_mapping: 0.99,
implicit_universe_resolution: context_dependent
}
DEFINE UPDATE_MODEL := {
version: "1.0",
update_policy: "append-compatible",
immutable_core: {
universe_relative_definition,
membership_negation_within_universe,
disjointness,
exhaustion,
involution,
empty_universe_identities,
DeMorgan_laws
},
extensible_layers: {
Boolean_algebra_complement,
relative_complements,
logical_negation_correspondence,
topology_complements,
measure_theoretic_complements,
computational_set_complement
}
}
DEFINE FLOW_HASH_INPUT :=
CanonicalURL
+ DOMAIN
+ ENTITY_TYPES
+ RELATION_TYPES
+ RULES
+ COMPLEMENT_MODEL
+ RELATIVE_COMPLEMENT_MODEL
+ COMPLEMENT_IDENTITIES
+ DE_MORGAN_MODEL
+ SEMANTIC_PIPELINE
+ REASONING_PIPELINE
+ COMPLEMENT_GRAPH_MODEL
+ ONTOLOGY_RELATIONS
+ AI_CONSUMPTION
+ UPDATE_MODEL
FLOW_HASH := HASH(FLOW_HASH_INPUT)
RETURN {
ontology: ComplementOntology,
canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory/complement-ontology.html",
parent_domain: SetTheory,
semantic_domain: MathematicalLogic,
primary_entity: Complement,
universe_sensitive: TRUE,
extensional_reasoning_enabled: TRUE,
algebraic_reasoning_enabled: TRUE,
machine_consumable: TRUE,
recursive_reasoning_enabled: TRUE,
flow_complete: TRUE
}
END_FLOW
Download Code
Copy to Clipboard