Recognizer for fconst structures.
(fconstp x) → *
Function:
(defun fconstp (x) (declare (xargs :guard t)) (let ((__function__ 'fconstp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :dec)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((core (std::da-nth 0 (cdr x))) (suffix? (std::da-nth 1 (cdr x)))) (and (dec-core-fconstp core) (fsuffix-optionp suffix?))))) (t (and (eq (car x) :hex) (and (true-listp (cdr x)) (eql (len (cdr x)) 3)) (b* ((prefix (std::da-nth 0 (cdr x))) (core (std::da-nth 1 (cdr x))) (suffix? (std::da-nth 2 (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)