Documentation

DescriptiveComplexity.Problems.Qbf.Membership

QBF is second-order definable #

The membership half of the completeness of DescriptiveComplexity.QBF: a quantified Boolean formula problem with k alternating blocks is Σₖ-definable when its prefix starts existentially, and Πₖ-definable when it starts universally (DescriptiveComplexity.qbfProblem_sigmaSODefinable, DescriptiveComplexity.qbfProblem_piSODefinable).

The second-order prefix is k monadic blocks (DescriptiveComplexity.unaryBlock: one unary relation variable each), one per quantifier block of the formula, and the first-order kernel simply evaluates the matrix: it says that every clause contains a true literal (or, for a disjunctive matrix, that some term has all its literals true), reading the truth value of a variable off the relation variable of a block marking it. No Tseitin translation is involved here – the matrix is already part of the input structure, so evaluating it is first-order.

The blocks are handled through DescriptiveComplexity.SecondOrderMerge: the kernel is written over the single merged block, where the relation variable of block i is the symbol DescriptiveComplexity.blockSym k i, and DescriptiveComplexity.sorealize_unmerge transports it into the iterated block expansion while turning the alternating second-order quantification into DescriptiveComplexity.altQuant.

The monadic blocks of a quantifier prefix #

@[reducible]

The second-order block of a single propositional quantifier: one unary relation variable, the truth assignment of one block of variables.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The quantifier prefix of QBF k: k monadic blocks.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      @[reducible, inline]

      The single block merging the whole prefix of QBF k.

      Equations
      Instances For
        Dependency graph

        The relation symbol of the truth assignment of block i, in the merged block's vocabulary.

        Equations
        Instances For
          Dependency graph
          def DescriptiveComplexity.repAssign (A : Type) (k : ) :
          (Fin kAProp)(qbfMergedBlock k).Assignment A

          The assignment of the merged block determined by k truth assignments.

          Equations
          Instances For
            Dependency graph
            theorem DescriptiveComplexity.repAssign_blockSym {A : Type} (k : ) (νs : Fin kAProp) (i : Fin k) (x : A) :

            Reading back the truth assignment of block i from the merged assignment.

            Dependency graph

            The prefix quantifies the components of the merged assignment #

            theorem DescriptiveComplexity.altAssign_qbfBlocks {A : Type} (k : ) (P : (qbfMergedBlock k).Assignment AProp) (pol : Bool) :
            altAssign A (qbfBlocks k) P pol altQuant A k (fun (νs : Fin kAProp) => P (repAssign A k νs)) pol

            Alternating quantification over the components of the merged assignment of a monadic prefix is alternating quantification over k truth assignments.

            Dependency graph

            The first-order kernel #

            @[reducible, inline]

            The vocabulary of the kernel: quantified CNF instances together with the k truth-assignment relation variables.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              The symbol for “is a clause” in the kernel's vocabulary.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The symbol for “occurs positively in” in the kernel's vocabulary.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The symbol for “occurs negatively in” in the kernel's vocabulary.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The block mark of block i in the kernel's vocabulary.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]

                      The truth-assignment variable of block i in the kernel's vocabulary.

                      Equations
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.qbfValF (k : ) {γ : Type} (x : γ) :

                        The truth value of the variable x, as a formula: some block marking x assigns it the value true.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Dependency graph
                          @[instance_reducible]

                          The interpretation of the kernel's vocabulary determined by k truth assignments.

                          Equations
                          Instances For
                            Dependency graph
                            theorem DescriptiveComplexity.relMap_qNuSym {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] (νs : Fin kAProp) (i : Fin k) (w : Fin 1A) :

                            The truth-assignment variables are read as the truth assignments.

                            Dependency graph
                            theorem DescriptiveComplexity.realize_qbfValF {k : } {A : Type} [(FirstOrder.Language.qbf k).Structure A] (νs : Fin kAProp) {γ : Type} (x : γ) (v : γA) :
                            (qbfValF k x).Realize v qbfVal νs (v x)
                            Dependency graph

                            The kernel for a conjunctive matrix: every clause contains a true literal.

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

                              The kernel for a disjunctive matrix: some term has all its literals true.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Dependency graph
                                noncomputable def DescriptiveComplexity.qbfKernel (k : ) (cnf : Bool) :

                                The kernel of the Σₖ/Πₖ definition of a quantified Boolean formula problem, for either shape of matrix.

                                Equations
                                Instances For
                                  Dependency graph
                                  theorem DescriptiveComplexity.realize_qbfKernel (k : ) (cnf : Bool) {A : Type} [(FirstOrder.Language.qbf k).Structure A] (νs : Fin kAProp) :
                                  A qbfKernel k cnf QbfMatrix cnf νs

                                  The kernel defines the matrix: under the interpretation of the relation variables by k truth assignments, the kernel says exactly that the matrix is satisfied.

                                  Dependency graph

                                  Membership #

                                  QBF with an existential outermost block is Σₖ-definable: quantify the k truth assignments as monadic second-order variables, and evaluate the matrix in first-order logic.

                                  Dependency graph

                                  QBF with a universal outermost block is Πₖ-definable.

                                  Dependency graph