(vl-function-map-find-matching-aux x args) → (mv score match)
Function:
(defun vl-function-map-find-matching-aux (x args) (declare (xargs :guard (and (vl-function-specialization-map-p x) (sv::maybe-4veclist-p args)))) (let ((__function__ 'vl-function-map-find-matching-aux)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv nil nil)) ((unless (mbt (consp (car x)))) (vl-function-map-find-matching-aux (cdr x) args)) ((cons specxn (vl-function-specialization match)) (car x)) ((unless match.successp) (vl-function-map-find-matching-aux (cdr x) args)) (score (vl-function-map-check-matching specxn args)) ((unless score) (vl-function-map-find-matching-aux (cdr x) args)) ((mv rest-score rest-match) (vl-function-map-find-matching-aux (cdr x) args)) ((unless (and rest-score (> rest-score score))) (mv score (vl-function-specialization-fix match)))) (mv rest-score rest-match))))
Theorem:
(defthm maybe-natp-of-vl-function-map-find-matching-aux.score (b* (((mv ?score ?match) (vl-function-map-find-matching-aux x args))) (maybe-natp score)) :rule-classes :type-prescription)
Theorem:
(defthm return-type-of-vl-function-map-find-matching-aux.match (b* (((mv ?score ?match) (vl-function-map-find-matching-aux x args))) (implies score (vl-function-specialization-p match))) :rule-classes :rewrite)
Theorem:
(defthm vl-function-map-find-matching-aux-of-vl-function-specialization-map-fix-x (equal (vl-function-map-find-matching-aux (vl-function-specialization-map-fix x) args) (vl-function-map-find-matching-aux x args)))
Theorem:
(defthm vl-function-map-find-matching-aux-vl-function-specialization-map-equiv-congruence-on-x (implies (vl-function-specialization-map-equiv x x-equiv) (equal (vl-function-map-find-matching-aux x args) (vl-function-map-find-matching-aux x-equiv args))) :rule-classes :congruence)
Theorem:
(defthm vl-function-map-find-matching-aux-of-maybe-4veclist-fix-args (equal (vl-function-map-find-matching-aux x (sv::maybe-4veclist-fix args)) (vl-function-map-find-matching-aux x args)))
Theorem:
(defthm vl-function-map-find-matching-aux-maybe-4veclist-equiv-congruence-on-args (implies (sv::maybe-4veclist-equiv args args-equiv) (equal (vl-function-map-find-matching-aux x args) (vl-function-map-find-matching-aux x args-equiv))) :rule-classes :congruence)