Recognizer for field structures.
(fieldp x) → *
Function:
(defun fieldp (x) (declare (xargs :guard t)) (let ((__function__ 'fieldp)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(name type))) :exec (fty::alist-with-carsp x '(name type))) (b* ((name (cdr (std::da-nth 0 x))) (type (cdr (std::da-nth 1 x)))) (and (identifierp name) (typep type))))))
Theorem:
(defthm consp-when-fieldp (implies (fieldp x) (consp x)) :rule-classes :compound-recognizer)