Documentation

DescriptiveComplexity.Problems.Sat.CountingCompare

SelMajSAT and SelEqSAT: complete problems for PP and C₌P #

A CNF formula with a selected variable (FirstOrder.Language.satSel), and the two counts of its models by the value of that variable (DescriptiveComplexity.SharpSelSAT true, DescriptiveComplexity.SharpSelSAT false), both in #P. The two decision problems comparing them:

Hardness is one construction for both: a problem of either class compares the witness counts of two kernels; the pair kernel of DescriptiveComplexity.Counting.KernelPair puts them in one kernel with a selector, the parsimonious Tseitin interpretation turns it into a CNF formula whose models are its witnesses, and the selected variable is the one of the selector (DescriptiveComplexity.PairSel.pairTseitinInterp). The models in which the selected variable is true are then the witnesses of the first kernel, and the others those of the second.

@[reducible, inline]

sel x: the variable x is selected.

Equations
Instances For
    Dependency graph

    The relation symbols of the language.

    Instances For
      Dependency graph
      Dependency graph

      The symbol selecting a variable.

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

        The relational language of CNF formulas with a selected variable.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          “Is selected”, in the vocabulary of CNF formulas with a selected variable.

          Equations
          Instances For
            Dependency graph
            Dependency graph

            The forgetful isomorphism of the underlying CNF formulas.

            Equations
            Instances For
              Dependency graph

              The two counts #

              A model of the formula in which every selected variable has the value b.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The vocabulary of the kernel: CNF formulas with a selected variable, and the truth-assignment variable.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  “Is selected”, in the kernel's vocabulary.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The truth-assignment symbol in the kernel's vocabulary.

                    Equations
                    Instances For
                      Dependency graph
                      Dependency graph

                      The kernel: a model of the formula, in which every selected variable has the value b.

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

                        The number of models of a CNF formula in which the selected variable has the value b.

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

                          The two problems #

                          SelMajSAT: the selected variable is true in more models than it is false.

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

                            SelEqSAT: the selected variable is true in exactly as many models as it is false.

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

                              Hardness: the Tseitin formula of a pair kernel, with the selector #

                              selected

                              @[reducible, inline]

                              The selector of the pair block.

                              Equations
                              Instances For
                                Dependency graph
                                @[reducible, inline]

                                The block and the kernel of the pair, abbreviated.

                                Equations
                                Instances For
                                  Dependency graph
                                  @[reducible, inline]
                                  noncomputable abbrev DescriptiveComplexity.PairSel.PK {L : FirstOrder.Language} (B B' : SOBlock) (φ : (L.sum B.lang).Sentence) (φ' : (L.sum B'.lang).Sentence) :
                                  (L.sum (PB B B').lang).Sentence

                                  The pair kernel, abbreviated.

                                  Equations
                                  Instances For
                                    Dependency graph

                                    The Tseitin formula of the pair kernel, with the selector's variable selected.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Dependency graph
                                      def DescriptiveComplexity.PairSel.satEquiv {L : FirstOrder.Language} {B B' : SOBlock} {φ : (L.sum B.lang).Sentence} {φ' : (L.sum B'.lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] :
                                      FirstOrder.Language.sat.Equiv ((pairTseitinInterp B B' φ φ').Map A) ((sharpTseitinInterp (PB B B') (PK B B' φ φ')).Map A)

                                      The underlying CNF formula is the parsimonious Tseitin formula.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        theorem DescriptiveComplexity.PairSel.sharpSelSat_eq {L : FirstOrder.Language} {B B' : SOBlock} {φ : (L.sum B.lang).Sentence} {φ' : (L.sum B'.lang).Sentence} {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (b : Bool) :
                                        (SharpSelSAT b).Count ((pairTseitinInterp B B' φ φ').Map A) = Nat.card { w : Witness (PB B B') (PK B B' φ φ') A // pairSel ↑w ↔ b = true }

                                        The models with the selected variable at b are the witnesses of the pair kernel whose selector is b. Registered in the Lax archive as Lax175070.CountingValues.sharpSelSat_eq.

                                        Dependency graph
                                        Dependency graph
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.CountDefinable.orderedReduction_sel {L : FirstOrder.Language} [L.IsRelational] (R : ℕ → ℕ → Prop) {P : DecisionProblem L} (B : SOBlock) (φ : ((L.sum FirstOrder.Language.order).sum B.lang).Sentence) (B' : SOBlock) (φ' : ((L.sum FirstOrder.Language.order).sum B'.lang).Sentence) (h : ∀ (A : Type) [inst : L.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A], P.Holds A ↔ R (witnessCount B φ A) (witnessCount B' φ' A)) :
                                        OrderedFOReduction P { Holds := fun (A : Type) (inst : FirstOrder.Language.satSel.Structure A) => R ((SharpSelSAT true).Count A) ((SharpSelSAT false).Count A), iso_invariant := ⋯ }

                                        Every problem defined by a relation between two witness counts reduces to the comparison of the two counts of a CNF formula by its selected variable.

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