The setting
To simulate time- computations of a deterministic one-writable-tape machine in space , one needs a uniform machine model for the simulated computation, a space-bounded access interface for its initial tape and read-only input heads, and a concrete Turing machine model for the simulator. The simulator algorithms are most convenient to design using finite collections of binary stacks, which are then compiled to multi-tape Turing machines with a constant-factor space overhead.
This page introduces the deterministic single-writable-tape machine with read-only heads, the multi-tape Turing machine model with explicit space windows, the polylogarithmic symbol access condition, and the binary stack machine compiler, together with three foundational guarantees: halted configurations remain fixed, polylogarithmic access yields an explicit uniform space bound in terms of the fifth-root cost function, and stack-height bounds compile to Turing machine space bounds.
Single-tape machines with read-only heads
A head move direction is an element of , with integer displacement , , and . For any alphabet , a write-and-move action is a pair .✦ A two-way tape over is a pair consisting of a head position and a content map .✦ The blank tape for has head position and constant content .✦ Reading returns ✦, and performing updates cell to (leaving all other cells unchanged) and moves the head to .✦
Let be a public input alphabet. A single-tape machine over consists of a finite state set with initial state and halting predicate , a finite common tape alphabet , a number of read-only input heads, a transition program, and a sensor function.✦ The head tag set is , where identifies the initial writable tape and identifies the -th read-only head.✦ The sensor function gives the symbol at integer displacement from the origin of tag on public input . The transition program maps a state , the writable-tape symbol, and the -tuple of read-only head symbols to a transition action consisting of a next state , a write-and-move action in for the writable tape, and a direction in for each read-only head.
A configuration of is a triple consisting of a state , a two-way tape over , and read-only head positions .✦ On public input , the initial configuration has state , writable tape , and all read-only heads at .✦ The halting-aware transition leaves the state, writable symbol, and all heads stationary when , and otherwise applies the transition program.✦ One step from reads the writable symbol and the symbols , applies the halting-aware transition, updates the writable tape, and adds to each read-only head position .✦ Iterating this step times from the initial configuration yields the configuration .✦ An outcome of is a pair ✦; the outcome at step is , where is the state of , and indicates that is still running.✦
Multi-tape Turing machines and space bounds
For any alphabet , the endmarked alphabet is , where and are the left and right endmarkers.✦ Given a finite word and position , the symbol observed at is if , the -st symbol of (zero-indexed) if , and if .✦ Moving from on in direction leaves unchanged for , yields for , and yields if or if for .✦
For a public alphabet and an argument index set , a read-only input is a pair consisting of a public word and binary argument words .✦ In particular, given and , the binary-encoded input has public word and each equal to the little-endian binary bit list of (with encoded as the empty word).✦ An input head state consists of positions and for , initially all .✦ Reading the input heads produces an observation in , and an input head movement tuple updates each position via the endmarked walk rule on its word.
Given a partial transition map and a predicate on a configuration space , a halting transition run from to with output within is defined inductively: if holds and , then there is a run from to outputting ; if holds, , and there is a run from to outputting , then there is a run from to outputting .✦
A multi-tape Turing machine with public alphabet , argument index set , and output type consists of a finite state set with start state , a finite work-tape index set , a finite work-tape alphabet with blank symbol for each , and a transition table mapping a state, an input observation, and a tuple of work-tape symbols either to an output or to a next state, an input head movement tuple, and a write-and-move action in for each .✦ A configuration consists of a state, input head positions, and a two-way tape over for each ✦; the initial configuration starts at with all input heads at and each work tape blank for .✦ One step evaluates the transition table on the observed symbols and either halts with or updates the state, input heads, and work tapes.✦
For , let be its binary length ( if , and if ). A space window for is a pair of bounds with .✦ A configuration lies inside if every work-tape head position satisfies .✦ The symbol bit width of tape and the bit width of are given by (1) The machine computes on input within space if there exist a space window with and a terminal configuration such that there is a halting run of on from the initial configuration to outputting whose configurations all lie inside .✦
Polylogarithmic symbol access
For a time cap and an exponent parameter , the integer bit length , fifth-root exponent , block parameter , shifted binary logarithm , and space bound function are defined by (2)
Fix a single-tape machine over with tape alphabet and tag set . Fix a canonical bijection from each finite set to , writing for the index of .✦ Let . For , , and , the encoded sensor query maps , , if and otherwise, and .✦ A sensor accessor for is a multi-tape Turing machine with public alphabet , argument index set , and output type .✦
Ordinary input tapes satisfy the polylogarithmic access condition for every time cap by storing the requested coordinate and rescanning to that position or an endmarker. A coordinate lies in the cap- range if .✦ Given , , and , the polylogarithmic access condition holds for if for every tag and every integer with , there exists with such that computes on within space .✦ The accessor provides uniform space- access on for if for every and every integer with , computes on within space .✦
Binary stack machines and compilation
A stack operation is an element of .✦ Applied to a bit list , leaves unchanged, prepends to , and removes the head bit of (leaving the empty list empty).✦ For an argument index set and a stack index set , a store consists of input head positions on and a stack for each .✦ The initial store places all input heads at and sets every stack empty.✦ Reading the store returns the top bit of each stack (or if empty).✦ A store update consists of an input head movement tuple and a family of stack operations ✦; performing it advances the input heads and applies each to .✦ A store satisfies height bound if for every .✦
A binary stack machine over consists of a finite state set , a start state , and a transition table mapping a state, an input observation, and the top-of-stack observations in either to an output or to a next state and a store update.✦ A configuration is a pair of a state and a store✦; one step evaluates the transition table and either halts with or updates the state and store.✦ A space-bounded execution of on input with height bound from store to store outputting is a halting run from to for some state in which every visited store satisfies height bound .✦
When is finite, compiles to a multi-tape Turing machine over with state set , work-tape index set , cell alphabet with blank on every tape, and start state .✦ Each step of is simulated in two phases. In the first phase, from , queries the table of ; if halts with , then halts with , and otherwise it advances the input heads as does, transitions to , and on each tape with current cell performs: write and stay for ; write and move right for ; write and move left if (or stay if ) for . In the second phase, from , keeps all input heads stationary, transitions to , and on each tape stays in place, writing for and keeping otherwise. The stack-to-tape space multiplier of is (3)✦ where is the symbol bit width of tape of from (1).
The claim
Theorem. Let be an alphabet and let be a single-tape machine over .
For every public input and , if the halting flag of is , then for every , (4)✦
For every sensor accessor for and real numbers with , there exist such that for every public input and time cap , whenever the polylogarithmic access condition holds for , the accessor provides uniform space- access on with (5)✦
Let and be sets, let be a finite set, and let be a binary stack machine over . If has a space-bounded execution on a read-only input from the initial store to some store outputting with stack height bound , then its compiled Turing machine computes on inside a space window satisfying (6)✦
In the paper, the result reads: a fixed deterministic machine has one two-sided writable tape, a fixed number of read-only input heads with cap-independent symbol functions (written above), and a deterministic space-bounded accessor that returns for using at most work-space bits. In the Lean library, all tapes share one common finite alphabet with coordinates given as integer displacements from fixed origins, and simulator algorithms are expressed as binary stack machines compiled to multi-tape Turing machines.
What is checked
In the Lean library, the claims (4), (5), and (6) are stated over the single-tape machine model with sensor interface , the multi-tape Turing machine model with explicit space windows (1), the cost functions (2) and polylogarithmic access condition, and the two-phase stack-to-Turing compilation with multiplier (3).