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