Skip to main content

Mathematical Inference Entity Ontology

AI Semantic Library Mathematical Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 15 October 2026
Audio Overview
FLOW ALGEBRA
Mathematical Inference Entity Ontology
Version: 1.0
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/ai-semantic-library-mathematical-entities/mathematical-inference-entity-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
Date: 2026-10-15

PURPOSE
Represent mathematical inference as a typed, auditable graph of premises, rules, substitutions, proof obligations, conclusions and dependencies. Preserve the distinction between a valid derivation and an unverified assertion.

ONTOLOGY
entity MathematicalInference {
  id: URI
  context: MathematicalContext
  premises: Set[Proposition]
  rule: InferenceRule
  substitutions: Map[Variable,Term]
  conclusion: Proposition
  obligations: Set[ProofObligation]
  status: {proposed, verified, rejected, unknown}
  provenance: Provenance
  confidence: ConfidenceRecord
  flow_hash: Digest
  version: Version
}
entity Proposition { id: URI; expression: TypedExpression; assumptions: Set[Proposition]; scope: Scope }
entity InferenceRule { id: URI; schema: RuleSchema; side_conditions: Set[Predicate]; logic: LogicSystem }
entity ProofObligation { proposition: Proposition; discharge: Evidence?; status: {open, discharged, failed} }
entity MathematicalContext { domain: Theory; axioms: Set[Proposition]; definitions: Set[Definition]; symbol_table: SymbolTable; logic: LogicSystem }
entity Provenance { sources: Set[URI]; author: String?; timestamp: DateTime; derivation: Set[URI] }
entity ConfidenceRecord { level: Real[0,1]?; basis: {formal_proof, trusted_source, heuristic, unknown}; explanation: String }

RELATIONSHIPS
premise_of: Proposition -> MathematicalInference
applies_rule: MathematicalInference -> InferenceRule
derives: MathematicalInference -> Proposition
depends_on: MathematicalInference -> MathematicalInference
requires: MathematicalInference -> ProofObligation
uses_context: MathematicalInference -> MathematicalContext
supported_by: MathematicalInference -> Provenance
equivalent_under: Proposition x Proposition -> MathematicalContext
contradicts_under: Proposition x Proposition -> MathematicalContext

TYPING AND SCOPE
rule TYPE_CHECK(inference):
  require every expression well_typed under context.symbol_table
  require all free variables declared or bound
  require substitutions respect variable types and capture avoidance
  require rule.logic compatible with context.logic
  else reject with explicit diagnostic

rule CONTEXT_CHECK(inference):
  require each premise is available as axiom, assumption or previously verified conclusion
  require each cited result is valid in the active domain and scope
  require side_conditions evaluated or converted to open obligations
  prohibit silent strengthening of assumptions

INFERENCE SEMANTICS
judgement: Gamma |-_L P
Gamma = premises and available assumptions in logic L

rule MODUS_PONENS:
  from Gamma |- P and Gamma |- (P -> Q)
  infer Gamma |- Q

rule CONJUNCTION_INTRODUCTION:
  from Gamma |- P and Gamma |- Q
  infer Gamma |- (P AND Q)

rule CONJUNCTION_ELIMINATION:
  from Gamma |- (P AND Q)
  infer Gamma |- P
  infer Gamma |- Q

rule UNIVERSAL_INSTANTIATION:
  from Gamma |- forall x:T . P(x)
  infer Gamma |- P(t)
  precondition: t:T and substitution is capture_avoiding

rule EQUALITY_SUBSTITUTION:
  from Gamma |- (a = b) and Gamma |- P(a)
  infer Gamma |- P(b)
  precondition: a and b have compatible types; replacement is valid in context

rule IMPLICATION_INTRODUCTION:
  from Gamma union {P} |- Q
  infer Gamma |- (P -> Q)
  precondition: discharge exactly the indicated assumption P

rule TRANSITIVITY_OF_EQUALITY:
  from Gamma |- (a = b) and Gamma |- (b = c)
  infer Gamma |- (a = c)

