Documentation

CslibFrontier.Computability.PolyTime.CSP.ToCNF

Polynomial-time forbidden-pattern compilation of Boolean CSPs #

The existing width-guarded compiler Cslib.Logic.PL.CSP.toCNFBounded is polynomial-time for fixed width when its finite relation tables can be evaluated in polynomial time. These certificates serve both exact counting and approximation-preserving reductions.

Main definitions #

Main results #

@[reducible, inline]
abbrev Cslib.Complexity.encConstraint {Rel V : Type} (encRel : Rel ↪ List Bool) (encV : V ↪ List Bool) :

Binary encoding of a constraint (R, vs) : Constraint Rel V.

Instances For
    @[reducible, inline]
    abbrev Cslib.Complexity.encCSP {Rel V : Type} (encRel : Rel ↪ List Bool) (encV : V ↪ List Bool) :

    Binary encoding of a CSP instance F : CSP Rel V.

    Instances For

      Width-guarded compilation of a Boolean CSP instance to a k-CNF formula is computable in polynomial time whenever fun R => sem R w is computable in polynomial time for each bit pattern w of length at most k.

      Width-guarded compilation of a Boolean CSP instance to a k-CNF formula is computable in polynomial time whenever sem is computable in polynomial time.

      Width-guarded compilation of a Boolean CSP instance to a k-CNF formula is computable in polynomial time for any finite relation alphabet Rel.