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