Recognizer for const structures.
(constp x) → *
Function:
(defun constp (x) (declare (xargs :guard t)) (and (consp x) (cond ((or (atom x) (eq (car x) :int)) (and (b* ((iconst (cdr x))) (iconstp iconst)))) ((eq (car x) :float) (and (b* ((fconst (cdr x))) (fconstp fconst)))) ((eq (car x) :enum) (and (b* ((ident (cdr x))) (identp ident)))) (t (and (eq (car x) :char) (and) (b* ((cconst (cdr x))) (cconstp cconst)))))))
Theorem:
(defthm consp-when-constp (implies (constp x) (consp x)) :rule-classes :compound-recognizer)