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