Numbered assignments #
Exhaustive search over the assignments of the n distinct variables of a formula enumerates the
numbers i < 2 ^ n. Cslib.Logic.PL.bitsAssignment vs i gives the variable at position j of
the list vs the binary digit j of i. Every assignment of the variables of a duplicate-free
list vs is numbered by some i < 2 ^ |vs| (Cslib.Logic.PL.exists_lt_two_pow_bitsAssignment_eq),
so a formula whose variables are listed by vs is satisfiable exactly when one of the numbered
assignments satisfies it (Cslib.Logic.PL.CNF.satisfiable_iff_exists_bitsAssignment). The
distinct variables of a formula are listed by Cslib.Complexity.ThreeSAT.distinctVars, of length
Cslib.Logic.PL.CNF.numVars (Cslib.Complexity.ThreeSAT.length_distinctVars). Evaluating a
formula under a numbered assignment is polynomial-time
(Cslib.Complexity.computableTidilyInPolyTime_eval_bitsAssignment).
Main definitions #
Cslib.Logic.PL.bitsAssignment: the assignment numbered byi.
Main results #
Cslib.Logic.PL.CNF.satisfiable_iff_exists_bitsAssignment: satisfiability is a search over2 ^ |vs|numbered assignments.Cslib.Complexity.ThreeSAT.length_distinctVars: a formula hasnumVarsdistinct variables.Cslib.Complexity.computableTidilyInPolyTime_eval_bitsAssignment: evaluation under a numbered assignment is polynomial-time.
References #
The assignment numbered by i on the list of variables vs: the variable at position j of
vs takes the binary digit j of i.
Instances For
Every assignment is numbered. The assignments of the variables of a duplicate-free list
vs are the numbered assignments bitsAssignment vs i for i < 2 ^ |vs|.
Satisfiability by exhaustive search. A formula whose variables are all in the list vs is
satisfiable exactly when it is satisfied by an assignment numbered by some i < 2 ^ |vs|.
The distinct variables #
A formula has numVars distinct variables.
Polynomial time #
Evaluating a formula under the assignment numbered by i on a list of variables is
polynomial-time.