rule EXISTENTIAL_INTRODUCTION:
  from Gamma |- P(t)
  infer Gamma |- exists x:T . P(x)
  precondition: t:T

NOTE: Rule schemata are examples. Soundness is relative to the specified logic, axioms and semantics. Classical-only rules must not be applied automatically in intuitionistic or other nonclassical logics.

DERIVATION FLOW
flow INFER(input: MathematicalInference) -> ValidationResult:
  1. resolve referenced symbols, rules and premises
  2. normalise notation without changing meaning
  3. type_check(input)
  4. context_check(input)
  5. match rule.schema to input.premises using typed unification
  6. compute capture_avoiding substitutions
  7. instantiate conclusion and compare with proposed conclusion
  8. evaluate side_conditions and proof_obligations
  9. if every required check succeeds: status = verified
  10. if a required check fails: status = rejected
  11. otherwise: status = unknown; retain open obligations
  12. record derivation edges, provenance, confidence and hash
  return result with diagnostics and proof trace

PROOF GRAPH INVARIANTS
invariant NO_UNSUPPORTED_VERIFICATION:
  verified(inference) implies premises verified_or_assumed_in_context
  and rule_sound_in_context
  and all required obligations discharged

invariant DEPENDENCY_INTEGRITY:
  every derivation dependency resolves to an existing versioned entity

invariant ACYCLIC_FINITE_PROOF:
  a finite proof DAG must have no circular justification
  recursive or coinductive proofs require an explicit soundness discipline

invariant ASSUMPTION_TRACKING:
  each conclusion records undischarged assumptions

invariant CONSISTENCY_DISCIPLINE:
  detected contradiction is flagged with context and logic
  contradiction alone does not authorise arbitrary conclusions outside logics where explosion is valid

SEMANTIC EQUIVALENCE
flow EQUIVALENCE(a,b,context):
  distinguish textual_identity, alpha_equivalence, definitional_equivalence,
  logical_equivalence, algebraic_equivalence_under_assumptions
  require evidence for any semantic equivalence claim
  preserve domains, quantifier scopes, side conditions and units
  never equate approximate numerical agreement with exact proof

CONFIDENCE
rule CONFIDENCE_ASSIGNMENT:
  formal verification establishes derivation validity relative to explicit assumptions
  confidence score is metadata, not a substitute for proof
  heuristic inference remains proposed or unknown until independently checked
  propagate uncertainty in source claims and unresolved obligations
  do not manufacture numeric confidence values without a calibration model

PROVENANCE
record original expression, normalised expression, source references,
rule identifiers, context version, substitutions, assumptions,
proof obligations, validation results, authorship and timestamp.

FLOW_HASH
flow_hash = SHA256(canonical_serialisation(
  ontology_version, inference_id, context_version,
  sorted_premise_ids_and_versions, rule_id_and_version,
  substitutions, conclusion, obligations, dependency_hashes
))
Use deterministic encoding and explicit canonicalisation rules.
A hash provides change detection and identity, not mathematical proof.

UPDATE_MODEL
on change to premise, rule, definition, assumption or context:
  increment version
  invalidate dependent verification statuses
  traverse dependency graph and revalidate affected inferences
  recompute hashes and retain historical provenance
  report added, removed and changed conclusions

AI_CONSUMPTION
input: structured mathematical statements and context
output: typed inference graph, proof trace, validation status,
        outstanding obligations, provenance and confidence metadata
requirements:
  distinguish facts, assumptions, conjectures and verified theorems
  cite each inference rule and its premises
  never present an unverified AI-generated derivation as a formal proof
  preserve exact symbolic expressions and their domains
  expose uncertainty, contradictions and missing evidence
  allow independent checking by a proof assistant or symbolic verifier

EXAMPLE
context: classical propositional logic
premise p1: P
premise p2: P -> Q
rule: MODUS_PONENS
conclusion: Q
proof: [p1, p2, MODUS_PONENS]
status: verified, provided p1 and p2 are accepted in this context

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