(vl-pgenstr-highest prefix names) returns the largest
(vl-pgenstr-highest prefix names) → *
Function:
(defun vl-pgenstr-highest (prefix names) (declare (xargs :guard (and (stringp prefix) (string-listp names)))) (let ((__function__ 'vl-pgenstr-highest)) (declare (ignorable __function__)) (cond ((atom names) 0) ((vl-pgenstr-p prefix (car names)) (max (vl-pgenstr->val prefix (car names)) (vl-pgenstr-highest prefix (cdr names)))) (t (vl-pgenstr-highest prefix (cdr names))))))
Theorem:
(defthm none-greater-than-vl-pgenstr-highest (implies (and (< (vl-pgenstr-highest prefix names) n) (force (stringp prefix)) (force (natp n))) (equal (member-equal (vl-pgenstr prefix n) names) nil)))
Theorem:
(defthm vl-pgenstr-highest-of-incremental-extension (implies (force (stringp prefix)) (equal (vl-pgenstr-highest prefix (cons (vl-pgenstr prefix (+ 1 (vl-pgenstr-highest prefix modns))) modns)) (+ 1 (vl-pgenstr-highest prefix modns)))))
Theorem:
(defthm vl-pgenstr-highest-of-irrelevant-extension (implies (and (not (equal other prefix)) (force (stringp prefix)) (force (stringp other))) (equal (vl-pgenstr-highest other (cons (vl-pgenstr prefix k) modns)) (vl-pgenstr-highest other modns))))