Recognizer for structdecl structures.
(structdeclp x) → *
Function:
(defun structdeclp (x) (declare (xargs :guard t)) (let ((__function__ 'structdeclp)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :structdecl) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(name components recordp))) :exec (fty::alist-with-carsp (cdr x) '(name components recordp))) (b* ((name (cdr (std::da-nth 0 (cdr x)))) (components (cdr (std::da-nth 1 (cdr x)))) (recordp (cdr (std::da-nth 2 (cdr x))))) (and (identifierp name) (compdecl-listp components) (booleanp recordp))))))
Theorem:
(defthm consp-when-structdeclp (implies (structdeclp x) (consp x)) :rule-classes :compound-recognizer)