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