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