Recognizer for vl-select structures.
(vl-select-p x) → *
Function:
(defun vl-select-p (x) (declare (xargs :guard t)) (let ((__function__ 'vl-select-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :field)) (and (b* ((name (cdr x))) (stringp name)))) (t (and (eq (car x) :index) (and) (b* ((val (cdr x))) (vl-expr-p val))))))))
Theorem:
(defthm consp-when-vl-select-p (implies (vl-select-p x) (consp x)) :rule-classes :compound-recognizer)