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