FLOW ALGEBRA
Ontology: Relationship Ontology
Domain: Relationship Ontologies > Foundations of Relationships
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/foundations-of-relationships/relationship-ontology-2.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "RelationshipOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: RelationshipOntology
category: FoundationsOfRelationships
subject: Relationship
purpose:
- represent typed semantic connections between entities, concepts, events, states, processes, resources, and relationships
- preserve relationship identity, predicate, participants, roles, direction, arity, cardinality, domain, range, context, confidence, validity, and provenance
- support knowledge graphs, semantic search, ontology reasoning, inference, recursive traversal, cross-domain mapping, and Flow Algebra
- distinguish relationships from entities, attributes, similarity, correlation, causation, and equivalence
# ---------- CORE ----------
entity Relationship:
type: SemanticStructure
may_include:
- relationship_identifier
- predicate
- participants
- participant_roles
- direction
- inverse
- arity
- cardinality
- domain
- range
- context
- temporal_state
- confidence
- validity
- provenance
entity RelationshipIdentifier:
type: PersistentIdentifier
identifies: Relationship
entity RelationshipParticipant:
type: SemanticResource
entity RelationshipPredicate:
type: SemanticPredicate
relationships:
Relationship -> IDENTIFIED_BY -> RelationshipIdentifier
Relationship -> HAS_PREDICATE -> RelationshipPredicate
Relationship -> HAS_PARTICIPANT -> RelationshipParticipant
RelationshipParticipant -> MAY_HAVE_ROLE -> RelationshipRole
Relationship -> MAY_HAVE_CONTEXT -> RelationshipContext
Relationship -> MAY_HAVE_CONFIDENCE -> RelationshipConfidence
Relationship -> MAY_HAVE_PROVENANCE -> RelationshipProvenance
# ---------- IDENTITY ----------
rule identity:
relationship identity != predicate identity
rule participant_identity:
relationship identity != participant identity
rule label_identity:
relationship label != relationship identity
rule endpoint_identity:
same participants != same relationship
when predicate, direction, context, or validity differs
# ---------- STRUCTURE ----------
entity BinaryRelationship:
subtype_of: Relationship
arity: 2
structure RelationshipTriple:
subject: RelationshipParticipant
predicate: RelationshipPredicate
object: RelationshipParticipant
rule triple:
binary relationship MUST preserve subject, predicate, and object
entity NaryRelationship:
subtype_of: Relationship
arity: >= 2
rule nary:
n-ary relationship SHOULD preserve participant roles
rule flattening:
n-ary relationship MUST NOT be reduced
where reduction loses semantic meaning
# ---------- PREDICATE / DIRECTION ----------
entity RelationshipPredicate:
type: SemanticPredicate
may_include:
- predicate_identifier
- preferred_label
- definition
- domain
- range
- inverse
- symmetry
- transitivity
- reflexivity
- cardinality_constraints
relationship_direction:
- directed
- undirected
- bidirectional
- inverse_defined
- context_dependent
rule direction:
directed relationship MUST preserve source and target roles
rule reversal:
relationship MUST NOT be reversed
unless inverse semantics explicitly permit
# ---------- INVERSE / LOGICAL PROPERTIES ----------
entity InverseRelationship:
subtype_of: Relationship
rule inverse:
inverse relationship MAY be inferred
only when predicate semantics define valid inverse
rule inverse_identity:
relationship != inverse relationship
rule symmetry:
IF predicate is symmetric
THEN relationship(a,b) MAY imply relationship(b,a)
rule transitivity:
IF predicate is transitive
AND relationship(a,b)
AND relationship(b,c)
THEN MAY infer relationship(a,c)
rule reflexivity:
reflexive predicate MAY permit relationship(a,a)
rule logical_properties:
symmetry, transitivity, and reflexivity
MUST NOT be assumed without predicate semantics
# ---------- ROLES / ARITY / CARDINALITY ----------
entity RelationshipRole:
type: SemanticRole
may_include:
- role_identifier
- role_name
- participant
- constraints
rule role:
participant identity != participant role
entity RelationshipArity:
type: StructuralMetadata
entity RelationshipCardinality:
type: ConstraintMetadata
may_be:
- zero_or_one
- exactly_one
- zero_or_many
- one_or_many
- one_to_one
- one_to_many
- many_to_one
- many_to_many
rule cardinality:
cardinality SHOULD preserve ontology constraints
# ---------- DOMAIN / RANGE / CONTEXT ----------
entity RelationshipDomain:
type: TypeConstraint
entity RelationshipRange:
type: TypeConstraint
rule domain_range:
participants SHOULD satisfy declared predicate domain and range
entity RelationshipContext:
type: ContextMetadata
may_include:
- ontology
- domain
- scope
- temporal_context
- spatial_context
- application_context
- interpretation_constraints
rule context:
relationship interpretation SHOULD preserve applicable context
entity RelationshipTemporalState:
type: TemporalMetadata
may_include:
- valid_from
- valid_until
- assertion_time
- observation_time
rule historical:
historically valid relationship != currently valid relationship
# ---------- RELATIONSHIP FAMILIES ----------
relationship_families:
- taxonomic
- hierarchical
- mereological
- associative
- causal
- temporal
- spatial
- dependency
- provenance
- equivalence
- contrast
- mapping
- contextual
entity TaxonomicRelationship:
subtype_of: Relationship
may_be:
- is_a
- subclass_of
- instance_of
- type_of
rule instance:
instance_of != subclass_of
rule taxonomic_part:
is_a != part_of
entity HierarchicalRelationship:
subtype_of: Relationship
may_be:
- parent_of
- child_of
- broader_than
- narrower_than
- superclass_of
- subclass_of
rule hierarchy:
hierarchical direction MUST be preserved
entity MereologicalRelationship:
subtype_of: Relationship
may_be:
- part_of
- has_part
- component_of
- member_of
rule part_whole:
part_of != is_a
rule membership:
member_of != subclass_of
entity AssociativeRelationship:
subtype_of: Relationship
may_be:
- related_to
- associated_with
- similar_to
- connected_to
- interacts_with
rule association:
association != causation
rule similarity:
similarity != semantic identity
entity CausalRelationship:
subtype_of: Relationship
may_be:
- causes
- caused_by
- contributes_to
- enables
- prevents
- inhibits
rule causation:
correlation != causation
rule contribution:
contributes_to != sole_cause
# ---------- OTHER RELATIONSHIP FAMILIES ----------
entity TemporalRelationship:
subtype_of: Relationship
entity SpatialRelationship:
subtype_of: Relationship
entity DependencyRelationship:
subtype_of: Relationship
rule dependency:
dependency != semantic identity
entity ProvenanceRelationship:
subtype_of: Relationship
rule provenance_relation:
derived_from != identical_to_source
entity EquivalenceRelationship:
subtype_of: Relationship
may_be:
- equivalent_to
- same_as
- exact_match
- close_match
rule equivalence:
exact equivalence requires stronger semantics
than similarity or relatedness
rule close_match:
close_match != same_as
# ---------- ASSERTION / INFERENCE / MAPPING ----------
entity AssertedRelationship:
subtype_of: Relationship
entity InferredRelationship:
subtype_of: Relationship
may_include:
- premises
- inference_rule
- confidence
- provenance
rule assertion:
asserted relationship != inferred relationship
entity RelationshipMapping:
type: SemanticMapping
may_include:
- source_relationship
- target_relationship
- mapping_type
- scope
- evidence
- confidence
mapping_types:
- exact
- close
- broader
- narrower
- related
- contextual
rule mapping:
mapped relationship != identical relationship
unless exact mapping is supported
# ---------- CONFIDENCE / VALIDITY / PROVENANCE ----------
entity RelationshipConfidence:
type: EpistemicMetadata
range: [0.0, 1.0]
rule confidence_bounds:
REQUIRE 0.0 <= confidence <= 1.0
rule confidence:
confidence in relationship != guarantee of truth
entity RelationshipValidity:
type: ValidityMetadata
may_include:
- valid_from
- valid_until
- ontology_version
- evidence_validity
entity RelationshipProvenance:
type: ProvenanceMetadata
may_include:
- relationship_identifier
- source
- creator
- assertion_time
- evidence
- derivation
- transformation
- ontology_version
- validation_events
rule provenance:
relationship SHOULD preserve origin
and derivation where available
# ---------- RECURSIVE TRAVERSAL ----------
entity RecursiveRelationshipTraversal:
type: AIReasoningProcess
may_include:
- starting_entity
- traversed_relationships
- visited_entities
- depth
- stopping_condition
- cycle_policy
rule recursion:
recursive relationship traversal MUST preserve
visited state and stopping or cycle-control behaviour
# ---------- VALIDATION ----------
validation:
require:
- identifiable_relationship
- predicate
- participants
reject:
- relationship_label_presented_as relationship_identity
- directed_relationship_reversed_without inverse_semantics
- non_symmetric_relationship_presented_as symmetric
- non_transitive_relationship_used_transitively
- participant_identity_presented_as participant_role
- n_ary_relationship_flattened_with semantic_loss
- instance_of_presented_as subclass_of
- part_of_presented_as is_a
- association_presented_as causation
- correlation_presented_as causation
- similarity_presented_as identity
- relatedness_presented_as equivalence
- close_match_presented_as same_as
- inferred_relationship_presented_as asserted_relationship
- mapped_relationship_presented_as exact_identity_without evidence
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"relationship" ~= "typed semantic connection between two or more participants"
"relationship ontology" ~= "ontology defining semantic relationships and their constraints"
"relationship predicate" ~= "semantic type defining the meaning of a relationship"
"relationship participant" ~= "semantic resource occupying a role in a relationship"
"inverse relationship" ~= "relationship defined by inverse semantics of another predicate"
PRESERVE distinctions:
relationship_identity != relationship_label
relationship_identity != predicate_identity
relationship_identity != participant_identity
participant_identity != participant_role
relationship != inverse_relationship
instance_of != subclass_of
is_a != part_of
member_of != subclass_of
association != causation
correlation != causation
similarity != identity
relatedness != equivalence
close_match != same_as
asserted_relationship != inferred_relationship
mapping != identity
historical_validity != current_validity
# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
explicit_relationship_metadata:
score: 1.00
explicit_predicate_and_participants:
score: 1.00
validated_domain_and_range:
score: 0.99
explicit_inverse_semantics:
score: 0.99
evidence_supported_inferred_relationship:
score: <= 0.95
contextual_relationship_mapping:
score: <= 0.90
similarity_supported_relatedness:
score: <= 0.80
lexical_or_cooccurrence_only:
score: <= 0.55
incomplete_relationship_provenance:
score: <= 0.55
action: preserve uncertainty
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
on_relationship_creation:
- assign RelationshipIdentifier
- identify predicate and participants
- identify participant roles
- determine direction and arity
- validate domain, range, and cardinality
- preserve context
- initialise confidence and provenance
on_relationship_change:
- preserve previous relationship state
- identify changed predicate, participant, role, direction, context, or validity
- validate semantic impact
- update provenance
on_inference:
- inspect predicate symmetry, transitivity, reflexivity, and inverse semantics
- validate premises
- infer relationship only when permitted
- preserve inference confidence and provenance
on_mapping:
- identify source and target relationships
- classify mapping type
- preserve evidence, context, and confidence
- prevent unsupported identity merge
- update provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- relationship_entities
- predicates
- participant_rules
- role_rules
- direction_rules
- inverse_rules
- arity_rules
- cardinality_rules
- domain_range_rules
- context_rules
- temporal_rules
- mapping_rules
- validation
- semantic_equivalence
- confidence_model
- update_model
canonicalisation:
- preserve_relationship_identifier
- preserve_predicate_identity
- preserve_participant_identity_and_roles
- preserve_direction
- preserve_inverse_semantics
- preserve_arity
- preserve_cardinality
- preserve_domain_and_range
- preserve_context
- preserve_temporal_validity
- preserve_confidence
- preserve_provenance
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- foundational Relationship Ontology
- typed semantic connection model
- predicate, participant, role, direction, arity, cardinality, domain, range, context, confidence, validity, and provenance structure
- inference-aware and recursive-safe relationship reasoning model
operations:
- identify relationships and participants
- resolve predicates and participant roles
- preserve direction
- resolve valid inverse relationships
- inspect symmetry, transitivity, and reflexivity
- validate arity and cardinality
- validate domain and range
- classify relationship families
- preserve semantic and temporal context
- distinguish association, correlation, causation, similarity, and equivalence
- distinguish asserted and inferred relationships
- map relationships across ontologies
- recursively traverse relationships with cycle control
- trace confidence, validity, and provenance
constraints:
- do_not_equate_relationship_label_with identity
- do_not_equate_predicate_or_participant_identity_with relationship_identity
- do_not_reverse_directional_relationship_without inverse_semantics
- do_not_assume_symmetry_transitivity_or_reflexivity
- do_not_flatten_n_ary_relationship_with semantic_loss
- do_not_equate_instance_of_with subclass_of
- do_not_equate_part_of_with is_a
- do_not_equate_association_or_correlation_with causation
- do_not_equate_similarity_or_relatedness_with identity_or_equivalence
- do_not_equate_inferred_relationship_with asserted_relationship
- preserve_predicate_participants_roles_direction_context_confidence_and_provenance
# ---------- QUERY MODEL ----------
query:
input:
- relationship_identifier
- predicate_identifier
- participant_identifier
- relationship_type
- ontology
- context
- validity_time
resolve:
1. identify Relationship
2. resolve predicate and participants
3. resolve participant roles and direction
4. inspect inverse semantics
5. validate arity, cardinality, domain, and range
6. inspect symmetry, transitivity, and reflexivity
7. classify relationship family
8. inspect context and temporal validity
9. inspect confidence and provenance
10. return relationship interpretation
# ---------- INFERENCE ----------
inference:
IF predicate defines valid inverse
THEN MAY infer inverse relationship
IF predicate is symmetric
THEN MAY infer reversed participant relationship
IF predicate is transitive
AND valid relationship chain exists
THEN MAY infer transitive relationship
IF evidence indicates only similarity, association, or correlation
THEN do_not infer identity, equivalence, or causation
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: Relationship
relationship_identity: machine_interpretable
predicates: explicit
participants_and_roles: explicit
direction: preserved
inverse_semantics: explicit
arity: explicit
cardinality: constrained
domain_and_range: validated
context: preserved
temporal_validity: explicit
asserted_and_inferred: distinguishable
relationship_families: distinguishable
confidence: explicit
provenance: preserved
recursive_traversal: cycle_safe
uncertainty: explicit
AI_reasoning: enabled
end flow
Download Code
Copy to Clipboard