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