TCSLib

193 Complexity — EXP

193.1 Overview

This module introduces the exponential-time classes: \(\mathrm{EXP}\) as the union of the deterministic time classes \(\mathrm{DTIME}(2^{n^c})\), and \(\mathrm{NEXP}\) in certificate form (exponential-length certificates checked by a polynomial-time verifier language). It proves the chain of inclusions \(\mathrm{P} \subseteq \mathrm{EXP}\), \(\mathrm{NP} \subseteq \mathrm{EXP}\) (by brute-force certificate enumeration on a concrete multi-tape machine), and \(\mathrm{EXP} \subseteq \mathrm{NEXP}\) (by padding), together with the supporting fixed-width binary counter, reversible logging/restoration, clean-call, and exponential-split machinery.

193.2 Declarations

Definition 193.1 The class \(\mathrm{EXP}\)
✓
#

A language \(L\) over the binary alphabet belongs to \(\mathrm{EXP}\) if and only if \(L \in \mathrm{DTIME}(2^{n^c})\) for some constant \(c \in \mathbb {N}\), i.e. \(L\) is decided by some finite multi-tape Turing machine within \(a \cdot 2^{n^c}\) steps on inputs of length \(n\), for constants \(a\) and \(c\).

Definition 193.2 Exponentially bounded function
✓
#

A function \(p : \mathbb {N} \to \mathbb {N}\) is exponentially bounded if there exist constants \(C, c \in \mathbb {N}\) such that \(p(n) \le C \cdot 2^{(n+1)^c}\) for every \(n\).

Definition 193.3 The class \(\mathrm{NEXP}\), certificate form
✓
#

A language \(L\) over the binary alphabet belongs to \(\mathrm{NEXP}\) if there exist constants \(C, c \in \mathbb {N}\) and a verifier language \(V \in \mathrm{P}\) such that for every binary string \(x\): \(x \in L\) if and only if there is a certificate \(u\) of length exactly \(C \cdot 2^{(|x|+1)^c}\) with the concatenation \(x \mathbin {+\! \! +} u\) in \(V\).

Theorem 193.4 \(\mathrm{P} \subseteq \mathrm{EXP}\)
✓

Every language in \(\mathrm{P}\) lies in \(\mathrm{EXP}\): a language over the binary alphabet decidable in time polynomial in the input length is also decidable in time \(2^{n^c}\) for some constant \(c\), up to a constant factor.

Definition 193.5 Little-endian value of a boolean word
✓
#

The value of a boolean word read as a little-endian binary numeral: the empty word has value \(0\), and a word with first bit \(b\) and tail \(u\) has value \(2 \cdot \mathrm{val}(u) + b\). Leading (high-order) zero bits are allowed.

Definition 193.6 Fixed-width binary increment
✓
#

The fixed-width increment of a boolean word viewed as a little-endian binary counter: it returns the incremented word of the same length, or nothing on overflow (when the word is all ones); the empty word overflows.

Definition 193.7 Width-\(w\) little-endian binary word
✓
#

For all natural numbers \(w\) and \(i\), the width-\(w\) little-endian binary word of \(i\) is the list of the \(w\) lowest binary digits of \(i\), least significant first, with high-order zeros retained.

Lemma 193.8 Value bound for a boolean word
✓
#

For every boolean word \(u\), the little-endian value of \(u\) is strictly less than \(2^{|u|}\).

Lemma 193.9 Length of the width-\(w\) word
✓
#

For all \(w\) and \(i\), the width-\(w\) little-endian binary word of \(i\) has length exactly \(w\).

Lemma 193.10 The word of rank zero
✓
#

For every width \(w\), the width-\(w\) little-endian binary word of \(0\) is the all-false word of length \(w\).

Lemma 193.11 Value of an in-range word
✓

If \(i \lt 2^w\), then the little-endian value of the width-\(w\) binary word of \(i\) equals \(i\).

Lemma 193.12 Equal-length words with equal values coincide
✓
#

Two boolean words of the same length with the same little-endian value are equal (trailing high-order false bits included).

Lemma 193.13 Every word represents its own value
✓

Every boolean word \(u\) equals the width-\(|u|\) little-endian binary word of its own little-endian value.

Lemma 193.14 Specification of the fixed-width increment
✓

For every boolean word \(u\): if the fixed-width increment of \(u\) succeeds with result \(v\), then \(|v| = |u|\) and the little-endian value of \(v\) is one more than that of \(u\); if it overflows, then the value of \(u\) plus one equals \(2^{|u|}\).

Lemma 193.15 Increment on canonical words
✓

For \(i \lt 2^w\), the fixed-width increment of the width-\(w\) binary word of \(i\) equals the width-\(w\) word of \(i+1\) when \(i + 1 \lt 2^w\), and reports overflow otherwise. This includes width zero.

Lemma 193.16 Exact-width certificates versus in-range ranks
✓

For every width \(w\) and every predicate \(p\) on boolean words: there exists a word \(u\) with \(|u| = w\) satisfying \(p\) if and only if there exists a rank \(i \lt 2^w\) such that \(p\) holds of the width-\(w\) binary word of \(i\).

Definition 193.17 Boolean test of consecutive ranks
✓
#

Given an acceptance function on natural-number ranks, a start rank \(i\), and a count: the Boolean that is true exactly when one of the \(\mathrm{count}\) consecutive ranks starting at \(i\) accepts, evaluated by testing the ranks in order.

Lemma 193.18 Characterisation of the rank test
✓
#

Testing \(\mathrm{count}\) consecutive ranks starting at \(i\) against an acceptance function returns true if and only if some rank \(j\) with \(i \le j \lt i + \mathrm{count}\) accepts.

Lemma 193.19 Rank test equals certificate existence
✓

Let \(V\) be a language over the binary alphabet, \(x\) a string, and \(w\) a width. Testing all \(2^w\) ranks with the acceptance function “the indicator of \(V\) accepts \(x\) concatenated with the width-\(w\) binary word of the rank” returns true if and only if there exists \(u\) with \(|u| = w\) and \(x \mathbin {+\! \! +} u \in V\).

Lemma 193.20 Timed loop invariant for candidate rounds
✓

