Documentation

CslibFrontier.Computability.Complexity.CookLevin.RunFeatures

The features that hold along a run #

Cslib.Complexity.CookLevin.trueVars tm u w T lists the tableau variables that the run of tm on u ++ w makes true, read off the tracked run (Turing.MultiTapeTM.trackedRun): at every time t ≤ T, the control, the positions of the input and work heads, the work cells in the window |z| ≤ T, the view of the output, the symbols read and the situation; and the certificate bits of w that are true. On every variable of the tableau, membership in this list is the assignment Cslib.Complexity.CookLevin.runAssignment read off the run (Cslib.Complexity.CookLevin.decide_mem_trueVars_eq_runAssignment). The list is built from the run by constructors only, so a polynomial-time computation of it never decodes a variable.

Main definitions #

Main results #

References #

The features with finitely many values that hold, given the control, the input symbol read, the work symbols read and the view of the output: these four, and the situation of a running configuration.

noncomputable def Cslib.Complexity.CookLevin.trueFeatures {k : ℕ} {State : Type} (T : ℕ) (c : Turing.FiniteCfg k Bool State × (Fin k → ℤ)) :

The features listed for tracked storage c, with work cells in the window |z| ≤ T.

A feature whose cell, if any, lies in the window |z| ≤ T.

On storage agreeing with a native configuration, the listed features are read off the native configuration.

theorem Cslib.Complexity.CookLevin.mem_trueFeatures_iff {k : ℕ} {State : Type} {w : List Bool} {c : Turing.FiniteCfg k Bool State × (Fin k → ℤ)} {cfg : Turing.Cfg k Bool State w} (h : Turing.MultiTapeTM.TrackedAgrees c cfg) {T : ℕ} {φ : Turing.MultiTapeTM.Feature k State} (hφ : InWindow T φ) :

Listed features hold. On storage agreeing with a native configuration, a feature with its cell in the window is listed exactly when it holds.

A basic feature has its cell, if any, in the window.

The listed variables of a run #

noncomputable def Cslib.Complexity.CookLevin.trueVars {k : ℕ} {State : Type} (tm : Turing.MultiTapeTM k Bool State) (u w : List Bool) (T : ℕ) :
List (Var k State)

The variables listed for the run of tm on u ++ w up to time T: the features listed for the tracked storage at each time t ≤ T, and the certificate bits of w that are true.

theorem Cslib.Complexity.CookLevin.decide_mem_trueVars_eq_runAssignment {k : ℕ} {State : Type} [Fintype State] [DecidableEq State] {tm : Turing.MultiTapeTM k Bool State} {u w : List Bool} {T : ℕ} {v : Var k State} (hv : Determined (u.length + w.length) w.length T v) :
decide (v ∈ trueVars tm u w T) = runAssignment tm u w v

The listed variables are the true ones on every variable that the tableau mentions (see Cslib.Complexity.CookLevin.determined_of_mem_vars_tableau).

theorem Cslib.Complexity.CookLevin.eval_tableau_trueVars {k : ℕ} {State : Type} [Fintype State] [DecidableEq State] {tm : Turing.MultiTapeTM k Bool State} {u w : List Bool} {T : ℕ} (hhalt : (Turing.MultiTapeTM.runFrom (tm.initCfg (u ++ w)) T).state = none) (hout : (Turing.MultiTapeTM.runFrom (tm.initCfg (u ++ w)) T).output = [true]) :
Logic.PL.CNF.eval (fun (v : Var k State) => decide (v ∈ trueVars tm u w T)) (tableau tm u w.length T) = true

The listed variables satisfy the tableau of an accepting run: membership in trueVars tm u w T agrees with runAssignment tm u w on every variable of the tableau.