Fixer for values of type
Function:
(defun schar-fix (x) (declare (xargs :guard (scharp x))) (let ((__function__ 'schar-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((get (schar-integer-fix (std::da-nth 0 (cdr x))))) (cons :schar (list get))) :exec x)))
Theorem:
(defthm scharp-of-schar-fix (b* ((fixed-x (schar-fix x))) (scharp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm schar-fix-when-scharp (implies (scharp x) (equal (schar-fix x) x)))