Polynomial-space iteration #
SpaceIter.mem_PSPACE_of_iterate proves membership in PSPACE by iterating a
polynomial-time string function on polynomially bounded states. The number of
iterations may be exponential in a polynomial in the input length.
The initial state is pair [] x. Every positive iterate before Nof x has a
false head bit; iterate Nof x signals completion with a true head bit. One
more application produces a nonempty state whose head bit is the answer.
Both the initial state and this final answer state are included in the length
bound. The iteration count is a mathematical bound and need not itself be
computed by the step function.
This is the shared machine-independent entry point used by Savitch's theorem
and IP ⊆ PSPACE. The machine construction and its space accounting live in
Complexitylib.Classes.Space.Iterate.Internal.
Iterating a polynomial-time function on a polynomially bounded state is in
PSPACE, however many iterations it takes. The function is applied to
pair [] x over and over; it signals completion by putting a 1 at the head of
its state, and the head of the state one application later is the answer.