Smartly negate a canonicalized expression.
We assume
Function:
(defun vl-condcheck-negate (x) (declare (xargs :guard (vl-expr-p x))) (declare (xargs :guard (vl-expr-p x))) (let ((__function__ 'vl-condcheck-negate)) (declare (ignorable __function__)) (if (and (not (vl-fast-atom-p x)) (eq (vl-nonatom->op x) :vl-unary-bitnot)) (first (vl-nonatom->args x)) (make-vl-nonatom :op :vl-unary-bitnot :args (list x)))))
Theorem:
(defthm vl-expr-p-of-vl-condcheck-negate (implies (and (force (vl-expr-p x))) (b* ((new-x (vl-condcheck-negate x))) (vl-expr-p new-x))) :rule-classes :rewrite)