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