Polynomial time for the variables listed along a run #
For a fixed machine, the variables Cslib.Complexity.CookLevin.trueVars tm u w T listed along its
run are computable in polynomial time from u, w and the unary bound T
(Cslib.Complexity.CookLevin.computableInPolyTime_trueVars). Each time step reads the tracked
storage (Turing.MultiTapeTM.computableInPolyTime_trackedRun) and builds its features with the
constructor certificates of CslibFrontier.Computability.Complexity.CookLevin.Encoding; the
features
with finitely many values are selected by a finite case analysis.
Main results #
Cslib.Complexity.CookLevin.computableInPolyTime_trueFeatures: the features listed for tracked storage.Cslib.Complexity.CookLevin.computableInPolyTime_trueVars: the variables listed for a run.
theorem Cslib.Complexity.CookLevin.computableInPolyTime_trueFeatures {k : ℕ} {State : Type} [Fintype State] :
Turing.MultiTapeTM.ComputableInPolyTime
(fun (p : ℕ × Turing.FiniteCfg k Bool State × (Fin k → ℤ)) => trueFeatures p.1 p.2)
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encTrackedCfg)
(Turing.MultiTapeTM.encList encFeature)
The listed features are polynomial-time in the unary window bound and the tracked storage.
theorem Cslib.Complexity.CookLevin.computableInPolyTime_trueVars {k : ℕ} {State : Type} [Fintype State] (tm : Turing.MultiTapeTM k Bool State) :
The listed variables are polynomial-time in the input prefix u, the certificate w
and the unary bound T, for a fixed machine.