Right shift of a value of type
Function:
(defun shr-slong (x y) (declare (xargs :guard (and (slongp x) (integerp y) (shr-slong-okp x y)))) (slong-from-integer (truncate (integer-from-slong x) (expt 2 (ifix y)))))
Theorem:
(defthm slongp-of-shr-slong (slongp (shr-slong x y)))
Theorem:
(defthm shr-slong-of-slong-fix-x (equal (shr-slong (slong-fix x) y) (shr-slong x y)))
Theorem:
(defthm shr-slong-slong-equiv-congruence-on-x (implies (slong-equiv x x-equiv) (equal (shr-slong x y) (shr-slong x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm shr-slong-of-ifix-y (equal (shr-slong x (ifix y)) (shr-slong x y)))
Theorem:
(defthm shr-slong-int-equiv-congruence-on-y (implies (acl2::int-equiv y y-equiv) (equal (shr-slong x y) (shr-slong x y-equiv))) :rule-classes :congruence)