Recognizer for dec-core-fconst structures.
(dec-core-fconstp x) → *
Function:
(defun dec-core-fconstp (x) (declare (xargs :guard t)) (let ((__function__ 'dec-core-fconstp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :frac)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((significand (std::da-nth 0 (cdr x))) (expo? (std::da-nth 1 (cdr x)))) (and (dec-frac-constp significand) (dec-expo-optionp expo?))))) (t (and (eq (car x) :int) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((significand (std::da-nth 0 (cdr x))) (expo (std::da-nth 1 (cdr x)))) (and (dec-digit-char-listp significand) (dec-expop expo)))))))))
Theorem:
(defthm consp-when-dec-core-fconstp (implies (dec-core-fconstp x) (consp x)) :rule-classes :compound-recognizer)