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