• Top
  • Funparam

Funparamp

Recognizer for funparam structures.

Signature
(funparamp x) → *

Definitions and Theorems

Function: funparamp

(defun funparamp (x)
  (declare (xargs :guard t))
  (let ((__function__ 'funparamp))
    (declare (ignorable __function__))
    (and (consp x)
         (eq (car x) :funparam)
         (mbe :logic (and (alistp (cdr x))
                          (equal (strip-cars (cdr x))
                                 '(name sort type)))
              :exec (fty::alist-with-carsp (cdr x)
                                           '(name sort type)))
         (b* ((name (cdr (std::da-nth 0 (cdr x))))
              (sort (cdr (std::da-nth 1 (cdr x))))
              (type (cdr (std::da-nth 2 (cdr x)))))
           (and (identifierp name)
                (var/const-sortp sort)
                (typep type))))))

Theorem: consp-when-funparamp

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