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