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