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