(q-and-is-nilc2 x y) determines whether
This is like q-and-is-nil.
Function:
(defun q-and-is-nilc2 (x y) (declare (xargs :guard t)) (cond ((eq x t) (eq y t)) ((atom x) t) ((eq y t) t) ((atom y) nil) (t (and (q-and-is-nilc2 (qcar x) (qcar y)) (q-and-is-nilc2 (qcdr x) (qcdr y))))))
Theorem:
(defthm q-and-is-nilc2-removal (implies (and (force (ubddp x)) (force (ubddp y))) (equal (q-and-is-nilc2 x y) (not (q-and x (q-not y))))))