Recognizer for theorem structures.
(theoremp x) → *
Function:
(defun theoremp (x) (declare (xargs :guard t)) (let ((__function__ 'theoremp)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(name variables formula))) :exec (fty::alist-with-carsp x '(name variables formula))) (b* ((name (cdr (std::da-nth 0 x))) (variables (cdr (std::da-nth 1 x))) (formula (cdr (std::da-nth 2 x)))) (and (identifierp name) (typed-variable-listp variables) (expressionp formula))))))
Theorem:
(defthm consp-when-theoremp (implies (theoremp x) (consp x)) :rule-classes :compound-recognizer)