Explicit-degree overhead of the finite-state RAM simulation #
When every primitive certificate of a RAM model has degree D ≥ 3
(Model.NativePrimitives.HasDegree), one step of the native finite-state simulator has degree D
in the encoded runtime configuration and state. The 3 is the sparse-memory scan, which is cubic in
the encoded memory (SparseMemory.scanTime_le_cube). A clocked run of n steps under the runtime
configuration k, whose step outcomes have encoded length at most B, therefore costs
O(|input| + (n + 1) · (X ^ D + (log n + 1) ^ 2)) machine steps, where X = 2 |k| + B + 2 bounds
the encoded loop states plus one. Whole-run transport inherits this bound with every constant
outside the degree.
These are the degree analogues of the *_isPolynomial lemmas of
CslibFrontier.Computability.GenericRAM.Simulation.Run, which give polynomial bounds of unnamed
degree.
Main results #
Cslib.GenericRAM.FiniteState.stepCertificate_hasDegree,Cslib.GenericRAM.FiniteState.roundCertificate_hasDegree: one simulated step has degreeD.Cslib.GenericRAM.FiniteState.runTime_le,Cslib.GenericRAM.FiniteState.runSpace_le: explicit bounds on a clocked run from per-round bounds and a bound on the visited states.Cslib.GenericRAM.FiniteState.transport_inO_of_hasDegree: whole-run transport with timeO(… + (steps + 1) · (X ^ D + (log steps + 1) ^ 2)), whereX = 2 |cfg| + B + 2andBbounds the encoded step outcomes, for runs that halt withinstepsinstructions.
References #
The certificate of the raw sparse-memory lookup has degree D for every D ≥ 3: time and
space bounds of degree D and encoded output of linear length. The cubic time and linear space
bounds behind it are SparseMemory.readTime_le_cube and SparseMemory.readSpace_le_linear.
The certificate of the raw sparse-memory update has degree D for every D ≥ 3: time and
space bounds of degree D and encoded output of linear length. The cubic time and linear space
bounds behind it are SparseMemory.writeTime_le_cube and SparseMemory.writeSpace_le_linear.
One simulated step has degree D when every primitive certificate has degree D ≥ 3.
One clocked round of the simulator has degree D when every primitive certificate has
degree D ≥ 3.
Clocked runs with explicit bounds #
The loop state after j rounds from a continuing state has the encoded length of the runtime
configuration and the j-step outcome.
Explicit clocked run time. If every round costs at most C (ℓ + 1) ^ D on a loop state of
encoded length ℓ, and the outcomes of the first n steps have encoded length at most B, then
n clocked steps cost at most 3 |input| + (n + 1) (C X ^ D + X + (|n| + 1) ^ 2), where
X = 2 |k| + B + 2 bounds the encoded loop states plus one.
Explicit clocked run space. The space analogue of runTime_le.
Whole-run transport with an explicit degree. Suppose every primitive certificate of the
model has degree D ≥ 3, a halting run of p from initState a takes at most steps a
instructions, and the outcomes of its first steps a clocked steps have encoded length at most
B a. Then f is computable in time
O(Tsteps + Tcfg + Tinit + |input| + (steps + 1) · (X ^ D + (|steps| + 1) ^ 2)), where
X = 2 |cfg| + B + 2 and |input| is the encoded length of (steps, cfg, initState). Only the
constant factor is hidden.