(vl-find-structmember name membs) → memb
Function:
(defun vl-find-structmember (name membs) (declare (xargs :guard (and (stringp name) (vl-structmemberlist-p membs)))) (let ((__function__ 'vl-find-structmember)) (declare (ignorable __function__)) (if (atom membs) nil (if (equal (string-fix name) (vl-structmember->name (car membs))) (vl-structmember-fix (car membs)) (vl-find-structmember name (cdr membs))))))
Theorem:
(defthm return-type-of-vl-find-structmember (b* ((memb (vl-find-structmember name membs))) (iff (vl-structmember-p memb) memb)) :rule-classes :rewrite)
Theorem:
(defthm vl-datatype-resolved-p-of-find-structmember (implies (and (vl-structmemberlist-resolved-p members) (vl-find-structmember name members)) (vl-datatype-resolved-p (vl-structmember->type (vl-find-structmember name members)))))
Theorem:
(defthm vl-find-structmember-of-str-fix-name (equal (vl-find-structmember (str-fix name) membs) (vl-find-structmember name membs)))
Theorem:
(defthm vl-find-structmember-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-find-structmember name membs) (vl-find-structmember name-equiv membs))) :rule-classes :congruence)
Theorem:
(defthm vl-find-structmember-of-vl-structmemberlist-fix-membs (equal (vl-find-structmember name (vl-structmemberlist-fix membs)) (vl-find-structmember name membs)))
Theorem:
(defthm vl-find-structmember-vl-structmemberlist-equiv-congruence-on-membs (implies (vl-structmemberlist-equiv membs membs-equiv) (equal (vl-find-structmember name membs) (vl-find-structmember name membs-equiv))) :rule-classes :congruence)