Fixer for dec-digit.
(dec-digit-fix x) → fixed-x
Function:
(defun dec-digit-fix (x) (declare (xargs :guard (dec-digitp x))) (mbe :logic (if (dec-digitp x) x (char-code #\0)) :exec x))
Theorem:
(defthm dec-digitp-of-dec-digit-fix (b* ((fixed-x (dec-digit-fix x))) (dec-digitp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm dec-digit-fix-when-dec-digitp (implies (dec-digitp x) (equal (dec-digit-fix x) x)))