Documentation

DescriptiveComplexity.Problems.TwoSat.Membership

2SAT is SO-Krom definable, hence in NL #

The membership half of the completeness of 2SAT for DescriptiveComplexity.NL: a Krom program (DescriptiveComplexity.TwoSatKrom.twoSatProgram) whose satisfying assignments are exactly the satisfying truth assignments of a width-two CNF structure, so DescriptiveComplexity.twoSat_mem_NL.

The program is the natural one, and it shows what the guards of the Krom fragment buy. Guess the truth assignment as the single unary relation variable of DescriptiveComplexity.satAssignBlock, universally quantify three first-order variables c, x, y, and emit:

Correctness rests on DescriptiveComplexity.exists_covering_pair: under the width bound, a clause with an occurrence has two signed occurrences covering all of them, which is exactly the shape a single 2-clause can speak about.

The atoms and the guards #

The atom “the guessed truth assignment holds of the p-th universally quantified variable”.

Equations
Instances For
    Dependency graph

    The literal of the occurrence with sign s at the p-th variable: the truth assignment must make it true.

    Equations
    Instances For
      Dependency graph

      The covering condition, as a formula over the ordered expansion: every occurrence of the clause 0 is the occurrence (1, s) or the occurrence (2, u).

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

        The guard of the two-literal clause of the program: 0 is a clause whose occurrences are exactly (1, s) and (2, u).

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

          Realization of the guards #

          The program #

          Assignments on both sides #

          The block assignment induced by a truth assignment.

          Equations
          Instances For
            Dependency graph

            The truth assignment induced by a block assignment.

            Equations
            Instances For
              Dependency graph
              theorem DescriptiveComplexity.TwoSatKrom.nuLit_holds_ofTruth {A : Type} (ν : A → Prop) (p : Fin 3) (s : Bool) (v : Fin 3 → A) :
              (nuLit p s).Holds (ofTruth ν) v ↔ SatOcc.LitTrue ν (v p) s
              Dependency graph
              theorem DescriptiveComplexity.TwoSatKrom.nuLit_holds_toTruth {A : Type} (ρ : satAssignBlock.Assignment A) (p : Fin 3) (s : Bool) (v : Fin 3 → A) :
              (nuLit p s).Holds ρ v ↔ SatOcc.LitTrue (toTruth ρ) (v p) s
              Dependency graph

              The program holds of a satisfying truth assignment #

              2SAT is SO-Krom definable #

              2SAT is SO-Krom definable: guess the truth assignment, and let the guards do the rest – one 2-clause per clause of the input (read through a covering pair of occurrences), one goal clause for empty clauses and one for a violated width promise. Since NL is defined as SO-Krom definability, this is the statement TwoSAT ∈ NL.

              Dependency graph
              Dependency graph