Documentation

CslibFrontier.Computability.Complexity.Problems.SAT.Relation

SAT as an NP relation #

Cslib.Complexity.SAT.npRelation is the NP relation of SAT: a certificate for a formula φ has the length of the encoded formula and lists the values of the variables in order of first occurrence (Cslib.Complexity.SAT.assignment). Its language is SAT.

Witness maps into SAT build certificates from assignments. If the formula is a relabelling ψ.relabel f along an injective f, an assignment σ of the variables of ψ is described by the values ψ.vars.map σ, read along the occurrences of ψ itself, followed by padding (Cslib.Complexity.SAT.padCertificate); no inverse of f is needed (Cslib.Complexity.SAT.verifier_relabel_vars_map_append). This is how the explicit witness maps of the Levin reductions to SAT and ThreeSAT are written.

Main definitions #

Main results #

References #

The NP relation of SAT: certificates as long as the encoded formula, checked by Cslib.Complexity.SAT.verifier.

The language of the NP relation of SAT is SAT.

Certificates from assignments #

A certificate prefix u for φ, padded on the right with false to the length of the encoded formula.

theorem Cslib.Complexity.SAT.assignment_relabel_vars_map_append {V : Type u_1} {f : V → ℕ} (hf : Function.Injective f) (ψ : Logic.PL.CNF V) (σ : V → Bool) (v : List Bool) {x : V} (hx : x ∈ ψ.vars) :
assignment (Logic.PL.CNF.relabel f ψ) (List.map σ ψ.vars ++ v) (f x) = σ x

Read along the occurrences of ψ.relabel f, for an injective f, the values of σ listed along the occurrences of ψ describe σ: the certificate assignment at f x is σ x.

The verifier of SAT, on ψ.relabel f for an injective f and the values of σ along the occurrences of ψ followed by any bits, evaluates ψ under σ.

An assignment σ satisfying ψ gives a witness for ψ.relabel f, for an injective f: its values along the occurrences of ψ, padded.

An assignment σ satisfying φ gives a witness for φ: its values along the occurrences of φ, padded.

The assignment described by a witness satisfies the formula.