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