FLOW ALGEBRA
ONTOLOGY: Knowledge Relationship Ontology
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/foundations-of-relationships/knowledge-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library
PURPOSE
Model typed, provenance-aware relationships between knowledge entities, claims, concepts, evidence and sources, supporting explainable semantic reasoning and safe updates.
ENTITY_TYPES
KnowledgeEntity(id, label, type, context)
Concept(id, definition, domain)
Claim(id, proposition, polarity, scope)
Evidence(id, observation, method)
Source(id, uri, author, publication_time)
Agent(id, role)
Context(id, domain, temporal_scope, jurisdiction)
Relationship(id, subject, predicate, object, context)
Provenance(id, source, extraction_method, recorded_at)
RELATIONSHIP_TYPES
IS_A(Concept, Concept)
PART_OF(KnowledgeEntity, KnowledgeEntity)
RELATED_TO(KnowledgeEntity, KnowledgeEntity)
DEFINES(Source, Concept)
ASSERTS(Source|Agent, Claim)
SUPPORTS(Evidence|Claim, Claim)
CONTRADICTS(Claim, Claim)
DERIVED_FROM(Claim|KnowledgeEntity, Source|Claim)
EQUIVALENT_TO(Concept, Concept)
DEPENDS_ON(Claim, Claim)
VALID_IN(Claim|Relationship, Context)
SUPERSEDES(Claim, Claim)
TYPED_RELATIONSHIP
relation := (subject:Entity, predicate:RelationType, object:Entity,
context:Context?, provenance:Provenance?, confidence:Decimal[0,1])
REQUIRE subject != null AND predicate != null AND object != null
REQUIRE domain(predicate) ACCEPTS type(subject)
REQUIRE range(predicate) ACCEPTS type(object)
INFERENCE_RULES
IF IS_A(A,B) AND IS_A(B,C) THEN IS_A(A,C)
PROVIDED no declared disjointness or contextual exception
IF EQUIVALENT_TO(A,B) THEN EQUIVALENT_TO(B,A)
PROVIDED equivalence is validated in the same scope
IF SUPPORTS(E1,C) AND SUPPORTS(E2,C) THEN aggregate_evidence(C,[E1,E2])
PROVIDED evidence dependence is assessed; do not assume independence
IF CONTRADICTS(C1,C2) THEN flag_conflict(C1,C2)
DO NOT silently discard either claim
IF DERIVED_FROM(C,S) THEN retain_lineage(C,S)
SEMANTIC_EQUIVALENCE
compare(a,b):
test canonical_identifiers, definitions, domain, scope, temporal_validity
return {status: equivalent|related|distinct|undetermined, confidence, rationale}
NEVER merge concepts on label similarity alone
CONFIDENCE
confidence := bounded_score(0.0,1.0)
inputs := source_reliability, evidence_quality, contextual_fit,
corroboration, freshness, extraction_uncertainty
RULE: confidence is not a calibrated probability unless explicitly validated
RULE: conflicting or dependent evidence must be recorded
VALIDATION
validate_entity_types()
validate_relation_domain_range()
validate_required_provenance()
validate_context_and_time()
detect_cycles_where_acyclic_required()
detect_disjointness_violations()
detect_conflicting_claims()
check_semantic_equivalence_before_merge()
retain_explanations_for_derived_relations()
FLOW_HASH
canonical_payload := normalise(ontology_version, entity_ids,
typed_relations, context, provenance,
validation_rules)
FLOW_HASH := SHA256(UTF8(canonical_payload))
NOTE: hash is a content-integrity identifier, not proof of factual truth
UPDATE_MODEL
ingest(change)
validate(change)
compare_with_existing_claims_and_relations()
preserve_previous_versions_and_provenance()
mark_superseded_records_without_erasing_history()
recompute_affected_inferences_and_confidence()
regenerate_FLOW_HASH()
publish_only_if_validation_passes()
AI_CONSUMPTION
export := {
ontology: "Knowledge Relationship Ontology",
version: "1.0",
entities: typed_entities,
relationships: typed_relations,
contexts: contexts,
provenance: provenance_records,
confidence: confidence_annotations,
conflicts: unresolved_conflicts,
inference_trace: explainable_derivations,
flow_hash: FLOW_HASH
}
RULE: distinguish asserted facts, inferred facts, and hypotheses
RULE: expose uncertainty and source lineage to consuming AI systems
END FLOW ALGEBRA
Download Code
Copy to Clipboard