Function:
(defun s3vec-bitand (x y) (declare (xargs :guard (and (s4vec-p x) (s4vec-p y)))) (let ((__function__ 's3vec-bitand)) (declare (ignorable __function__)) (if-s2vec-p (x y) (s2vec (sparseint-bitand (s2vec->val x) (s2vec->val y))) (b* (((s4vec x)) ((s4vec y))) (s4vec (sparseint-bitand x.upper y.upper) (sparseint-bitand x.lower y.lower))))))
Theorem:
(defthm s4vec-p-of-s3vec-bitand (b* ((res (s3vec-bitand x y))) (s4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm s3vec-bitand-correct (b* ((?res (s3vec-bitand x y))) (equal (s4vec->4vec res) (3vec-bitand (s4vec->4vec x) (s4vec->4vec y)))))
Theorem:
(defthm s3vec-bitand-of-s4vec-fix-x (equal (s3vec-bitand (s4vec-fix x) y) (s3vec-bitand x y)))
Theorem:
(defthm s3vec-bitand-s4vec-equiv-congruence-on-x (implies (s4vec-equiv x x-equiv) (equal (s3vec-bitand x y) (s3vec-bitand x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm s3vec-bitand-of-s4vec-fix-y (equal (s3vec-bitand x (s4vec-fix y)) (s3vec-bitand x y)))
Theorem:
(defthm s3vec-bitand-s4vec-equiv-congruence-on-y (implies (s4vec-equiv y y-equiv) (equal (s3vec-bitand x y) (s3vec-bitand x y-equiv))) :rule-classes :congruence)