Let \(M\) be a finite multi-tape Turing machine over the binary alphabet, \(x\) an input, and let \(\mathrm{cfg}\) assign to each rank a configuration of \(M\) on \(x\). Suppose the configuration at rank \(i + \mathrm{count}\) is halted with single-bit output false, and that for each rank \(j\) with \(i \le j \lt i + \mathrm{count}\) the machine, within \(B\) steps from \(\mathrm{cfg}(j)\), either halts with single-bit output true (when rank \(j\) accepts) or reaches \(\mathrm{cfg}(j+1)\) (when it rejects). Then within \(\mathrm{count} \cdot B\) steps from \(\mathrm{cfg}(i)\) the machine halts with single-bit output equal to the disjunction of the acceptance bits over the ranks \(i \le j \lt i + \mathrm{count}\).

Lemma 193.21 Polynomial exponents absorb into \(2^{n^e}\)
✓
#

For all constants \(K, k \in \mathbb {N}\) there exist constants \(A, e \in \mathbb {N}\) such that \(2^{K (n+1)^k} \le A \cdot 2^{n^e}\) for every \(n\).

Lemma 193.22 Enumeration budgets are exponential budgets
✓
#

For all constants \(a, C, c, d \in \mathbb {N}\) there exist \(A, e \in \mathbb {N}\) such that for every \(n\),

\[ a \cdot 2^{C(n+1)^c} \cdot \bigl(n + C(n+1)^c + 1\bigr)^d \le A \cdot 2^{n^e}. \]
Lemma 193.23 Agreement of the two fixed-width increments
✓

For every boolean word \(s\), the fixed-width little-endian binary increment of \(s\) computed by the Turing-machine catalog’s counter equals the one computed by the certificate-enumeration counter: both return the same-length incremented word, or both fail exactly on overflow (including on the empty word).

Lemma 193.24 The stalled increment preserves width
✓

For every boolean word \(s\), applying the fixed-width increment and falling back to \(s\) itself on overflow yields a word whose length is exactly \(|s|\).

Lemma 193.25 Orbit of the stalled increment
✓

For every width \(w\) and every \(i \lt 2^w\), iterating the stalled fixed-width increment (increment, keeping the word unchanged on overflow) \(i\) times from the all-false word of length \(w\) yields the width-\(w\) little-endian binary word of \(i\). Nothing is asserted at the terminal rank \(2^w\).

Lemma 193.26 Binary digits of \(2^w - 1\)
✓
#

For every \(w\), the binary-digit list of \(2^w - 1\) is the all-true word of length \(w\).

Definition 193.27 Sparse tape of a finite cell list
✓
#

The tape function determined by a finite list of possibly blank cells: a nonnegative position \(z\) holds the \(z\)-th list entry (which may itself be blank), and every position beyond the list, as well as every negative position, is blank.

Lemma 193.28 Appending one sparse cell
✓
#

Appending one possibly blank entry to a finite cell list changes the induced sparse tape at exactly the position just past the old list, where the new entry is written.

Lemma 193.29 Erasing the last sparse cell
✓

Let \(w\) be a finite list of possibly blank cells and \(b\) a possibly blank entry. Blanking position \(|w|\) of the sparse tape of \(w\) extended by \(b\) yields exactly the sparse tape of \(w\); this holds even when \(b\) is itself blank.

Definition 193.30 Encoding of head moves as tape symbols
✓
#

The move code is the encoding of the three head moves as tape symbols: it sends a left move to a false bit, staying put to the blank symbol, and a right move to a true bit.

Definition 193.31 Decoding of the inverse head move
✓
#

The inverse-move decoding is the map from recorded move symbols to head moves, used by the backward restoration pass, that sends a false bit to a right move, the blank symbol to staying put, and a true bit to a left move; thus every move symbol is decoded to the inverse of the move it encodes.

Lemma 193.32 A move and its decoded inverse cancel
✓

For every head move \(d\), encoding \(d\) as a tape symbol and decoding the inverse move yields exactly the negation of \(d\)’s integer head displacement.

Definition 193.33 History entry of one machine step
✓
#

For a machine with \(k\) work tapes, a history entry for one step is a pair consisting of the tuple of the \(k\) symbols under the work heads before the step and the tuple of the \(k\) head moves performed by the step.

Definition 193.34 Logging instrumentation of one action
✓

Given the symbols currently under the \(k\) work heads and an action of a \(k\)-tape machine, the corresponding action of a machine with \(k + (1 + (k + k))\) work tapes: it performs the original action on the first \(k\) tapes while advancing a unary clock tape and recording, on \(2k\) history tapes, the overwritten symbols and the encoded head moves. Output and control are otherwise unchanged.

Definition 193.35 The logging machine
✓

For a finite machine \(M\) with \(k\) work tapes, the logging machine of \(M\) is the machine with the same finite state set and initial state and with \(k + (1 + (k + k))\) work tapes, every transition of which performs \(M\)’s transition on the first \(k\) tapes while logging a clock mark, the overwritten symbols, and the head moves on the extra tapes.

The configuration of the logging machine corresponding to a source configuration \(c\) and a finite history list \(h\): the source fields occupy the first block of tapes, the clock tape holds \(|h|\) true marks, the history tapes hold the recorded old symbols and encoded moves as sparse tapes, and every history head sits one cell past the recorded entries.

For any configuration \(c\) with history \(h\) and any action \(a\) of the source machine: applying the logged version of \(a\) to the logged configuration of \(c\) with history \(h\) yields the logged configuration of \(a\) applied to \(c\), with history \(h\) extended by the single entry recording the overwritten symbols and head moves of \(a\). This includes halting and output-emitting actions.

For a machine, a start configuration, and a time \(t\): the list of history entries (overwritten symbols and head moves) of the actions actually executed during the first \(t\) steps of the run. No entry is recorded once the machine has halted.

For every finite machine \(M\), start configuration \(c_0\) (possibly prepared, not necessarily initial), and time \(t\): running the logging machine of \(M\) for \(t\) steps from the logged configuration of \(c_0\) with empty history yields the logged configuration of \(M\)’s time-\(t\) configuration together with the history of the first \(t\) steps. In particular the source’s input, output, and halting time are unchanged by the instrumentation.

