Documentation

Complexitylib.Classes.Containments.Internal.SavitchBound

The step bound Savitch's recursion starts from #

⚠️ Unreviewed by Bolton

Complexitylib.Classes.Containments.Internal.ReachIn halves a step bound; this file supplies the bound to start from. A machine using polynomial space has at most 2 ^ poly configurations, so reachability is always witnessed within 2 ^ poly steps, and halving that bound bottoms out after poly levels. That is the whole reason Savitch's recursion is affordable: its depth is polynomial and each level stores one configuration, itself of polynomial size.

Main definitions #

Main results #

noncomputable def Complexity.codeExpBound (cardQ k : ) (p : Polynomial ) :

A polynomial dominating the exponent of the configuration count of a machine with cardQ states, k work tapes, and space bounded by p.

Equations
Instances For
    theorem Complexity.card_Code_le_two_pow_poly (Q : Type) [Fintype Q] (k : ) (S : ) (p : Polynomial ) (hS : ∀ (n : ), S n Polynomial.eval n p) (n : ) :

    The configuration count is 2 to a polynomial.

    theorem Complexity.NPSPACE_bounded_reachability_internal {L : Language} (hL : L NPSPACE) :
    ∃ (k : ) (tm : NTM k) (q : Polynomial ), ∀ (x : List Bool), x L ∃ (c : Cfg k tm.Q), tm.ReachesCfgLe (2 ^ Polynomial.eval x.length q) (tm.initCfg x) c tm.halted c c.output.cells 1 = Γ.one

    A language in NPSPACE is reachability within 2 ^ poly steps. This is the input to Savitch's recursion: halving the bound 2 ^ q(|x|) bottoms out after q(|x|) levels, so the recursion depth is polynomial.

    theorem Complexity.NPSPACE_subset_PSPACE_of_recursion_internal (h : ∀ (k : ) (tm : NTM k) (S : ) (L₀ : Language) (m : ) (q : Polynomial ), tm.DecidesInSpace L₀ S(BigO S fun (x : ) => x ^ m)∃ (k' : ) (M : TM k') (r : Polynomial ), (∀ (x : List Bool) (c' : Cfg k' M.Q), M.reaches (M.initCfg x) c'c'.WithinDecisionSpace x.length (Polynomial.eval x.length r)) ∀ (x : List Bool), ∃ (c' : Cfg k' M.Q), M.reaches (M.initCfg x) c' M.halted c' ((∃ (c : Cfg k tm.Q), tm.ReachesCfgLe (2 ^ Polynomial.eval x.length q) (tm.initCfg x) c tm.halted c c.output.cells 1 = Γ.one)c'.output.cells 1 = Γ.one) ((¬∃ (c : Cfg k tm.Q), tm.ReachesCfgLe (2 ^ Polynomial.eval x.length q) (tm.initCfg x) c tm.halted c c.output.cells 1 = Γ.one) → c'.output.cells 1 = Γ.zero)) :

    NPSPACE ⊆ PSPACE, reduced to the existence of one machine. The hypothesis carries the space witness for tm: without it the configuration graph is unbounded and the step bound 2 ^ q(|x|) is not enough to make the search decidable in polynomial space.