(scope-fix x) is a usual ACL2::fty omap fixing function.
(scope-fix x) → *
Function:
(defun scope-fix (x) (declare (xargs :guard (scopep x))) (mbe :logic (if (scopep x) x nil) :exec x))
Theorem:
(defthm scopep-of-scope-fix (scopep (scope-fix x)))
Theorem:
(defthm scope-fix-when-scopep (implies (scopep x) (equal (scope-fix x) x)))
Theorem:
(defthm emptyp-scope-fix (implies (or (omap::emptyp x) (not (scopep x))) (omap::emptyp (scope-fix x))))
Theorem:
(defthm emptyp-of-scope-fix-to-not-scope-or-emptyp (equal (omap::emptyp (scope-fix x)) (or (not (scopep x)) (omap::emptyp x))))
Function:
(defun scope-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (scopep acl2::x) (scopep acl2::y)))) (equal (scope-fix acl2::x) (scope-fix acl2::y)))
Theorem:
(defthm scope-equiv-is-an-equivalence (and (booleanp (scope-equiv x y)) (scope-equiv x x) (implies (scope-equiv x y) (scope-equiv y x)) (implies (and (scope-equiv x y) (scope-equiv y z)) (scope-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm scope-equiv-implies-equal-scope-fix-1 (implies (scope-equiv acl2::x x-equiv) (equal (scope-fix acl2::x) (scope-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm scope-fix-under-scope-equiv (scope-equiv (scope-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-scope-fix-1-forward-to-scope-equiv (implies (equal (scope-fix acl2::x) acl2::y) (scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-scope-fix-2-forward-to-scope-equiv (implies (equal acl2::x (scope-fix acl2::y)) (scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm scope-equiv-of-scope-fix-1-forward (implies (scope-equiv (scope-fix acl2::x) acl2::y) (scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm scope-equiv-of-scope-fix-2-forward (implies (scope-equiv acl2::x (scope-fix acl2::y)) (scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)