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