Check if the right shift of a value of type
Function:
(defun shr-slong-okp (x y) (declare (xargs :guard (and (slongp x) (integerp y)))) (and (integer-range-p 0 (long-bits) (ifix y)) (>= (integer-from-slong x) 0)))
Theorem:
(defthm booleanp-of-shr-slong-okp (booleanp (shr-slong-okp x y)))
Theorem:
(defthm shr-slong-okp-of-slong-fix-x (equal (shr-slong-okp (slong-fix x) y) (shr-slong-okp x y)))
Theorem:
(defthm shr-slong-okp-slong-equiv-congruence-on-x (implies (slong-equiv x x-equiv) (equal (shr-slong-okp x y) (shr-slong-okp x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm shr-slong-okp-of-ifix-y (equal (shr-slong-okp x (ifix y)) (shr-slong-okp x y)))
Theorem:
(defthm shr-slong-okp-int-equiv-congruence-on-y (implies (acl2::int-equiv y y-equiv) (equal (shr-slong-okp x y) (shr-slong-okp x y-equiv))) :rule-classes :congruence)