FLOW ALGEBRA
MATHEMATICAL MODEL ONTOLOGY
Kireth Semantic Library | Entity Graph | Mathematical Entities | Computational Mathematical Entities
Version: 1.0 | Date: 2026-10-14 | Locale: en-GB
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/computational-mathematical-entities/mathematical-model-ontology-2.html
Status: Proposed formalisation; source page wording not independently verified.
1. PURPOSE
Represent mathematical models as typed, inspectable abstractions of systems, with explicit assumptions, variables, parameters, equations, constraints, predictions, uncertainty, validation and provenance.
2. ENTITY TYPES
MathematicalModel, TargetSystem, Domain, Variable, StateVariable, InputVariable, OutputVariable, Parameter, Assumption, Equation, Constraint, BoundaryCondition, InitialCondition, ObjectiveFunction, Solver, Simulation, Prediction, Observation, Dataset, Residual, ErrorMetric, ValidationResult, ModelVersion, ProvenanceRecord.
3. CORE SIGNATURE
Model M := (D, X, U, Y, Theta, A, E, C, F, I, O)
D: domain; X: state variables; U: inputs; Y: outputs; Theta: parameters;
A: assumptions; E: equations; C: constraints; F: model mapping or dynamics;
I: initial/boundary conditions where applicable; O: observables.
Static: y = F(x, u; theta) subject to C(x,u,theta).
Dynamic: dx/dt = F(x,u,t;theta), y = H(x,u,t;theta).
These are modelling templates, not requirements that every model be differentiable or dynamic.
4. TYPED RELATIONSHIPS
MathematicalModel --ABSTRACTS--> TargetSystem
MathematicalModel --HAS_DOMAIN--> Domain
MathematicalModel --HAS_VARIABLE--> Variable
MathematicalModel --HAS_PARAMETER--> Parameter
MathematicalModel --ASSUMES--> Assumption
MathematicalModel --DEFINED_BY--> Equation
MathematicalModel --CONSTRAINED_BY--> Constraint
MathematicalModel --SOLVED_BY--> Solver
MathematicalModel --GENERATES--> Prediction
Prediction --COMPARED_WITH--> Observation
ValidationResult --EVALUATES--> MathematicalModel
ModelVersion --DERIVED_FROM--> ModelVersion
5. WELL-FORMEDNESS INVARIANTS
INV-01: Every symbol has a declared type, domain and, where relevant, unit.
INV-02: Every equation is dimensionally consistent when physical units apply.
INV-03: Parameter and variable domains are explicitly stated.
INV-04: Constraints and assumptions are separately represented.
INV-05: A solver result does not imply empirical validation.
INV-06: Predictions identify model version, inputs and parameter values.
INV-07: An inconsistent constraint set must not be labelled feasible.
INV-08: Model validity is conditional on stated scope and assumptions.
6. EXECUTABLE FLOW ALGEBRA
flow "MathematicalModelValidation" v1.0
input: model:MathematicalModel, data:Dataset?, tolerance:Real>=0
require: declared(model.variables, model.parameters)
step 1: parse_equations(model.equations)
step 2: type_check(model.symbols)
step 3: check_domains(model.variables, model.parameters)
step 4: check_units_if_applicable(model.equations)
step 5: check_constraint_consistency(model.constraints)
step 6: check_initial_boundary_conditions_if_applicable(model)
step 7: solve_or_simulate_with_recorded_method(model)
step 8: verify_residuals_and_feasibility(model, tolerance)
step 9: if data exists, evaluate_fit_and_out_of_sample_performance(model, data)
step 10: emit validation_result, diagnostics, provenance
output: ValidationResult
end
7. INFERENCE RULES
R-01: ValidTyping(M) AND SatisfiedConstraints(M,z) -> FeasibleCandidate(M,z).
R-02: FeasibleCandidate(M,z) AND VerifiedEquations(M,z) -> MathematicalSolution(M,z).
R-03: MathematicalSolution(M,z) DOES NOT IMPLY EmpiricallyAccurate(M).
R-04: EmpiricalFit(M,D) DOES NOT IMPLY CausalIdentification(M).
R-05: ChangedAssumptions(M) -> RequiresRevalidation(M).
R-06: SamePredictions(M1,M2,D) DOES NOT IMPLY StructuralEquivalence(M1,M2).
R-07: FailedValidation(M,D) -> RecordFailureAndScope(M,D).
8. MODEL CLASSES
Deterministic | Stochastic | Static | Dynamic | Discrete | Continuous |
Linear | Nonlinear | Mechanistic | Empirical | Statistical | Optimisation |
Simulation | Analytical | Numerical | Hybrid.
Classes may overlap and are not mutually exclusive.
9. SEMANTIC EQUIVALENCE AND DISTINCTIONS
MathematicalModel != TargetSystem.
ModelParameter != ObservedVariable.
ModelPrediction != Measurement.
ModelCalibration != ModelValidation.
NumericalApproximation != ExactSolution.
SemanticEquivalence(M1,M2) requires specified notion: structural, behavioural, observational or predictive, together with domain and tolerance.
10. CONFIDENCE AND UNCERTAINTY
CONFIDENCE: {status: assessed|unassessed, basis: evidence|expert_review|formal_proof, score: optional[0,1]}
Uncertainty categories: parameter, measurement, structural, numerical, stochastic.
Do not treat a confidence score as a mathematical probability without calibration.
11. UPDATE MODEL
UPDATE_MODEL: immutable_versioning=true
On changed data, assumptions, parameters, solver or equations:
create new ModelVersion; preserve previous provenance;
invalidate dependent predictions where necessary; rerun checks.
12. FLOW HASH
FLOW_HASH: SHA-256(canonical_utf8(ontology_id, version, typed_entities,
relationships, invariants, rules, validation_spec))
Hash is computed by an implementation; no hash value is asserted here.
13. AI CONSUMPTION
AI_CONSUMPTION:
mode: typed_semantic_retrieval_and_reasoning
require: source_url, ontology_id, model_version, assumptions, provenance
output: structured_entities, grounded_relations, checks, uncertainty
safeguards: distinguish verified results from hypotheses and predictions;
avoid inventing data, empirical validation or proofs.
14. EXAMPLE
Model: linear prediction y = a*x + b.
Inputs: x:Real; parameters a,b:Real; output y:Real.
Validation: verify arithmetic and types; evaluate residuals against observations
only when observations are supplied. Good fit alone does not establish causation.
15. VALIDATION CHECKLIST
[ ] Typed symbols and domains
[ ] Assumptions and constraints explicit
[ ] Mathematical consistency checked
[ ] Solver settings and tolerances recorded
[ ] Empirical evidence distinguished from proof
[ ] Version and provenance recorded
[ ] Hash computed only on canonical implementation payload
END FLOW ALGEBRA
Download Code
Copy to Clipboard