Recognizer for stringlit structures.
(stringlitp x) → *
Function:
(defun stringlitp (x) (declare (xargs :guard t)) (let ((__function__ 'stringlitp)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(prefix? schars))) :exec (fty::alist-with-carsp x '(prefix? schars))) (b* ((prefix? (cdr (std::da-nth 0 x))) (schars (cdr (std::da-nth 1 x)))) (and (eprefix-optionp prefix?) (s-char-listp schars))))))
Theorem:
(defthm consp-when-stringlitp (implies (stringlitp x) (consp x)) :rule-classes :compound-recognizer)