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