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