Definition 193.40 The restoration machine
✓

The restoration controller on \(k + (1 + (k + k))\) work tapes: reading the newest history entry, it alternates moving the \(k\) source heads by the inverses of the recorded moves with writing back the recorded old symbols, erasing the history as it goes, and halts with all history heads at zero when the left blank of the clock tape is reached. The native input head never moves.

Definition 193.41 Restoration checkpoint configuration
✓

The checkpoint configuration of the restoration machine determined by a source configuration \(c\), a history list \(h\), and an input-head position: the source work fields are those of \(c\), the logged history tapes hold \(h\), and every history head inspects the last remaining entry.

Definition 193.42 Completed restoration configuration
✓

For a source configuration \(c\) and an input-head position \(p\), the completed restoration configuration is the halted configuration of the restoration machine whose input head is at \(p\), whose source work tapes and head positions are those of \(c\), whose clock and history tapes are all blank with heads at zero, and whose output is empty.

Lemma 193.43 Undoing one tape write
✓

For any configuration \(c\), action \(a\), and work-tape index \(i\): writing the symbol that was under head \(i\) in \(c\), at \(c\)’s head position, into tape \(i\) after \(a\) has been applied restores tape \(i\) exactly to its contents in \(c\). This covers no-write actions and writes of the blank symbol.

Lemma 193.44 Erasing the newest clock mark
✓

For every \(n\), blanking cell \(n\) of the buffer tape holding \(n + 1\) consecutive true marks yields the buffer tape holding \(n\) consecutive true marks.

The intermediate restoration configuration between inverse movement and inverse writing, for a source configuration \(c\), an action \(a\), and a history \(h\): the old symbols of \(c\) are retained in finite control, the source heads are back at their pre-action positions, and the last history entry is already erased.

Let \(c\) be a source configuration, \(a\) an action, \(h\) a history list, and \(p\) an input-head position. One step of the restoration machine from the checkpoint at \(p\) for the configuration obtained by applying \(a\) to \(c\), whose history is \(h\) extended by the entry recording \(a\) (the symbols under the work heads of \(c\) and the head moves of \(a\)), equals the mid-restoration configuration for \(c\), \(a\), \(h\) and \(p\): the recorded head moves are reversed, the overwritten symbols are retained in finite control, and the cells of that history entry are erased.

Let \(c\) be a source configuration, \(a\) an action, \(h\) a history list, and \(p\) an input-head position. One step of the restoration machine from the mid-restoration configuration for \(c\), \(a\), \(h\) and \(p\) equals the checkpoint configuration for \(c\) and \(h\) at \(p\): the retained old symbols are written back, restoring the source tapes to their contents in \(c\), and the history heads move back onto the last entry of \(h\).

With no history left, one silent step of the restoration machine from the checkpoint for a source configuration \(c\) with empty history returns the history heads to zero and halts, reaching the completed restoration configuration for \(c\). This also covers a source run of zero steps.

Let \(M\) be a finite machine that is live (not halted) at every time before \(t\) when run from \(c_0\). Then the restoration machine, started at the checkpoint for \(M\)’s time-\(t\) configuration with the \(t\)-step history, reaches the completed restoration configuration of \(c_0\) — original work tapes and head positions, blank history — in exactly \(2t + 1\) steps, preserving any supplied input-head position.

If a machine’s run from \(c_0\) is halted at time \(T\), then there is a time \(t \le T\) at which it halts for the first time: the machine is live at every time before \(t\), and its configuration at time \(t\) equals its configuration at time \(T\).

Definition 193.51 Two-head administrative action
✓
#

Given displacements \(m\) and \(d\) and a next control state, the two-head administrative action is the action on \(L + 1\) work tapes that writes nothing, emits nothing, moves the native input head by \(m\) and the head of the last (capture) tape by \(d\), leaves the heads of the first \(L\) work tapes in place, and selects the given next control state.

Definition 193.52 Entry action into restoration
✓

The restoration entry action is the silent action that moves every history head of the restoration machine, including the clock head, one cell left, from the right blank onto the newest recorded entry; it writes nothing, leaves the source heads and the input head fixed, and selects the restoration machine’s checkpoint state.

Definition 193.53 Clean-call wrapper of a machine
✓

The clean subroutine built from a finite machine \(M\): it simulates the logging version of \(M\) with the output captured on one extra final tape, then runs the captured restoration of all source work, rewinds the native input head and the captured word, and halts silently. The retained output word lives on the last work tape; no physical output is emitted.

Definition 193.54 Administrative configuration of the clean wrapper
✓

An administrative configuration of the clean-call wrapper: the source block holds the restored work fields of a given source configuration with blank histories, the last tape holds a retained word \(y\), and the control state, native input-head position, and capture-head position are parameters. The output is empty.

If a source machine \(M\) is live for \(t\) steps from a configuration \(c_0\), then the clean wrapper of \(M\), run for \(t\) steps from the captured logged start of \(c_0\), reaches the captured logged configuration of \(M\)’s time-\(t\) configuration with the \(t\)-step history; any halting emission of \(M\) is retained on the capture tape.

If the source configuration \(c\) is halted, then one silent step of the clean wrapper from the captured logged configuration of \(c\) with history \(h\) parks every history head on the last entry and enters the captured restoration phase at the checkpoint for \(c\) and \(h\), retaining \(c\)’s output on the capture tape.

If the source \(M\) is live for \(t\) steps from \(c_0\), then within \(2t + 1\) steps the clean wrapper’s captured restoration, started at the checkpoint of the time-\(t\) configuration with its history, reaches the administrative configuration in which the original source work fields of \(c_0\) are restored, the time-\(t\) output is retained on the last tape, and the capture head stands at the end of that word.

