Fixtype of octal digit characters.
This is a type introduced by fty::deffixtype.
Function:
(defun oct-digit-char-fix (x) (declare (xargs :guard (oct-digit-char-p x))) (mbe :logic (if (oct-digit-char-p x) x #\0) :exec x))
Theorem:
(defthm oct-digit-char-p-of-oct-digit-char-fix (b* ((fixed-x (oct-digit-char-fix x))) (oct-digit-char-p fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm oct-digit-char-fix-when-oct-digit-char-p (implies (oct-digit-char-p x) (equal (oct-digit-char-fix x) x)))
Function:
(defun oct-digit-char-equiv$inline (x y) (declare (xargs :guard (and (oct-digit-char-p x) (oct-digit-char-p y)))) (equal (oct-digit-char-fix x) (oct-digit-char-fix y)))
Theorem:
(defthm oct-digit-char-equiv-is-an-equivalence (and (booleanp (oct-digit-char-equiv x y)) (oct-digit-char-equiv x x) (implies (oct-digit-char-equiv x y) (oct-digit-char-equiv y x)) (implies (and (oct-digit-char-equiv x y) (oct-digit-char-equiv y z)) (oct-digit-char-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm oct-digit-char-equiv-implies-equal-oct-digit-char-fix-1 (implies (oct-digit-char-equiv x x-equiv) (equal (oct-digit-char-fix x) (oct-digit-char-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm oct-digit-char-fix-under-oct-digit-char-equiv (oct-digit-char-equiv (oct-digit-char-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-oct-digit-char-fix-1-forward-to-oct-digit-char-equiv (implies (equal (oct-digit-char-fix x) y) (oct-digit-char-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-oct-digit-char-fix-2-forward-to-oct-digit-char-equiv (implies (equal x (oct-digit-char-fix y)) (oct-digit-char-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm oct-digit-char-equiv-of-oct-digit-char-fix-1-forward (implies (oct-digit-char-equiv (oct-digit-char-fix x) y) (oct-digit-char-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm oct-digit-char-equiv-of-oct-digit-char-fix-2-forward (implies (oct-digit-char-equiv x (oct-digit-char-fix y)) (oct-digit-char-equiv x y)) :rule-classes :forward-chaining)