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