Skip to main content

Graph 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
GRAPH ONTOLOGY
Kireth Semantic Library — Mathematical Entities / Graph and Network Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/graph-and-network-entities/graph-ontology-2.html
Status: Proposed formalisation; source page wording not independently verified.
Authors: Mark Higgins — Sky (Recursive AI)
Website: https://kirethresearch.org
Version: 1.0

1. ENTITY DECLARATION
entity Graph : MathematicalStructure
  fields:
    vertex_set: Set[Vertex]
    edge_set: Set[Edge]
    directed: Boolean
    allow_loops: Boolean
    allow_parallel_edges: Boolean
    edge_weight: Optional[Function[Edge, Real]]
  invariant: each edge endpoint belongs to vertex_set

entity Vertex : GraphElement
entity Edge : GraphElement
entity Walk : Sequence[Vertex, Edge]
entity Path : Walk
entity Cycle : ClosedPath
entity ConnectedComponent : MaximalConnectedSubgraph
entity Subgraph : Graph
entity Tree : UndirectedAcyclicConnectedGraph

2. TYPED RELATIONSHIPS
Graph HAS_VERTEX Vertex
Graph HAS_EDGE Edge
Edge HAS_SOURCE Vertex
Edge HAS_TARGET Vertex
Vertex ADJACENT_TO Vertex
Vertex INCIDENT_TO Edge
Path TRAVERSES Edge
Subgraph SUBGRAPH_OF Graph
ConnectedComponent COMPONENT_OF Graph
Tree SUBTYPE_OF Graph
Graph SEMANTIC_RELATED_TO Network

3. CORE MATHEMATICS
G = (V, E).
Undirected simple graph: E subset of {{u,v} : u,v in V and u != v}.
Directed simple graph: E subset of {(u,v) : u,v in V and u != v}.
Degree of undirected vertex v: deg(v) = number of incident edge ends; a loop contributes two.
Handshaking lemma (finite undirected graph): sum_{v in V} deg(v) = 2|E|.
Directed graph: sum indeg(v) = sum outdeg(v) = |E|.
Path: walk with no repeated vertices (except endpoint convention for cycles).
Connected (undirected): every pair of vertices admits a path.
Tree (finite undirected): connected and acyclic; for n >= 1, |E| = n - 1.

4. OPERATIONS
add_vertex(G,v) -> Graph
add_edge(G,e,u,v) -> Graph [requires u,v in V]
remove_vertex(G,v) -> Graph [also removes incident edges]
remove_edge(G,e) -> Graph
neighbors(G,v) -> Set[Vertex]
degree(G,v) -> NonnegativeInteger
reachable(G,u,v) -> Boolean
induced_subgraph(G,S) -> Graph [requires S subset V]
connected_components(G) -> Set[ConnectedComponent]
shortest_path(G,u,v) -> Optional[Path] [requires stated weight assumptions]

5. INFERENCE RULES
IF undirected(G) AND finite(G) THEN sum_degree(G) = 2 * edge_count(G).
IF tree(G) AND finite(G) AND vertex_count(G) >= 1 THEN edge_count(G) = vertex_count(G) - 1.
IF path_exists(G,u,v) AND undirected(G) THEN connected_pair(G,u,v).
IF graph_is_simple(G) THEN no_loops(G) AND no_parallel_edges(G).
IF directed(G) THEN distinguish in_degree FROM out_degree.
IF weighted(G) THEN preserve units and sign constraints for algorithms.

6. SEMANTIC DISTINCTIONS
Graph (mathematics) != chart/plot of a function.
Graph != network: network often adds application semantics or flow/capacity attributes.
Walk != trail != path: trail does not repeat edges; path does not repeat vertices.
Directed edge (u,v) != undirected edge {u,v}.
Connectivity for directed graphs requires explicit weak/strong qualifier.
Graph isomorphism != graph equality.

7. VALIDATION
validate vertex and edge identifiers are unique within declared representation.
validate all edge endpoints belong to V.
validate loop/parallel-edge policy.
validate directedness, weights, and units.
validate finite/infinite assumptions before using counting theorems.
validate connectedness semantics and algorithm preconditions.
validate provenance and version for graph updates.

8. CONFIDENCE AND PROVENANCE
CONFIDENCE: 0.99 for standard mathematical definitions under specified assumptions; not a confidence assessment of source-page fidelity.
SOURCE_STATUS: proposed formalisation; not a verbatim transcription.
PROVENANCE: user-supplied ontology URL; standard graph-theoretic definitions.

9. SEMANTIC_EQUIVALENCE
Equivalent representations may use adjacency lists, adjacency matrices or incidence structures when directedness, multiplicity, loops and weights are preserved.
Equivalence must be explicitly scoped: representation equivalence is not necessarily labelled-graph identity.

10. FLOW_HASH / UPDATE_MODEL
FLOW_HASH: compute SHA-256 over canonical UTF-8 content after excluding the FLOW_HASH field itself; no digest asserted here.
UPDATE_MODEL:
  trigger: change to axioms, entities, edge policies, algorithms, or source ontology
  actions: increment version; validate constraints; recompute hash; record provenance

11. AI_CONSUMPTION
parse typed entities and edges; preserve graph direction and multiplicity.
apply inference only where assumptions hold.
return proof trace for inferred properties.
separate mathematical facts from source-specific editorial claims.
flag ambiguous terms (graph, network, path, connectivity).

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