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