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