Documentation

CslibFrontier.Computability.Complexity.FineGrained.Assignment

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.Logic.PL.CNF.distinctVars, of length Cslib.Logic.PL.CNF.numVars (Cslib.Logic.PL.CNF.length_distinctVars). Evaluating a formula under a numbered assignment is polynomial-time (Cslib.Complexity.computableInPolyTime_eval_bitsAssignment).

Main results #

References #