Recognizer for expr/tyname structures.
(expr/tyname-p x) → *
Function:
(defun expr/tyname-p (x) (declare (xargs :guard t)) (let ((__function__ 'expr/tyname-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :expr)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((unwrap (std::da-nth 0 (cdr x)))) (exprp unwrap)))) (t (and (eq (car x) :tyname) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((unwrap (std::da-nth 0 (cdr x)))) (tynamep unwrap))))))))
Theorem:
(defthm consp-when-expr/tyname-p (implies (expr/tyname-p x) (consp x)) :rule-classes :compound-recognizer)