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