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