Fixer for ushort-integer.
(ushort-integer-fix x) → fixed-x
Function:
(defun ushort-integer-fix (x) (declare (xargs :guard (ushort-integerp x))) (mbe :logic (if (ushort-integerp x) x 0) :exec x))
Theorem:
(defthm ushort-integerp-of-ushort-integer-fix (b* ((fixed-x (ushort-integer-fix x))) (ushort-integerp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm ushort-integer-fix-when-ushort-integerp (implies (ushort-integerp x) (equal (ushort-integer-fix x) x)))