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