Recognizer for programdef structures.
(programdefp x) → *
Function:
(defun programdefp (x) (declare (xargs :guard t)) (let ((__function__ 'programdefp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :mapping)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (mappingp get)))) ((eq (car x) :interface) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (interface-typep get)))) ((eq (car x) :record) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (record-typep get)))) ((eq (car x) :closure) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (closurep get)))) (t (and (eq (car x) :function) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((get (std::da-nth 0 (cdr x)))) (functionp get))))))))
Theorem:
(defthm consp-when-programdefp (implies (programdefp x) (consp x)) :rule-classes :compound-recognizer)