Filtering...

satisfiable-add-proof-clause-base

books/projects/sat/lrat/list-based/satisfiable-add-proof-clause-base
other
(in-package "LRAT")
other
(include-book "lrat-checker")
other
(include-book "truth-monotone")
other
(include-book "unit-propagation-implies-unsat")
other
(include-book "unit-propagation-monotone")
other
(include-book "unit-propagation-correct")
other
(defthm truth-monotone
  (implies (and (subsetp-equal a1 a2)
      (equal (formula-truep formula a1) t))
    (equal (formula-truep formula a2) t)))
other
(defthm unit-propagation-implies-unsat
  (implies (and (clause-or-assignment-p assignment)
      (formula-p formula)
      (formula-truep formula assignment)
      (index-listp indices))
    (not (equal (unit-propagation formula
          indices
          assignment)
        t))))
other
(defthm unit-propagation-monotone
  (implies (and (equal (unit-propagation formula
          indices
          a1)
        t)
      (clause-or-assignment-p a1)
      (clause-or-assignment-p a2)
      (subsetp-equal a1 a2)
      (formula-p formula))
    (equal (unit-propagation formula
        indices
        a2)
      t)))
other
(defthm unit-propagation-correct
  (implies (and (formula-p formula)
      (clause-or-assignment-p clause)
      (clause-or-assignment-p assignment)
      (formula-truep formula assignment)
      (equal (unit-propagation formula
          indices
          (negate-clause-or-assignment clause))
        t))
    (equal (evaluate-clause clause assignment)
      t)))
other
(defund flip-literal
  (lit assignment)
  (cons lit
    (remove-literal lit
      (remove-literal (negate lit)
        assignment))))
other
(defthm member-remove-literal
  (iff (member lit1
      (remove-literal lit2 x))
    (if (equal lit1 lit2)
      nil
      (member lit1 x))))
other
(defthm clause-or-assignment-p-flip-literal
  (implies (and (clause-or-assignment-p assignment)
      (literalp lit))
    (clause-or-assignment-p (flip-literal lit assignment)))
  :hints (("Goal" :in-theory (enable flip-literal))))
other
(defthm member-flip-literal
  (member lit
    (flip-literal lit assignment))
  :hints (("Goal" :in-theory (enable flip-literal))))