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