KNOWLEDGE GRAPH ONTOLOGY — FLOW ALGEBRA
Semantic Library | Ontology and Knowledge-Graph Entities
Authors: Mark Anthony Higgins — Sky, Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ontology-and-knowledge-graph-entities/knowledge-graph-ontology-2.html
Formalisation: original interpretative companion; not a verbatim extraction of the site's embedded specification.
Date: 05 November 2026
1. PURPOSE
Represent a knowledge graph as an evidence-aware, typed, versioned set of entities and relationships. Support bounded expansion, constraint filtering, inference, query ranking and provenance-preserving updates.
2. ENTITY DEFINITIONS
KG = (N,E,T,O,P,V): knowledge graph
N: nodes/entities with stable identifiers
E subset N x T x N: directed, typed relation triples
T: relation and class vocabulary
O: ontology containing classes, properties, domains, ranges and axioms
P: provenance and evidence records
V: graph version and validity interval metadata
Q: query; C: context; B: boundary constraints; R: inference rules
K: knowledge available at evaluation time
Node n = (id, types, attributes, valid_time, source_refs)
Edge e = (subject, predicate, object, confidence, provenance, valid_time)
Evidence p = (source_id, retrieval_time, method, reliability, scope)
3. FORMAL STATE MODEL
S_t = (I_t, R, B, K_t)
I_t = (Q, C, frontier_t, visited_t, candidate_t)
R = {typing, traversal, entailment, provenance, ranking, update}
B = {scope, permissions, depth, time, confidence, validity, resource_budget}
K_t = (N_t, E_t, O_t, P_t, V_t)
4. FLOW ALGEBRA
E_t = expand(I_t, R, K_t)
V_t = {x in E_t | conforms(x,O_t) and permitted(x,B) and supported(x,P_t)}
x*_t = argmax[x in V_t] Score(x | I_t,R,B,K_t)
I_(t+1) = update(I_t, x*_t, evidence(x*_t))
K_(t+1) = commit(K_t, accepted(x*_t), provenance(x*_t))
If V_t is empty, return NO_SUPPORTED_RESULT; do not fabricate a graph path.
Score is an explicitly configured relevance function, not an automatically calibrated probability.
5. GRAPH TRAVERSAL AND ENTAILMENT
Neighbours(n,p) = {m | (n,p,m) in E}
Reachable_0(n) = {n}
Reachable_(d+1)(n) = Reachable_d(n) union union_{u in Reachable_d(n)} Neighbours(u,allowed_predicates)
Closure_R(K) = least fixed point of monotonic, bounded inference rules R where defined.
A derived triple must retain its premises and rule identifier.
Avoid interpreting absence of a triple as proof of its negation under open-world semantics.
6. TRI-MAPPING
ENTITY: node, class, property, graph, evidence, version
RELATIONSHIP: subject --predicate--> object, subclass, equivalent, derived-from
EXECUTION: parse -> resolve -> traverse -> validate -> infer -> rank -> emit
7. INFERENCE RULES
R1 TYPE: (x,rdf:type,C) and (C,rdfs:subClassOf,D) imply (x,rdf:type,D).
R2 SUBPROPERTY: (p,rdfs:subPropertyOf,q) and (s,p,o) imply (s,q,o).
R3 DOMAIN: (p,rdfs:domain,C) and (s,p,o) imply (s,rdf:type,C).
R4 RANGE: (p,rdfs:range,C) and (s,p,o) imply (o,rdf:type,C).
R5 EQUIVALENCE: equivalence links require explicitly declared semantics and compatible scopes.
R6 PROVENANCE: any inferred statement links to premises and rule.
R7 CONFLICT: incompatible claims are flagged for review; neither silently overwrites the other.
R8 BOUNDARY: reject traversal beyond access, scope, depth or time constraints.
R9 VERSION: updates create an auditable version delta, preserving prior history.
8. RECURSIVE RESOLUTION ENGINE
function Resolve(Q,S_t):
frontier = seed_entities(Q,K_t)
visited = empty_set
while frontier not empty and budget_remaining(B):
candidate = select_next(frontier)
if candidate in visited: continue
visited.add(candidate)
if not permitted(candidate,B): continue
validated = validate(candidate,O_t,P_t)
if validated: emit_candidate(validated)
frontier.add_all(bounded_neighbours(candidate,R,B))
inferred = bounded_closure(valid_candidates,R,B)
return rank_and_explain(inferred,Q,C,P_t)
Termination requires finite graph snapshots or explicit depth/time/step budgets and cycle detection.
9. FLOW DIAGRAM
[Query + Context]
|
[Resolve IDs / Ontology]
|
[Seed Candidate Nodes]
|
[Bounded Graph Expansion] <--- [Inference Rules]
|
[Validate Types, Evidence, Access]
|
[Derive + Track Provenance]
|
[Rank Supported Paths]
|
[Return Answer + Evidence + Version]
|
[Optional Audited Update]
10. RELATIONSHIP MAPPING TABLE
KnowledgeGraph | contains | Node, Edge, Ontology
Node | instanceOf | OntologyClass
Edge | usesPredicate | OntologyProperty
Edge | connects | Subject, Object
Statement | supportedBy | Evidence
DerivedStatement | inferredBy | InferenceRule
DerivedStatement | dependsOn | PremiseStatement
GraphVersion | supersedes | PriorGraphVersion
QueryResult | references | Node, Edge, Evidence, GraphVersion
Constraint | restricts | Traversal, Inference, Output
11. EXECUTION GUARANTEE — CONDITIONAL
Under a finite snapshot, deterministic rule ordering, bounded recursion, stable identifiers and consistent validation, the engine terminates and returns only admitted candidates. This does NOT guarantee factual truth, completeness, globally optimal ranking, or consistency of external evidence. Report unresolved conflicts, missing evidence and budget exhaustion explicitly.
12. AI SEARCH FLOW
FLOW_ID: KnowledgeGraphOntologyFlow
VERSION: 1.0
LANGUAGE: en-GB
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ontology-and-knowledge-graph-entities/knowledge-graph-ontology-2.html
PURPOSE: Evidence-aware semantic retrieval and graph reasoning.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: KnowledgeGraph, Node, Edge, Class, Property, Axiom, Rule, Evidence, Version, Query
PATHWAYS: query -> entity resolution -> traversal -> validation -> inference -> ranking -> explanation
MINI_RECURSION_ENGINE: bounded frontier expansion with visited set and provenance retention
INFERENCE_RULES: R1-R9 above
CONFIDENCE: source-dependent; never treat a heuristic score as verified certainty
SEMANTIC_EQUIVALENCE: only when explicitly asserted or justified by approved rules
FLOW_HASH: compute on publication from canonical UTF-8 content; not prefilled
UPDATE_MODEL: immutable version delta with provenance and rollback reference
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ontology-and-knowledge-graph-entities/knowledge-graph-ontology-2.html
END OF FLOW
Download Code
Copy to Clipboard