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