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