Fixing function for repeat-range structures.
(repeat-range-fix x) → new-x
Function:
(defun repeat-range-fix$inline (x) (declare (xargs :guard (repeat-rangep x))) (let ((__function__ 'repeat-range-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((min (nfix (std::da-nth 0 (cdr x)))) (max (acl2::nati-fix (std::da-nth 1 (cdr x))))) (cons :repeat (list min max))) :exec x)))
Theorem:
(defthm repeat-rangep-of-repeat-range-fix (b* ((new-x (repeat-range-fix$inline x))) (repeat-rangep new-x)) :rule-classes :rewrite)
Theorem:
(defthm repeat-range-fix-when-repeat-rangep (implies (repeat-rangep x) (equal (repeat-range-fix x) x)))
Function:
(defun repeat-range-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (repeat-rangep acl2::x) (repeat-rangep acl2::y)))) (equal (repeat-range-fix acl2::x) (repeat-range-fix acl2::y)))
Theorem:
(defthm repeat-range-equiv-is-an-equivalence (and (booleanp (repeat-range-equiv x y)) (repeat-range-equiv x x) (implies (repeat-range-equiv x y) (repeat-range-equiv y x)) (implies (and (repeat-range-equiv x y) (repeat-range-equiv y z)) (repeat-range-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm repeat-range-equiv-implies-equal-repeat-range-fix-1 (implies (repeat-range-equiv acl2::x x-equiv) (equal (repeat-range-fix acl2::x) (repeat-range-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm repeat-range-fix-under-repeat-range-equiv (repeat-range-equiv (repeat-range-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-repeat-range-fix-1-forward-to-repeat-range-equiv (implies (equal (repeat-range-fix acl2::x) acl2::y) (repeat-range-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-repeat-range-fix-2-forward-to-repeat-range-equiv (implies (equal acl2::x (repeat-range-fix acl2::y)) (repeat-range-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm repeat-range-equiv-of-repeat-range-fix-1-forward (implies (repeat-range-equiv (repeat-range-fix acl2::x) acl2::y) (repeat-range-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm repeat-range-equiv-of-repeat-range-fix-2-forward (implies (repeat-range-equiv acl2::x (repeat-range-fix acl2::y)) (repeat-range-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)