Auxiliary pushdown automata #
An auxiliary pushdown automaton (Turing.AuxPDA) extends a multi-tape nondeterministic Turing
machine (read-only input tape with clamped endmarkers, k two-way read/write work tapes, and a
write-only output tape) with an unbounded pushdown stack whose height is not charged to work
space.
Each transition inspects the control state, the symbol under the input head, the k symbols under
the work-tape heads, and the top symbol of the stack (Option StackSym, where none indicates an
empty stack), and performs a multi-tape Turing action (Turing.Action) together with a stack
operation (AuxPDA.StackOp: stay, push γ, or pop). Attempting pop on an empty stack fails
(stack underflow, StackOp.apply? .pop [] = none) and cannot fire as a step.
Work space (AuxPDA.RunPath.space) counts distinct cells visited on the k work tapes only,
matching Turing.MultiTapeNTM.RunPath.space; the pushdown stack is uncharged. Time bounds
(AuxPDA.RunsInTime) apply to all computation paths, preventing vacuous looping branches.
This is original machine infrastructure for cslib-frontier #7920 (Work Package 3), mirroring the upstream multi-tape machine conventions of [Pap94a] and [Sip13].
Main definitions #
Turing.AuxPDA.StackOp: pushdown stack operations (stay,push,pop) and partial applicationStackOp.apply?.Turing.AuxPDA.Action,Turing.AuxPDA.Cfg: single-step actions and full configurations extendingTuring.ActionandTuring.Cfgwith the pushdown stack.Turing.AuxPDA: nondeterministic auxiliary pushdown automaton.Turing.AuxPDA.Step,Turing.AuxPDA.RunPath,Turing.AuxPDA.ComputationPath: single-step relation and finite runs.Turing.AuxPDA.RunsInTime,Turing.AuxPDA.RunsInSpace,Turing.AuxPDA.Accepts,Turing.AuxPDA.DecidesInTimeAndSpace: all-branches time/space bounds and acceptance.Turing.AuxPDA.ofMultiTapeNTM: embedding of aMultiTapeNTMwith an unused stack.
Main results #
Turing.AuxPDA.RunPath.stackHeight_le,Turing.AuxPDA.ComputationPath.stackHeight_le: stack height grows by at most one per step.Turing.AuxPDA.ComputationPath.storage_fitsIn: work-tape heads and non-blank cells lie within per-tape visited-cell windows.Turing.AuxPDA.DecidesInTimeAndSpace.mono: monotone resource closure.Turing.AuxPDA.ofMultiTapeNTM_runsInSpace_iff,Turing.AuxPDA.ofMultiTapeNTM_runsInTime_iff,Turing.AuxPDA.ofMultiTapeNTM_accepts_iff: exact simulation of multi-tape NTMs.
References #
Stack operations, actions and configurations #
The elementary operations on the pushdown stack of an auxiliary pushdown automaton.
- stay {StackSym : Type u_1} : StackOp StackSym
Leave the stack unchanged.
- push {StackSym : Type u_1} (sym : StackSym) : StackOp StackSym
Push a symbol onto the top of the stack.
- pop {StackSym : Type u_1} : StackOp StackSym
Pop the top symbol of the stack; invalid (underflow) on an empty stack.
Instances For
One step of an auxiliary pushdown automaton: a multi-tape Turing action paired with a pushdown stack operation.
- tape : Turing.Action k Symbol State
The input-head move, work-tape edits/moves, optional output, and successor state.
- stackOp : StackOp StackSym
The operation applied to the pushdown stack.
Instances For
A configuration of an auxiliary pushdown automaton relative to input: an underlying
multi-tape Turing configuration together with the pushdown stack (top symbol first).
- tapes : Turing.Cfg k Symbol State input
The underlying multi-tape Turing configuration (state, input head, work tapes, output).
- stack : List StackSym
The pushdown stack, with the top symbol at the head of the list.
Instances For
The control state and work-tape storage of a configuration (forgetting input head, output, and stack).
Apply an AuxPDA.Action to a configuration. Returns none on stack underflow (pop on an
empty stack).
Nondeterministic auxiliary pushdown automata #
A nondeterministic auxiliary pushdown automaton with k read/write work tapes over
Option Symbol (none = blank), a read-only input tape, a write-only output tape, and an
unbounded pushdown stack over StackSym.
- q₀ : State
The initial control state.
- Tr (q : State) (input : Option Symbol) (work : Fin k → Option Symbol) (top : Option StackSym) (action : Action k Symbol StackSym State) : Prop
The nondeterministic transition relation on control state, input symbol, work-tape head symbols, top stack symbol (
nonewhen empty), and resulting action.
The one-step relation on configurations. A halted configuration steps only to itself; a
running configuration steps by applying any action related by Tr that does not underflow the
stack.
A single step changes each work-tape head by at most one cell.
A single step does not modify any work-tape cell away from its head.
Once a run path is halted, its configuration stays unchanged.
The last configuration equals any earlier halted configuration.
A run path that ends halted decomposes into a running prefix ending at its first halted configuration.
The positions visited by work-tape head i along a run path. The pushdown stack is not
counted in space.
Every cell between the first and last head positions of a work tape is visited.
Any work-tape cell that changed along a path was visited by its head.
Every visited head position lies within spaceUsedByTape of its starting position.
A run path starting at the initial configuration of M on input.
The path starts at the initial configuration.
The number of steps taken by a computation path.
Total work-tape space used along a computation path (stack uncharged).
The stack height at the end of a computation path is at most its step count.
The work-tape storage at the end of a computation path fits in its per-tape visited-cell
windows, matching Turing.MultiTapeNTM.ComputationPath.storage_fitsIn.
Time bounds, space bounds and decision #
A time bound can be increased.
A space bound can be increased.
A machine without work tapes satisfies every space bound regardless of stack usage.
M decides A within work space s and all-branches time t relative to enc: on every
encoded instance enc a, every computation prefix uses at most s a work-tape cells, every
computation path of length at least t a halts, and a ∈ A ↔ M.Accepts (enc a).
Monotone resource closure for DecidesInTimeAndSpace.
Embedding multi-tape nondeterministic Turing machines #
Embed any MultiTapeNTM as an AuxPDA with a dummy stack alphabet PUnit that never pushes
or pops (StackOp.stay on every transition).
ofMultiTapeNTM preserves work-tape space bounds exactly.
ofMultiTapeNTM preserves all-branches time bounds exactly.
ofMultiTapeNTM preserves acceptance exactly.