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