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