Documentation

Complexitylib.Circuits.KCNF.Defs

Clause sets, subcubes, isolation and the PPZ decoder -- definitions #

A clause set over N variables is a finite set of clauses, each a finite set of literals (ClauseSet N). It is the set-based form of Complexity.CNF, used by the satisfiability-coding lemma of Paturi, Pudlák and Zane and by the sparsification lemma of Impagliazzo, Paturi and Zane. CNF.toClauseSet converts a CNF, preserving its semantics (CNF.eval) and not increasing its width.

Main definitions #

Literals over N variables are pairs of a variable and a polarity.

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

    There are 2 N literals over N variables.

    @[reducible, inline]

    A clause set over N variables: a finite set of clauses, each a finite set of literals. A clause is satisfied when one of its literals is true; a clause set when all its clauses are.

    Equations
    Instances For

      x satisfies every clause of ψ.

      Equations
      Instances For

        The solution set of a clause set.

        Equations
        Instances For

          The number of clauses of ψ that mention the variable v.

          Equations
          Instances For
            def Complexity.ClauseSet.neighbors {N : ℕ} (ψ : ClauseSet N) (u : Fin N) :

            The neighbours of u in the co-occurrence graph of ψ: the variables w ≠ u such that some clause of ψ mentions both u and w.

            Equations
            Instances For

              The clause set of a CNF: each clause becomes the set of its literals.

              Equations
              Instances For
                noncomputable def Complexity.ClauseSet.toCNF {N : ℕ} (ψ : ClauseSet N) :
                CNF N

                A CNF with the clauses of a clause set, listed in some order.

                Equations
                Instances For
                  def Complexity.CNF.occurrences {N : ℕ} (φ : CNF N) (v : Fin N) :

                  The number of clauses of a CNF (counted with multiplicity) that mention the variable v.

                  Equations
                  Instances For

                    x ⊕ e_T: flip the coordinates of x in T.

                    Equations
                    Instances For
                      def Complexity.ContainsSubcube {N : ℕ} (S : Set (BitString N)) (d : ℕ) :

                      S contains a subcube of dimension d: some base point a and some set J of d coordinates have a ⊕ e_T ∈ S for every T ⊆ J.

                      Equations
                      Instances For

                        The isolated directions of x in S: the coordinates i with x ⊕ e_i ∉ S.

                        Equations
                        Instances For
                          def Complexity.ClauseSet.forced {N : ℕ} (ψ : ClauseSet N) (σ : Equiv.Perm (Fin N)) (x : BitString N) :

                          The variables forced on input x for the order σ: those at which the first rule of the decoder fires when the earlier variables carry the values of x.

                          Equations
                          Instances For
                            def Complexity.ClauseSet.decodeValue {N : ℕ} (ψ : ClauseSet N) (σ : Equiv.Perm (Fin N)) (z : BitString N) (v : Fin N) (b : Bool) :

                            The value the decoder gives to v on the partial assignment z with default bit b: the polarity of a forcing literal if the first rule fires (true if some forcing literal is positive), and b otherwise.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Complexity.ClauseSet.decodeUpTo {N : ℕ} (ψ : ClauseSet N) (σ : Equiv.Perm (Fin N)) (y : BitString N) :

                              The decoder after processing the first p positions of σ: positions < p carry decoded values and the others still carry the input y.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              • ψ.decodeUpTo σ y 0 = y
                              Instances For
                                def Complexity.ClauseSet.decode {N : ℕ} (ψ : ClauseSet N) (σ : Equiv.Perm (Fin N)) (y : BitString N) :

                                The PPZ decoder for the order σ, run on the input y.

                                Equations
                                Instances For