• Top
  • Annotation

Annotationp

Recognizer for annotation structures.

Signature
(annotationp x) → *

Definitions and Theorems

Function: annotationp

(defun annotationp (x)
  (declare (xargs :guard t))
  (let ((__function__ 'annotationp))
    (declare (ignorable __function__))
    (and (mbe :logic (and (alistp x)
                          (equal (strip-cars x) '(name)))
              :exec (fty::alist-with-carsp x '(name)))
         (b* ((name (cdr (std::da-nth 0 x))))
           (identifierp name)))))

Theorem: consp-when-annotationp

(defthm consp-when-annotationp
  (implies (annotationp x) (consp x))
  :rule-classes :compound-recognizer)