Evaluation semantics of char-code.
Function:
(defun eval-char-code (x) (declare (xargs :guard (valuep x))) (let ((__function__ 'eval-char-code)) (declare (ignorable __function__)) (value-number (if (value-case x :character) (char-code (value-character->get x)) 0))))
Theorem:
(defthm valuep-of-eval-char-code (b* ((result (eval-char-code x))) (valuep result)) :rule-classes :rewrite)
Theorem:
(defthm eval-char-code-of-value-fix-x (equal (eval-char-code (value-fix x)) (eval-char-code x)))
Theorem:
(defthm eval-char-code-value-equiv-congruence-on-x (implies (value-equiv x x-equiv) (equal (eval-char-code x) (eval-char-code x-equiv))) :rule-classes :congruence)