For any displacements \(m, d\) and control states \(q, q'\), applying the two-head administrative action with displacements \(m, d\) and next state \(q'\) to an administrative configuration of the clean wrapper in state \(q\) yields the administrative configuration with the same tapes, retained word and empty output, in state \(q'\), with the native input head moved by \(m\) and the capture head moved by \(d\).

Consider a machine with a start state whose transition unconditionally steps the input head left into a scanning state, and a scanning state that keeps stepping left over input symbols and exits right into a destination state at the left blank. Then from any configuration in the start state there is a number of steps, at most the current input position plus \(2\), after which the configuration equals the original one with control transferred to the destination state and the input head at cell one.

For every \(j \le |y|\): from the administrative configuration of the clean wrapper with retained word \(y\) and capture head just left of cell \(j\), exactly \(j + 1\) steps return the capture head to zero without erasing \(y\), advancing control to the final administrative state.

If a machine \(M\) halts within \(T\) steps from configuration \(c_0\) on input \(x\) with output \(y\), then within \(3T + |x| + |y| + 8\) steps the clean wrapper of \(M\), started at the captured logged start of \(c_0\), halts in the administrative configuration with \(c_0\)’s work fields restored, all histories blank, \(y\) retained on the last tape, the input head at cell one, the capture head at zero, and no physical output.

Definition 193.62 The assembly machine
✓

A two-state machine with one work tape that first emits (copies to its output) the entire native input and then emits the word written on its work tape, never writing that tape, and halts at the word’s right blank.

Definition 193.63 Assembly configurations
✓

An assembly configuration is the configuration of the assembly machine on input \(x\) determined by a control state, an input-head position, a candidate word \(s\) held fixed on the single work tape with its head at a given cell, and the output prefix emitted so far.

Suppose the input \(x\) decomposes as \(\mathit{pre} \mathbin {+\! \! +} \mathit{rest}\), and let \(s\) be a candidate word. After exactly \(|\mathit{rest}| + 1\) steps from the input-phase configuration of the assembly machine with the input head on the first symbol of \(\mathit{rest}\), candidate \(s\) with its head at zero, and output \(\mathit{pre}\), the machine is in the candidate phase with the input head at the right boundary, the candidate tape and its head at zero unchanged, and output \(x\).

Suppose the candidate word \(s\) decomposes as \(\mathit{pre} \mathbin {+\! \! +} \mathit{rest}\), and let \(\mathit{out}\) be a word and \(p\) an input-head position. After exactly \(|\mathit{rest}| + 1\) steps from the candidate-phase configuration of the assembly machine with input head at \(p\), candidate head at position \(|\mathit{pre}|\), and output \(\mathit{out} \mathbin {+\! \! +} \mathit{pre}\), the machine is halted with the candidate tape unchanged, its head at position \(|s|\), the input head still at \(p\), and output \(\mathit{out} \mathbin {+\! \! +} s\); an empty remainder takes the single final step.

Lemma 193.66 Assembly emits the padded input
✓

For all binary words \(x\) and \(s\), the assembly machine started in its input phase on input \(x\), with \(s\) on its work tape and all heads at their starting positions, is halted after exactly \(|x| + |s| + 2\) steps with output \(x \mathbin {+\! \! +} s\), its input head at the right boundary, the candidate tape unchanged, and the candidate head at position \(|s|\).

Let \(M_1, M_2\) be finite machines, and let \(c_0\) be a configuration of \(M_1\) on input \(x\) (not necessarily initial) from which \(M_1\) halts within \(T_1\) steps with output \(y\); suppose \(M_2\) computes \(z\) from input \(y\) within \(T_2\) steps. Then the buffered composition of \(M_1\) and \(M_2\), started at its first-phase configuration for \(c_0\), halts within \(T_1 + |y| + 2 + T_2\) steps with output \(z\).

For any verifier machine \(MV\), words \(x, s\), and assembly phase: the buffered composition’s first-phase configuration over the assembly machine prepared with candidate \(s\) equals the canonical configuration in which control sits in the chosen assembly phase, tape zero carries \(s\), and all other tapes (composition buffer and verifier work) are blank.

If a machine \(MV\) decides a language \(V\) within time \(T_v\), then from the canonical candidate seam with candidate \(s\) on input \(x\), the buffered composition of the assembly machine with \(MV\) halts within \(T_v(|x| + |s|) + 2(|x| + |s|) + 4\) steps, with single-bit output the indicator of \(x \mathbin {+\! \! +} s \in V\).

Definition 193.70 Halt-redirecting action wrapper
✓
#

Relabel the live states of an action along an embedding and redirect its halt to a designated live return state, keeping all tape effects and the output unchanged.

Definition 193.71 Halt-redirecting configuration map
✓
#

The configuration correspondence matching the halt redirection: all fields are preserved, and the control state is the embedded live state, or the designated return state when the source has halted.

Lemma 193.72 Simulation through the first halt via redirection
✓

Suppose a host machine’s transitions on embedded states are the halt-redirected transitions of a source machine, and the source is live at every time before \(t\) when run from \(c_0\). Then the host’s \(t\)-step run from the redirected configuration of \(c_0\) equals the redirected configuration of the source’s time-\(t\) configuration; in particular at the first halt the host lands in the return state with the source’s final writes and output.

Definition 193.73 Padding an action to a larger tape bank
✓
#

Given a map \(\iota \) from source control states to host control states, the padding of an action \(a\) of a \(k\)-tape machine to \(K\) tapes is the action that performs \(a\)’s input move, output, writes and moves on the first \(k\) work tapes, leaves every further tape unwritten and stationary, and replaces \(a\)’s next control state by its image under \(\iota \) (halting stays halting).

Definition 193.74 Padding a configuration to a larger tape bank
✓
#

Pad a configuration of a \(k\)-tape machine to \(K\) tapes by adding blank stationary high tapes, embedding the control state along a given map.

Lemma 193.75 Padding commutes with one action
✓

Applying the padded version of an action to the padded version of a configuration equals the padding of the result of applying the original action; the added high tapes remain blank.

Let \(k \le K\) and suppose a host machine’s transitions on embedded states are the padded transitions of a \(k\)-tape source machine, reading only the first \(k\) tapes. Then for every configuration \(c\) of the source and every time \(t\), the host’s run from the padded configuration of \(c\) equals the padding of the source’s run.

Definition 193.77 Three source routines on a shared tape bank
✓

The disjoint union of three finite machines on a common bank whose size is the sum of their tape counts: each branch runs its machine, padded, on an initial block of tapes. The machine starts in the third routine, and control can enter either other routine without disturbing tape zero.

Definition 193.78 Two-ended candidate/capture action
✓
#

Given optional writes \(a\) and \(b\), a displacement \(d\), and a next control state, the two-ended action is the action on \(L + 1\) work tapes that performs write \(a\) on tape zero and write \(b\) on the last tape, moves both of these heads by \(d\), leaves every intervening tape unwritten and stationary, keeps the input head fixed, and emits nothing.

Let \(B\) be a finite source machine with designated verification and increment entry states. The enumerator body built from \(B\) is the machine that issues clean calls of \(B\) (with halts redirected to live administrative states) for initialization, verification, and increment, coordinated by seven administrative states: an anchor, a seed-copy phase, an unused reserve, a verdict test, an increment check, a result copy, and a synchronized rewind. Its stopped variant agrees with the active body except that the anchor is a silent self-loop.

Suppose a machine \(I\) computes, within time \(j(n+1)\) on inputs of length \(n\), the output word of the fixed-width binary increment (the successor word, or the empty word on overflow). Then from the candidate seam in the candidate phase with candidate \(s\) on input \(x\), the buffered composition of the assembly machine with \(I\) halts within \((j+3)(|s|+1)\) steps and outputs the increment result of \(s\), which is empty exactly on overflow.

Lemma 193.81 Padding preserves the candidate seam
✓

For \(0 \lt k \le K\): padding the canonical configuration whose only nonblank tape is tape zero carrying a word \(s\) from a \(k\)-tape bank to a \(K\)-tape bank yields the canonical configuration with \(s\) on tape zero of the larger bank, all added tapes blank and parked at zero.

Lemma 193.82 Padding the initial configuration
✓

Padding the initial (all-blank-work) configuration of a \(k\)-tape machine yields the canonical configuration with an empty tape-zero word on the larger bank; this holds even when the source machine has no work tapes.

Lemma 193.83 Overwriting the next candidate cell
✓
#

Writing a bit at position \(|\mathit{pre}|\) of the buffer tape holding \(\mathit{pre} \mathbin {+\! \! +} \mathit{old}\) yields the buffer tape holding \(\mathit{pre}\), then that bit, then the tail of \(\mathit{old}\) with its first cell dropped; this includes the case of an empty \(\mathit{old}\).

Lemma 193.84 Clearing the next captured cell
✓
#

For every \(p\), every bit \(b\), and every boolean word \(\mathit{rest}\), blanking position \(p\) of the sparse tape consisting of \(p\) blank cells followed by the symbols of the word \(b\) then \(\mathit{rest}\) yields the sparse tape of \(p + 1\) blank cells followed by the symbols of \(\mathit{rest}\).

Definition 193.85 Two-ended administrative configurations
✓
#

A configuration on \(L + 1\) work tapes for the administrative copy and rewind scans: tape zero and the last tape carry given tape functions with a common head position, every other tape is blank with its head at zero, the input head is at cell one, and the output is empty.

Lemma 193.86 Effect of a two-ended action
✓

Let \(L \gt 0\), and consider a two-ended configuration on \(L + 1\) work tapes whose tape zero holds \(u\) and whose last tape holds \(v\), with common head position \(h\). Applying the two-ended action with optional writes \(a\), \(b\), displacement \(d\) and next state \(q'\) yields the two-ended configuration in state \(q'\) whose tape zero is \(u\) with cell \(h\) overwritten by \(a\) (if \(a\) writes), whose last tape is \(v\) with cell \(h\) overwritten by \(b\) (if \(b\) writes), and whose common head position is \(h + d\); the input head and the empty output are unchanged.

Lemma 193.87 A list of blanks induces the blank tape
✓
#

The sparse tape induced by a list of \(n\) blank entries is blank at every position.

Lemma 193.88 Lifted words induce buffer tapes
✓

The sparse tape induced by lifting every symbol of a boolean word into a nonblank cell equals the standard buffer tape of that word.

Consider a machine with at least two work tapes whose copy state, at a two-ended configuration, overwrites the tape-zero cell with \(f\) applied to the captured symbol, blanks the captured cell, and advances both heads, exiting left into a rewind state at the captured right blank. Starting with tape zero holding \(\mathit{pre} \mathbin {+\! \! +} \mathit{old}\), the capture tape holding \(\mathit{rest}\) beyond \(|\mathit{pre}|\) already-erased cells, and both heads at \(|\mathit{pre}|\): after \(|\mathit{rest}| + 1\) steps the machine is in the rewind state, tape zero holds \(\mathit{pre}\), then \(f\) mapped over \(\mathit{rest}\), then the remainder of \(\mathit{old}\) beyond position \(|\mathit{rest}|\), the capture tape is blank, and both heads stand at \(|\mathit{pre}| + |\mathit{rest}| - 1\).

Consider a machine whose rewind state moves both endpoint heads left while the tape-zero cell is nonblank and exits right into an arrival state at the left blank. For every word \(w\) on tape zero and every \(j \le |w|\): from common head position \(j - 1\), exactly \(j + 1\) steps reach the arrival state with both heads at zero, preserving \(w\) and the blank capture tape.

For a machine with copy and rewind states as in the two preceding scans: if the captured word \(v\) is at least as long as the old tape-zero word, then from a two-ended configuration with both heads at zero, exactly \(2|v| + 2\) steps replace tape zero entirely by \(f\) mapped over \(v\), blank the capture tape, and return both heads to zero in the arrival state.

For a machine \(B\) with at least one work tape: the logged configuration, with empty history, of the canonical seam carrying a word \(s\) on tape zero equals the canonical seam of the logging machine’s larger tape bank, the added tapes being blank and stationary.

Lemma 193.93 Appending an output tape to a seam
✓

Appending one tape holding a word \(y\) to a bank of \(L\) tapes whose only nonblank tape is tape zero holding \(s\) yields exactly the two-ended tape layout: tape zero \(s\), last tape \(y\), all intervening tapes blank.

For a machine \(B\) with at least one work tape: the clean wrapper’s captured entry configuration at the prepared seam carrying \(s\) on tape zero equals the two-ended administrative configuration with tape zero \(s\), blank capture, and both endpoint heads at zero.

For a machine \(B\) with at least one work tape: the clean wrapper’s completed administrative configuration over the prepared seam carrying \(s\), with retained output \(y\), equals the two-ended configuration with tape zero \(s\), capture tape \(y\), and both endpoint heads at zero.

Let \(B\) be a source machine with at least one work tape that, started in state \(q\) at the seam carrying candidate \(s\) on input \(x\), halts within \(T\) steps with output \(y\). Then the enumerator body, from the two-ended configuration embedding the clean call of \(q\) in a given mode, reaches within \(3T + |x| + |y| + 8\) steps the two-ended configuration in that mode’s administrative continuation state, with candidate \(s\) preserved, \(y\) on the capture tape, all scratch blank, both endpoint heads at zero, and empty physical output.

Lemma 193.97 Two-ended configurations with blank capture are seams
✓

The two-ended administrative configuration with tape zero holding \(s\), blank capture tape, and both endpoint heads at zero equals the canonical seam configuration carrying \(s\) on tape zero.

Let \(B\) be a source machine with at least one work tape that, started at the empty seam on input \(x\), halts within \(T\) steps emitting \(w\) consecutive true marks. Then within \(3T + |x| + 3w + 10\) steps from its initial configuration on \(x\), the enumerator body reaches the anchor state over the canonical seam carrying the all-false candidate of width \(w\).

For every input \(x\) and candidate word \(s\), one step of the active enumerator body from the anchor state over the canonical seam carrying \(s\) on tape zero yields the two-ended configuration that enters the verification call (the source’s verifier entry state in verification mode), with tape zero \(s\), a blank capture tape, and both endpoint heads at zero; the step writes nothing, moves no head, and emits nothing.

For every candidate word \(s\), after one step of the enumerator body (active or stopped) from the two-ended configuration in the verdict state with tape zero \(s\) and the captured word consisting of a single true bit, the machine is halted and its output is exactly the single bit true.

For every candidate word \(s\), one step of the enumerator body (active or stopped) from the two-ended configuration in the verdict state with tape zero \(s\) and a captured single false bit yields the two-ended configuration that enters the increment call (the source’s increment entry state in increment mode), with tape zero \(s\), the captured verdict erased so that the capture tape is blank, and both endpoint heads at zero.

Lemma 193.102 Case analysis of the increment result
✓

For every boolean word \(s\), exactly one of the following holds for the fixed-width increment’s output word: it is empty (overflow) and the stalled step leaves \(s\) unchanged; or it is nonempty, has length exactly \(|s|\), and the stalled step equals it.

One step of the enumerator body from the increment-check state, at the two-ended configuration with candidate \(s\) and captured increment result \(v\), preserves all tapes and transfers control to the anchor when \(v\) is empty (overflow) and to the result-copy state otherwise.

Let \(B\) be a source machine with at least one work tape that, started in the increment entry state at the seam with candidate \(s\), halts within \(T\) steps emitting the fixed-width increment’s output word. Then the enumerator body, from the two-ended configuration embedding the increment call, reaches within \(3T + |x| + 3|s| + 11\) steps the anchor over the seam carrying the stalled increment of \(s\): the successor word of the same width, or \(s\) itself on overflow.

Let \(B\) be a source machine with at least one work tape whose verification call on candidate \(s\) (from the verifier entry state at the seam) halts within \(T_v\) steps with single-bit output \(b\), and whose increment call halts within \(T_i\) steps emitting the fixed-width increment output. Then from the configuration just after departure, within \(3T_v + 3T_i + 2|x| + 3|s| + 21\) steps the enumerator body either halts with output true (when \(b\) is true) or reaches the anchor over the seam carrying the stalled increment of \(s\) (when \(b\) is false).

If a control state’s transition is the silent stationary self-loop, then from any configuration in that state, a run of any length leaves the configuration unchanged.

Lemma 193.107 Runs agree before the first anchor visit
✓

If two transition tables agree at every control state other than a designated anchor state, then their runs from a common configuration coincide for every duration during which the second machine’s run has not yet visited the anchor.

Lemma 193.108 First visit to a stopped anchor
✓

Let two transition tables agree away from an anchor state, which the second (stopped) table turns into a silent self-loop. If the stopped run from \(c\) stands at the anchor at time \(T\), then there is a time \(t \le T\) such that the active run never visits the anchor before \(t\) and its time-\(t\) configuration equals the stopped run’s time-\(T\) configuration.

Lemma 193.109 Halted stopped runs transfer unchanged
✓

Let two transition tables agree away from an anchor state, which the second (stopped) table turns into a silent self-loop. If the stopped run from \(c\) is halted at time \(T\), then the active run from \(c\) equals the stopped run at time \(T\), and the active run never visits the anchor at any time up to \(T\).

Lemma 193.110 Active and stopped bodies agree off the anchor
✓

The active and stopped variants of the enumerator body have identical transitions at every control state other than the anchor; their tape counts and finite state sets coincide.

Let \(B\) be a source machine with at least one work tape that, from the empty seam on input \(x\), halts within \(T\) steps emitting \(w\) true marks. Then within \(3T + |x| + 3w + 10\) steps the active enumerator body reaches the anchor over the all-false width-\(w\) candidate seam, without visiting the anchor at any earlier time.

Let \(B\) be a source machine with at least one work tape whose verification call on candidate \(s\) halts within \(T_v\) steps with single-bit verdict \(b\), and whose increment call halts within \(T_i\) steps emitting the fixed-width increment output. Then there is a time \(t\) with \(0 \lt t \le 3T_v + 3T_i + 2|x| + 3|s| + 22\) such that the active enumerator body, started at the anchor over the seam with candidate \(s\), does not visit the anchor at any strictly intermediate positive time, and at time \(t\) either halts with output true (when \(b\) is true) or stands at the anchor over the seam carrying the stalled increment of \(s\) (when \(b\) is false).

Lemma 193.113 Lifting a prepared call into a shared bank
✓

Suppose a host machine simulates a source machine with at least one work tape by padded transitions on an initial tape block. If the source, started in state \(q\) at the seam carrying \(s\), is halted at time \(T\) with output \(y\), then the host, started in the embedded state at its own seam carrying \(s\), is halted at time \(T\) with the same output \(y\).

Suppose a host machine simulates a source machine by padded transitions on an initial tape block. If the source computes \(y\) from input \(x\) within \(T\) steps, then the host, started in the embedded initial state at the empty seam on \(x\), is halted at time \(T\) with output \(y\); this holds even for a source with no work tapes.

Fix constants \(C, c\), a budget function \(G\), a language \(V\) over the binary alphabet, and a finite machine (the body) with a designated anchor state satisfying: (i) from its initial configuration on any input \(x\) it reaches, within \(G(|x|)\) steps and with no earlier anchor visit, the anchor over the seam carrying the all-false candidate of width \(w = C(|x|+1)^c\); and (ii) from the anchor over any candidate \(s\) of width \(w\), within some positive time at most \(G(|x|)\) and with no interior anchor visit, it halts with output true when \(x \mathbin {+\! \! +} s \in V\) and otherwise returns to the anchor over the stalled fixed-width increment of \(s\). Then there exist a constant \(b\) and a machine \(E\) such that for every input \(x\) there is a rank-indexed family of configurations with: \(E\) reaches the rank-\(0\) configuration from its initial configuration within \(b(G(|x|) + (|x|+1)^{c+1} + 1)\) steps; the rank-\(2^w\) configuration is halted with single-bit output false; and from each rank \(i \lt 2^w\), within the same budget, \(E\) either halts with output true (when \(x\) concatenated with the width-\(w\) binary word of \(i\) lies in \(V\)) or reaches rank \(i + 1\).

Fix constants \(C, c\), a language \(V\) over the binary alphabet, and a machine \(MV\) deciding \(V\) within time \(T_v\). Then there exist a constant \(b\) and one finite machine \(E\) such that for every input \(x\) — writing \(n = |x|\) and \(w = C(n+1)^c\) — there is a rank-indexed family of configurations of \(E\) on \(x\) with: \(E\) reaches the rank-\(0\) configuration from its initial configuration within \(b\, (T_v(n+w) + (n+w+1)^{c+1})\) steps; the rank-\(2^w\) configuration is halted with single-bit output false; and from each rank \(i \lt 2^w\), within the same budget, \(E\) either halts with output true when \(x\) concatenated with the width-\(w\) binary word of \(i\) lies in \(V\), or reaches the rank-\((i+1)\) configuration otherwise.

Let a machine \(MV\) decide a language \(V\) over the binary alphabet within time \(T_v\), and fix constants \(C, c\). Then there exist a constant \(b\) and a finite machine deciding the existential projection \(\{ \, x \mid \exists u,\ |u| = C(|x|+1)^c \wedge x \mathbin {+\! \! +} u \in V\, \} \) within time

\[ b \cdot 2^{C(n+1)^c} \cdot \Bigl(T_v\bigl(n + C(n+1)^c\bigr) + \bigl(n + C(n+1)^c + 1\bigr)^{c+1}\Bigr). \]
Theorem 193.118 \(\mathrm{NP} \subseteq \mathrm{EXP}\)
✓

Every language in \(\mathrm{NP}\) lies in \(\mathrm{EXP}\): a language over the binary alphabet with polynomial-length certificates and a polynomial-time verifier is decidable in time \(2^{n^e}\) for some constant \(e\), up to a constant factor.

Lemma 193.119 Binary digits of a power-of-two multiple
✓
#

For every \(C \neq 0\) and every \(p\), the binary-digit list of \(C \cdot 2^p\) consists of \(p\) false bits followed by the binary digits of \(C\).

Definition 193.120 The binary shift machine
✓

For a fixed boolean word \(w\), a machine with no work tapes that emits one false bit for each native input symbol and then emits \(w\), halting afterwards.

For every \(t \le |x|\): after \(t\) steps on input \(x\), the shift machine is still in its scanning state, its input head stands at position \(t + 1\), and its output so far is exactly \(t\) false bits.

For every suffix word \(w\) and every input \(x\), the shift machine for \(w\) halts on input \(x\) within \(|x| + |w| + 2\) steps, and its output is \(|x|\) false bits followed by \(w\).

Lemma 193.123 Monotone linear budget for the shift machine
✓

For every word \(w\), the shift machine for \(w\) computes the function mapping each input \(x\) to \(0^{|x|} \mathbin {+\! \! +} w\) within time \((|w| + 2)(n + 1)\) on inputs of length \(n\); this time bound is monotone and linear in \(n\).

Lemma 193.124 Exponential padding widths are computable in binary
✓

For all constants \(C, c\) there exist a finite machine and a constant \(A\) such that the machine computes, from each input \(x\), the binary-digit list of \(C \cdot 2^{(|x|+1)^c}\) within time \(A (|x| + 1)^{c+1}\).

Definition 193.125 Decider wrapper of an installed call
✓
#

For a machine \(C\) with at least one work tape and designated entry and exit states: the wrapper machine that copies the native input onto tape zero, rewinds both heads, executes one entry action of \(C\), follows \(C\) until its first return to the exit state, and then emits the single symbol found on tape zero as its decision.

Definition 193.126 Load-phase configurations of the decider wrapper
✓

A load-phase configuration of the decider wrapper on input \(x\) is determined by a phase index \(q \in \{ 0, 1, 2\} \), an input-head position \(p\), a word \(u\), and a head position \(h\): its control state is phase \(q\), its input head is at \(p\), tape zero holds \(u\) with its head at \(h\), every other work tape is blank with its head at zero, and the output is empty.

For every \(i \lt |x|\), one step of the decider wrapper in its copy phase, with the first \(i\) input bits already on tape zero, appends the \((i+1)\)-st input bit to tape zero and advances both the input head and the tape-zero head by one.

For every \(i \le |x|\), running the decider wrapper for \(i\) steps from its initial configuration on \(x\) reaches the copy-phase configuration with the first \(i\) input bits on tape zero and both active heads just past them.

For every \(j \le |x|\): from the rewind-phase configuration of the decider wrapper with the full copy of \(x\) on tape zero and both active heads just left of cell \(j\), exactly \(j + 1\) steps reach the dispatch seam — the dispatch state over \(x\) on tape zero with all heads at the origin. This includes the empty input.

Let \(C\) be a finite machine with at least one work tape and designated entry and exit states, and let \(x\) be an input. After exactly \(2|x| + 2\) steps from its initial configuration on \(x\), the decider wrapper of \(C\) is in the dispatch seam configuration: the dispatch state, \(x\) on tape zero, every other work tape blank, and all heads at their starting positions.

Lemma 193.131 Following the call until its first return
✓

As long as the inner machine’s run from a configuration has not reached the designated exit state, the decider wrapper’s run from the state-renamed copy of that configuration coincides, under the renaming, with the inner machine’s run.

Suppose the inner machine, started in its entry state at the seam carrying \(x\) on tape zero, first reaches the exit state at a positive time \(t\) (no visit at any earlier positive time), in the canonical configuration carrying a word \(y\) on tape zero. Then the decider wrapper, from its dispatch seam, reaches the renamed exit configuration in exactly \(t\) steps; this covers the case where the entry and exit states coincide.

Suppose the inner machine, started in its entry state at the seam carrying \(x\), first returns to the exit state at a positive time \(t\) with the singleton word \([b]\) on tape zero. Then the decider wrapper computes the output \([b]\) from input \(x\) within \(2|x| + 2 + t + 1\) steps, with no earlier emission.

Lemma 193.134 A clean installed call yields an ordinary decider
✓

If a finite machine \(M\) decides a language \(L\) over the binary alphabet within time \(T\), then there exist a finite machine \(R\) and a constant \(B\) such that \(R\) decides \(L\) within time \(B\, (T(n) + n + 2)\).

If a machine \(F\) computes \(y\) from \(x\) within \(s\) steps and a machine \(G\) computes \(z\) from \(y\) within \(t\) steps, then the buffered composition of \(F\) and \(G\) computes \(z\) from \(x\) within \(s + |y| + 2 + t\) steps.

Definition 193.136 Nonempty-input guard
✓

For a finite machine \(M\), the nonempty-input guard of \(M\) is the machine with the same work tapes that, on empty input, emits a single rejecting (false) bit and halts, and, on nonempty input, takes one silent step and then runs \(M\) from \(M\)’s initial state.

Lemma 193.137 The guard preserves the source run
✓

After the nonempty guard has been passed, the guarded machine’s run from any state-renamed configuration of \(M\) coincides, under the renaming, with \(M\)’s own run.

For every finite machine \(M\), the nonempty-input guard of \(M\), run on the empty input, is halted after one step with output exactly the single bit false.

If \(x\) is nonempty and \(M\) computes \(y\) from \(x\) within \(t\) steps, then the guarded machine computes \(y\) from \(x\) within \(t + 1\) steps.

Lemma 193.140 Strict monotonicity of exponential padding
✓
#

For all constants \(C, c\), the map \(n \mapsto n + C \cdot 2^{(n+1)^c}\) on the natural numbers is strictly increasing; in particular the exponential split of a padded length, when it exists, is unique. This includes coefficient zero and degree zero.

Definition 193.141 The exponential-split search
✓
#

Given constants \(C, c\) and a length \(m\): the least \(n \le m\) satisfying \(n + C \cdot 2^{(n+1)^c} = m\), if one exists, and an explicit failure value otherwise.

Lemma 193.142 A successful split certifies its equation
✓
#

If the exponential-split search on \((C, c, m)\) returns \(n\), then \(n \le m\) and \(n + C \cdot 2^{(n+1)^c} = m\).

Lemma 193.143 Failure excludes every split
✓
#

The exponential-split search on \((C, c, m)\) fails if and only if no natural number \(n\) satisfies \(n + C \cdot 2^{(n+1)^c} = m\).

Lemma 193.144 Completeness of the split search
✓

If \(n + C \cdot 2^{(n+1)^c} = m\), then the exponential-split search on \((C, c, m)\) returns exactly \(n\).

Lemma 193.145 The split search rejects length zero
✓

For every positive coefficient \(C\) and every degree \(c\), the exponential-split search on \((C, c, 0)\) returns the failure value, so length zero admits no exponential split.

Definition 193.146 The emitted split word
✓

Given constants \(C, c\) and a word \(y\), the split word of \(y\) is the paired encoding of the first \(i\) symbols of \(y\) and the remaining suffix when the exponential-split search on \((C, c, |y|)\) returns \(i\), and is the empty word, signalling failure, when the search fails.

Lemma 193.147 Linear length of the split word
✓

For every word \(y\), the emitted split word for \(y\) has length at most \(2|y| + 2\), including on malformed (unsplittable) inputs.

For all constants \(C, c\) there exist a finite machine and a constant \(A\) computing the split-word function (the paired prefix/suffix encoding, or the empty failure word) within time \(A (n + 1)^{c+2}\) on inputs of length \(n\).

Definition 193.149 The padding verifier
✓
#

For a language \(L\) over the binary alphabet and a degree \(c\): the language of words \(y\) such that the exponential-split search with coefficient one succeeds on \(|y|\) with some prefix length \(n\) and the first \(n\) symbols of \(y\) form a word in \(L\). Words whose length admits no split are rejected; certificate bits carry no information.

Lemma 193.150 The padding verifier on exact-width concatenations
✓

If \(|u| = 2^{(|x|+1)^c}\), then the concatenation \(x \mathbin {+\! \! +} u\) belongs to the padding verifier of \(L\) at degree \(c\) if and only if \(x \in L\).

Lemma 193.151 The split equation bounds the source budget
✓

If the exponential-split search with coefficient one returns \(n\) on a length \(m\), then \(a \cdot 2^{n^c} \le a \cdot m\) for every constant \(a\), including degree zero.

If some finite machine decides a language \(L\) over the binary alphabet within time \(a \cdot 2^{n^c}\), then the padding verifier of \(L\) at degree \(c\) belongs to \(\mathrm{P}\).

Theorem 193.153 \(\mathrm{EXP} \subseteq \mathrm{NEXP}\)
✓

Every language in \(\mathrm{EXP}\) lies in \(\mathrm{NEXP}\): a language over the binary alphabet decidable in time \(2^{n^c}\) admits certificates of length exactly \(2^{(n+1)^c}\) together with a polynomial-time verifier language.