Recognizer for integral-type structures.
(integral-typep x) → *
Function:
(defun integral-typep (x) (declare (xargs :guard t)) (let ((__function__ 'integral-typep)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :char)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :byte) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :short) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :int) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :long) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-integral-typep (implies (integral-typep x) (consp x)) :rule-classes :compound-recognizer)