Documentation

Complexitylib.SAT.ThreeSAT

Encoded CNF-SAT and 3SAT languages #

This module names the existing encoded SAT problem as CNFSAT and defines ThreeSAT by restricting decoded CNFs to clauses of exactly three literals. It is a semantic and codec interface only; no complexity-class membership or reduction claim is made here.

Main definitions and results #

Decode a concrete SAT bit string and accept it only when every decoded clause contains exactly three literals.

Equations
Instances For
    @[simp]

    An exact 3-CNF survives encoding followed by restricted decoding.

    theorem Complexity.SAT.CNF.decode3?_sound {z : List Bool} {φ : CNF} (h : decode3? z = some φ) :
    z = φ.encode φ.Is3CNF

    Restricted decoding is sound for both the concrete encoding and the exact-three-literal shape.

    Characterization of successful exact-3 decoding.

    The concrete CNF encoding is injective.

    CNF-SAT compatibility surface #

    @[reducible, inline]

    Compatibility name for the library's existing SAT language, whose inputs are concrete encodings of satisfiable CNF formulas.

    Equations
    Instances For

      The compatibility name denotes exactly the existing SAT language.

      @[simp]

      Membership through the compatibility name is definitionally the existing SAT membership predicate.

      A bit string is in CNF-SAT exactly when it decodes to a satisfiable CNF.

      @[simp]

      Encoding a typed CNF is in CNF-SAT exactly when that formula is satisfiable.

      3SAT #

      3SAT consists of concrete encodings of satisfiable CNFs in which every clause has exactly three literals.

      Equations
      Instances For

        A bit string is in 3SAT exactly when restricted decoding succeeds with a satisfiable formula.

        @[simp]

        Encoding a typed CNF belongs to 3SAT exactly when it is an exact 3-CNF and is satisfiable.

        Every 3SAT instance is, after forgetting the shape restriction, a CNF-SAT instance.

        A fixed unsatisfiable exact 3-CNF: one clause forces x₀, while the other forces ¬x₀. Repeated literals make both clauses have width exactly three.

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

          falseFormula has exactly three literals in each clause.

          A valid encoded 3-CNF no-instance suitable as the target of malformed or otherwise invalid source inputs in later total reductions.

          Equations
          Instances For

            The fallback encoding is not a member of 3SAT.