AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
FORMULA ONTOLOGY
Kireth Semantic Library | Mathematical Entities | Equation and Statement Entities
Version: 1.0 | Date: 2026-10-13 | Locale: en-GB
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/equation-and-statement-entities/formula-ontology.html
Source status: Ontology constructed from established mathematical principles; webpage content not independently verified.
01. PURPOSE
flow "FormulaOntology" v1.0
purpose: represent, type-check, interpret, transform, evaluate and verify mathematical formulas.
root_entity: MathematicalFormula
parent: EquationAndStatementEntities
distinguish: Formula != mere character string; meaning depends on syntax, interpretation and assumptions.
02. ENTITY MODEL
entity MathematicalFormula:
id: URI
notation: String
syntax_tree: -ExpressionTree | LogicalFormulaTree
formula_kind: Enum[algebraic, logical, geometric, statistical, physical, computational]
free_variables: Set[Symbol]
bound_variables: Set[Symbol]
constants: Set[Symbol]
operators: Set[Operator]
assumptions: Set[Predicate]
domain: MathematicalDomain
codomain: MathematicalDomain?
units: UnitExpression?
provenance: Provenance
confidence: ConfidenceRecord
03. CLASSIFICATION
definitional_formula: defines a quantity or relationship under specified conventions
identity_formula: holds for every admissible assignment in its stated domain
conditional_formula: holds when antecedent and assumptions are satisfied
equation_formula: asserts equality of two expressions
inequality_formula: asserts an order relationship on an ordered domain
logical_formula: denotes a proposition or predicate under interpretation
empirical_formula: model relationship whose validity depends on evidence and conditions
algorithmic_formula: specifies computable evaluation steps
04. FORMAL SEMANTICS
context Gamma = (symbol_table, types, assumptions, units, interpretation)
parse(text, grammar) -> AST | SyntaxError
typecheck(Gamma, AST) -> TypedAST | TypeError
evaluate(TypedAST, assignment, Gamma) -> Value | Undefined
satisfaction(Gamma, assignment, proposition) -> True | False | Undetermined
well_formed(F) does not imply true(F).
A formula with free variables requires an assignment or quantification to have a determinate truth value.
05. OPERATORS AND OPERANDS
operator_arity: 0 | 1 | 2 | n
operator_signature: Domain^arity -> Codomain
operator_precedence: defined_by_grammar
associativity: left | right | none
operand_roles: positional and typed
prevent: undefined operation, ambiguous parse, unbound symbol, invalid unit composition
06. VARIABLES AND BINDING
FV(x) = {x}; FV(c) = empty for constant c
FV(f(t1,...,tn)) = union(FV(ti))
FV(forall x.P) = FV(P) minus {x}
FV(exists x.P) = FV(P) minus {x}
alpha_equivalent(forall x.P(x), forall y.P(y)) when renaming avoids capture
substitution(F, x, t): capture_avoiding=true
07. EQUATIONS AND IDENTITIES
equation: lhs = rhs under an assignment or solution condition
identity: forall admissible x, lhs(x) = rhs(x)
equivalent_equations: equal solution sets under shared domain and assumptions
caution: multiplying by zero, squaring or cancelling can change solution sets
example: (x^2 - 1)/(x - 1) = x + 1 only where x != 1
08. TRANSFORMATIONS
simplify(F, Gamma) -> F' with semantic preservation on declared domain
expand(F) -> F' subject to algebraic assumptions
factor(F) -> F' subject to algebraic assumptions
substitute(F, mapping) -> F' with capture avoidance
rearrange(F, target) -> F' plus side_conditions
differentiate(F, variable) -> derivative when differentiability conditions hold
integrate(F, variable) -> antiderivative family when defined
normalise(F) -> canonical representation relative to a specified rewrite system
09. FORMULA COMPOSITION
compose(f, g)(x) = f(g(x)) where g(x) lies in domain(f)
combine(F, G, op): enforce compatible types and units
dependencies(F): directed graph of referenced symbols and subformulas
detect_cycles(dependencies): distinguish recursive definitions from invalid circular definitions
10. DIMENSIONAL SEMANTICS
units(a + b): require dimension(a) = dimension(b)
units(a * b): dimension(a) * dimension(b)
units(a / b): dimension(a) / dimension(b), b != 0
exp(x), log(x), sin(x): arguments dimensionless in standard mathematical models
dimensional_consistency is necessary for physical formulas but not sufficient for truth.
11. NUMERICAL SEMANTICS
exact_evaluation: preserve integers, rationals and symbolic constants where possible
approximate_evaluation: record precision, rounding_mode and numerical_error
uncertainty_propagation: specify distributional or interval assumptions
singularities: detect domain exclusions and discontinuities
stability: distinguish algebraic equivalence from numerical stability
12. INFERENCE RULES
R01: if Gamma |- F : Boolean and Gamma |= F, then F is satisfied in Gamma.
R02: if Gamma |- a=b and f is defined on both, infer f(a)=f(b).
R03: if Gamma |- F equivalent G, preserve truth only under equivalence side conditions.
R04: if x != 0, infer (x*y)/x = y for appropriate algebraic structures.
R05: if F has a free variable x, require binding or assignment before asserting a truth value.
R06: if dimensions conflict in an additive physical formula, flag validation failure.
R07: if a rewrite introduces or removes domain exclusions, retain those exclusions in provenance.
R08: if a formula is empirical, do not promote model fit to mathematical proof.
13. SEMANTIC RELATIONSHIPS
MathematicalFormula IS_A MathematicalEntity
MathematicalFormula HAS_PART Expression
MathematicalFormula USES Symbol
MathematicalFormula HAS_OPERATOR Operator
MathematicalFormula HAS_DOMAIN MathematicalDomain
MathematicalFormula DEPENDS_ON Assumption
MathematicalFormula MAY_DEFINE Quantity
MathematicalFormula MAY_ASSERT MathematicalStatement
MathematicalFormula MAY_BE_EQUIVALENT_TO MathematicalFormula
MathematicalFormula MAY_BE_DERIVED_FROM MathematicalFormula
MathematicalFormula HAS_PROVENANCE Provenance
14. KNOWLEDGE GRAPH TRIPLES
(Formula, rdf:type, MathematicalFormula)
(Formula, hasSyntaxTree, AST)
(Formula, hasFreeVariable, Symbol)
(Formula, hasAssumption, Predicate)
(Formula, hasDomain, Domain)
(Formula, derivedFrom, SourceFormula)
(Formula, hasValidationStatus, Status)
(Formula, hasConfidence, ConfidenceRecord)
(Formula, hasFlowHash, Digest)
15. SEMANTIC EQUIVALENCE
equivalent(F,G,Gamma) iff for all admissible assignments in Gamma, their denotations agree.
syntactic_equivalence: same normalised parse tree under a chosen grammar
alpha_equivalence: consistent renaming of bound variables
algebraic_equivalence: equal values with matched domains and assumptions
logical_equivalence: equal truth values across admissible interpretations
semantic_similarity: heuristic relationship; does not imply equivalence
equivalence_scope: record domains, branch choices, units and side conditions
16. VALIDATION
V01: source and identifier present
V02: -expression parses without ambiguity
V03: all symbols typed and resolved
V04: operator arity and types valid
V05: binding and scope valid
V06: domain restrictions explicit
V07: units dimensionally consistent when applicable
V08: transformation side conditions preserved
V09: proof status distinguished from empirical support
V10: provenance and version recorded
17. CONFIDENCE
confidence.semantic: 0.0..1.0
confidence.parsing: 0.0..1.0
confidence.proof: proven | checked_examples | unverified | refuted
confidence.empirical: evidence_dependent | not_applicable
rule: high model confidence is not a substitute for formal proof.
18. FLOW_HASH
canonical_payload: (ontology_version, AST, symbol_types, domain, assumptions, units, semantics_version)
FLOW_HASH: SHA256(UTF8(canonical_serialisation(canonical_payload)))
rule: exclude volatile timestamps from semantic digest; retain them in provenance.
19. UPDATE_MODEL
update_trigger: changed_formula | changed_assumption | changed_domain | changed_source | corrected_proof
on_update: parse -> typecheck -> validate -> recompute_dependencies -> recheck_equivalence -> hash -> publish
versioning: immutable_revision_history
invalidation: dependent formulas and derived assertions
20. AI_CONSUMPTION
input: formula_text | structured_AST | graph_entity
output: typed_AST, interpretation, assumptions, valid_transformations, verification_status, provenance
retrieval_keys: symbol, operator, domain, formula_kind, dependencies, canonical_hash
safeguards: no silent division by zero; no silent loss of domain; no fabricated proof
explainability: include transformation steps and assumptions
21. EXAMPLES
F1: A = pi*r^2; domain r >= 0; units(A)=length^2
F2: a^2-b^2 = (a-b)*(a+b); identity over any commutative ring
F3: forall x in Real, x^2 >= 0; true over ordered real field
F4: y = m*x + c; relation with free parameters m,c and variable x
F5: E = m*c^2; physical relationship under specified modelling assumptions
22. CROSS-ONTOLOGY LINKS
parent: Equation and Statement Entities
related: Mathematical Statement Ontology
related: Equation Ontology
related: Identity Ontology
related: Equality Ontology
related: Inequality Ontology
related: Mathematical Expression Ontology
related: Variable Ontology
related: Operator Ontology
related: Parameter Ontology
related: Constraint Ontology
23. INTEGRITY AND ATTRIBUTION
authors: Mark Higgins — Sky (Recursive AI)
research_site: https://kirethresearch.org
source_page: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/equation-and-statement-entities/formula-ontology.html
disclosure: AI-assisted ontology and Flow Algebra authored collaboratively.
status: standalone conceptual specification; not a deployed executable interpreter.
END FLOW ALGEBRA