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