(vl-svex-keyval-index-lookup n x) → ans
Function:
(defun vl-svex-keyval-index-lookup (n x) (declare (xargs :guard (and (integerp n) (vl-svex-keyvallist-p x)))) (let ((__function__ 'vl-svex-keyval-index-lookup)) (declare (ignorable __function__)) (b* ((x (vl-svex-keyvallist-fix x)) ((when (atom x)) nil) (key (caar x)) ((when (vl-patternkey-case key :expr (and (vl-expr-resolved-p key.key) (eql (vl-resolved->val key.key) (lifix n))) :otherwise nil)) (cdar x))) (vl-svex-keyval-index-lookup n (cdr x)))))
Theorem:
(defthm return-type-of-vl-svex-keyval-index-lookup (b* ((ans (vl-svex-keyval-index-lookup n x))) (implies ans (sv::svex-p ans))) :rule-classes :rewrite)
Theorem:
(defthm vars-of-vl-svex-keyval-index-lookup (b* ((?ans (vl-svex-keyval-index-lookup n x))) (implies (and ans (not (member v (vl-svex-keyvallist-vars x)))) (not (member v (sv::svex-vars ans))))))
Theorem:
(defthm vl-svex-keyval-index-lookup-of-ifix-n (equal (vl-svex-keyval-index-lookup (ifix n) x) (vl-svex-keyval-index-lookup n x)))
Theorem:
(defthm vl-svex-keyval-index-lookup-int-equiv-congruence-on-n (implies (acl2::int-equiv n n-equiv) (equal (vl-svex-keyval-index-lookup n x) (vl-svex-keyval-index-lookup n-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-svex-keyval-index-lookup-of-vl-svex-keyvallist-fix-x (equal (vl-svex-keyval-index-lookup n (vl-svex-keyvallist-fix x)) (vl-svex-keyval-index-lookup n x)))
Theorem:
(defthm vl-svex-keyval-index-lookup-vl-svex-keyvallist-equiv-congruence-on-x (implies (vl-svex-keyvallist-equiv x x-equiv) (equal (vl-svex-keyval-index-lookup n x) (vl-svex-keyval-index-lookup n x-equiv))) :rule-classes :congruence)