Documentation

Complexitylib.Models.TuringMachine.UTM.HierarchySupport

Support lemmas for the time-hierarchy theorem #

Four self-contained ingredients used by the diagonalization argument:

groupPairs consumes two bits per emitted symbol (a trailing odd bit is dropped), so its output is at most half as long as its input.

The per-iteration cost of the UTM's simulate/halt-test loop is quadratic in the description length, with explicit constant 240.

theorem Complexity.LittleO.nat_mul_le {f g : } (h : LittleO f g) (C : ) :
∃ (N : ), ∀ (n : ), N nC * f n g n

A little-o hypothesis beats every constant multiple eventually: from f = o(g) extract, for any scale C : ℕ, a threshold N past which C * f n ≤ g n pointwise over .

theorem Complexity.TM.halt_or_run_dichotomy {k : } (tm : TM k) (c₀ : Cfg k tm.Q) (V : ) :
(∃ (T : ) (c : Cfg k tm.Q), T V tm.reachesIn T c₀ c tm.halted c) ∃ (c : Cfg k tm.Q), tm.reachesIn V c₀ c ¬tm.halted c

Run dichotomy: from any configuration, a deterministic machine either halts within V steps or reaches a non-halted configuration in exactly V steps.