Polynomial-space Mathlib stack machines decide problems in PSPACE #
The source certificate supplies termination and a Boolean answer. A polynomial bound on every
reachable source stack gives a tidy polynomial-space computation, then membership in PSPACE.
The source runtime need not be polynomially bounded. Input and output words use the bridge's
standard finite-symbol encodings; the final Boolean answer is recoded to encBool.
Main results #
Cslib.Complexity.mem_PSPACE_of_tm2: a terminating Mathlib TM2 decider with polynomially bounded stacks decides a problem inPSPACE.
References #
A terminating finite-alphabet Mathlib stack-machine decider with polynomially bounded
stacks decides a problem in PSPACE, under the standard binary input-word encoding.
The hypothesis hstacks uses Turing.TM2.stepTotal, which agrees with Mathlib's partial
Turing.TM2.step whenever it returns a successor and fixes halted configurations
(Turing.TM2.stepTotal_of_step). Thus it bounds the ordinary source run, including its initial
and final configurations; padding beyond halting imposes no additional stack bound.