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