(matches-add-backref name start-index matches) → new-matches
Function:
(defun matches-add-backref (name start-index matches) (declare (xargs :guard (and (natp start-index) (matchstatelist-p matches)))) (declare (xargs :guard (matchstatelist-indices-gte start-index matches))) (let ((__function__ 'matches-add-backref)) (declare (ignorable __function__)) (if (atom matches) nil (cons (match-add-backref name start-index (car matches)) (matches-add-backref name start-index (cdr matches))))))
Theorem:
(defthm matchstatelist-p-of-matches-add-backref (b* ((new-matches (matches-add-backref name start-index matches))) (matchstatelist-p new-matches)) :rule-classes :rewrite)
Theorem:
(defthm matches-add-backref-preserves-matchstatelist-indices-gte (b* ((?new-matches (matches-add-backref name start-index matches))) (implies (matchstatelist-indices-gte n matches) (matchstatelist-indices-gte n new-matches))))
Theorem:
(defthm consp-of-matches-add-backref (b* ((?new-matches (matches-add-backref name start-index matches))) (equal (consp new-matches) (consp matches))))
Theorem:
(defthm matchstatelist-indices-gte-of-add-backref (iff (matchstatelist-indices-gte n (matches-add-backref name start x)) (matchstatelist-indices-gte n x)))
Theorem:
(defthm matchstatelist-indices-lte-of-add-backref (iff (matchstatelist-indices-lte n (matches-add-backref name start x)) (matchstatelist-indices-lte n x)))
Theorem:
(defthm matches-add-backref-of-nfix-start-index (equal (matches-add-backref name (nfix start-index) matches) (matches-add-backref name start-index matches)))
Theorem:
(defthm matches-add-backref-nat-equiv-congruence-on-start-index (implies (acl2::nat-equiv start-index start-index-equiv) (equal (matches-add-backref name start-index matches) (matches-add-backref name start-index-equiv matches))) :rule-classes :congruence)
Theorem:
(defthm matches-add-backref-of-matchstatelist-fix-matches (equal (matches-add-backref name start-index (matchstatelist-fix matches)) (matches-add-backref name start-index matches)))
Theorem:
(defthm matches-add-backref-matchstatelist-equiv-congruence-on-matches (implies (matchstatelist-equiv matches matches-equiv) (equal (matches-add-backref name start-index matches) (matches-add-backref name start-index matches-equiv))) :rule-classes :congruence)