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