(vl-keyval-member-lookup name x) → ans
Function:
(defun vl-keyval-member-lookup (name x) (declare (xargs :guard (and (stringp name) (vl-keyvallist-p x)))) (let ((__function__ 'vl-keyval-member-lookup)) (declare (ignorable __function__)) (b* ((x (vl-keyvallist-fix x)) ((when (atom x)) nil) (key (caar x)) ((when (vl-patternkey-case key :structmem (equal key.name (string-fix name)) :otherwise nil)) (cdar x))) (vl-keyval-member-lookup name (cdr x)))))
Theorem:
(defthm return-type-of-vl-keyval-member-lookup (b* ((ans (vl-keyval-member-lookup name x))) (implies ans (vl-expr-p ans))) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-count-of-vl-keyval-member-lookup (b* ((?ans (vl-keyval-member-lookup name x))) (implies ans (< (vl-expr-count ans) (vl-keyvallist-count x)))) :rule-classes :linear)
Theorem:
(defthm vl-keyval-member-lookup-of-str-fix-name (equal (vl-keyval-member-lookup (str-fix name) x) (vl-keyval-member-lookup name x)))
Theorem:
(defthm vl-keyval-member-lookup-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-keyval-member-lookup name x) (vl-keyval-member-lookup name-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-keyval-member-lookup-of-vl-keyvallist-fix-x (equal (vl-keyval-member-lookup name (vl-keyvallist-fix x)) (vl-keyval-member-lookup name x)))
Theorem:
(defthm vl-keyval-member-lookup-vl-keyvallist-equiv-congruence-on-x (implies (vl-keyvallist-equiv x x-equiv) (equal (vl-keyval-member-lookup name x) (vl-keyval-member-lookup name x-equiv))) :rule-classes :congruence)