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