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