Documentation

Trestle.Encode.Cardinality.GeneralEncs

def Trestle.Encode.Cardinality.naiveLtK.cond {ν : Type} (cond : Clause (Literal ν)) (k : ) (lits : Array (Literal ν)) :
VEncCNF ν Unit ((fun (τ : Model.PropAssignment ν) => τ cond.toPropFun) lessThan k lits.toList)

Conditional, naive less-than-k encoding, using (n choose k) clauses. This is identical to naiveLtK, but accepts an array of literals to be prepended to every clause.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Trestle.Encode.Cardinality.naiveLtK {ν : Type} (k : ) (lits : Array (Literal ν)) :
    VEncCNF ν Unit (lessThan k lits.toList)

    Naive less-than-k encoding, using (n choose k) clauses.

    Equations
    Instances For
      def Trestle.Encode.Cardinality.naiveAtLeastK.cond {ν : Type} (cond : Clause (Literal ν)) (k : ) (lits : Array (Literal ν)) :
      VEncCNF ν Unit ((fun (τ : Model.PropAssignment ν) => τ cond.toPropFun) atLeast k lits.toList)

      Conditional, naive at-least-k encoding

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Conditional, naive at-least-k encoding

        Equations
        Instances For
          @[inline]

          Trivial at least one encoding (just a single clause)

          Equations
          Instances For