Right-shift a sparseint by some shift amount
(sparseint-rightshift shift x) → rightshift
Function:
(defun sparseint-rightshift$inline (shift x) (declare (xargs :guard (and (natp shift) (sparseint-p x)))) (let ((__function__ 'sparseint-rightshift)) (declare (ignorable __function__)) (sparseint$-rightshift shift (sparseint-fix x))))
Theorem:
(defthm sparseint-p-of-sparseint-rightshift (b* ((rightshift (sparseint-rightshift$inline shift x))) (sparseint-p rightshift)) :rule-classes :rewrite)
Theorem:
(defthm sparseint-rightshift-correct (b* ((?rightshift (sparseint-rightshift$inline shift x))) (equal (sparseint-val rightshift) (logtail shift (sparseint-val x)))))
Theorem:
(defthm sparseint-rightshift$inline-of-nfix-shift (equal (sparseint-rightshift$inline (nfix shift) x) (sparseint-rightshift$inline shift x)))
Theorem:
(defthm sparseint-rightshift$inline-nat-equiv-congruence-on-shift (implies (nat-equiv shift shift-equiv) (equal (sparseint-rightshift$inline shift x) (sparseint-rightshift$inline shift-equiv x))) :rule-classes :congruence)
Theorem:
(defthm sparseint-rightshift$inline-of-sparseint-fix-x (equal (sparseint-rightshift$inline shift (sparseint-fix x)) (sparseint-rightshift$inline shift x)))
Theorem:
(defthm sparseint-rightshift$inline-sparseint-equiv-congruence-on-x (implies (sparseint-equiv x x-equiv) (equal (sparseint-rightshift$inline shift x) (sparseint-rightshift$inline shift x-equiv))) :rule-classes :congruence)