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