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