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