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