Basic equivalence relation for hex-digit structures.
Function:
(defun hex-digit-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (hex-digitp acl2::x) (hex-digitp acl2::y)))) (equal (hex-digit-fix acl2::x) (hex-digit-fix acl2::y)))
Theorem:
(defthm hex-digit-equiv-is-an-equivalence (and (booleanp (hex-digit-equiv x y)) (hex-digit-equiv x x) (implies (hex-digit-equiv x y) (hex-digit-equiv y x)) (implies (and (hex-digit-equiv x y) (hex-digit-equiv y z)) (hex-digit-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm hex-digit-equiv-implies-equal-hex-digit-fix-1 (implies (hex-digit-equiv acl2::x x-equiv) (equal (hex-digit-fix acl2::x) (hex-digit-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm hex-digit-fix-under-hex-digit-equiv (hex-digit-equiv (hex-digit-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-hex-digit-fix-1-forward-to-hex-digit-equiv (implies (equal (hex-digit-fix acl2::x) acl2::y) (hex-digit-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-hex-digit-fix-2-forward-to-hex-digit-equiv (implies (equal acl2::x (hex-digit-fix acl2::y)) (hex-digit-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-digit-equiv-of-hex-digit-fix-1-forward (implies (hex-digit-equiv (hex-digit-fix acl2::x) acl2::y) (hex-digit-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-digit-equiv-of-hex-digit-fix-2-forward (implies (hex-digit-equiv acl2::x (hex-digit-fix acl2::y)) (hex-digit-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)