Resource proofs for named linked-list programs #
The callback is the same ordinary source declaration used by the mathematical
list program. Its finite-word and instruction proofs are reused by the shared
fold interfaces; no second callback implementation or register proof is needed.
The range condition remains separate from mathematical correctness.
The final theorem compiles the actual Native.Source.sumFrom caller, including
its imported fold call and its own outer invocation, return and halt.
The allocating finite-range consumer reuses its generated entry and single-round correspondence with inferred component budgets. Structural composition infers the enclosing function's bound; arena readiness and capacity remain separate.
The actual intermediate addition fits whenever its mathematical sum fits. The generated ordinary-argument interface hides the argument environment.
The existing structural rule counts addition, return and body initialization.
The ordinary callback range proof supplies the linked fold's zero-growth resource contract, with actual inputs related to mathematical accumulator values.
The standalone fold uses the callback's zero-depth specialization.
The same original callback bound transfers without repricing the callback or proving its source behavior again. Outer calls are charged by the fold.
The standalone fold's callback bound is unchanged by its depth specialization.
The same source addition contract is reused by folds with a finite-word domain.
A bound on the final natural sum bounds every intermediate accumulator. Only ordinary list algebra is used; this is not another traversal proof.
The generated native correspondence supplies the actual caller's ordinary sum and exact unchanged heap, independently of ranges and instruction budgets.
The real caller adds one call level above fold and its callback. A single ordinary final-sum bound supplies the ranges along the entire computation.
The caller pays for its actual imported fold invocation, return and body initialization. The callback and linked traversal retain their original costs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Structural call composition counts the actual native wrapper, rather than publishing only the independently runnable library fold's bound.
The generated native wrapper halts on the RAM backend with the ordinary sum and the identical represented source heap. Its bound covers both internal call levels and its outer invocation; the launch supplies real code and stack capacity for the combined native source program.
A uniform bound for both the running and stopped paths of the actual range guard, inferred from its source instructions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The whole range body includes its linked cons call and cursor update. The shared cons certificate supplies the allocating operation's cost.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The existing source round contracts compose inferred uniform bounds into a linear bound for this same allocating loop. The running condition uses the named completion view, not a private lexical position. No second traversal, register proof or hand-written potential inequality is needed. Readiness and capacity remain separate, as does the enclosing function's wrapper cost.
Infer the unchanged source body's bound around its range certificate. The numeric witness depends only on the count; the generated entry proof uses the existing input observation without a hand-built local-state relation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The callable function adds its actual two-instruction initialization once.
Equations
Instances For
A count-only bound on the same callable implementation, under its original heap-indexed List observation. This does not assert capacity or realizability.
All count-dependent work is the existing round envelope; the enclosing source control and function initialization contribute only a fixed term.