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