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