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