Documentation

Complexitylib.SAT.Tseitin.Internal.FunctionSemantics

Total-function semantics for Tseitin splitting #

The public SAT semantics use finite Boolean lists, with out-of-range variables defaulting to false. Fresh-variable arguments are simpler with total assignments ℕ → Bool, since a fresh variable can be set with Function.update without changing any earlier variable.

This internal module defines total-assignment evaluation for literals, clauses, and CNFs. It relates that evaluation to the existing list semantics, proves the two satisfiability notions equivalent, and records the congruence and update lemmas used by the recursive Tseitin correctness proof.

@[reducible, inline]

A total Boolean assignment, used internally while choosing fresh variables.

Equations
Instances For
    @[inline]

    Evaluate a literal under a total assignment.

    Equations
    Instances For
      @[simp]

      Total evaluation through the Assignment.get view of a finite assignment agrees with the public list semantics.

      @[simp]

      Negating a literal complements its value under a total assignment.

      @[simp]

      A positive literal evaluates to the value of its variable.

      @[simp]

      A negative literal evaluates to the complement of its variable.

      theorem Complexity.SAT.Lit.evalTotal_eq_of_agree_internal {α β : TotalAssignment} ( : Lit) (h : α .var = β .var) :
      evalTotal α = evalTotal β

      A literal has the same value under assignments that agree at its variable.

      @[inline]

      Evaluate a clause under a total assignment.

      Equations
      Instances For
        @[simp]

        Total evaluation through the Assignment.get view of a finite assignment agrees with the public list semantics.

        theorem Complexity.SAT.Clause.evalTotal_eq_of_agree_internal {α β : TotalAssignment} (c : Clause) (h : c, α .var = β .var) :

        Clause evaluation is invariant when assignments agree on every occurring variable.

        @[inline]

        Evaluate a CNF under a total assignment.

        Equations
        Instances For

          A CNF is satisfiable by a total Boolean assignment.

          Equations
          Instances For
            @[simp]

            Total evaluation through the Assignment.get view of a finite assignment agrees with the public list semantics.

            theorem Complexity.SAT.CNF.evalTotal_eq_of_agree_internal {α β : TotalAssignment} (φ : CNF) (h : cφ, c, α .var = β .var) :
            evalTotal α φ = evalTotal β φ

            CNF evaluation is invariant when assignments agree on every occurring variable.

            Updating a total assignment sets the selected variable to the new value.

            theorem Complexity.SAT.TotalAssignment.update_of_ne_internal (α : TotalAssignment) {fresh i : } (b : Bool) (h : fresh i) :
            Function.update α fresh b i = α i

            Updating one variable leaves every distinct variable unchanged.

            theorem Complexity.SAT.TotalAssignment.update_of_lt_internal (α : TotalAssignment) (fresh i : ) (b : Bool) (h : i < fresh) :
            Function.update α fresh b i = α i

            Updating a total assignment at fresh leaves every smaller variable unchanged.

            theorem Complexity.SAT.Lit.evalTotal_update_of_var_lt_internal (α : TotalAssignment) (fresh : ) (b : Bool) ( : Lit) (h : .var < fresh) :
            evalTotal (Function.update α fresh b) = evalTotal α

            Updating a later variable preserves a literal's value.

            Updating a variable above a clause's maximum variable preserves its value.

            theorem Complexity.SAT.CNF.evalTotal_update_of_maxVar_lt_internal (α : TotalAssignment) (fresh : ) (b : Bool) (φ : CNF) (h : φ.maxVar < fresh) :
            evalTotal (Function.update α fresh b) φ = evalTotal α φ

            Updating a variable above a CNF's maximum variable preserves its value.

            List satisfiability is equivalent to satisfiability by a total Boolean function.