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