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