(q-and-is-nil x y) determines whether
You could ask the same question in other ways, say for instance
(not (q-and x y))
But
Function:
(defun q-and-is-nil (x y) (declare (xargs :guard t)) (cond ((eq x t) (eq y nil)) ((atom x) t) ((eq y t) nil) ((atom y) t) (t (and (q-and-is-nil (qcar x) (qcar y)) (q-and-is-nil (qcdr x) (qcdr y))))))
Function:
(defun q-and-is-nil-memoize-condition (x y) (declare (ignorable x y) (xargs :guard 't)) (and (consp x) (consp y)))
Theorem:
(defthm q-and-is-nil-removal (implies (and (force (ubddp x)) (force (ubddp y))) (equal (q-and-is-nil x y) (not (q-and x y)))))