Narrowing conversion from
(int-to-short operand) → result
Function:
(defun int-to-short (operand) (declare (xargs :guard (int-valuep operand))) (b* ((x (int-value->int operand))) (short-value (logext 16 x))))
Theorem:
(defthm short-valuep-of-int-to-short (b* ((result (int-to-short operand))) (short-valuep result)) :rule-classes :rewrite)
Theorem:
(defthm int-to-short-of-int-value-fix-operand (equal (int-to-short (int-value-fix operand)) (int-to-short operand)))
Theorem:
(defthm int-to-short-int-value-equiv-congruence-on-operand (implies (int-value-equiv operand operand-equiv) (equal (int-to-short operand) (int-to-short operand-equiv))) :rule-classes :congruence)