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