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