Documentation

CslibFrontier.Logics.Propositional.CNF.PolyTime

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 (Cslib.Logic.PL.encClause, Cslib.Logic.PL.encCNFOver). 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 definitions #

Main results #

References #

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.

Listing the distinct variables of a formula in order of first occurrence is polynomial-time.

The number of distinct variables of a formula, in unary, is polynomial-time.

Encoding of a literal occurrence: unary clause and position indices with an encoded literal.

Instances For

    Enumerating the literal occurrences of a CNF formula is polynomial-time.

    Evaluating a computed literal is polynomial-time under an assignment that is polynomial-time in the input and the variable. The literal's certificate comes first, so that it fixes the variable encoding before fun_prop certifies the assignment.

    theorem Cslib.Logic.PL.Clause.computableInPolyTime_eval {V : Type} {encV : V ↪ List Bool} {α : Type} {input : α ↪ List Bool} {σ : α → V → Bool} {c : α → Clause V} (hc : Turing.MultiTapeTM.ComputableInPolyTime c input (encClause encV)) (hσ : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : α × V) => σ p.1 p.2) (Turing.MultiTapeTM.encPair input encV) Turing.MultiTapeTM.encBool) :

    Evaluating a computed clause is polynomial-time under an assignment that is polynomial-time in the input and the variable.

    theorem Cslib.Logic.PL.CNF.computableInPolyTime_eval {V : Type} {encV : V ↪ List Bool} {α : Type} {input : α ↪ List Bool} {σ : α → V → Bool} {φ : α → CNF V} (hφ : Turing.MultiTapeTM.ComputableInPolyTime φ input (encCNFOver encV)) (hσ : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : α × V) => σ p.1 p.2) (Turing.MultiTapeTM.encPair input encV) Turing.MultiTapeTM.encBool) :

    Evaluating a computed formula is polynomial-time under an assignment that is polynomial-time in the input and the variable.

    Evaluating a formula under the assignment numbered by i on a list of variables 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.