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