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