Documentation

DescriptiveComplexity.Problems.SatUnsat

SAT-UNSAT, the canonical DP problem #

SAT-UNSAT (Papadimitriou & Yannakakis 1984): given two CNF formulas, is the first satisfiable and the second not? It is the prototypical problem of DescriptiveComplexity.DP, the class of differences of NP problems, and it wears its DP definition on its sleeve – one half is an NP condition, the other a coNP one, and they are imposed on disjoint parts of the vocabulary.

The vocabulary #

An instance carries the two formulas side by side: Language.satPair is two copies of Language.sat, one per side. Both live on the same universe – there is no need to keep the two formulas' variables apart, since each side's clauses only mention their own occurrence relations, and a truth assignment for one side is free to do as it likes on the other side's variables.

What is here, and what is not #

The vocabulary, the semantics and isomorphism-invariance, and the three problems: DescriptiveComplexity.SATUNSAT itself together with its two halves DescriptiveComplexity.SatFirst (an NP condition) and DescriptiveComplexity.UnsatSecond (a coNP one), which are what a DP definition of it will conjoin. Satisfiability of a side is stated once, parameterized by the triple of relation symbols to read (DescriptiveComplexity.SatWith), since the two sides differ only in that.

Membership in DP (DescriptiveComplexity.satUnsat_mem_DP) is proved without writing a single new kernel: each side is projected onto a plain Language.sat instance by a one-dimensional, single-tag interpretation (DescriptiveComplexity.sideInterp), so SatFirst reduces to SAT and SatSecond does too; Σ₁-definability of the first half and Π₁-definability of the second then come from DescriptiveComplexity.sat_sigmaSODefinable by closure of the levels under FO reductions, the second after complementing the reduction.

DP-hardness is in DescriptiveComplexity.Problems.SatUnsat.Hardness (DescriptiveComplexity.satUnsat_hard_of_dpDefinable, whence DescriptiveComplexity.SATUNSAT_DP_complete): the Cook–Levin discharge of the Σ₁ half and that of the complement of the Π₁ half, run side by side into a single paired instance. The lemma below on satisfiability along a clause-covering embedding is the step it needs.

Relation symbols of the language of pairs of CNF instances: two copies of Language.satRel, one per side.

Instances For
    Dependency graph
    Dependency graph
    def FirstOrder.Language.instDecidableEqSatPairRel.decEq {a✝ : } (x✝ x✝¹ : satPairRel a✝) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph

      The relational vocabulary of pairs of CNF instances.

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

        “Is a clause of the first formula”.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          “Occurs positively in”, first formula.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            “Occurs negatively in”, first formula.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              “Is a clause of the second formula”.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                “Occurs positively in”, second formula.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  “Occurs negatively in”, second formula.

                  Equations
                  Instances For
                    Dependency graph

                    Satisfiability of one side #

                    Satisfiability of the side of the instance read by the given triple of symbols: some assignment of truth values makes every clause of that side contain a true literal. Both sides of SAT-UNSAT are instances of this.

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

                      The first formula of the pair is satisfiable: the NP half of SAT-UNSAT.

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

                        The second formula of the pair is unsatisfiable: the coNP half.

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

                          SAT-UNSAT: the first formula of the pair is satisfiable and the second is not.

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

                            Reading one side as a plain CNF instance #

                            Rather than restate SAT's Σ₁ kernel for a pair of formulas, each side is projected onto a plain Language.sat instance by a one-dimensional, single-tag interpretation. Definability of both halves is then inherited from DescriptiveComplexity.sat_sigmaSODefinable by closure under FO reductions – no new kernel, and no second copy of its realization proof.

                            The interpretation reading the side given by a triple of symbols as a plain CNF instance: same universe, the three relations renamed.

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

                              The projected instance is satisfiable exactly when that side is.

                              Dependency graph

                              Satisfiability ignores elements outside the formula #

                              The step both halves of a DP-hardness pairing will need. Pairing two reductions into one instance forces a common dimension and a common universe, so each side's formula ends up sitting inside a larger structure: the other side's points are there too, and so are the tuples the shorter side does not use. Those extra elements are not harmless by fiat, but they are harmless once they are neither clauses nor occurrences, which is what the lemma below says.

                              It is stated as transfer along an injection j that reflects the three relations, hits every clause, and hits every element occurring in a clause of its image. Elements outside the image are then pure spectators: a truth assignment may do as it likes on them.

                              Satisfiability transfers along a clause-covering embedding. The extra elements of A – those outside the image of j – are neither clauses nor occurrences, so they constrain nothing and a satisfying assignment of B extends to them arbitrarily.

                              Dependency graph

                              Membership in DP #

                              The second formula of the pair is satisfiable: the problem DescriptiveComplexity.UnsatSecond complements.

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

                                Projecting the first side is a reduction of SatFirst to SAT.

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

                                  Projecting the second side is a reduction of SatSecond to SAT.

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

                                    The first side's satisfiability is Σ₁-definable, inherited from SAT along the projection.

                                    Dependency graph
                                    Dependency graph

                                    The second side's unsatisfiability is Π₁-definable: the complement of an NP condition, the reduction complementing along with it.

                                    Dependency graph

                                    SAT-UNSAT is in DP, by its very shape: an NP condition on one side and a coNP condition on the other, imposed together.

                                    Dependency graph