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