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