FLOW ALGEBRA
NUMERICAL ERROR ONTOLOGY
Kireth Semantic Library | Mathematical Entities / Computational Mathematical Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/computational-mathematical-entities/numerical-error-ontology-2.html
Version: 1.0 | Date: 2026-10-14 | Language: en-GB
Authors: Mark Higgins — Sky (Recursive AI)
Status: Proposed mathematical formalisation; source-page wording not independently verified.
1. PURPOSE
Represent numerical error as a typed, measurable discrepancy between a reference mathematical quantity and a computed approximation. Distinguish error, uncertainty, residual, and conditioning; track causes and justified bounds.
2. TYPED ENTITIES
NumericalError: {id, reference, approximation, signed_error?, absolute_error?, relative_error?, error_source, bound?, units?, confidence, provenance}
ReferenceValue: ExactValue | CertifiedReference | HighPrecisionEstimate
Approximation: {value, numeric_type, precision, algorithm, iteration?, provenance}
ErrorSource: RoundOff | Truncation | Discretisation | Cancellation | InputPerturbation | Propagation | ModelError
ErrorBound: {lower?, upper?, norm, assumptions, certificate?}
ConditionNumber: {value, norm, problem, evaluation_point}
Residual: {operator, approximate_solution, residual_value, norm}
3. CORE DEFINITIONS
Let x be the reference and x_hat the approximation.
signed_error(x_hat,x) := x_hat - x
absolute_error(x_hat,x) := |x_hat - x|
relative_error(x_hat,x) := |x_hat - x| / |x|, provided x != 0
vector_absolute_error := ||x_hat - x|| under a declared norm
vector_relative_error := ||x_hat - x|| / ||x||, provided ||x|| != 0
forward_error := ||computed_solution - exact_solution||
backward_error := smallest admissible input perturbation making the computed result exact, under a declared perturbation metric
residual(F,x_hat) := F(x_hat), for root-finding F(x)=0
4. MATHEMATICAL INVARIANTS
absolute_error >= 0
relative_error >= 0 whenever defined
absolute_error = 0 iff x_hat = x
|x_hat - x| <= certified_bound implies error_within_bound
|x_hat - x| <= |x_hat - y| + |y - x| (triangle inequality)
For a nonzero scalar a: absolute_error(a*x_hat,a*x) = |a|*absolute_error(x_hat,x)
For a nonzero scalar a: relative_error(a*x_hat,a*x) = relative_error(x_hat,x), where defined
A small residual alone does NOT imply a small forward error without additional stability/conditioning assumptions.
5. ERROR CLASSIFICATION
round_off: finite-precision arithmetic representation or operation
truncation: replacing an infinite process or exact operation with a finite approximation
discretisation: replacing a continuous mathematical problem with a discrete one
cancellation: loss of significant digits in subtraction of nearly equal values
propagated_error: error transported through successive operations
input_error: error due to uncertain or perturbed input values
model_error: discrepancy between model and target phenomenon; keep separate from purely numerical error
6. TYPED RELATIONSHIPS
NumericalError --compares--> Approximation
NumericalError --references--> ReferenceValue
NumericalError --has_source--> ErrorSource
NumericalError --bounded_by--> ErrorBound
NumericalError --measured_in--> Unit
Approximation --produced_by--> Algorithm
Residual --evaluated_at--> Approximation
ConditionNumber --characterises--> ComputationalProblem
ErrorBound --depends_on--> Assumption
NumericalError --has_provenance--> ProvenanceRecord
7. EXECUTABLE INFERENCE FLOWS
flow COMPUTE_ABSOLUTE_ERROR(reference, approximation):
require comparable_types(reference, approximation)
return abs(approximation - reference)
flow COMPUTE_RELATIVE_ERROR(reference, approximation):
require reference != 0
return abs(approximation - reference) / abs(reference)
flow VERIFY_ERROR_BOUND(reference, approximation, bound):
require bound >= 0
return abs(approximation - reference) <= bound
flow CLASSIFY_NUMERICAL_ERROR(context):
if finite_precision_operation(context): emit RoundOff
if finite_series_or_iteration_cutoff(context): emit Truncation
if continuous_problem_discretised(context): emit Discretisation
if subtraction_near_equal(context): emit CancellationRisk
return classification_with_evidence
flow EVALUATE_RESIDUAL(operator, approximate_solution):
return norm(operator(approximate_solution))
flow CERTIFY_ACCURACY(error_bound, tolerance, assumptions_verified):
require tolerance >= 0
return assumptions_verified AND error_bound <= tolerance
8. SEMANTIC DISTINCTIONS
numerical_error != residual
numerical_error != statistical_variance
numerical_error != measurement_uncertainty
accuracy != precision
forward_error != backward_error
condition_number != algorithmic_stability
estimated_error != certified_error_bound
small_residual != guaranteed_small_solution_error
9. VALIDATION RULES
V01: Reject negative absolute errors and negative upper bounds.
V02: Relative error undefined at zero reference unless an explicitly named alternative normalisation is supplied.
V03: All comparisons require compatible units, dimensions and norms.
V04: Certified bounds require assumptions, derivation and verifiable provenance.
V05: Floating-point equality and zero tests require documented semantics.
V06: Do not claim guaranteed accuracy from empirical convergence alone.
V07: Identify whether reference is exact, certified or approximate.
V08: Keep computational, input, measurement and model errors separately typed.
V09: Distinguish absolute tolerance from relative tolerance.
V10: Do not infer error direction from absolute error alone.
10. SEMANTIC EQUIVALENCE
'absolute numerical error' ~ 'absolute approximation error' when reference and approximation are fixed
'rounding error' ~ 'round-off error' in finite-precision computation
'error estimate' != 'rigorous error bound'
'approximation error' is context-dependent and may include non-numerical sources
11. CONFIDENCE AND PROVENANCE
CONFIDENCE: {level: verified | conditional | estimated | unknown, evidence, assumptions}
PROVENANCE: {source_url, source_version?, algorithm, numeric_precision, evaluation_date, reviewer?}
UPDATE_MODEL: recompute dependent errors and bounds when reference, approximation, algorithm, tolerance, precision or assumptions change.
12. FLOW HASH
FLOW_HASH_SPEC: SHA-256 of canonical UTF-8 serialisation of the flow record, with stable field ordering, normalised numeric representations and the hash field excluded.
FLOW_HASH_VALUE: not calculated; generate from final canonical deployed content.
13. AI CONSUMPTION
AI_CONSUMPTION:
entity: NumericalError
task_support: [error_estimation, numerical_validation, algorithm_comparison, uncertainty_separation, scientific_computation]
required_context: [reference_status, approximation, numeric_precision, error_metric, assumptions]
output_policy: report values, units, bound status, assumptions and provenance; do not present an estimate as a guarantee.
14. CROSS-ONTOLOGY LINKS
Approximation Ontology; Approximate Solution Ontology; Exact Solution Ontology; Convergence Criterion Ontology; Iteration Ontology; Mathematical Algorithm Ontology; Computational Complexity Ontology; Measurement Uncertainty Ontology.
END FLOW ALGEBRA
Download Code
Copy to Clipboard