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