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