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