Basic equivalence relation for comm structures.
Function:
(defun comm-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (commp acl2::x) (commp acl2::y)))) (equal (comm-fix acl2::x) (comm-fix acl2::y)))
Theorem:
(defthm comm-equiv-is-an-equivalence (and (booleanp (comm-equiv x y)) (comm-equiv x x) (implies (comm-equiv x y) (comm-equiv y x)) (implies (and (comm-equiv x y) (comm-equiv y z)) (comm-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm comm-equiv-implies-equal-comm-fix-1 (implies (comm-equiv acl2::x x-equiv) (equal (comm-fix acl2::x) (comm-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm comm-fix-under-comm-equiv (comm-equiv (comm-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-comm-fix-1-forward-to-comm-equiv (implies (equal (comm-fix acl2::x) acl2::y) (comm-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-comm-fix-2-forward-to-comm-equiv (implies (equal acl2::x (comm-fix acl2::y)) (comm-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm comm-equiv-of-comm-fix-1-forward (implies (comm-equiv (comm-fix acl2::x) acl2::y) (comm-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm comm-equiv-of-comm-fix-2-forward (implies (comm-equiv acl2::x (comm-fix acl2::y)) (comm-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)