Recognizer for outcome structures.
(outcomep x) → *
Function:
(defun outcomep (x) (declare (xargs :guard t)) (let ((__function__ 'outcomep)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :function-success)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message)))) ((eq (car x) :type-success) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message)))) ((eq (car x) :specification-success) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message)))) ((eq (car x) :theorem-success) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message)))) ((eq (car x) :transformation-success) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((message (std::da-nth 0 (cdr x))) (toplevels (std::da-nth 1 (cdr x)))) (and (stringp message) (toplevel-listp toplevels))))) ((eq (car x) :proof-obligation-failure) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((message (std::da-nth 0 (cdr x))) (obligation-expr (std::da-nth 1 (cdr x)))) (and (stringp message) (expressionp obligation-expr))))) ((eq (car x) :theorem-failure) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message)))) ((eq (car x) :transformation-failure) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message)))) (t (and (eq (car x) :unexpected-failure) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((message (std::da-nth 0 (cdr x)))) (stringp message))))))))
Theorem:
(defthm consp-when-outcomep (implies (outcomep x) (consp x)) :rule-classes :compound-recognizer)