Recognizer for hex-pair structures.
(hex-pairp x) → *
Function:
(defun hex-pairp (x) (declare (xargs :guard t)) (let ((__function__ 'hex-pairp)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :hex-pair) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(1st 2nd))) :exec (fty::alist-with-carsp (cdr x) '(1st 2nd))) (b* ((1st (cdr (std::da-nth 0 (cdr x)))) (2nd (cdr (std::da-nth 1 (cdr x))))) (and (hex-digitp 1st) (hex-digitp 2nd))))))
Theorem:
(defthm consp-when-hex-pairp (implies (hex-pairp x) (consp x)) :rule-classes :compound-recognizer)