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