Documentation

Complexitylib.Classes.Hierarchy

The deterministic time hierarchy theorem (weak form) #

Arora–Barak Theorem 3.1 (weak form). If g is clock-constructible and (f(n) + n + 1)² = o(g(n)), then some language is decidable in time O((n + 1)² · (g n + 1)) but not in time O(f).

The witness is the diagonal language diagLang clk of the diagonalizer diagTM clk built from a clock-constructibility witness clk for g:

Main results #

threshold from a big-O bound

theorem Complexity.time_hierarchy_weak {f g : } (hg : TM.ClockConstructible g) (hg1 : ∀ (n : ), 1 g n) (hfg : LittleO (fun (n : ) => (f n + n + 1) ^ 2) g) :
LDTIME fun (n : ) => (n + 1) ^ 2 * (g n + 1), LDTIME f

The deterministic time hierarchy theorem (weak form, AB Theorem 3.1). For clock-constructible g ≥ 1 with (f n + n + 1)² = o(g n), there is a language decidable in time O((n + 1)² · (g n + 1)) but not in time O(f). The (·)² slack absorbs the single-tape reduction; the (n + 1)² factor is the universal machine's per-step cost.

theorem Complexity.time_hierarchy_weak_ssubset {f g : } (hg : TM.ClockConstructible g) (hg1 : ∀ (n : ), 1 g n) (hfg : LittleO (fun (n : ) => (f n + n + 1) ^ 2) g) :
DTIME f DTIME fun (n : ) => (n + 1) ^ 2 * (g n + 1)

The time hierarchy theorem as a strict inclusion: DTIME f ⊂ DTIME ((n + 1)² · (g n + 1)) under the same hypotheses.

theorem Complexity.DTIME_pow_ssubset (a : ) (ha : 1 a) :
(DTIME fun (n : ) => (n + 1) ^ a) DTIME fun (n : ) => (n + 1) ^ (2 * a + 5)

Polynomial time hierarchy: DTIME((n+1)^a) ⊂ DTIME((n+1)^(2a+5)) for every a ≥ 1. Instantiates the hierarchy theorem at the clock-constructible bound g = (n+1)^(2a+3).