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