Recognizer for hexdig/uscore structures.
(hexdig/uscore-p x) → *
Function:
(defun hexdig/uscore-p (x) (declare (xargs :guard t)) (let ((__function__ 'hexdig/uscore-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :digit)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (hex-digitp get)))) (t (and (eq (car x) :underscore) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-hexdig/uscore-p (implies (hexdig/uscore-p x) (consp x)) :rule-classes :compound-recognizer)