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