Sematics of a UBDD.
(eval-bdd x values) evaluates the UBDD
Typically
When
When
Function:
(defun eval-bdd (x values) (declare (xargs :guard t)) (cond ((atom x) (if x t nil)) ((atom values) (eval-bdd (cdr x) nil)) ((car values) (eval-bdd (car x) (cdr values))) (t (eval-bdd (cdr x) (cdr values)))))
Theorem:
(defthm eval-bdd-when-not-consp (implies (not (consp x)) (equal (eval-bdd x values) (if x t nil))))
Theorem:
(defthm eval-bdd-of-non-consp-cheap (implies (not (consp x)) (equal (eval-bdd x vals) (if x t nil))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
Theorem:
(defthm eval-bdd-of-nil (equal (eval-bdd nil values) nil))
Theorem:
(defthm eval-bdd-of-t (equal (eval-bdd t values) t))
Theorem:
(defthm eval-bdd-when-non-consp-values (implies (and (syntaxp (not (equal vals *nil*))) (atom vals)) (equal (eval-bdd x vals) (eval-bdd x nil))))