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