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