Skip to main content

Path Ontology

Graph and Network Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 14 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Path Ontology
DOMAIN: Mathematical Entities / Graph and Network Entities
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/graph-and-network-entities/path-ontology-2.html
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
VERSION: 1.0
STATUS: Proposed formalisation aligned to the source page title and domain; detailed source algebra not visible in retrieved HTML.

1. ONTOLOGY IDENTITY
ontology PathOntology {
  class Graph; class Vertex; class Edge; class Walk; class Trail; class Path;
  class DirectedPath; class WeightedPath; class Cycle; class ConnectedComponent;
  relation hasVertex(Graph, Vertex);
  relation hasEdge(Graph, Edge);
  relation incident(Edge, Vertex);
  relation adjacent(Vertex, Vertex);
  relation startsAt(Path, Vertex);
  relation endsAt(Path, Vertex);
  relation traverses(Path, Edge);
  relation reaches(Vertex, Vertex);
}

2. TYPED MATHEMATICAL MODEL
Graph G = (V, E), where V is a vertex set and E an edge set.
Undirected edges are unordered endpoint pairs; directed edges are ordered endpoint pairs.
Walk W = (v_0, e_1, v_1, ..., e_k, v_k), with each e_i joining v_(i-1) and v_i.
Trail = walk with no repeated edge.
SimplePath = walk with no repeated vertex (except that a closed simple cycle may repeat its start at the end).
Path convention: this ontology uses Path to mean SimplePath unless explicitly qualified.
Length(Path) = k, the number of traversed edges.
WeightedCost(Path, w) = sum_(i=1..k) w(e_i), when w: E -> Real is defined.
A zero-length path (v_0) is permitted.

3. AXIOMS AND INVARIANTS
A1: Every vertex of a path belongs to its graph.
A2: Every edge of a path belongs to its graph.
A3: Each consecutive vertex pair is incident to its traversed edge.
A4: In a directed path, edge orientation matches traversal order.
A5: For a simple path, all vertices are distinct.
A6: Length(Path) = number_of_vertices(Path) - 1.
A7: A path from u to v establishes reachability from u to v.
A8: Undirected reachability is symmetric; directed reachability need not be.
A9: Concatenating compatible walks produces a walk; it is a simple path only if the resulting vertex sequence has no repetitions.
A10: A path cost is defined only when its edges have applicable weights.

4. RELATIONSHIP ALGEBRA
hasPath(G, P) -> startsAt(P, u) AND endsAt(P, v)
traverses(P, e) -> hasEdge(G, e) when hasPath(G, P)
pathBetween(G, u, v) -> reachableIn(G, u, v)
pathBetween(G, u, v) AND undirected(G) -> pathBetween(G, v, u)
subpathOf(Q, P) -> hasPath(G, Q) when hasPath(G, P)
connected(G) <-> for all u,v in V(G), pathBetween(G,u,v) [undirected graphs]
stronglyConnected(G) <-> for all u,v in V(G), directedPathBetween(G,u,v) [directed graphs]

5. EXECUTABLE INFERENCE FLOWS
flow ValidatePath(G, vertices, edges):
  REQUIRE len(vertices) = len(edges) + 1
  REQUIRE all vertices belong to V(G)
  REQUIRE all edges belong to E(G)
  FOR i in 1..len(edges):
    REQUIRE edge[i] connects vertex[i-1] to vertex[i]
    IF G is directed: REQUIRE source(edge[i]) = vertex[i-1]
                      AND target(edge[i]) = vertex[i]
  RETURN valid_walk = true,
         valid_simple_path = all vertices distinct,
         length = len(edges)

flow InferReachability(G, P):
  IF ValidatePath(G,P).valid_simple_path:
    ASSERT reachableIn(G, first(P), last(P))

flow ComputePathCost(P, w):
  REQUIRE each edge in P has a defined numeric weight
  RETURN sum(w(e) for e in edges(P))

flow ShortestPath(G, source, target, w):
  REQUIRE source,target in V(G)
  REQUIRE finite graph and applicable edge weights
  IF all weights >= 0: use Dijkstra or equivalent
  ELSE: use a negative-edge-capable method and detect reachable negative cycles
  IF a reachable negative cycle can lead to target: shortest finite cost is undefined
  ELSE IF target unreachable: return UNREACHABLE
  ELSE return minimum-cost path and cost

6. SEMANTIC DISTINCTIONS
Path != Walk: a walk may repeat vertices and edges.
Path != Trail: a trail forbids repeated edges but may repeat vertices.
Path != Cycle: a cycle is closed, while a simple path has distinct vertices.
Path length != path weight: length counts edges; weight aggregates edge attributes.
Reachability != adjacency: a reachable pair may be separated by several edges.
Directed path != undirected path: direction constrains traversal.

7. VALIDATION
CHECK entity types, endpoint membership, incidence and orientation.
CHECK simple-path uniqueness when Path is asserted.
CHECK non-negative integer edge count.
CHECK weights, units, missing values and algorithm preconditions.
CHECK no inferred symmetry in directed reachability.
CHECK source, target, and graph identity consistency.

8. CONFIDENCE AND PROVENANCE
CONFIDENCE: 1.0 for mathematically proven deductions under explicit assumptions;
            lower or UNKNOWN for incomplete source graphs or unverified attributes.
PROVENANCE: retain source graph identifier, edge identifiers, assumptions,
            algorithm, timestamp, and validation outcome.
SEMANTIC_EQUIVALENCE: assert only with matching graph model, path convention,
                      endpoints, direction and edge identity semantics.

9. FLOW HASH / UPDATE MODEL
FLOW_HASH: SHA-256 of canonical UTF-8 serialisation of ontology version,
           typed declarations, axioms and inference rules; compute at deployment.
UPDATE_MODEL: increment version when path semantics, graph types or rules change;
              revalidate affected inferences and invalidate outdated hashes.

10. AI CONSUMPTION
AI_CONSUMPTION:
  mode: typed-graph-reasoning
  parse: ontology -> types -> constraints -> rules -> validated conclusions
  never: infer edges absent from the graph or treat direction as symmetric
  output: {path, endpoints, length, cost?, reachable, evidence, confidence}
  error_policy: return explicit INVALID / UNKNOWN / UNREACHABLE, never fabricate

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