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