Verified structured RAM terminated-unary decoder #
This module exposes a reusable cursor decoder for the unary fields used by the serialized-circuit format. The source proof covers both successful termination and input exhaustion, and compilation preserves its exact transition count, logarithmic cost, peak space, decoded value, and suffix cursor.
Invoke the decoder loop as a resource-bounded cursor routine.
Unlike program_performance, this theorem does not require the standalone
input initializer. It can therefore be sequenced after another parser step.
The loop preserves every data register at or above inputBase.
Source-level correctness with exact transitions and explicit resources.
End-to-end concrete RAM performance and terminated-unary correctness.
The explicit logarithmic-cost time budget is quasilinear.
The explicit peak-space budget is quasilinear.