FLOW ALGEBRA
Ontology: Semantic Relationship Ontology
Domain: Relationship Ontologies > Foundations of Relationships
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/foundations-of-relationships/semantic-relationship-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "SemanticRelationshipOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: RelationshipOntology
category: FoundationsOfRelationships
subject: SemanticRelationship
purpose:
- represent meaningful typed connections between semantic resources
- preserve relationship identity, source, predicate, target, direction, context, scope, confidence, validity, and provenance
- support ontology reasoning, knowledge graphs, semantic search, inference, mapping, recursive traversal, and Flow Algebra
- distinguish semantic relationships from lexical similarity, co-occurrence, statistical association, and unsupported inference
# ---------- CORE ----------
entity SemanticRelationship:
type: KnowledgeRelationship
may_include:
- relationship_identifier
- source
- predicate
- target
- direction
- inverse
- domain
- range
- cardinality
- context
- scope
- confidence
- validity
- provenance
entity SemanticRelationshipIdentifier:
type: PersistentIdentifier
identifies: SemanticRelationship
entity SemanticSource:
type: SemanticResource
entity SemanticTarget:
type: SemanticResource
entity SemanticPredicate:
type: RelationshipType
relationships:
SemanticRelationship -> IDENTIFIED_BY -> SemanticRelationshipIdentifier
SemanticRelationship -> HAS_SOURCE -> SemanticSource
SemanticRelationship -> HAS_PREDICATE -> SemanticPredicate
SemanticRelationship -> HAS_TARGET -> SemanticTarget
SemanticPredicate -> MAY_HAVE_INVERSE -> SemanticPredicate
SemanticRelationship -> MAY_HAVE_CONTEXT -> RelationshipContext
SemanticRelationship -> MAY_HAVE_CONFIDENCE -> RelationshipConfidence
SemanticRelationship -> MAY_HAVE_PROVENANCE -> RelationshipProvenance
# ---------- TRIPLE ----------
structure SemanticRelationshipTriple:
subject: SemanticSource
predicate: SemanticPredicate
object: SemanticTarget
rule triple:
semantic relationship MUST preserve subject, predicate, and object
rule triple_identity:
same source and target with different predicate
!= same semantic relationship
# ---------- IDENTITY ----------
rule identity:
semantic relationship identity != predicate identity
rule endpoint_identity:
semantic relationship identity != source or target identity
rule label_identity:
relationship label != relationship identity
# ---------- PREDICATE ----------
entity SemanticPredicate:
type: RelationshipType
may_include:
- predicate_identifier
- preferred_label
- definition
- domain
- range
- inverse
- symmetry
- transitivity
- reflexivity
- semantic_constraints
rule predicate:
predicate defines semantic meaning of relationship
rule predicate_label:
predicate label != complete predicate semantics
# ---------- DIRECTION / INVERSE ----------
relationship_direction:
- directed
- undirected
- bidirectional
- inverse_defined
- context_dependent
rule direction:
directional semantic relationship MUST preserve source and target
rule reversal:
source-target reversal MUST NOT be inferred
unless inverse semantics explicitly permit
entity InverseSemanticRelationship:
subtype_of: SemanticRelationship
rule inverse:
inverse relationship MAY be inferred
only when predicate semantics define valid inverse
rule inverse_identity:
semantic relationship != inverse semantic relationship
# ---------- LOGICAL PROPERTIES ----------
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:
IF predicate is reflexive
THEN relationship(a,a) MAY be valid
rule logical_properties:
symmetry, transitivity, and reflexivity
MUST NOT be assumed without predicate semantics
# ---------- DOMAIN / RANGE / CARDINALITY ----------
entity SemanticRelationshipDomain:
type: TypeConstraint
entity SemanticRelationshipRange:
type: TypeConstraint
rule domain_range:
source and target SHOULD satisfy declared predicate domain and range
entity SemanticRelationshipCardinality:
type: ConstraintMetadata
may_be:
- one_to_one
- one_to_many
- many_to_one
- many_to_many
- optional
- exactly_one
- at_least_one
- at_most_one
rule cardinality:
semantic relationship SHOULD preserve declared cardinality constraints
# ---------- CONTEXT / SCOPE ----------
entity RelationshipContext:
type: ContextMetadata
may_include:
- ontology
- domain
- temporal_context
- spatial_context
- application_context
- interpretation_constraints
rule context:
relationship interpretation SHOULD preserve applicable semantic context
rule context_change:
same triple MAY have different validity or interpretation
under different context
# ---------- SEMANTIC RELATIONSHIP TYPES ----------
semantic_relationship_types:
- taxonomic
- hierarchical
- mereological
- associative
- causal
- temporal
- spatial
- dependency
- provenance
- equivalence
- contrast
- mapping
- contextual
# ---------- TAXONOMIC / HIERARCHICAL ----------
entity TaxonomicSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- is_a
- instance_of
- subclass_of
- type_of
rule instance:
instance_of != subclass_of
rule is_a:
is_a != part_of
entity HierarchicalSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- broader_than
- narrower_than
- parent_of
- child_of
- superclass_of
- subclass_of
rule hierarchy:
hierarchy direction MUST be preserved
# ---------- PART-WHOLE ----------
entity MereologicalSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- part_of
- has_part
- component_of
- member_of
rule part_whole:
part_of != is_a
rule membership:
member_of != subclass_of
# ---------- ASSOCIATIVE / CAUSAL ----------
entity AssociativeSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- related_to
- associated_with
- similar_to
- connected_to
- interacts_with
rule association:
association != causation
rule similarity:
similarity != semantic identity
entity CausalSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- causes
- caused_by
- contributes_to
- enables
- prevents
- inhibits
rule causation:
correlation != causation
rule contribution:
contributes_to != sole_cause
# ---------- TEMPORAL / SPATIAL ----------
entity TemporalSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- before
- after
- during
- overlaps
- simultaneous_with
entity SpatialSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- inside
- contains
- adjacent_to
- overlaps
- intersects
- near
- north_of
- south_of
- east_of
- west_of
rule spatial:
spatial semantics SHOULD preserve reference frame
where required
# ---------- DEPENDENCY / PROVENANCE ----------
entity DependencySemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- depends_on
- required_by
- prerequisite_of
- uses
- provides
rule dependency:
dependency != semantic equivalence
entity ProvenanceSemanticRelationship:
subtype_of: SemanticRelationship
may_be:
- derived_from
- generated_by
- attributed_to
- sourced_from
- transformed_from
- version_of
rule provenance_relation:
derived_from != identical_to_source
# ---------- EQUIVALENCE / MAPPING ----------
entity SemanticEquivalenceRelationship:
subtype_of: SemanticRelationship
may_be:
- equivalent_to
- same_as
- exact_match
- close_match
rule equivalence:
semantic equivalence requires stronger evidence
than similarity or relatedness
rule close_match:
close_match != same_as
entity SemanticRelationshipMapping:
type: SemanticMapping
may_include:
- source_relationship
- target_relationship
- mapping_type
- evidence
- scope
- confidence
mapping_types:
- exact
- close
- broader
- narrower
- related
- contextual
rule mapping:
mapped semantic relationship != identical relationship
unless exact mapping is supported
# ---------- ASSERTED / INFERRED ----------
entity AssertedSemanticRelationship:
subtype_of: SemanticRelationship
entity InferredSemanticRelationship:
subtype_of: SemanticRelationship
may_include:
- premises
- inference_rule
- confidence
- provenance
rule assertion:
asserted semantic relationship != inferred semantic relationship
rule inference:
inferred relationship SHOULD preserve premises,
inference rule, confidence, and provenance
# ---------- CONFIDENCE ----------
entity RelationshipConfidence:
type: EpistemicMetadata
range: [0.0, 1.0]
may_include:
- score
- method
- evidence
- source
- assessment_time
rule confidence_bounds:
REQUIRE 0.0 <= confidence <= 1.0
rule confidence:
confidence in semantic relationship != guarantee of truth
# ---------- VALIDITY / PROVENANCE ----------
entity SemanticRelationshipValidity:
type: ValidityMetadata
may_include:
- valid_from
- valid_until
- ontology_version
- evidence_validity
- context_validity
entity RelationshipProvenance:
type: ProvenanceMetadata
may_include:
- relationship_identifier
- source
- creator
- assertion_time
- evidence
- derivation
- transformation
- ontology_version
- validation_events
rule provenance:
semantic relationship SHOULD preserve origin,
evidence, and derivation where available
# ---------- RECURSIVE TRAVERSAL ----------
entity RecursiveSemanticRelationshipTraversal:
type: AIReasoningProcess
may_include:
- starting_resource
- traversed_relationships
- visited_resources
- depth
- stopping_condition
- cycle_policy
rule recursion:
recursive semantic traversal MUST preserve visited state
and stopping or cycle-control behaviour
rule cycle:
semantic graph cycle != infinite recursion
when cycle policy is enforced
# ---------- VALIDATION ----------
validation:
require:
- identifiable_semantic_relationship
- source
- predicate
- target
reject:
- relationship_label_presented_as semantic_relationship_identity
- directional_relationship_reversed_without inverse_semantics
- non_symmetric_predicate_presented_as symmetric
- non_transitive_predicate_used_transitively
- domain_or_range_violation_ignored
- instance_of_presented_as subclass_of
- part_of_presented_as is_a
- association_presented_as causation
- correlation_presented_as causation
- similarity_presented_as semantic_identity
- relatedness_presented_as semantic_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:
"semantic relationship" ~= "meaningful typed connection between semantic resources"
"semantic predicate" ~= "relationship type defining the meaning of a semantic connection"
"semantic relationship triple" ~= "source-predicate-target representation of a semantic relationship"
"inverse semantic relationship" ~= "relationship defined by valid inverse predicate semantics"
"semantic relationship mapping" ~= "mapping between semantic relationships across representations or ontologies"
PRESERVE distinctions:
semantic_relationship_identity != relationship_label
semantic_relationship_identity != predicate_identity
source != target
relationship != inverse_relationship
instance_of != subclass_of
is_a != part_of
member_of != subclass_of
association != causation
correlation != causation
similarity != semantic_identity
relatedness != semantic_equivalence
close_match != same_as
asserted_relationship != inferred_relationship
mapping != identity
confidence != truth
# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
explicit_semantic_relationship:
score: 1.00
explicit_source_predicate_target:
score: 1.00
validated_domain_and_range:
score: 0.99
explicit_inverse_semantics:
score: 0.99
evidence_supported_inferred_relationship:
score: <= 0.95
contextual_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 SemanticRelationshipIdentifier
- identify source, predicate, and target
- validate domain and range
- resolve direction and inverse semantics
- preserve context and scope
- initialise confidence and provenance
on_relationship_change:
- preserve previous relationship state
- identify changed source, predicate, target, 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 confidence and provenance
on_mapping:
- identify source and target semantic relationships
- classify mapping type
- preserve evidence, scope, and confidence
- prevent unsupported identity merge
- update provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- semantic_relationship_entities
- predicates
- source_target_rules
- direction_rules
- inverse_rules
- logical_property_rules
- domain_range_rules
- cardinality_rules
- context_rules
- mapping_rules
- validation
- semantic_equivalence
- confidence_model
- update_model
canonicalisation:
- preserve_relationship_identifier
- preserve_source_predicate_target
- preserve_predicate_identity
- preserve_relationship_direction
- preserve_inverse_semantics
- preserve_domain_and_range
- preserve_cardinality
- preserve_context_and_scope
- preserve_confidence
- preserve_validity
- preserve_provenance
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- foundational semantic relationship ontology
- typed source-predicate-target knowledge representation model
- relationship direction, logical properties, context, confidence, validity, and provenance structure
- inference-aware and recursive-safe semantic relationship model
operations:
- identify semantic relationships
- resolve source, predicate, and target
- preserve relationship direction
- resolve valid inverse semantics
- validate domain, range, and cardinality
- inspect symmetry, transitivity, and reflexivity
- classify semantic relationship families
- preserve semantic context and scope
- distinguish association, correlation, causation, similarity, and equivalence
- distinguish asserted and inferred relationships
- map relationships across ontologies
- recursively traverse semantic relationships with cycle control
- trace confidence, validity, and provenance
constraints:
- do_not_equate_relationship_label_with semantic_relationship_identity
- do_not_reverse_directional_relationship_without inverse_semantics
- do_not_assume_symmetry_transitivity_or_reflexivity
- do_not_ignore_domain_or_range_constraints
- 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_source_predicate_target_direction_context_confidence_and_provenance
# ---------- QUERY MODEL ----------
query:
input:
- relationship_identifier
- source
- predicate
- target
- relationship_type
- ontology
- context
- validity_time
resolve:
1. identify SemanticRelationship
2. resolve source, predicate, and target
3. inspect direction and inverse semantics
4. validate domain, range, and cardinality
5. inspect symmetry, transitivity, and reflexivity
6. classify semantic relationship family
7. inspect context, scope, and mappings
8. inspect confidence and validity
9. trace provenance
10. return semantic relationship interpretation
# ---------- INFERENCE ----------
inference:
IF predicate defines valid inverse
THEN MAY infer inverse semantic relationship
IF predicate is symmetric
THEN MAY infer reversed semantic relationship
IF predicate is transitive
AND valid semantic relationship chain exists
THEN MAY infer transitive relationship
IF evidence indicates only similarity, association, correlation, or co-occurrence
THEN do_not infer identity, equivalence, or causation
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: SemanticRelationship
relationship_identity: machine_interpretable
source_predicate_target: explicit
direction: preserved
inverse_semantics: explicit
logical_properties: predicate_governed
domain_and_range: validated
cardinality: constrained
semantic_context: preserved
relationship_families: distinguishable
asserted_and_inferred: distinguishable
mappings: evidence_aware
confidence: explicit
validity: context_aware
provenance: preserved
recursive_traversal: cycle_safe
uncertainty: explicit
AI_reasoning: enabled
end flow
Download Code
Copy to Clipboard