Bitwise logical NOT of a 3vec.
Function:
(defun 3vec-bitnot (x) (declare (xargs :guard (4vec-p x))) (let ((__function__ '3vec-bitnot)) (declare (ignorable __function__)) (if-2vec-p (x) (2vec (lognot (2vec->val x))) (b* (((4vec x))) (4vec (lognot x.lower) (lognot x.upper))))))
Theorem:
(defthm 4vec-p-of-3vec-bitnot (b* ((~x (3vec-bitnot x))) (4vec-p ~x)) :rule-classes :rewrite)
Theorem:
(defthm 3vec-p-of-3vec-bitnot (b* ((?~x (3vec-bitnot x))) (implies (3vec-p x) (3vec-p ~x))))
Theorem:
(defthm 3vec-bitnot-bits (implies (3vec-p x) (equal (4vec-idx->4v n (3vec-bitnot x)) (acl2::4v-not (4vec-idx->4v n x)))))
Theorem:
(defthm 3vec-bitnot-of-4vec-fix-x (equal (3vec-bitnot (4vec-fix x)) (3vec-bitnot x)))
Theorem:
(defthm 3vec-bitnot-4vec-equiv-congruence-on-x (implies (4vec-equiv x x-equiv) (equal (3vec-bitnot x) (3vec-bitnot x-equiv))) :rule-classes :congruence)