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* ((unwrap (cdr x))) (iconstp unwrap)))) ((eq (car x) :float) (and (b* ((unwrap (cdr x))) (fconstp unwrap)))) ((eq (car x) :enum) (and (b* ((unwrap (cdr x))) (identp unwrap)))) (t (and (eq (car x) :char) (and) (b* ((unwrap (cdr x))) (cconstp unwrap)))))))
Theorem:
(defthm consp-when-constp (implies (constp x) (consp x)) :rule-classes :compound-recognizer)