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