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