Generate a list of fresh names, using particular, preferred names if possible.
(vl-namefactory-plain-names names factory) → (mv fresh-names new-factory)
Function:
(defun vl-namefactory-plain-names (names factory) (declare (xargs :guard (and (string-listp names) (vl-namefactory-p factory)))) (let ((__function__ 'vl-namefactory-plain-names)) (declare (ignorable __function__)) (b* (((when (atom names)) (mv nil (vl-namefactory-fix factory))) ((mv name factory) (vl-namefactory-plain-name (car names) factory)) ((mv rest factory) (vl-namefactory-plain-names (cdr names) factory))) (mv (cons name rest) factory))))
Theorem:
(defthm string-listp-of-vl-namefactory-plain-names.fresh-names (b* (((mv ?fresh-names ?new-factory) (vl-namefactory-plain-names names factory))) (string-listp fresh-names)) :rule-classes :rewrite)
Theorem:
(defthm vl-namefactory-p-of-vl-namefactory-plain-names.new-factory (b* (((mv ?fresh-names ?new-factory) (vl-namefactory-plain-names names factory))) (vl-namefactory-p new-factory)) :rule-classes :rewrite)
Theorem:
(defthm len-vl-namefactory-plain-names (equal (len (mv-nth 0 (vl-namefactory-plain-names names factory))) (len names)))
Theorem:
(defthm true-listp-vl-namefactory-plain-names (true-listp (mv-nth 0 (vl-namefactory-plain-names names factory))) :rule-classes :type-prescription)
Theorem:
(defthm vl-namefactory-plain-names-are-fresh (implies (member-equal name (vl-namefactory-allnames factory)) (b* (((mv fresh-names ?new-factory) (vl-namefactory-plain-names names factory))) (not (member name fresh-names)))))
Theorem:
(defthm vl-namefactory-plain-names-of-string-list-fix-names (equal (vl-namefactory-plain-names (string-list-fix names) factory) (vl-namefactory-plain-names names factory)))
Theorem:
(defthm vl-namefactory-plain-names-string-list-equiv-congruence-on-names (implies (str::string-list-equiv names names-equiv) (equal (vl-namefactory-plain-names names factory) (vl-namefactory-plain-names names-equiv factory))) :rule-classes :congruence)
Theorem:
(defthm vl-namefactory-plain-names-of-vl-namefactory-fix-factory (equal (vl-namefactory-plain-names names (vl-namefactory-fix factory)) (vl-namefactory-plain-names names factory)))
Theorem:
(defthm vl-namefactory-plain-names-vl-namefactory-equiv-congruence-on-factory (implies (vl-namefactory-equiv factory factory-equiv) (equal (vl-namefactory-plain-names names factory) (vl-namefactory-plain-names names factory-equiv))) :rule-classes :congruence)