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