Check if the left shift of a value of type
Function:
(defun shl-slong-okp (x y) (declare (xargs :guard (and (slongp x) (integerp y)))) (and (integer-range-p 0 (long-bits) (ifix y)) (>= (integer-from-slong x) 0) (slong-integerp (* (integer-from-slong x) (expt 2 (ifix y))))))
Theorem:
(defthm booleanp-of-shl-slong-okp (booleanp (shl-slong-okp x y)))
Theorem:
(defthm shl-slong-okp-of-slong-fix-x (equal (shl-slong-okp (slong-fix x) y) (shl-slong-okp x y)))
Theorem:
(defthm shl-slong-okp-slong-equiv-congruence-on-x (implies (slong-equiv x x-equiv) (equal (shl-slong-okp x y) (shl-slong-okp x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm shl-slong-okp-of-ifix-y (equal (shl-slong-okp x (ifix y)) (shl-slong-okp x y)))
Theorem:
(defthm shl-slong-okp-int-equiv-congruence-on-y (implies (acl2::int-equiv y y-equiv) (equal (shl-slong-okp x y) (shl-slong-okp x y-equiv))) :rule-classes :congruence)