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