Algorithmic Mathematics
Authors:
MArk Anthony Higgins - Sky Recursive Ai
MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: July 6th 2026
Revised Date: July 6th 2026
AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
ALGORITHMIC MATHEMATICS — MAIN PAGE ONTOLOGY
Version: 1.0
Canonical URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/algorithmic-mathematics.html
Authors: Mark Higgins — Sky (Recursive AI)
Publisher: Kireth Research | https://kirethresearch.org
Document type: Formal ontology and typed reasoning specification
1. PURPOSE
Define a unified, machine-interpretable framework for algorithms, algorithm design paradigms, correctness, complexity and resource-aware computation. This main-page ontology connects the eleven constituent algorithmic mathematics ontologies without conflating a design technique with a computational guarantee.
2. SIGNATURE AND TYPES
sort Problem
sort Instance(P:Problem)
sort Solution(P:Problem)
sort Algorithm
sort Procedure
sort State
sort Step
sort Input
sort Output
sort Specification
sort Invariant
sort Variant
sort Proof
sort Resource = {TIME, SPACE}
sort Bound
sort CostFunction
sort ComplexityClass
sort DesignParadigm = {RECURSION, DIVIDE_AND_CONQUER, GREEDY, DYNAMIC_PROGRAMMING, BACKTRACKING, BRANCH_AND_BOUND}
sort Outcome = {VALID, INVALID, UNKNOWN}
entity P: Problem
entity x: Instance(P)
entity A: Algorithm
entity y: Output
entity spec: Specification
entity n: natural_number
3. CORE RELATIONS
SOLVES(A,P) iff for every valid instance x of P, A terminates and returns a solution satisfying P's specification.
PARTIALLY_CORRECT(A,P) iff every terminating run of A on a valid input returns a valid solution.
TOTAL_CORRECT(A,P) iff PARTIALLY_CORRECT(A,P) and TERMINATES_ON_ALL_VALID_INPUTS(A,P).
IMPLEMENTS(A,spec) iff A's observable behaviour satisfies spec under declared preconditions.
USES_PARADIGM(A,d) iff A is constructed using design paradigm d.
HAS_TIME_COST(A,T) iff T bounds or characterises steps under an explicitly stated computational model.
HAS_SPACE_COST(A,S) iff S bounds or characterises auxiliary memory under an explicitly stated computational model.
SUBPROBLEM_OF(P1,P2) iff P1 is a component problem whose solution contributes to solving P2.
DEPENDS_ON(A1,A2) iff A1 requires a result or capability provided by A2.
EQUIVALENT_ON_DOMAIN(A,B,D) iff forall x in D: OUTPUT(A,x) = OUTPUT(B,x), where both terminate.
4. OPERATIONAL CONTRACT
input: problem P, valid instance x, candidate algorithm A, specification spec, computational model M
output: solution y, or a typed failure/unknown result
preconditions: x belongs to the domain of P; representation and arithmetic assumptions are declared
postcondition: if a correct terminating algorithm succeeds, y satisfies spec(P,x)
error states: INVALID_INPUT, UNSATISFIABLE, RESOURCE_LIMIT, NONTERMINATION, UNPROVEN_CORRECTNESS
5. ALGORITHM ONTOLOGY
ALGORITHM(A) requires finite description, unambiguous operational rules, defined inputs and outputs, and a declared execution model.
DETERMINISTIC(A) iff identical configurations yield identical next configurations.
CORRECT(A,P) must specify partial versus total correctness.
Algorithm existence does not imply efficient computability.
6. RECURSIVE ALGORITHM ONTOLOGY
RECURSIVE(A) iff a procedure of A invokes itself directly or indirectly.
BASE_CASE(A) establishes terminating configurations without further recursive calls.
RECURSIVE_STEP(A) reduces or transforms an instance into further instances.
TERMINATION_RULE: if a well-founded measure strictly decreases along every recursive call, recursion terminates.
Counterexample: a recursive definition without a decreasing measure may diverge.
7. DIVIDE AND CONQUER ONTOLOGY
DIVIDE(P,x) -> finite subinstances x1,...,xk.
CONQUER(xi) -> solutions yi.
COMBINE(y1,...,yk) -> candidate solution y.
Correctness requires subproblem validity and correctness of COMBINE.
Typical recurrence: T(n) = a*T(n/b) + f(n), under explicit size and regularity assumptions.
The Master Theorem applies only when its hypotheses hold.
8. GREEDY ALGORITHM ONTOLOGY
GREEDY_CHOICE(A,s) selects a locally preferred feasible action from state s.
FEASIBLE_PREFIX(s) must be preserved after each choice.
GLOBAL_OPTIMALITY is not implied by local optimality.
A greedy algorithm is proven optimal only if the problem has a suitable greedy-choice property and an accompanying proof, often by exchange or cut arguments.
9. DYNAMIC PROGRAMMING ONTOLOGY
STATE_DP(P) defines a finite or suitably bounded family of subproblems.
RECURRENCE_DP(s) expresses a state value in terms of dependencies.
MEMOISATION caches results of top-down recursion.
TABULATION computes values in a valid dependency order.
Correctness requires a valid recurrence and base cases.
Efficiency gains depend on overlapping subproblems and the number/cost of states.
10. BACKTRACKING ONTOLOGY
SEARCH_TREE(P) enumerates partial assignments or decisions.
EXTEND(s,c) creates a child state from choice c.
PRUNE_INVALID(s) discards branches proven unable to produce a valid solution.
COMPLETE(s) indicates a full candidate.
Sound pruning must not discard a valid answer when completeness is required.
Worst-case search can remain exponential.
11. BRANCH AND BOUND ONTOLOGY
INCUMBENT is the best feasible solution found so far.
BOUND(s) provides an admissible bound on the best possible solution in subtree s.
For minimisation: prune s if LOWER_BOUND(s) >= INCUMBENT_COST.
For maximisation: prune s if UPPER_BOUND(s) <= INCUMBENT_VALUE.
Optimality claims require valid bounds and exhaustive treatment of all unpruned branches.
12. ALGORITHM ANALYSIS ONTOLOGY
COST(A,x,M) measures operations or resources for algorithm A on instance x under model M.
WORST_CASE(A,n) = max cost over valid size-n instances, when the maximum exists.
BEST_CASE(A,n) = min cost over valid size-n instances, when the minimum exists.
AVERAGE_CASE(A,n,D) = expected cost under an explicitly stated distribution D.
AMORTISED_COST applies to sequences of operations, not automatically to each individual operation.
13. BIG O NOTATION ONTOLOGY
f(n) in O(g(n)) iff exists c>0, n0 such that forall n>=n0: 0<=f(n)<=c*g(n), for eventually nonnegative functions.
f(n) in Omega(g(n)) iff g(n) in O(f(n)), under matching positivity assumptions.
f(n) in Theta(g(n)) iff f(n) in O(g(n)) and f(n) in Omega(g(n)).
Big O denotes an asymptotic upper bound, not necessarily a tight bound or worst-case cost unless the analysed function is a worst-case function.
14. TIME COMPLEXITY ONTOLOGY
TIME(A,x,M) = number of model-defined computation steps on x.
T_A(n) = max {TIME(A,x,M): SIZE(x)=n}, when defined.
Model, input encoding, arithmetic costs and worst/average/amortised interpretation must be stated.
Polynomial time is defined relative to input length and the chosen standard computational model.
15. SPACE COMPLEXITY ONTOLOGY
SPACE(A,x,M) = peak model-defined memory usage during execution.
S_A(n) = max {SPACE(A,x,M): SIZE(x)=n}, when defined.
Distinguish auxiliary space from total space including input and output storage.
Recursive call stacks count toward auxiliary space when allocated by the execution model.
Time-space trade-offs must state the relevant resource accounting.
16. INFERENCE RULES
R1: TOTAL_CORRECT(A,P) => PARTIALLY_CORRECT(A,P).
R2: PARTIALLY_CORRECT(A,P) and TERMINATES_ON_ALL_VALID_INPUTS(A,P) => TOTAL_CORRECT(A,P).
R3: VALID_INVARIANT(I,A) and INITIALLY_TRUE(I) and PRESERVED(I,A) => INVARIANT_HOLDS_AT_REACHABLE_STATES(I,A).
R4: WELL_FOUNDED_DECREASE(A,V) and NO_UNMEASURED_INFINITE_TRANSITIONS(A) => TERMINATES(A).
R5: VALID_DP_RECURRENCE(P) and CORRECT_BASE_CASES(P) and VALID_EVALUATION_ORDER(P) => CORRECT_DP_VALUES(P).
R6: GREEDY_CHOICE_PROPERTY(P) and VALID_GREEDY_PROOF(A,P) => GREEDY_OPTIMAL(A,P).
R7: ADMISSIBLE_BOUND(s) and BOUND_CANNOT_BEAT_INCUMBENT(s) => SAFE_TO_PRUNE(s).
R8: f in O(g) and g in O(h) => f in O(h), for compatible eventually nonnegative functions.
17. SEMANTIC_EQUIVALENCE
algorithm = finite operational procedure under declared semantics (not necessarily efficient)
recursive algorithm != necessarily terminating algorithm
divide-and-conquer != dynamic programming, although implementations can overlap
greedy heuristic != proven optimal greedy algorithm
backtracking != branch and bound; both search trees, but pruning criteria differ
Big O != exact running time
space complexity != storage capacity of the input medium
partial correctness != total correctness
18. VALIDATION
V01: reject missing input domain or output specification.
V02: flag unspecified computational model in complexity claims.
V03: reject unconditional termination claims for recursion lacking proof.
V04: reject global-optimality claims based only on greedy selection.
V05: reject dynamic programming recurrences with cyclic dependencies unless a valid fixed-point method is specified.
V06: reject unsafe branch-and-bound pruning when bound admissibility is unproven.
V07: reject treating O(g) as necessarily Theta(g).
V08: reject time or space bounds that omit input-size definition.
V09: distinguish theoretical worst-case complexity from empirical benchmarks.
V10: ensure sub-ontology links preserve the parent topic and canonical identities.
19. EXAMPLE REASONING
Problem: find a shortest path in a graph with nonnegative edge weights.
Candidate: Dijkstra's algorithm using a suitable priority queue.
Premise: edge weights are nonnegative; graph representation and priority queue are specified.
Inference: greedy extraction of minimum tentative distance is safe by the standard shortest-path invariant.
Conclusion: algorithm returns shortest-path distances from the source for reachable vertices.
Caution: this conclusion does not extend unchanged to graphs with negative-weight edges.
20. CHILD ONTOLOGY REGISTRY
- Algorithm Ontology
- Recursive Algorithm Ontology
- Divide and Conquer Ontology
- Greedy Algorithm Ontology
- Dynamic Programming Ontology
- Backtracking Ontology
- Branch and Bound Ontology
- Algorithm Analysis Ontology
- Big O Notation Ontology
- Time Complexity Ontology
- Space Complexity Ontology
21. CONFIDENCE
CONFIDENCE(formal_definition) = HIGH when mathematical premises and model assumptions are explicit.
CONFIDENCE(correctness_claim) = CONDITIONAL on proof obligations.
CONFIDENCE(empirical_performance) = DATA_DEPENDENT on measurements and environment.
UNKNOWN is retained whenever premises, proofs or measurements are missing.
22. FLOW_HASH
FLOW_HASH algorithm: SHA-256 over UTF-8 bytes of the canonicalised flow content excluding the FLOW_HASH field itself.
FLOW_HASH value: COMPUTE_ON_PUBLICATION
Canonicalisation policy: preserve section order; normalise line endings to LF; do not silently change formulas.
23. UPDATE_MODEL
version: 1.0
update_policy: append or revise typed definitions with explicit versioning; revalidate dependent ontology links and proofs.
change_detection: compare canonicalised content hashes and semantic rule identifiers.
provenance: Kireth Semantic Library main-page ontology.
24. AI_CONSUMPTION
interpretation: execute typed relations and inference rules as a formal specification, not as executable source code.
required_checks: validate preconditions, computational model, proof obligations and resource assumptions before asserting conclusions.
reasoning_mode: symbolic, typed, provenance-aware, uncertainty-preserving.
response_policy: distinguish proven results, conditional deductions, empirical observations and unknowns.
END FLOW ALGEBRA