Recognizer for type-subset structures.
(type-subsetp x) → *
Function:
(defun type-subsetp (x) (declare (xargs :guard t)) (let ((__function__ 'type-subsetp)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(supertype variable restriction witness))) :exec (fty::alist-with-carsp x '(supertype variable restriction witness))) (b* ((supertype (cdr (std::da-nth 0 x))) (variable (cdr (std::da-nth 1 x))) (restriction (cdr (std::da-nth 2 x))) (witness (cdr (std::da-nth 3 x)))) (and (typep supertype) (identifierp variable) (expressionp restriction) (maybe-expressionp witness))))))
Theorem:
(defthm consp-when-type-subsetp (implies (type-subsetp x) (consp x)) :rule-classes :compound-recognizer)