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