Recognizer for token+span structures.
(token+span-p x) → *
Function:
(defun token+span-p (x) (declare (xargs :guard t)) (let ((__function__ 'token+span-p)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(token span))) :exec (fty::alist-with-carsp x '(token span))) (b* ((token (cdr (std::da-nth 0 x))) (span (cdr (std::da-nth 1 x)))) (and (tokenp token) (spanp span))))))
Theorem:
(defthm consp-when-token+span-p (implies (token+span-p x) (consp x)) :rule-classes :compound-recognizer)