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