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