Documentation

Std.Sat.CNF.Basic

@[reducible, inline]
abbrev Std.Sat.CNF.Clause (α : Type u) :

A clause in a CNF.

The literal (i, b) is satisfied if the assignment to i agrees with b.

Equations
Instances For
    @[reducible, inline]
    abbrev Std.Sat.CNF (α : Type u) :

    A CNF formula.

    Literals are identified by members of α.

    Equations
    Instances For
      def Std.Sat.CNF.Clause.eval {α : Type u_1} (a : αBool) (c : Clause α) :

      Evaluating a Clause with respect to an assignment a.

      Equations
      Instances For
        @[simp]
        theorem Std.Sat.CNF.Clause.eval_nil {α : Type u_1} (a : αBool) :
        eval a [] = false
        @[simp]
        theorem Std.Sat.CNF.Clause.eval_cons {α : Type u_1} {i : Literal α} {c : List (Literal α)} (a : αBool) :
        eval a (i :: c) = (a i.fst == i.snd || eval a c)
        def Std.Sat.CNF.eval {α : Type u_1} (a : αBool) (f : CNF α) :

        Evaluating a CNF formula with respect to an assignment a.

        Equations
        Instances For
          @[simp]
          theorem Std.Sat.CNF.eval_nil {α : Type u_1} (a : αBool) :
          eval a [] = true
          @[simp]
          theorem Std.Sat.CNF.eval_cons {α : Type u_1} {c : Clause α} {f : List (Clause α)} (a : αBool) :
          eval a (c :: f) = (Clause.eval a c && eval a f)
          @[simp]
          theorem Std.Sat.CNF.eval_append {α : Type u_1} (a : αBool) (f1 f2 : CNF α) :
          eval a (f1 ++ f2) = (eval a f1 && eval a f2)
          def Std.Sat.CNF.Sat {α : Type u_1} (a : αBool) (f : CNF α) :
          Equations
          Instances For
            def Std.Sat.CNF.Unsat {α : Type u_1} (f : CNF α) :
            Equations
            Instances For
              theorem Std.Sat.CNF.sat_def {α : Type u_1} (a : αBool) (f : CNF α) :
              Sat a f eval a f = true
              theorem Std.Sat.CNF.unsat_def {α : Type u_1} (f : CNF α) :
              f.Unsat ∀ (a : αBool), eval a f = false
              @[simp]
              theorem Std.Sat.CNF.not_unsat_nil {α : Type u_1} :
              @[simp]
              theorem Std.Sat.CNF.sat_nil {α : Type u_1} {assign : αBool} :
              Sat assign []
              @[simp]
              theorem Std.Sat.CNF.unsat_nil_cons {α : Type u_1} {g : CNF α} :
              Unsat ([] :: g)
              def Std.Sat.CNF.Clause.Mem {α : Type u_1} (v : α) (c : Clause α) :

              Variable v occurs in Clause c.

              Equations
              Instances For
                @[simp]
                theorem Std.Sat.CNF.Clause.not_mem_nil {α : Type u_1} {v : α} :
                ¬Mem v []
                @[simp]
                theorem Std.Sat.CNF.Clause.mem_cons {α : Type u_1} {l : Literal α} {c : List (Literal α)} {v : α} :
                Mem v (l :: c) v = l.fst Mem v c
                theorem Std.Sat.CNF.Clause.mem_of {α✝ : Type u_1} {c : Clause α✝} {v : α✝} {p : Bool} (h : (v, p) c) :
                Mem v c
                theorem Std.Sat.CNF.Clause.eval_congr {α : Type u_1} (a1 a2 : αBool) (c : Clause α) (hw : ∀ (i : α), Mem i ca1 i = a2 i) :
                eval a1 c = eval a2 c
                def Std.Sat.CNF.Mem {α : Type u_1} (v : α) (f : CNF α) :

                Variable v occurs in CNF formula f.

                Equations
                Instances For
                  theorem Std.Sat.CNF.any_not_isEmpty_iff_exists_mem {α : Type u_1} {f : CNF α} :
                  (List.any f fun (c : Clause α) => !List.isEmpty c) = true ∃ (v : α), Mem v f
                  theorem Std.Sat.CNF.not_exists_mem {α✝ : Type u_1} {f : CNF α✝} :
                  (¬∃ (v : α✝), Mem v f) ∃ (n : Nat), f = List.replicate n []
                  theorem Std.Sat.CNF.not_mem_nil {α : Type u_1} {v : α} :
                  ¬Mem v []
                  theorem Std.Sat.CNF.mem_cons {α : Type u_1} {v : α} {c : Clause α} {f : CNF α} :
                  Mem v (c :: f) Clause.Mem v c Mem v f
                  theorem Std.Sat.CNF.mem_of {α✝ : Type u_1} {f : CNF α✝} {c : Clause α✝} {v : α✝} (h : c f) (w : Clause.Mem v c) :
                  Mem v f
                  @[simp]
                  theorem Std.Sat.CNF.mem_append {α : Type u_1} {v : α} {f1 f2 : CNF α} :
                  Mem v (f1 ++ f2) Mem v f1 Mem v f2
                  theorem Std.Sat.CNF.eval_congr {α : Type u_1} (a1 a2 : αBool) (f : CNF α) (hw : ∀ (v : α), Mem v fa1 v = a2 v) :
                  eval a1 f = eval a2 f