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