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