(mode-set-fix x) is a usual ACL2::fty set fixing function.
(mode-set-fix x) → *
In the logic, we apply mode-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 mode-set-fix (x) (declare (xargs :guard (mode-setp x))) (mbe :logic (if (mode-setp x) x nil) :exec x))
Theorem:
(defthm mode-setp-of-mode-set-fix (mode-setp (mode-set-fix x)))
Theorem:
(defthm mode-set-fix-when-mode-setp (implies (mode-setp x) (equal (mode-set-fix x) x)))
Theorem:
(defthm emptyp-mode-set-fix (implies (or (emptyp x) (not (mode-setp x))) (emptyp (mode-set-fix x))))
Theorem:
(defthm emptyp-of-mode-set-fix (equal (emptyp (mode-set-fix x)) (or (not (mode-setp x)) (emptyp x))))
Function:
(defun mode-set-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (mode-setp acl2::x) (mode-setp acl2::y)))) (equal (mode-set-fix acl2::x) (mode-set-fix acl2::y)))
Theorem:
(defthm mode-set-equiv-is-an-equivalence (and (booleanp (mode-set-equiv x y)) (mode-set-equiv x x) (implies (mode-set-equiv x y) (mode-set-equiv y x)) (implies (and (mode-set-equiv x y) (mode-set-equiv y z)) (mode-set-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm mode-set-equiv-implies-equal-mode-set-fix-1 (implies (mode-set-equiv acl2::x x-equiv) (equal (mode-set-fix acl2::x) (mode-set-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mode-set-fix-under-mode-set-equiv (mode-set-equiv (mode-set-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-mode-set-fix-1-forward-to-mode-set-equiv (implies (equal (mode-set-fix acl2::x) acl2::y) (mode-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-mode-set-fix-2-forward-to-mode-set-equiv (implies (equal acl2::x (mode-set-fix acl2::y)) (mode-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mode-set-equiv-of-mode-set-fix-1-forward (implies (mode-set-equiv (mode-set-fix acl2::x) acl2::y) (mode-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mode-set-equiv-of-mode-set-fix-2-forward (implies (mode-set-equiv acl2::x (mode-set-fix acl2::y)) (mode-set-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)