(q-and-c1 x y) constructs a UBDD representing
Function:
(defun q-and-c1-fn (x y) (declare (xargs :guard t)) (cond ((atom x) (if x nil y)) ((atom y) (if y (q-not x) nil)) ((hons-equal x y) nil) (t (qcons (q-and-c1-fn (car x) (car y)) (q-and-c1-fn (cdr x) (cdr y))))))
Function:
(defun q-and-c1-fn-memoize-condition (x y) (declare (ignorable x y) (xargs :guard 't)) (and (consp x) (consp y)))
Function:
(defun q-and-c1-macro-fn (x y) (cond ((and (or (quotep x) (atom x)) (or (quotep y) (atom y))) (cons 'q-and-c1-fn (cons x (cons y 'nil)))) ((or (quotep y) (atom y)) (cons 'mbe (cons ':logic (cons (cons 'q-and-c1-fn (cons x (cons y 'nil))) (cons ':exec (cons (cons 'let (cons (cons (cons 'q-and-c1-y-do-not-use-elsewhere (cons y 'nil)) 'nil) (cons (cons 'if (cons '(not q-and-c1-y-do-not-use-elsewhere) (cons 'nil (cons (cons 'prog2$ (cons '(last-chance-wash-memory) (cons (cons 'q-and-c1-fn (cons x '(q-and-c1-y-do-not-use-elsewhere))) 'nil))) 'nil)))) 'nil))) 'nil)))))) (t (cons 'mbe (cons ':logic (cons (cons 'q-and-c1-fn (cons x (cons y 'nil))) (cons ':exec (cons (cons 'let (cons (cons (cons 'q-and-c1-x-do-not-use-elsewhere (cons x 'nil)) 'nil) (cons (cons 'if (cons '(eq t q-and-c1-x-do-not-use-elsewhere) (cons 'nil (cons (cons 'prog2$ (cons '(last-chance-wash-memory) (cons (cons 'q-and-c1-fn (cons 'q-and-c1-x-do-not-use-elsewhere (cons y 'nil))) 'nil))) 'nil)))) 'nil))) 'nil))))))))
Theorem:
(defthm ubddp-of-q-and-c1 (implies (and (force (ubddp x)) (force (ubddp y))) (equal (ubddp (q-and-c1 x y)) t)))
Theorem:
(defthm eval-bdd-of-q-and-c1 (equal (eval-bdd (q-and-c1 x y) values) (if (eval-bdd x values) nil (eval-bdd y values))))
Theorem:
(defthm canonicalize-q-and-c1 (implies (and (force (ubddp x)) (force (ubddp y))) (equal (q-and-c1 x y) (q-ite x nil y))))
Theorem:
(defthm q-and-c1-of-nil (and (equal (q-and-c1 nil x) x) (equal (q-and-c1 x nil) nil)))
Theorem:
(defthm q-and-c1-of-t (and (equal (q-and-c1 t x) nil) (equal (q-and-c1 x t) (q-not x))))