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