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