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