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