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