Recognizer for iconst structures.
(iconstp x) → *
Function:
(defun iconstp (x) (declare (xargs :guard t)) (let ((__function__ 'iconstp)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :iconst) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(value base unsignedp length))) :exec (fty::alist-with-carsp (cdr x) '(value base unsignedp length))) (b* ((value (cdr (std::da-nth 0 (cdr x)))) (base (cdr (std::da-nth 1 (cdr x)))) (unsignedp (cdr (std::da-nth 2 (cdr x)))) (length (cdr (std::da-nth 3 (cdr x))))) (and (natp value) (iconst-basep base) (booleanp unsignedp) (iconst-lengthp length))))))
Theorem:
(defthm consp-when-iconstp (implies (iconstp x) (consp x)) :rule-classes :compound-recognizer)