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