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