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