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