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