Fixer for base58-character.
(base58-character-fix x) → fixed-x
Function:
(defun base58-character-fix (x) (declare (xargs :guard (base58-characterp x))) (mbe :logic (if (base58-characterp x) x *base58-zero*) :exec x))
Theorem:
(defthm base58-characterp-of-base58-character-fix (b* ((fixed-x (base58-character-fix x))) (base58-characterp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm base58-character-fix-when-base58-characterp (implies (base58-characterp x) (equal (base58-character-fix x) x)))
Theorem:
(defthm characterp-of-base58-character-fix (b* ((?fixed-x (base58-character-fix x))) (characterp fixed-x)) :rule-classes :type-prescription)