AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
Mathematical Reasoning Entity Ontology
Version: 1.0
Date: 2026-10-15
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/ai-semantic-library-mathematical-entities/mathematical-reasoning-entity-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Project: Kireth Research Semantic Library
PURPOSE
Represent mathematical reasoning as a typed, inspectable graph of premises, assumptions, deductions, proof obligations, conclusions, and validation evidence. Distinguish verified proof from plausible inference and heuristic suggestions.
ENTITY TYPES
MathematicalReasoningEntity := {id, kind, statement, context, domain, dependencies, provenance, confidence, validation_status}
ReasoningKind := {axiom, definition, assumption, premise, lemma, theorem, conjecture, inference_step, proof, counterexample, conclusion}
Statement := {expression, language, free_variables, bound_variables, type_signature, interpretation}
Context := {theory, axioms, definitions, assumptions, variable_domains, notation_scope}
InferenceStep := {id, premises[], conclusion, rule, side_conditions[], justification, validator}
Proof := {goal, ordered_steps[], discharged_obligations[], unresolved_obligations[], result}
ValidationStatus := {unexamined, well_typed, conditionally_valid, verified, refuted, indeterminate}
TYPED RELATIONSHIPS
HAS_PREMISE(step, statement)
USES_RULE(step, rule)
DERIVES(step, conclusion)
DEPENDS_ON(statement, statement)
ASSUMES(proof, assumption)
PROVES(proof, theorem)
REFUTES(counterexample, claim)
EQUIVALENT_UNDER(a, b, context)
HAS_PROVENANCE(entity, source)
HAS_CONFIDENCE(entity, confidence_record)
REQUIRES_OBLIGATION(step, obligation)
FLOW OPERATORS
NORMALISE(statement, context) -> canonical_candidate
TYPE_CHECK(statement, context) -> type_result
RESOLVE_SYMBOL(symbol, context) -> binding | ambiguity
GENERATE_OBLIGATIONS(step, context) -> obligation_set
APPLY_RULE(premises, rule, side_conditions) -> conclusion | failure
VERIFY_STEP(step, context) -> validation_result
VERIFY_PROOF(proof, context) -> validation_result
TRACE_DEPENDENCIES(conclusion) -> directed_acyclic_proof_graph | cycle_report
FIND_COUNTEREXAMPLE(claim, domain) -> witness | unknown
COMPARE_REASONING(proof_a, proof_b, context) -> equivalence_assessment
EXECUTION FLOW
INPUT: mathematical claim, domain, definitions, assumptions, candidate reasoning steps.
1. Parse the claim into a typed mathematical statement.
2. Resolve symbols against the declared context; reject unresolved ambiguity.
3. Construct entities for premises, assumptions, rules, and intended conclusion.
4. Check domain restrictions and side conditions for every inference rule.
5. Build the dependency graph and detect unsupported or circular justification.
6. Generate proof obligations and submit them to appropriate validators.
7. Record each result with explicit evidence and any outstanding obligations.
8. Assign verified status only when every required obligation is discharged by a sound checker within its declared theory.
9. Attach provenance, version, confidence, and content hashes.
10. Emit a reasoning graph and machine-readable consumption record.
FORMAL INVARIANTS
I1: Every derived conclusion references at least one rule application or a declared axiom/definition.
I2: All rule premises must be available within the active proof context.
I3: A proof cannot discharge its own obligation by circular dependency.
I4: Substitution preserves declared types and avoids variable capture.
I5: Equivalence is always relative to a declared interpretation or theory.
I6: An unverified inference cannot be labelled a verified theorem.
I7: A counterexample refutes a universal claim only when it satisfies the claim's domain and assumptions.
I8: Confidence does not substitute for logical validity.
REASONING RULE EXAMPLES
ModusPonens: (P, P -> Q) |- Q
UniversalInstantiation: (forall x in D, P(x)), a in D |- P(a)
EqualitySubstitution: a = b, P(a) |- P(b), subject to well-typed substitution
TransitivityEquality: a = b, b = c |- a = c
ProofByContradiction: assumptions Gamma and not P derive contradiction |- Gamma entails P, under classical logic
WORKED EXAMPLE
Context: x is a real number; x > 2.
Premise P1: x > 2.
Rule R1: addition preserves strict inequality over real numbers.
Step S1: from P1 derive x + 3 > 5.
Conclusion C1: x + 3 > 5.
Obligations: real-number domain established; same quantity added to both sides.
Status: valid conditional on the declared context and accepted arithmetic rules.
Graph: P1 --HAS_PREMISE--> S1 --USES_RULE--> R1; S1 --DERIVES--> C1.
SEMANTIC_EQUIVALENCE
Evaluate equivalence by meaning and proof context, not by surface syntax alone.
Examples: x + 0 = x and x = x are related under additive-identity axioms; x^2 = 1 and x = 1 are not equivalent over the reals.
Return: {relation: equivalent | implies | contradicted | unrelated | unknown, context, evidence, limitations}.
CONFIDENCE
CONFIDENCE(entity) := {score: 0..1 | null, basis, calibration_method, evidence_ids[], limitations}
Keep heuristic confidence distinct from machine-checked proof status. Unknown calibration must be represented explicitly rather than guessed.
PROVENANCE
PROVENANCE := {source_uri, authors, created_at, modified_at, theory_version, validator_name, validator_version, evidence_ids[], licence}
Preserve the lineage of transformed statements and reasoning steps.
FLOW_HASH
FLOW_HASH := SHA256(canonical_serialisation({ontology_version, context, statements, rule_ids, dependency_edges, validation_evidence}))
A hash identifies the canonical content snapshot; it is not evidence of truth.
UPDATE_MODEL
On change to a premise, assumption, definition, rule, or validator version:
- identify all dependent nodes;
- invalidate affected cached conclusions and proof statuses;
- rerun relevant type checks and proof obligations;
- regenerate provenance, confidence records, and Flow Hash;
- preserve prior versions for audit.
AI_CONSUMPTION
Output fields: ontology_id, entity_id, entity_type, claim, context, premises, reasoning_steps, conclusion, validation_status, proof_obligations, evidence, semantic_equivalence, provenance, confidence, flow_hash, version.
AI agents must distinguish formal deductions from heuristic proposals, expose assumptions, avoid inventing proof evidence, and report unresolved obligations.
LIMITATIONS
This specification is a proposed semantic Flow Algebra representation. The notation describes intended operators and validation contracts; it is not itself an implemented proof assistant or a guarantee of formal correctness. Integration requires a parser, typed graph store, rule registry, and sound proof-checking backend.
END FLOW ALGEBRA