Documentation

CslibFrontier.Computability.Complexity.Problems.TMSAT

TMSAT is NP-complete #

TMSAT Arora and Barak, draft, Theorem 2.9 is the set of instances ⟨α, x, 1ⁿ, 1ᵗ⟩ (Cslib.Complexity.TMSATInstance) such that some witness u of exactly n bits makes the machine described by α accept the pair ⟨x, u⟩ within t steps.

Membership in NP (Cslib.Complexity.TMSAT.mem_NP): the verifier reads the first n bits of a certificate of length |enc a|, which is at least n as the witness length is written in unary, and runs the interpreter for t steps, which is polynomial in the instance with t in unary (Turing.MultiTapeTM.Universal.computableInPolyTime_universal).

Hardness (Cslib.Complexity.TMSAT.npHard): a problem in NP enc has a verifier computed by a machine within time c (n + 1) ^ d on inputs of length n, with certificates of length p |enc a|. The instance a maps to the description of that machine, the input enc a, the witness length p |enc a| and the step bound c (2 |enc a| + p |enc a| + 2) ^ d, which bounds the running time on every certificate of the prescribed length.

Main definitions #

Main results #

References #

An instance ⟨α, x, 1ⁿ, 1ᵗ⟩ of Cslib.Complexity.TMSAT Arora and Barak, draft, Theorem 2.9.

theorem Cslib.Complexity.encTMSATInstance_steps_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → TMSATInstance} :

Encoding of TMSATInstance as the tuple of the description, the input bits, and the witness length and the step bound in unary.

theorem Cslib.Complexity.encTMSATInstance_machine_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → TMSATInstance} :
theorem Cslib.Complexity.encTMSATInstance_witnessLength_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → TMSATInstance} :
theorem Cslib.Complexity.encTMSATInstance_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Turing.MultiTapeTM.Universal.Desc} {T0 S0 : γ → ℕ} {x1 : γ → List Bool} {T1 S1 x2 T2 S2 x3 T3 S3 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.Universal.eDesc T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encBits T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn Turing.MultiTapeTM.encUnary T2 S2) (h3 : Turing.MultiTapeTM.ComputableInO x3 encIn Turing.MultiTapeTM.encUnary T3 S3) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { machine := x0 x, input := x1 x, witnessLength := x2 x, steps := x3 x }) encIn encTMSATInstance (fun (x : γ) => T0 x + (T1 x + (T2 x + T3 x))) fun (x : γ) => S0 x + (S1 x + (S2 x + S3 x))
theorem Cslib.Complexity.encTMSATInstance_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Turing.MultiTapeTM.Universal.Desc} {x1 : γ → List Bool} {x2 x3 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.Universal.eDesc budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encBits budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn Turing.MultiTapeTM.encUnary budget) (h3 : Turing.MultiTapeTM.ComputableInSpace x3 encIn Turing.MultiTapeTM.encUnary budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { machine := x0 x, input := x1 x, witnessLength := x2 x, steps := x3 x }) encIn encTMSATInstance budget
theorem Cslib.Complexity.encTMSATInstance_input_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → TMSATInstance} :

The witness u makes the machine of a accept ⟨a.input, u⟩ = frame a.input ++ u: run by the universal interpreter for a.steps steps, it has halted with the output [true].

Instances For
    @[instance_reducible]

    Acceptance on the description of a machine: the machine, run on ⟨x, u⟩ for t steps, has halted with output [true].

    Deciding whether inst x accepts w x is computable in polynomial time whenever inst and w are.

    TMSAT Arora and Barak, draft, Theorem 2.9: the instances ⟨α, x, 1ⁿ, 1ᵗ⟩ for which some witness u of exactly n bits makes the machine described by α accept ⟨x, u⟩ within t steps.

    Membership in NP #

    The verifier of TMSAT: run the machine on ⟨x, u⟩, where u is the first n bits of the certificate.

    The witness length is at most the length of the encoded instance, since it is written in unary.

    TMSAT.verifier verifies TMSAT with certificates as long as the encoded instance.

    Hardness #

    The step bound of the reduction, c (2 m + p m + 2) ^ d for an instance of encoded length m, as a polynomial in m.

    For a polynomial-time pair verifier V on encPair enc encBits, a block-length polynomial p and block count k, construct a polynomial-time map f : α → TMSATInstance with (f a).witnessLength = p.eval (enc a).length whose step bound suffices to simulate V (a, w) on every word w of length k * p.eval (enc a).length.

    TMSAT is NP-hard: every problem in NP, with any encoding of its instances, reduces to it in polynomial time through a machine computing its verifier.