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