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