Fixtype of binary digit characters.
This is a type introduced by fty::deffixtype.
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)))
Function:
(defun bin-digit-char-equiv$inline (x y) (declare (xargs :guard (and (bin-digit-char-p x) (bin-digit-char-p y)))) (equal (bin-digit-char-fix x) (bin-digit-char-fix y)))
Theorem:
(defthm bin-digit-char-equiv-is-an-equivalence (and (booleanp (bin-digit-char-equiv x y)) (bin-digit-char-equiv x x) (implies (bin-digit-char-equiv x y) (bin-digit-char-equiv y x)) (implies (and (bin-digit-char-equiv x y) (bin-digit-char-equiv y z)) (bin-digit-char-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm bin-digit-char-equiv-implies-equal-bin-digit-char-fix-1 (implies (bin-digit-char-equiv x x-equiv) (equal (bin-digit-char-fix x) (bin-digit-char-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm bin-digit-char-fix-under-bin-digit-char-equiv (bin-digit-char-equiv (bin-digit-char-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-bin-digit-char-fix-1-forward-to-bin-digit-char-equiv (implies (equal (bin-digit-char-fix x) y) (bin-digit-char-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-bin-digit-char-fix-2-forward-to-bin-digit-char-equiv (implies (equal x (bin-digit-char-fix y)) (bin-digit-char-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bin-digit-char-equiv-of-bin-digit-char-fix-1-forward (implies (bin-digit-char-equiv (bin-digit-char-fix x) y) (bin-digit-char-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bin-digit-char-equiv-of-bin-digit-char-fix-2-forward (implies (bin-digit-char-equiv x (bin-digit-char-fix y)) (bin-digit-char-equiv x y)) :rule-classes :forward-chaining)