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