KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
SET THEORY → CARTESIAN PRODUCT ONTOLOGY
Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory/cartesian-product-ontology.html
FLOW_ALGEBRA CartesianProductOntology_v1.0
BEGIN_FLOW
DEFINE DOMAIN CartesianProductOntology := {
CartesianProduct,
Set,
Element,
OrderedPair,
OrderedTuple,
Tuple,
Coordinate,
FirstComponent,
SecondComponent,
Membership,
SetTheory,
EmptySet,
Singleton,
FiniteSet,
InfiniteSet,
Relation,
BinaryRelation,
Function,
Domain,
Codomain,
Range,
ProductSet,
CartesianPower,
NAryCartesianProduct,
Projection,
FirstProjection,
SecondProjection,
Cardinality,
Subset,
PowerSet
}
DEFINE ENTITY_TYPES := {
SET_OPERATION,
SET,
ELEMENT,
ORDERED_PAIR,
ORDERED_TUPLE,
COORDINATE,
RELATION,
FUNCTION,
PROJECTION,
CARDINAL_OBJECT,
SEMANTIC_OBJECT
}
DEFINE RELATION_TYPES := {
MEMBER_OF,
CONTAINS,
FIRST_COMPONENT_OF,
SECOND_COMPONENT_OF,
COMPONENT_OF,
SUBSET_OF,
PRODUCT_OF,
PROJECTS_TO,
HAS_DOMAIN,
HAS_CODOMAIN,
HAS_CARDINALITY,
RELATES,
MAPS_TO,
IS_INSTANCE_OF,
IS_SUBTYPE_OF,
DEPENDS_ON
}
SET CartesianProduct.type = SET_OPERATION
SET CartesianProduct.symbol = "×"
SET CartesianProduct.context = SetTheory
SET CartesianProduct.role =
"construct a set of ordered pairs or tuples formed by selecting one element from each input set in a specified order"
RULE binary_cartesian_product:
Set(A)
∧ Set(B)
-> CartesianProduct(A,B)
= A × B
= {(a,b) | a ∈ A AND b ∈ B}
RULE product_membership:
Set(A)
∧ Set(B)
-> (a,b) ∈ A × B
IFF
(a ∈ A AND b ∈ B)
RULE ordered_pair_components:
OrderedPair(a,b)
-> FIRST_COMPONENT_OF(a,(a,b))
∧ SECOND_COMPONENT_OF(b,(a,b))
RULE ordered_pair_equality:
OrderedPair(a,b)
∧ OrderedPair(c,d)
-> (a,b)=(c,d)
IFF
(a=c AND b=d)
RULE order_sensitivity:
Object(a)
∧ Object(b)
∧ a != b
-> (a,b) != (b,a)
RULE product_not_commutative:
Set(A)
∧ Set(B)
-> A × B
NOT_EQUAL_BY_DEFAULT
B × A
RULE swap_bijection:
Set(A)
∧ Set(B)
-> EXISTS bijection s:
A × B -> B × A
WHERE s(a,b)=(b,a)
RULE empty_left_product:
Set(B)
-> ∅ × B = ∅
RULE empty_right_product:
Set(A)
-> A × ∅ = ∅
RULE singleton_product:
Object(a)
∧ Object(b)
-> {a} × {b}
= {(a,b)}
RULE finite_product_cardinality:
FiniteSet(A)
∧ FiniteSet(B)
-> |A × B| = |A| * |B|
RULE subset_product_monotonicity:
SUBSET_OF(A,C)
∧ SUBSET_OF(B,D)
-> SUBSET_OF(A × B,C × D)
RULE relation_as_subset:
Relation(R,A,B)
-> SUBSET_OF(R,A × B)
RULE binary_relation:
R ⊆ A × B
-> BinaryRelation(R,A,B)
RULE function_graph:
Function(f:A->B)
-> Graph(f)
= {(a,f(a)) | a ∈ A}
∧ SUBSET_OF(Graph(f),A × B)
RULE first_projection:
Set(A)
∧ Set(B)
-> FirstProjection(π1:A×B->A)
∧ π1(a,b)=a
RULE second_projection:
Set(A)
∧ Set(B)
-> SecondProjection(π2:A×B->B)
∧ π2(a,b)=b
RULE cartesian_square:
Set(A)
-> CartesianPower(A,2)
= A × A
RULE cartesian_power:
Set(A)
∧ n ∈ PositiveIntegers
-> A^n
= {(a1,...,an) | FOR_ALL i, ai ∈ A}
RULE n_ary_product:
Sets(A1,...,An)
-> A1 × ... × An
= {
(a1,...,an)
| FOR_ALL i [ai ∈ Ai]
}
RULE indexed_product:
IndexedFamily({A_i | i ∈ I})
-> PRODUCT_i∈I A_i
= {
f | Domain(f)=I
AND FOR_ALL i ∈ I [f(i) ∈ A_i]
}
DEFINE BINARY_PRODUCT_MODEL := {
notation: "A × B",
output: SetOfOrderedPairs,
membership_condition:
"(a,b) ∈ A × B iff a ∈ A and b ∈ B",
coordinate_order: {
first_coordinate_from: A,
second_coordinate_from: B
}
}
DEFINE ORDERED_PAIR_MODEL := {
notation: "(a,b)",
equality_condition:
"(a,b)=(c,d) iff a=c and b=d",
order_sensitive: TRUE,
set_theoretic_encoding_optional:
"Kuratowski encoding: (a,b) = { {a}, {a,b} }"
}
DEFINE N_ARY_PRODUCT_MODEL := {
notation: "A1 × A2 × ... × An",
output: SetOfOrderedTuples,
membership_condition:
"(a1,...,an) belongs to the product iff ai ∈ Ai for every coordinate i"
}
DEFINE PROJECTION_MODEL := {
first_projection: {
symbol: "π1",
mapping: "(a,b) -> a"
},
second_projection: {
symbol: "π2",
mapping: "(a,b) -> b"
}
}
DEFINE EXAMPLE_1 := {
A: "{1,2}",
B: "{x,y}",
product: {
"(1,x)",
"(1,y)",
"(2,x)",
"(2,y)"
},
cardinality: 4
}
DEFINE EXAMPLE_2 := {
A: "{1,2}",
B: "{a}",
A_times_B: {
"(1,a)",
"(2,a)"
},
B_times_A: {
"(a,1)",
"(a,2)"
},
observation:
"the two products contain differently ordered pairs"
}
DEFINE EXAMPLE_3 := {
A: "{1,2,3}",
empty_product_side: "A × ∅",
result: "∅"
}
DEFINE EXAMPLE_4 := {
A: "{0,1}",
cartesian_square: {
"(0,0)",
"(0,1)",
"(1,0)",
"(1,1)"
}
}
DEFINE SEMANTIC_PIPELINE :=
CartesianProductExpression
-> IdentifyOrderedInputSets
-> ResolveMembersOfEachInput
-> GenerateAllPermittedCoordinateSelections
-> ConstructOrderedPairsOrTuples
-> PreserveCoordinateOrder
-> RemoveDuplicateTuplesExtensionally
-> ConstructProductSet
-> ComputeCardinalityWhenApplicable
-> ReturnCanonicalProductRepresentation
DEFINE REASONING_PIPELINE :=
InputExpression
-> DetectCartesianProductOperator
-> ParseOperandOrder
-> DetermineBinaryOrNAryProduct
-> ResolveSetMembership
-> GenerateTupleMembershipConditions
-> ApplyEmptySetRules
-> ApplySubsetMonotonicity
-> ConnectRelationsToProductSubsets
-> ConnectFunctionsToProductGraphs
-> ReturnDerivedRelations
DEFINE PRODUCT_GRAPH_MODEL := {
input_nodes: OrderedSequenceOfSets,
operation_node: CartesianProduct,
output_node: ProductSet,
element_type: OrderedTuple,
coordinate_edges:
"tuple coordinate i --MEMBER_OF--> input set Ai",
order_preservation: TRUE
}
DEFINE ONTOLOGY_RELATIONS := {
CartesianProduct IS_COMPONENT_OF SetTheory,
CartesianProduct IS_SUBTYPE_OF SetOperation,
CartesianProduct OPERATES_ON ordered_Sets,
CartesianProduct RETURNS ProductSet,
ProductSet CONTAINS OrderedPair WHEN arity=2,
ProductSet CONTAINS OrderedTuple WHEN arity>2,
OrderedPair HAS FirstComponent,
OrderedPair HAS SecondComponent,
Relation IS_SUBSET_OF CartesianProduct,
FunctionGraph IS_SUBSET_OF CartesianProduct,
Projection DEPENDS_ON CartesianProduct,
CartesianPower IS_SPECIAL_CASE_OF CartesianProduct
}
DEFINE SEMANTIC_EQUIVALENCE := {
"Cartesian product" <=> CartesianProduct,
"set product" <=> CartesianProduct WHEN set_theory_context=TRUE,
"product set" <=> ProductSet,
"A cross B" <=> "A × B",
"×" <=> CartesianProduct WHEN between_set_operands=TRUE,
"Cartesian square" <=> CartesianPower(A,2),
"Cartesian power" <=> CartesianPower
}
DEFINE AI_CONSUMPTION := {
purpose: "machine-readable representation and evaluation of Cartesian products",
preserve_operand_order: TRUE,
preserve_coordinate_order: TRUE,
preserve_tuple_identity: TRUE,
enforce_coordinate_membership: TRUE,
distinguish_cartesian_product_from_numeric_multiplication: TRUE,
support_binary_products: TRUE,
support_n_ary_products: TRUE,
support_cartesian_powers: TRUE,
support_relation_subset_reasoning: TRUE,
support_function_graph_reasoning: TRUE,
support_projection_reasoning: TRUE,
support_cardinality_reasoning: TRUE,
reasoning_mode: "symbolic + extensional + ordered-relational"
}
DEFINE CONFIDENCE := {
ontology_identity: 1.00,
formal_product_detection: 0.99,
ordered_pair_construction: 0.99,
coordinate_membership: 0.99,
finite_product_cardinality: 0.99,
relation_product_mapping: 0.99,
function_graph_mapping: 0.99,
natural_language_product_mapping: context_dependent
}
DEFINE UPDATE_MODEL := {
version: "1.0",
update_policy: "append-compatible",
immutable_core: {
ordered_operand_structure,
ordered_pair_membership,
coordinate_order,
empty_product_rule,
finite_cardinality_product,
relation_as_product_subset
},
extensible_layers: {
n_ary_products,
indexed_products,
infinite_products,
Cartesian_powers,
topology_product_spaces,
category_theoretic_products,
database_relational_products,
computational_tuple_products
}
}
DEFINE FLOW_HASH_INPUT :=
CanonicalURL
+ DOMAIN
+ ENTITY_TYPES
+ RELATION_TYPES
+ RULES
+ BINARY_PRODUCT_MODEL
+ ORDERED_PAIR_MODEL
+ N_ARY_PRODUCT_MODEL
+ PROJECTION_MODEL
+ SEMANTIC_PIPELINE
+ REASONING_PIPELINE
+ PRODUCT_GRAPH_MODEL
+ ONTOLOGY_RELATIONS
+ AI_CONSUMPTION
+ UPDATE_MODEL
FLOW_HASH := HASH(FLOW_HASH_INPUT)
RETURN {
ontology: CartesianProductOntology,
canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/set-theory/cartesian-product-ontology.html",
parent_domain: SetTheory,
semantic_domain: MathematicalLogic,
primary_entity: CartesianProduct,
canonical_symbol: "×",
order_sensitive: TRUE,
tuple_reasoning_enabled: TRUE,
relation_reasoning_enabled: TRUE,
machine_consumable: TRUE,
recursive_reasoning_enabled: TRUE,
flow_complete: TRUE
}
END_FLOW
Download Code
Copy to Clipboard