Recognizer for fconst structures.
(fconstp x) → *
Function:
(defun fconstp (x) (declare (xargs :guard t)) (and (consp x) (cond ((or (atom x) (eq (car x) :dec)) (and (consp (cdr x)) (b* ((core (car (cdr x))) (suffix? (cdr (cdr x)))) (and (dec-core-fconstp core) (fsuffix-optionp suffix?))))) (t (and (eq (car x) :hex) (and (consp (cdr x)) (consp (cdr (cdr x)))) (b* ((prefix (car (cdr x))) (core (car (cdr (cdr x)))) (suffix? (cdr (cdr (cdr x))))) (and (hprefixp prefix) (hex-core-fconstp core) (fsuffix-optionp suffix?))))))))
Theorem:
(defthm consp-when-fconstp (implies (fconstp x) (consp x)) :rule-classes :compound-recognizer)