Recognizer for vl-repetition structures.
(vl-repetition-p x) → *
Function:
(defun vl-repetition-p (x) (declare (xargs :guard t)) (let ((__function__ 'vl-repetition-p)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :vl-repetition) (std::prod-consp (cdr x)) (std::prod-consp (std::prod-cdr (cdr x))) (b* ((type (std::prod-car (cdr x))) (left (std::prod-car (std::prod-cdr (cdr x)))) (right (std::prod-cdr (std::prod-cdr (cdr x))))) (and (vl-repetitiontype-p type) (vl-expr-p left) (vl-maybe-expr-p right))))))
Theorem:
(defthm consp-when-vl-repetition-p (implies (vl-repetition-p x) (consp x)) :rule-classes :compound-recognizer)