AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
CYCLE ONTOLOGY
Kireth Semantic Library | Graph and Network Entities
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/graph-and-network-entities/cycle-ontology-2.html
Status: Proposed mathematical formalisation; source wording not independently verified.
Version: 1.0 | Date: 2026-10-14
1. ONTOLOGY IDENTITY
ontology_id: graph.cycle
entity_type: Cycle
parent_domain: GraphAndNetworkEntities
related: Graph, Vertex, Edge, Walk, Trail, Path, DirectedGraph, Tree, Forest, Connectivity
2. TYPED ENTITIES
Graph G=(V,E): finite or infinite graph.
Vertex v in V: graph node.
Edge e in E: incidence relation between endpoints.
Walk W=(v0,e1,v1,...,ek,vk): consecutive incident edges.
Cycle C: closed path with no repeated vertices except the first/last (under the stated graph convention).
SimpleCycle: cycle without repeated internal vertices or edges.
DirectedCycle: directed closed path following edge orientations.
CycleLength: number of edges in C.
CycleGraph C_n: connected 2-regular simple graph on n>=3 vertices.
AcyclicGraph: graph with no cycles.
3. CORE FORMALISATION
simple_undirected_cycle(G,C):
C=(v0,v1,...,v_{k-1},v0)
require k>=3 for simple graphs
require all v0,...,v_{k-1} distinct
require {v_i,v_{i+1}} in E for i=0,...,k-1 (indices mod k)
result true
directed_cycle(G,C):
C=(v0,v1,...,v_{k-1},v0)
require distinct internal vertices
require (v_i,v_{i+1}) in E for all i modulo k
note loops (k=1) and directed 2-cycles may be admitted according to graph model
4. AXIOMS AND INVARIANTS
A1: Every cycle is a closed walk; not every closed walk is a cycle.
A2: Every simple cycle in a simple undirected graph has length >=3.
A3: Every vertex of the cycle subgraph has degree 2 within that subgraph.
A4: An undirected graph is a forest iff it has no cycles.
A5: A connected undirected graph is a tree iff it has no cycles.
A6: Adding an edge between vertices already connected by a path in a forest creates exactly one cycle.
A7: A finite undirected graph with n vertices, m edges, and c connected components has cycle-space dimension m-n+c (including isolated vertices).
A8: A directed acyclic graph contains no directed cycles; its underlying undirected graph may still contain cycles.
5. RELATIONSHIPS
Cycle --SUBTYPE_OF--> ClosedWalk
Cycle --CONTAINS--> Vertex
Cycle --CONTAINS--> Edge
Cycle --HAS_LENGTH--> NonNegativeInteger
Cycle --BELONGS_TO--> Graph
DirectedCycle --RESPECTS_ORIENTATION_OF--> DirectedEdge
Tree --EXCLUDES--> Cycle
CycleSpace --GENERATED_BY--> CycleEdgeSets
6. INFERENCE FLOWS
flow DetectUndirectedCycle(G):
require G is finite and undirected
run depth_first_search with parent-edge tracking
if encounter visited vertex via non-parent edge: infer HAS_CYCLE(G)
else infer ACYCLIC(G)
flow DetectDirectedCycle(G):
require G is finite and directed
run DFS with active recursion stack or compute strongly connected components
if back-edge to active vertex: infer HAS_DIRECTED_CYCLE(G)
else infer DIRECTED_ACYCLIC(G)
flow ForestEdgeAddition(F,u,v):
require F is a forest and u,v are distinct vertices
if connected(F,u,v): infer ADD_EDGE_CREATES_UNIQUE_CYCLE
else infer ADD_EDGE_PRESERVES_ACYCLICITY
flow CycleRank(G):
require finite undirected graph
return |E|-|V|+connected_components(G)
7. SEMANTIC DISTINCTIONS
Cycle != arbitrary closed walk (repeated internal vertices may disqualify a cycle).
Cycle != trail (a trail need not be closed).
Cycle != path (a path conventionally has distinct vertices; a cycle closes back at its start).
Directed cycle != undirected cycle.
Cycle length != total edge weight; weighted cycle cost is the sum of its edge weights.
Cycle in graph theory != periodic orbit in dynamical systems, although mappings may exist.
8. VALIDATION
V1: Verify edge adjacency for every consecutive vertex pair.
V2: Verify closure: first vertex equals final vertex.
V3: Verify vertex uniqueness except endpoints for a simple cycle.
V4: Verify graph direction and loop/parallel-edge policy.
V5: Verify cycle length and any weights separately.
V6: Avoid inferring directed cycles from undirected cycles.
V7: Require finite-graph assumptions for counting identities and algorithms.
9. CONFIDENCE AND PROVENANCE
CONFIDENCE:
mathematical_definitions: high
ontology_mapping_to_source_page: unverified
inference_status: rule-based, conditional on declared graph conventions
PROVENANCE:
source_url: as stated above
source_text_verification: not performed
formalisation: authored for semantic integration
10. SEMANTIC_EQUIVALENCE
cycle ~ simple_closed_path [only under matching graph conventions]
acyclic_undirected_graph ~ forest
connected_acyclic_undirected_graph ~ tree
NOT_EQUIVALENT: cycle, closed_walk, directed_cycle, periodic_orbit
11. FLOW_HASH
FLOW_HASH:
algorithm: SHA-256
input: canonical UTF-8 representation of ontology_id, version, typed definitions, axioms, relationships and rules
status: compute at ingestion after canonicalisation
value: null
12. UPDATE_MODEL
UPDATE_MODEL:
revision_policy: semantic_versioning
triggers: corrected definitions, graph conventions, validation rules, ontology links
retain_previous_versions: true
recalculate_flow_hash: on_change
13. AI_CONSUMPTION
AI_CONSUMPTION:
parse_mode: typed_graph_semantics
supported_tasks: cycle_detection, graph_classification, reachability_context, acyclicity_validation, cycle_rank
prerequisites: graph_direction, simple_or_multigraph, finite_or_infinite, loop_policy
guardrails: preserve graph conventions; distinguish undirected and directed cycles; do not infer causal cycles from graph cycles
output: validated entities, relationships, proofs_or_counterexamples, confidence and provenance
END FLOW ALGEBRA