Documentation

CslibFrontier.Computability.Complexity.Problems.SAT.Paddable

Paddability of SAT and its variants #

SAT, ThreeSAT, ExactThreeSAT and NAEThreeSAT are paddable: prepend the clause [(N, true), (N, false), (N, true)], where N is the natural number whose little-endian binary digits are y ++ [true]. The clause contains both literals of N, so it is true, and has both a true and a false literal, under every assignment, and it has exactly three literals. Padding thus preserves satisfiability, not-all-equal satisfiability, and every clause-width condition met by a width-three clause. The padding y is read back from the binary digits of the first variable.

By the Berman–Hartmanis theorem for paddable languages (Cslib.Complexity.NPComplete.polyTimeIsomorphic_of_paddable), these four NP-complete languages are pairwise polynomial-time isomorphic, under the common encoding Cslib.Complexity.encCNF.

Source and adaptations #

The source version is the 1975 Cornell technical report Berman and Hartmanis. Locators in this file refer to that report; the numbering of the 1977 journal version Berman and Hartmanis has not been checked. The corresponding source is the report's Theorem 7 and its CNF padding construction (printed pp. 13–14); the isomorphisms also use §III, Theorem 1 and Lemmas 3 and 5 (printed pp. 7–12), through Cslib.Complexity.NPComplete.polyTimeIsomorphic_of_paddable.

The padding gadget here is not the report's. The report's CNF construction pads with clauses over fresh variables. The gadget here adds a single clause over one variable N, and the padding is the binary representation of N. The variable need not be fresh, because the clause is true under every assignment whether or not N occurs elsewhere in the formula. Keeping the gadget one width-three clause with a true and a false literal also lets it serve ThreeSAT, ExactThreeSAT and NAEThreeSAT, not only SAT. The decoder needed by the isomorphism theorems is Cslib.Complexity.cnfDecoder.

Main definitions #

Main results #

References #

The tautological width-three clause recording the bit string y in its variable.

Pad a formula with the bit string y, by prepending a tautological width-three clause.

Read back the padding: the binary digits of the first variable, without the final true.

unpad inverts pad in the padding argument.

The padding clause is true under every assignment.

Padding preserves the value of a formula under every assignment.

Padding preserves not-all-equal evaluation under every assignment.

Padding preserves satisfiability.

Padding preserves not-all-equal satisfiability.

theorem Cslib.Complexity.SAT.forall_clause_pad {p : Logic.PL.Clause ℕ → Prop} (hp : ∀ (c : Logic.PL.Clause ℕ), List.length c = 3 → p c) (φ : Logic.PL.CNF ℕ) (y : List Bool) :
(∀ c ∈ pad φ y, p c) ↔ ∀ c ∈ φ, p c

A clause condition met by width-three clauses holds for every clause of a padded formula exactly when it holds for every clause of the formula.

A formula language invariant under padding is paddable.

SAT is paddable. Compare Berman and Hartmanis, Theorem 7 and its CNF construction; SAT.pad replaces the report's fresh-variable gadget by a single clause.

An NP-complete language, over an instance type with a total polynomial-time decoder, is polynomial-time isomorphic to SAT exactly when it is paddable: the reverse direction is Berman and Hartmanis, §III, Theorem 1 combined with Lemmas 3 and 5, applied to SAT_paddable, and the forward direction is derived here (see Cslib.Complexity.NPComplete.polyTimeIsomorphic_iff_paddable). The Berman–Hartmanis conjecture therefore says, over such instance types, that every NP-complete language is paddable.

SAT and ThreeSAT are polynomial-time isomorphic (Berman and Hartmanis, §III, Theorem 1 and Lemmas 3 and 5, with the paddability of both languages from SAT.pad).

SAT and ExactThreeSAT are polynomial-time isomorphic (Berman and Hartmanis, §III, Theorem 1 and Lemmas 3 and 5, with the paddability of both languages from SAT.pad).

SAT and NAEThreeSAT are polynomial-time isomorphic (Berman and Hartmanis, §III, Theorem 1 and Lemmas 3 and 5, with the paddability of both languages from SAT.pad).