Create an indexed name, from a base and an index.
Function:
(defun iname (base i) (declare (xargs :guard (and (stringp base) (natp i)))) (let ((__function__ 'iname)) (declare (ignorable __function__)) (str::cat base "_" (str::nat-to-dec-string i))))
Theorem:
(defthm stringp-of-iname (b* ((name (iname base i))) (stringp name)) :rule-classes :rewrite)
Theorem:
(defthm iname-of-nfix-i (equal (iname base (nfix i)) (iname base i)))
Theorem:
(defthm iname-nat-equiv-congruence-on-i (implies (acl2::nat-equiv i i-equiv) (equal (iname base i) (iname base i-equiv))) :rule-classes :congruence)
Theorem:
(defthm iname-not-equal-to-base (implies (stringp base) (not (equal (iname base i) base))))