The fixing function used here is sfix.
The name
Function:
(defun sequiv$inline (x y) (declare (xargs :guard (and (setp x) (setp y)))) (equal (sfix x) (sfix y)))
Theorem:
(defthm sequiv-is-an-equivalence (and (booleanp (sequiv x y)) (sequiv x x) (implies (sequiv x y) (sequiv y x)) (implies (and (sequiv x y) (sequiv y z)) (sequiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm sequiv-implies-equal-sfix-1 (implies (sequiv x x-equiv) (equal (sfix x) (sfix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm sfix-under-sequiv (sequiv (sfix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-sfix-1-forward-to-sequiv (implies (equal (sfix x) y) (sequiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-sfix-2-forward-to-sequiv (implies (equal x (sfix y)) (sequiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm sequiv-of-sfix-1-forward (implies (sequiv (sfix x) y) (sequiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm sequiv-of-sfix-2-forward (implies (sequiv x (sfix y)) (sequiv x y)) :rule-classes :forward-chaining)