(message-set-fix x) is a usual ACL2::fty set fixing function.
(message-set-fix x) → *
In the logic, we apply message-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun message-set-fix (x) (declare (xargs :guard (message-setp x))) (mbe :logic (if (message-setp x) x nil) :exec x))
Theorem:
(defthm message-setp-of-message-set-fix (message-setp (message-set-fix x)))
Theorem:
(defthm message-set-fix-when-message-setp (implies (message-setp x) (equal (message-set-fix x) x)))
Theorem:
(defthm emptyp-message-set-fix (implies (or (emptyp x) (not (message-setp x))) (emptyp (message-set-fix x))))
Theorem:
(defthm emptyp-of-message-set-fix (equal (emptyp (message-set-fix x)) (or (not (message-setp x)) (emptyp x))))
Function:
(defun message-set-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (message-setp acl2::x) (message-setp acl2::y)))) (equal (message-set-fix acl2::x) (message-set-fix acl2::y)))
Theorem:
(defthm message-set-equiv-is-an-equivalence (and (booleanp (message-set-equiv x y)) (message-set-equiv x x) (implies (message-set-equiv x y) (message-set-equiv y x)) (implies (and (message-set-equiv x y) (message-set-equiv y z)) (message-set-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm message-set-equiv-implies-equal-message-set-fix-1 (implies (message-set-equiv acl2::x x-equiv) (equal (message-set-fix acl2::x) (message-set-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm message-set-fix-under-message-set-equiv (message-set-equiv (message-set-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-message-set-fix-1-forward-to-message-set-equiv (implies (equal (message-set-fix acl2::x) acl2::y) (message-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-message-set-fix-2-forward-to-message-set-equiv (implies (equal acl2::x (message-set-fix acl2::y)) (message-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm message-set-equiv-of-message-set-fix-1-forward (implies (message-set-equiv (message-set-fix acl2::x) acl2::y) (message-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm message-set-equiv-of-message-set-fix-2-forward (implies (message-set-equiv acl2::x (message-set-fix acl2::y)) (message-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)