Preferred names from low to high, inclusive, e.g., (foo_3 foo_4 foo_5)
(vl-preferred-replicate-names low high instname) → names
Function:
(defun vl-preferred-replicate-names (low high instname) (declare (xargs :guard (and (natp low) (natp high) (stringp instname)))) (declare (xargs :guard (<= low high))) (let ((__function__ 'vl-preferred-replicate-names)) (declare (ignorable __function__)) (b* ((low (lnfix low)) (high (lnfix high)) (name (cat instname "_" (natstr low))) ((when (mbe :logic (zp (- high low)) :exec (eql low high))) (list name))) (cons name (vl-preferred-replicate-names (+ 1 low) high instname)))))
Theorem:
(defthm string-listp-of-vl-preferred-replicate-names (b* ((names (vl-preferred-replicate-names low high instname))) (string-listp names)) :rule-classes :rewrite)
Theorem:
(defthm len-of-vl-preferred-replicate-names (equal (len (vl-preferred-replicate-names low high instname)) (+ 1 (nfix (- (nfix high) (nfix low))))))
Theorem:
(defthm vl-preferred-replicate-names-of-nfix-low (equal (vl-preferred-replicate-names (nfix low) high instname) (vl-preferred-replicate-names low high instname)))
Theorem:
(defthm vl-preferred-replicate-names-nat-equiv-congruence-on-low (implies (acl2::nat-equiv low low-equiv) (equal (vl-preferred-replicate-names low high instname) (vl-preferred-replicate-names low-equiv high instname))) :rule-classes :congruence)
Theorem:
(defthm vl-preferred-replicate-names-of-nfix-high (equal (vl-preferred-replicate-names low (nfix high) instname) (vl-preferred-replicate-names low high instname)))
Theorem:
(defthm vl-preferred-replicate-names-nat-equiv-congruence-on-high (implies (acl2::nat-equiv high high-equiv) (equal (vl-preferred-replicate-names low high instname) (vl-preferred-replicate-names low high-equiv instname))) :rule-classes :congruence)
Theorem:
(defthm vl-preferred-replicate-names-of-str-fix-instname (equal (vl-preferred-replicate-names low high (str-fix instname)) (vl-preferred-replicate-names low high instname)))
Theorem:
(defthm vl-preferred-replicate-names-streqv-congruence-on-instname (implies (streqv instname instname-equiv) (equal (vl-preferred-replicate-names low high instname) (vl-preferred-replicate-names low high instname-equiv))) :rule-classes :congruence)