• Top
  • Programid

Programidp

Recognizer for programid structures.

Signature
(programidp x) → *

Definitions and Theorems

Function: programidp

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

Theorem: consp-when-programidp

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