Left shift of a
(long-int-shiftl operand-left operand-right) → result
Only the low 6 bits of the distance are used [JLS14:15.19].
Function:
(defun long-int-shiftl (operand-left operand-right) (declare (xargs :guard (and (long-valuep operand-left) (int-valuep operand-right)))) (b* ((x (long-value->int operand-left)) (y (int-value->int operand-right))) (long-value (logext 64 (ash x (loghead 6 y))))))
Theorem:
(defthm long-valuep-of-long-int-shiftl (b* ((result (long-int-shiftl operand-left operand-right))) (long-valuep result)) :rule-classes :rewrite)
Theorem:
(defthm long-int-shiftl-of-long-value-fix-operand-left (equal (long-int-shiftl (long-value-fix operand-left) operand-right) (long-int-shiftl operand-left operand-right)))
Theorem:
(defthm long-int-shiftl-long-value-equiv-congruence-on-operand-left (implies (long-value-equiv operand-left operand-left-equiv) (equal (long-int-shiftl operand-left operand-right) (long-int-shiftl operand-left-equiv operand-right))) :rule-classes :congruence)
Theorem:
(defthm long-int-shiftl-of-int-value-fix-operand-right (equal (long-int-shiftl operand-left (int-value-fix operand-right)) (long-int-shiftl operand-left operand-right)))
Theorem:
(defthm long-int-shiftl-int-value-equiv-congruence-on-operand-right (implies (int-value-equiv operand-right operand-right-equiv) (equal (long-int-shiftl operand-left operand-right) (long-int-shiftl operand-left operand-right-equiv))) :rule-classes :congruence)