Recognizer for value-type structures.
(value-typep x) → *
Function:
(defun value-typep (x) (declare (xargs :guard t)) (let ((__function__ 'value-typep)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :plaintext)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((type (std::da-nth 0 (cdr x))) (vis (std::da-nth 1 (cdr x)))) (and (plaintext-typep type) (visibilityp vis))))) ((eq (car x) :record) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((name (std::da-nth 0 (cdr x)))) (identifierp name)))) (t (and (eq (car x) :extrecord) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((loc (std::da-nth 0 (cdr x)))) (locatorp loc))))))))
Theorem:
(defthm consp-when-value-typep (implies (value-typep x) (consp x)) :rule-classes :compound-recognizer)