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