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