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