Mathlib stack-machine computations within polynomial space #
The simulation stores one encoded source configuration and a binary clock. Its space bound depends on the sizes of the intermediate configurations, independently of the number of rounds. All source stacks count towards space, including the initial input and final output. The terminating-computation theorem derives an exponential clock from the polynomial stack bound; it does not require a runtime certificate. The simulation gives polynomial space overhead, rather than an assertion of a linear space bound.
Main results #
Turing.TM2.run_polySpace: a polynomial-time binary clock and polynomially bounded source stacks give a polynomial-space simulation.Turing.TM2Computable.computableTidilyInPolySpace: transfer termination and a polynomial source-stack bound to tidy polynomial-space computation.
References #
Iterate a source machine using a binary clock. The source input may be computed from a typed input; only its actual intermediate stacks need to obey the supplied space bound.
A terminating Mathlib computation with polynomially bounded source stacks is tidily computable within polynomial space. No source runtime bound or computable space bound is needed. The bound includes the input and output stacks at initialization, during execution and at halting.