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