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