This is similar to the fixtype set::set of osets.
Function:
(defun mequiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (mapp acl2::x) (mapp acl2::y)))) (equal (mfix acl2::x) (mfix acl2::y)))
Theorem:
(defthm mequiv-is-an-equivalence (and (booleanp (mequiv x y)) (mequiv x x) (implies (mequiv x y) (mequiv y x)) (implies (and (mequiv x y) (mequiv y z)) (mequiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm mequiv-implies-equal-mfix-1 (implies (mequiv acl2::x x-equiv) (equal (mfix acl2::x) (mfix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mfix-under-mequiv (mequiv (mfix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-mfix-1-forward-to-mequiv (implies (equal (mfix acl2::x) acl2::y) (mequiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-mfix-2-forward-to-mequiv (implies (equal acl2::x (mfix acl2::y)) (mequiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mequiv-of-mfix-1-forward (implies (mequiv (mfix acl2::x) acl2::y) (mequiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm mequiv-of-mfix-2-forward (implies (mequiv acl2::x (mfix acl2::y)) (mequiv acl2::x acl2::y)) :rule-classes :forward-chaining)