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