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