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