Documentation

DescriptiveComplexity.Problems.HornSat.Unsat

Horn unsatisfiability has a short certificate #

HORNSATᶜ ∈ NP (DescriptiveComplexity.hornSat_compl_mem_NP), equivalently HORNSAT ∈ coNP: an unsatisfiable Horn formula admits a polynomial-size, first-order checkable certificate of its unsatisfiability.

This is what makes level 0 of the hierarchy behave like the levels above it. Complementing the Horn discharge turns it into the two crossing inclusions PTIME ⊆ coNP and co-PTIME ⊆ NP (DescriptiveComplexity.PTIME_subset_coNP, DescriptiveComplexity.coPTIME_subset_NP), which state closure properties of level 0 that the Horn fragment does not obviously have.

The certificate #

A Horn formula is unsatisfiable exactly when unit propagation derives the premises of some clause that has no positive literal. The certificate guesses

and checks, first-order, that

Soundness (DescriptiveComplexity.subset_of_derivClosed): in any model, T is contained in the set of true variables – by well-founded induction along ≺, using the Horn condition, which is what makes the positive literal of a satisfied clause unique and hence identifiable. The exhibited clause is then falsified, so there is no model.

Completeness: the propagation closure itself (DescriptiveComplexity.Forced, defined by its stages DescriptiveComplexity.ForcedIn) is a certificate, ordered by the stage at which a variable enters it (DescriptiveComplexity.dep). If it were not one – if every clause whose negative literals are all forced had a positive literal – then Forced would itself be a model, so the formula would be satisfiable (DescriptiveComplexity.exists_goalClause).

Unit propagation and its least model #

The stages of unit propagation: ForcedIn n x says that x is the positive literal of a clause whose negative literals are all forced in fewer than n rounds.

Equations
Instances For
    Dependency graph

    A variable is forced when some stage forces it. On a Horn formula this is the least model of the implications.

    Equations
    Instances For
      Dependency graph

      Completeness of the certificate: if the formula is unsatisfiable then some clause has no positive literal and all its negative literals forced. Otherwise the propagation closure would itself be a model.

      Dependency graph

      Soundness of the certificate: a derivation-closed set sits inside every model. The Horn condition is what makes this work – it identifies the positive literal by which a satisfied clause is satisfied.

      Dependency graph

      The propagation closure sits inside every model: the instance of DescriptiveComplexity.subset_of_derivClosed at the closure itself, ordered by its stages.

      Dependency graph

      The stages of unit propagation stabilize at the size of the universe: they form an increasing chain of subsets, so if each of the first Nat.card A steps grew strictly the last would overflow the universe. This honest bound – rather than the indefinite one of DescriptiveComplexity.exists_forcedIn_bound – is what a machine doing one propagation round per element needs.

      Dependency graph

      For a Horn instance, satisfiability is decided by the propagation closure: the CNF is satisfiable exactly when the closure, read as an assignment, satisfies every clause. This is the semantic half of the unit-propagation machine of the machine bridge: the machine computes the closure and then verifies each clause against it.

      Dependency graph

      The Σ₁ definition #

      The single existential block of the Σ₁ definition of Horn unsatisfiability: a unary relation variable (true: the derived set) and a binary one (false: the derivation order).

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

        The vocabulary of the kernel: CNF instances together with the two guessed 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 derived-set symbol in the kernel's vocabulary.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The derivation-order symbol in the kernel's vocabulary.

                  Equations
                  Instances For
                    Dependency graph

                    Realization of the kernel #

                    Horn unsatisfiability is in NP #

                    The complement of HORN-SAT is in NP.

                    Dependency graph