Polynomial-time CNF construction #
The clause and formula constructors used by reductions to satisfiability are polynomial-time
for any fixed encoding of their variables. Literals use encPair, and clauses and formulas use
encList. Specializing the variable encoding to binary naturals gives the encoding of SAT.
These results certify the existing constructors, including the ordered-pair implementation of exactly-one constraints. They apply to empty lists and lists with repeated variables. Relabelling requires a polynomial-time renaming function, but does not require injectivity; injectivity is needed separately when transferring satisfiability.
Main results #
Cslib.Logic.PL.Clause.computableInPolyTime_impLits,.computableTidilyInPolyTime_imp: implication clauses.Cslib.Logic.PL.Clause.computableInPolyTime_relabel,Cslib.Logic.PL.CNF.computableInPolyTime_relabel: renaming variables.Cslib.Logic.PL.CNF.computableInPolyTime_exactlyOne: exactly-one constraints.Cslib.Logic.PL.CNF.computableInPolyTime_vars: listing variable occurrences.Cslib.Logic.PL.Clause.computableInPolyTime_length,Cslib.Logic.PL.CNF.computableInPolyTime_length,Cslib.Logic.PL.CNF.computableInPolyTime_vars_length: clause, formula and variable-occurrence counts in unary.Cslib.Logic.PL.CNF.isPolyTime_compact: compact unary indices for arbitrary variable names.
References #
Negating a literal changes only its polarity.
Construct an implication from literals, with a positive conclusion.
Construct an implication from positive hypotheses and a positive conclusion.
Relabelling a clause is polynomial-time whenever the renaming function is.
Relabelling a formula is polynomial-time whenever the renaming function is.
List the variables of a formula in order, including repetitions.
The number of literals in a polynomial-time clause, in unary, is polynomial-time.
The number of clauses in a polynomial-time formula, in unary, is polynomial-time.
The number of variable occurrences in a polynomial-time formula, in unary, is polynomial-time.
Construct the clause requiring at least one listed variable to hold.
Construct the clauses forbidding two distinct listed variables from both holding. The list may contain repeated variables.
Construct exactly-one constraints in polynomial time, including for empty or repeated lists.
The entire input-dependent renaming is polynomial-time for any original variable encoding. Its output indices use unary encoding and are bounded by the input's number of occurrences.