Recognizer for hex-core-fconst structures.
(hex-core-fconstp x) → *
Function:
(defun hex-core-fconstp (x) (declare (xargs :guard t)) (let ((__function__ 'hex-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 (hex-frac-constp significand) (bin-expop 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 (hex-digit-char-listp significand) (bin-expop expo)))))))))
Theorem:
(defthm consp-when-hex-core-fconstp (implies (hex-core-fconstp x) (consp x)) :rule-classes :compound-recognizer)