The time-hierarchy diagonalizer diagTM #
The 8-tape machine D := diagTM clk at the heart of the time hierarchy
theorem. On input x it:
- builds the self-pair
pair x xon work tape 7 (pairSelfTM); - decides
TerminatedRegion xby a single input scan (termCheckTM); malformed inputs are routed to a fixed0output (writeTM Γw.zero); - for well-formed inputs: blanks the verdict cell (
blankOutTM), builds the unary clockregTape (g |x|)on work tape 6 (the abstract clock-constructibility witnessclk), runs the clocked universal machine on the self-pair (retargetInput clockedUtmTM), and finally negates output cell 1 (negOutTM) — accepting exactly when the simulated machine does not accept withing |x|steps.
Main definitions #
TM.ClockWitness— the body ofClockConstructible, namedTM.blankOutTM— write□at output cell 1, framing everything elseTM.diagTM,TM.diagLang,TM.diagTime
Main results #
TM.clockConstructible_iffTM.diagTM_decidesInTime—diagTM clkdecidesdiagLang clkin timediagTime C gTM.diagTM_flips— on terminated inputs whose interpreted machine halts within the clock budget, membership indiagLang clkis the negation of the simulated machine's acceptanceTM.diagTime_le_poly—diagTime C g n ≤ (C + 786) * ((n+1)² * (g n + 1))
Implementation notes #
Two landed specs do not quite fit and are bridged locally:
writeTMwrites□under every work-tape head, which would corrupt the pair tape;blankOutTM(mirroringnegOutTM) blanks output cell 1 while framing the input and all work tapes exactly.ClockWitness's postcondition only guarantees that the output tape is▷-clean — not that it is restored to blank — so the landedclockedUtmTM_hoareTime_*(whose precondition demands a blank output tape) cannot be applied afterclk. We re-derive them here with a merely▷-clean output precondition (cleanUtmPre):initTMis output-idle, so its Hoare triple transports to any clean output tape by an output-swap simulation; every other ingredient already accepts a clean output tape.
The body of ClockConstructible, with the machine and constant
exposed: tm writes the unary clock regTape (g |x|) on work tape 6
within C * (g |x| + |x| + 1) steps, framing the rest of the
diagonalizer's tape layout. See ClockConstructible for the design
discussion.
Equations
- One or more equations did not get rendered due to their size.
Instances For
ClockConstructible is exactly the existential closure of
ClockWitness.
Replace output cell 1 with □ and halt with the output head parked at
cell 1. Mirrors negOutTM exactly (rewind → right to cell 1 → write →
halt); unlike writeTM, the input tape and all work tapes are exactly
unchanged (readBackWrite writes and idleDir moves).
Equations
- One or more equations did not get rendered due to their size.
Instances For
blankOutTM specification (ghost form, exact frames). Starting from
pinned tapes inp₀/work₀/out₀ with a well-formed output tape (cell 0
is ▷, no ▷ at cells ≥ 1, head ≤ B) and no tape head resting on ▷,
blankOutTM halts within B + 3 steps having blanked output cell 1,
all other output cells unchanged, output head parked at cell 1, and the
input and work tapes exactly unchanged.
The time-hierarchy diagonalizer. Build pair x x on tape 7; check
TerminatedRegion x (malformed inputs output 0); otherwise blank the
verdict cell, build the clock regTape (g |x|) on tape 6 (clk), run the
clocked universal machine on the self-pair, and negate output cell 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The language the diagonalizer decides: inputs on which it halts with
1 at output cell 1.
Equations
Instances For
The diagonalizer's running-time bound (a closed form; see
diagTime_le_poly for the clean polynomial bound).
Equations
Instances For
The diagonalizer decides its language in time diagTime C g. For
any clock-constructibility witness (clk, C) for g ≥ 1, the machine
diagTM clk decides diagLang clk within diagTime C g steps.
The diagonal flip. On a well-formed input x whose interpreted
machine halts within the clock budget at mcF, the diagonalizer
accepts x exactly when the interpreted machine does not.
Compatibility form of diagTM_flips_of_halts. The positivity hypothesis
is not needed for the flip itself, but remains in this public signature for
callers of the original theorem.