AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
Title: Recursive Relationship Ontology
Version: 1.0
Source: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/logical-relationships/recursive-relationship-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
Status: Companion formalisation; source-page content not independently verified.
ONTOLOGY:
id: recursive_relationship_ontology
domain: relationship_ontologies.logical_relationships
definition: A typed model of relationships defined directly or indirectly in terms of themselves, with explicit base cases, termination conditions and cycle handling.
ENTITIES:
Entity: {id: IRI, type: Class, attributes: Map}
RecursiveRelation: {id: IRI, source: Entity, target: Entity, predicate: IRI, scope: Context}
BaseCase: {predicate: IRI, condition: Proposition}
RecursiveRule: {head: Atom, body: List[Atom], guard: Proposition}
Derivation: {conclusion: Atom, premises: List[Atom], depth: Integer, provenance: Source}
Context: {id: IRI, domain: String, valid_time: Interval?}
RELATIONSHIPS:
DIRECT_RECURSION(rule, predicate) := predicate occurs in body(rule) and head(rule) uses predicate
INDIRECT_RECURSION(p, q) := p depends transitively on q and q depends transitively on p
BASE_CASE_FOR(base, rule) := base establishes a non-recursive derivation path for rule
RECURSIVE_DEPENDENCY(p, q) := q appears in a rule body defining p
REACHABLE(x, y) := EDGE(x, y) OR EXISTS z (EDGE(x, z) AND REACHABLE(z, y))
INFERENCE:
rule reachability_base: EDGE(x, y) -> REACHABLE(x, y)
rule reachability_step: EDGE(x, z) AND REACHABLE(z, y) -> REACHABLE(x, y)
rule ancestry_base: PARENT(x, y) -> ANCESTOR(x, y)
rule ancestry_step: PARENT(x, z) AND ANCESTOR(z, y) -> ANCESTOR(x, y)
semantics: least_fixed_point for monotonic, positive recursive rules
evaluation: semi_naive_iteration until no new facts or configured resource limit
CONSTRAINTS:
- Every recursive predicate must have a documented intended interpretation and base case or an explicitly justified coinductive semantics.
- Detect cycles; do not infer that a cycle is invalid unless the relationship requires acyclicity.
- Record depth and resource limits; an incomplete evaluation must not be represented as a complete result.
- For negation or non-monotonic recursion, require a declared semantics (e.g. stratified negation or well-founded semantics).
- Do not infer causal relationships solely from recursive reachability.
SEMANTIC_EQUIVALENCE:
exact: Only when predicates have matching extension under the same interpretation and context.
approximate: Similar recursive definitions do not establish logical equivalence.
contextual: Preserve direction, domain, temporal scope and base-case assumptions.
CONFIDENCE:
asserted_fact: Preserve source-specific confidence and evidence.
derived_fact: Propagate evidence provenance and uncertainty using a declared aggregation policy.
note: Logical entailment and empirical confidence are separate dimensions.
PROVENANCE:
record: source_id, rule_id, input_fact_ids, timestamp, context, derivation_depth
reproducibility: Record rule-set version and evaluation semantics.
VALIDATION:
- Check predicate arity and entity types.
- Check rule safety and variable binding.
- Check recursion semantics and fixed-point convergence or truncation status.
- Verify derivation traces against declared base facts and rules.
- Flag unsupported equivalence, ambiguous contexts and contradictory evidence.
FLOW_HASH:
algorithm: SHA-256
input: canonical_serialisation(ontology_id, version, entity_schema, relationships, rules, constraints)
output: lowercase_hex_digest
note: Compute at deployment; no digest is asserted in this document.
UPDATE_MODEL:
trigger: new_fact | changed_rule | revoked_evidence | changed_context
actions: [validate, identify_affected_dependencies, recompute_fixed_point, update_provenance, recalculate_flow_hash, publish_version]
preserve: previous_versions_and_derivation_audit
AI_CONSUMPTION:
format: UTF-8 plain text
operations: [parse_typed_relations, evaluate_recursive_rules, query_reachability, explain_derivations, detect_cycles, verify_constraints]
safety: distinguish_asserted_from_inferred; expose_incomplete_results; retain_provenance
END FLOW ALGEBRA