How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Time and Space Hierarchy Theorems
1 · Prerequisites
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Decidable, Recognizable, and Enumerable Languages
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Linear Recurrences and Rational Generating Functions
- P, NP, coNP, and Polynomial Reductions
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Robust Machine Models and Universal Computation
- Sequences and Limits
- The ZFC Axioms and the Basic Set Constructions
- Turing Machines, Configurations, and Computation
2 · Summary
The hierarchy theorems are quantitative diagonal arguments: clocks reserve universal-simulation overhead, while a configuration cap forces a space diagonalizer to halt. The local read-only-workspace section deliberately bridges back to the library’s earlier all-tapes convention before concluding .
3 · Logical flowchart
4 · Definitions, theorems and proofs
An efficient universal simulation with a clock
Definition
Fix a multitape universal simulator , using the finite transition-table encoding convention of A fixed effective binary encoding of deterministic one-tape Turing machines, extended to finitely many tapes by recording the tape count and the finite table on tuples of scanned symbols. Here machines have the multitape semantics of The classes DTIME, NTIME, DSPACE, and NSPACE. On a self-delimiting pair of total length and clock value , first decodes the pair and then simulates at most steps of , rejecting malformed encodings or a clock expiry. For each fixed , this uses These bounds apply with the binary numeral for already supplied and when the simulated computation visits cells; their constants may depend on . The terms pay for decoding and retaining the encoded input, including when or . For a clock constructed from the input length, fix a time-constructible function with eventually and a constructor as in Time-constructible and space-constructible functions. Run to obtain before invoking the simulator. This adds time, so total time is . If this constructor uses cells, total all-tapes space is . No constructor-space bound smaller than is implicit. Small externally supplied clocks, including zero and one, remain covered by the first interface.
Effective enumeration of clocked machines
Statement
Fix a total computable bound and one halting constructor for its values. There is a total effective decoding of binary strings into pairs , where is a deterministic multitape machine and is an integer. Every pair occurs and has arbitrarily long padded codes; malformed codes denote a fixed rejecting pair.
A decoded pair can be equipped either with a step clock or with a visited-cell cap . A step clock rejects on expiry. A cell cap rejects before the next visit would exceed the cap, but does not by itself force a looping computation to halt. The cap counts simulated cells, not the constructor's or simulator's own resource use. Resource-bounded applications must separately charge construction and simulation costs and impose their appropriate time- or space-constructibility hypotheses.
Facts & Assumptions
Given: the fixed and its constructor, and a finite binary string .
Proof
Parse into three self-delimiting fields for a machine code, a canonical positive binary integer , and an ignored padding string, rejecting trailing data. Use the finite-table multitape extension in An efficient universal simulation with a clock of the total decoder in A fixed effective binary encoding of deterministic one-tape Turing machines. Invalid fields return the fixed rejector pair with multiplier one. Every finite string is thereby decoded in finite time; listing all strings in length-lexicographic order gives the enumeration.
For each valid machine and multiplier, encoding these fields with successively longer padding supplies arbitrarily long codes for that pair. On input , compute using the fixed halting constructor. A step counter enforces simulated transitions, returning a halting result if it occurs within the budget and otherwise rejecting. This is the supplied step-clock interface.
For a cell cap, maintain the minimum and maximum visited position on each simulated tape, together with their total interval length. Each tape head moves to an adjacent cell, so these intervals count precisely its visited cells. Include the initial visited cells, rejecting immediately if they already exceed , and reject before a transition that would enlarge the total beyond . This effective monitor preserves every run staying within the cap; a loop inside it may continue forever. A separate configuration clock is needed to force such a run to halt.
If the relevant resource use of is , some fixed positive integer bounds it for all sufficiently large . The enumeration includes this pair, and its corresponding monitor then preserves those computations. No claim about exceptional small lengths where , or about the monitor's own resource overhead, is implicit.
The time-diagonal language respects its budget
Statement
Let be time constructible, eventually at least , with . There is a deterministic language with the following property. For every fixed clocked pair , all sufficiently long valid padded codes of that pair satisfy: is the complement of the result of simulating for at most steps, with inner clock expiry interpreted as rejection.
Facts & Assumptions
Given: the stated and fixed halting constructors for their binary values. Use the padded pair encoding of Effective enumeration of clocked machines.
Proof
Define one fixed multitape procedure on : decode , reject malformed codes, construct for , and run the clocked universal simulator on with simulated input equal to the entire word . If the inner simulation returns, output the opposite of its result. This is a fixed interpreter; its decoding, clock construction, and universal-simulator transitions are all actual transitions of .
The diagonal decider first computes and constructs a unary timer of that length. The constructor costs . Converting its binary output to unary also costs : repeatedly decrement a least-significant-bit-first counter and emit a mark, charging the traversed carry/borrow runs over the whole countdown. Their total is linear in the initial counter value. Rewind the timer, then execute with its fixed tapes and one additional timer tape. Each simulated transition of this fixed advances the timer once; at its end output a default rejection unless has already returned. The fixed transition table is incorporated directly, so this outer clock adds constant overhead per transition, not another universal-simulation factor.
On every input, including malformed descriptions and arbitrarily large encoded multipliers, the outer clock permits at most transitions of . All input-dependent decoding and inner-clock work are inside that clock. Thus total time is , after treating finitely many lengths below the eventual floor separately.
Fix . On its valid padded codes, decoding and copying the full simulated input cost ; constructing the inner clock costs . By An efficient universal simulation with a clock, simulation costs . For this fixed pair the combined runtime of is . It therefore finishes before the outer timer on every sufficiently long code of that pair. Arbitrarily long such codes exist by the enumeration, and the returned answer is the required complement.
The deterministic time hierarchy theorem
Statement
For time-constructible satisfying ,
Facts & Assumptions
Given: the stated constructible bounds.
Proof
The clocked diagonal construction decides a language in .
If a machine running in decided , its code and a sufficiently long padded input would be a valid diagonal instance. The construction returns the opposite answer there, contradiction.
P is properly contained in EXP
Statement
Facts & Assumptions
Given: and .
Proof
Every polynomial is , while ; both displayed bounds are time constructible.
The time hierarchy gives . Since and , this supplies a language in .
The nondeterministic time hierarchy theorem
Statement
For nondecreasing time-constructible with eventually and ,
Facts & Assumptions
Given: the displayed hypotheses, with constructibility and all-branch time classes as in Time-constructible and space-constructible functions and The classes DTIME, NTIME, DSPACE, and NSPACE.
Proof
Construct a deterministic unary-input clock as follows: read its input, compute the binary value with the fixed constructor, and perform countdown iterations before halting. A least-significant-bit-first binary counter has linear total decrement cost (the numbers of bit changes form a geometric sum); returning its head after each decrement has the same bound. Thus the clock's actual running time is eventually, and can be arranged to be at least for every . It is an exact running time in the terminology of Seiferas--Fischer--Meyer, even though was supplied only by an asymptotically bounded binary-output constructor.
Use the first corollary to Seiferas--Fischer--Meyer Theorem 4 (the identity-function case, p. 155): for an exact running time , there is a binary language accepted within but outside every acceptance-time class with bound satisfying and . Here acceptance time means the length of a shortest accepting branch, and nonmembers have no accepting branch. This is the external separation result being invoked.
In particular, has an acceptor with an accepting branch of length at most on each member. Run that fixed acceptor with the fixed unary clock from step 1.1 on separate tapes, interleaving one transition of each per round, and reject if the clock expires without acceptance. This preserves the language and forces every branch to halt within . The product machine has fixed finite control; this is direct clocking, not a claim of linear universal simulation. Hence under the local all-branch convention.
If belonged to local , a constant integer would bound its accepting times at every length by : enlarge to cover the finitely many exceptional lengths. Since eventually, . This contradicts the exclusion in step 2.1. Thus .
Nondecreasing gives , so every all-branch decider is an all-branch decider. Together with steps 3.1 and 3.2 this proves the strict inclusion.
Space-bounded universal simulation
Statement
A fixed universal simulator, given a machine description and input of total length , can simulate a computation using all-tapes space in all-tapes space. In particular, this is when .
Facts & Assumptions
Given: a description/input pair of total length and a simulated run using at most visited cells.
Proof
Retain the description and input, and store the active state, tape contents of visited cells, and head positions; update this finite configuration one transition at a time.
The description/input portion costs cells and the current simulated configuration costs cells. Updating one configuration at a time requires no history of the run and no halting clock. Hence the simulator uses space, which is under .
The space-diagonal machine halts
Statement
Let be space constructible and suppose . The all-tapes space diagonalizer can be made total in space by stopping a simulation after its configuration bound.
Facts & Assumptions
Given: the stated constructible cap and a simulated deterministic machine.
Proof
Compute in binary, enforce that cap, and run the universal simulation with a binary counter through the at most configurations allowed by the cap. The simulation uses space because .
A nonhalting deterministic run repeats a configuration before the counter expires, while a halting run is seen directly. Declare a fixed answer at expiry. The counter has bits, so it and the simulator remain within space.
The deterministic space hierarchy theorem
Statement
For all-tapes space-constructible with and ,
Facts & Assumptions
Given: constructible with and .
A fixed universal simulator uses all-tapes space when its coded input has length and the simulated computation uses space. Space-bounded universal simulation
Proof
Define a total diagonalizer on inputs of the self-delimiting form . On such an input of length , universally simulate inside a fixed reserved fraction of the constructible -space budget, and reverse its answer; reject malformed inputs and use the forced-halting configuration cutoff if the simulation does not halt within that cap. The parser, retained input, simulated configuration, and cutoff counter together use space.
Suppose that a machine decides in at most space for all sufficiently large . Since and , sufficiently long paddings make the simulator's space fit strictly inside the reserved cap. On any such , the cutoff does not fire and is the opposite of , a contradiction. Hence , while step 1.1 puts . The reverse class inclusion is immediate from .
Read-only-input work-space classes and constructibility
Definition
A read-only-input machine has one read-only input tape and finitely many work tapes. On an input of length , the input is bracketed by endmarkers and the input head is confined to those positions. The input tape is never written and its cells are not charged.
contains the languages decided by such machines while visiting work-tape cells. A bound is work-space constructible when a deterministic read-only-input machine, on input , outputs the binary expansion of while visiting work cells. In hierarchy applications we require so that an input-head address fits in the work bound. This model is distinct from all-tapes DSPACE.
Universal simulation preserves read-only work space up to constants
Statement
Let have total length , with a deterministic read-only-input machine in the model of Read-only-input work-space classes and constructibility. For each fixed , a universal simulator supplied with a binary integer cap faithfully simulates until it halts or would exceed visited work cells; in the latter case it rejects. It uses work space, hence when . A run that stays within the cap but loops need not halt.
For varying descriptions, a uniform bound is instead obtained by capping the size of the simulator's entire encoded configuration and scratch storage at , rejecting before that storage cap is exceeded. Faithfulness in this version is asserted only for computations whose encoded storage fits that cap. The two caps need not have the same numerical value: encoding constants may depend on 's alphabet and tape count.
Facts & Assumptions
Given: the encoded pair and supplied binary cap, stored in charged work space; use either the fixed- visited-cell cap or the encoded-storage cap as specified above.
Proof
Read the machine and input as two delimited regions of the one read-only input . Store their endpoints and the simulated input-head address in bits; the simulated input is endmarked and confined to its field. The effective finite-table coding underlying Effective enumeration of clocked machines applies also with one input tape designated read-only. Table fields and transition entries can be found by rescanning rather than copying the program.
For fixed , store the work tapes as finite words with marked heads and interval endpoints. Its alphabet and tape count are constants, so a run using at most work cells has an encoding of length . Work-head addresses and the visited-cell counter add bits, and the finite-control encoding is constant. Before extending a visited interval, test the cell cap and reject on overflow, including an initial overflow. A binary cap itself uses bits. Thus the work bound is .
Alternatively, count actual visited work cells in the simulator's binary representation, including configuration, cap, and scratch storage; enforce the encoded-storage limit before each visit to a new work cell. The input-field addresses and allocation counter need only auxiliary bits. Program lookup can compare indexed table fields by repeated scans in space. Reject malformed codes or an overflow. This gives the uniform bound, with faithful transition simulation whenever all required storage fits. Large alphabets or many tapes may trigger this guard even if the simulated cell count is at most .
In either version, each completed simulated transition is exactly the transition selected by the encoded table, so induction gives faithfulness up to halting or overflow. No configuration-time counter was introduced, and thus within-cap loops are not falsely declared halting. The logarithmic floor absorbs the address term in each respective bound.
The read-only-workspace diagonal machine halts
Statement
Let be work-space constructible with . The local read-only-workspace diagonal simulator can stop every deterministic computation after its finite configuration bound while using work space.
Facts & Assumptions
Given: the stated constructible bound and a read-only machine capped at work cells.
Proof
Compute the cap . The input is fixed and read-only, while finite control, work contents, and all head positions have only exponentially many configurations in .
Use the universal simulator and a binary counter of bits to count through that bound, stopping at expiry. A deterministic nonhalting computation repeats a configuration beforehand, so the forced answer makes the simulation total without exceeding work space.
The read-only-workspace space hierarchy theorem
Statement
If are work-space constructible, , and , then
Facts & Assumptions
Given: satisfying the stated local-model hypotheses.
Proof
Apply Effective enumeration of clocked machines with the work-space bound . On a code of length for , first compare the required cap with a fixed fraction of . If it does not fit, return a fixed answer; if it fits, simulate with cap , stop after its finite configuration bound, and return the opposite answer. Malformed codes also receive a fixed answer.
The preliminary comparison and the guarded simulation use work cells on every input. For each fixed decoded pair, the simulator and its counter use cells; because and the logarithmic floor is absorbed by , every sufficiently long padded code for that pair passes the guard. Thus the diagonal language lies in without losing the eventual self-code needed below.
If the diagonal language were in , choose a clock multiplier for its decider and then a sufficiently long padded code for that pair. On input the diagonal machine simulates that same decider on and returns the opposite answer, a contradiction. Since also gives the ordinary inclusion, the containment is strict.
Read-only work space becomes all-tapes space after charging input
Statement
For every , under the repository's all-tapes convention.
Facts & Assumptions
Given: a read-only-input decider using work cells.
Proof
Regard its endmarked input tape as an ordinary tape. By the local-model definition the input head is confined to its input positions, and the machine visits work cells.
Therefore the total visited-cell count is , which is the claimed all-tapes DSPACE bound.
L is properly contained in PSPACE
Statement
With ,
Facts & Assumptions
Given: and .
Proof
The local hierarchy applies to , yielding a language in .
The bridge puts that language in , hence in PSPACE. Since every computation is also polynomial all-tapes space, this proves the proper containment.
Language padding
Definition
For and a total function , define All malformed strings, and strings with a wrong unary-pad length, are outside the padded language. The exponent is a nonnegative integer precisely on the displayed branch , and the delimiter makes decoding canonical.
Padding transfers time bounds
Statement
Let satisfy for every . Suppose the canonical padding in Language padding is constructible on in time, and validity of any string of length can be decided, with its unpadded word recovered when valid, in time, for a fixed integer .
If has a deterministic decider taking time, then has a decider taking on valid inputs of decoded length and total length , and on malformed inputs. Its worst-case bound at length is , where Conversely, if has a deterministic decider taking time, then has a decider taking time.
Facts & Assumptions
Given: and the construction/validation procedures above; for the forward implication an decider for , and for the converse an decider for .
Proof
For the forward implication, validate and reject it if malformed. Otherwise recover and run the supplied decider. By the padding definition its answer is correct, and its cost is . Since , the set of lengths with is finite; maximizing gives the displayed worst-case bound, including lengths with no valid pad.
For the converse, on of length construct and run the independently supplied padded-language decider. The exponent is nonnegative, including at , and this valid pad belongs to the padded language exactly when . Construction costs and the decider costs , giving the claimed sum.
Gap and union theorems for abstract complexity bounds
Statement
Let be a Blum complexity measure. (Gap) for every total recursive satisfying for every , there is a total recursive, monotonically increasing bound such that . (Union) for every recursively enumerable family of recursive bounds satisfying for every , there is a recursive with , where denotes the programs whose -complexity is eventually at most .
Facts & Assumptions
Given: a Blum measure, the stated recursive data, and eventual-bound class convention.
Proof
The Gap Theorem for abstract measures (Hartmanis--Hopcroft, Theorem 7) applies to the given Blum measure and recursive . Its finite-stage construction uses only bounded tests of the decidable Blum predicate ; it does not attempt to decide whether a program is eventually below a bound. The resulting recursive nondecreasing has the stage invariant that every indexed program eventually below is also eventually below . Hence .
The Union Theorem for abstract measures (Hartmanis--Hopcroft, Theorem 16) applies to the effective strictly increasing sequence . Its recursive finite-injury construction produces a recursive with two complementary invariants: every is eventually at most , and each indexed program that is outside every exceeds infinitely often. These give respectively and the reverse inclusion.
Hierarchy theorems do not separate P from NP
Statement
The deterministic and nondeterministic time hierarchy conclusions do not themselves compare with , and therefore do not constitute a proof of either or .
Facts & Assumptions
Given: the quantified conclusions of the two hierarchy theorems.
A binary language is in verifier-defined NP exactly when it belongs to for some (The verifier and nondeterministic definitions of NP agree).
Proof
Each hierarchy compares two deterministic classes or two nondeterministic classes at separated resource bounds, such as versus .
By [L1] and the definition of , the versus question compares the unions of deterministic and nondeterministic polynomial-time classes. A separation needs one language in outside every deterministic polynomial-time class; equality needs polynomial deterministic simulations for all languages. The witnesses in step 1.1 only separate two bounds in the same model, and their bounds and witnesses may vary. These stated conclusions do not themselves provide either of the required cross-model arguments. This is a comparison of what the theorem statements assert, not a formal independence claim about their consequences in an axiomatic theory.
False: unrestricted diagonalization respects any resource bound
Statement
An unrestricted universal diagonalization automatically stays within whatever resource bound is claimed for its simulated machines.
Facts & Assumptions
Given: the claimed constant bound .
Refutation
Fix a machine that halts after one transition without reading its input, and consider the valid pairs as grows. The simulated computation respects the bound , but the specified universal simulator must first decode the complete self-delimiting pair and reject malformed encodings. This takes time at least linear in the unbounded pair length.
Hence this unrestricted diagonalizer is not an -time computation, despite every selected run of taking one step. A candidate's resource bound alone therefore does not bound decoding and universal-simulation overhead; a separate clock and a proved gap are needed.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Arora and Barak, Computational Complexity, Chapter 3
- Arora and Barak, Computational Complexity, §3.1
- Arora and Barak, Computational Complexity, Theorem 3.1
- Sebastiaan Terwijn, Complexity Theory, §2.2
- Arora and Barak, Computational Complexity, Section 3.3, Theorem 3.3
- Seiferas, Fischer, and Meyer, Separating Nondeterministic Time Complexity Classes, Theorem 4 and Corollary 4.1, pp. 152–155
- Arora and Barak, Computational Complexity, §3.2
- Sebastiaan Terwijn, Complexity Theory, §2.3
- Arora and Barak, Computational Complexity, Theorem 3.2
- Arora and Barak, Computational Complexity, Definition 4.1 and Remark 4.2
- Arora and Barak, Computational Complexity, Remark 4.2
- Arora and Barak, Computational Complexity, Definition 4.1
- Arora and Barak, Computational Complexity, Definition 4.5
- Sebastiaan Terwijn, Complexity Theory, Exercise 3.5.2(a)
- Sebastiaan Terwijn, Complexity Theory, Theorem 5.6.1
- Hartmanis and Hopcroft, An Overview of the Theory of Computational Complexity, Theorem 16