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