(vl-find-highest-priority-extension extensions found) → hit
Function:
(defun vl-find-highest-priority-extension (extensions found) (declare (xargs :guard (and (string-listp extensions) (string-listp found)))) (let ((__function__ 'vl-find-highest-priority-extension)) (declare (ignorable __function__)) (b* ((extensions (string-list-fix extensions)) (found (string-list-fix found)) ((when (atom extensions)) (raise "Programming error, failed to find extension.") "") ((when (member-equal (car extensions) found)) (car extensions))) (vl-find-highest-priority-extension (cdr extensions) found))))
Theorem:
(defthm stringp-of-vl-find-highest-priority-extension (b* ((hit (vl-find-highest-priority-extension extensions found))) (stringp hit)) :rule-classes :type-prescription)
Theorem:
(defthm vl-find-highest-priority-extension-of-string-list-fix-extensions (equal (vl-find-highest-priority-extension (string-list-fix extensions) found) (vl-find-highest-priority-extension extensions found)))
Theorem:
(defthm vl-find-highest-priority-extension-string-list-equiv-congruence-on-extensions (implies (str::string-list-equiv extensions extensions-equiv) (equal (vl-find-highest-priority-extension extensions found) (vl-find-highest-priority-extension extensions-equiv found))) :rule-classes :congruence)
Theorem:
(defthm vl-find-highest-priority-extension-of-string-list-fix-found (equal (vl-find-highest-priority-extension extensions (string-list-fix found)) (vl-find-highest-priority-extension extensions found)))
Theorem:
(defthm vl-find-highest-priority-extension-string-list-equiv-congruence-on-found (implies (str::string-list-equiv found found-equiv) (equal (vl-find-highest-priority-extension extensions found) (vl-find-highest-priority-extension extensions found-equiv))) :rule-classes :congruence)