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