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