Cumulative allocation for the existing array-record loop #
The unchanged ArrayRangeNative.repeatAppend allocates a new array each round
and retains earlier arrays. Its reserve is the sum of all new payload lengths,
not merely the final length. The current array layout charges no per-array
header cells.
The mathematical guard/body contracts transport observations at actual heaps. The shared readiness rule reuses them on an existing source execution, with word ranges and cumulative capacity explicit. This adds neither a second termination proof nor a new implementation. The full-function result uses the original source totality, the existing nonuniform time certificate and an actual preloaded launch. Its typed outcome retains the original mathematical contract, the exact cursor growth and the same halted runner's instruction bound. No input-loading or exact peak-live-space claim follows from this retained allocation bound.
All fresh array cells allocated by the remaining rounds; old arrays remain allocated.
Equations
- Complexity.Language.Examples.LinkedList.NativeRange.RepeatAppendReady.reserve count size chunk = ∑ index ∈ Finset.range count, (size + (index + 1) * chunk)
Instances For
Conservation of the remaining reservation across one active round.
Word ranges and the cumulative unused reservation, expressed only in mathematical locals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mathematical ranges and sufficient remaining capacity survive an actual round.
The current mathematical record has word-sized fields; any actual observation inherits these ranges through the shared representation rules.
The actual guard does not allocate; its scalar comparison uses the represented count.
One actual append call followed by the existing scalar record update and decrement.
The same finite loop is ready, consuming exactly the sum of its fresh arrays.
Obtain source termination from the existing correctness contract and measure that very execution, with no additional termination or instruction-budget premise.
Attach the loop readiness to the unchanged function's two bindings and final return.
Bound the original function's retained allocation by the cumulative fresh-array reservation. Its source precondition retains actual handles and permits overlapping inputs.
Publish one complete invocation with the original mathematical contract, the exact retained arena growth and the previously proved nonuniform time bound.