Recognizer for rule structures.
(rulep x) → *
Function:
(defun rulep (x) (declare (xargs :guard t)) (let ((__function__ 'rulep)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :rule) (true-listp (cdr x)) (eql (len (cdr x)) 3) (b* ((name (std::da-nth 0 (cdr x))) (incremental (std::da-nth 1 (cdr x))) (definiens (std::da-nth 2 (cdr x)))) (and (rulenamep name) (booleanp incremental) (alternationp definiens))))))
Theorem:
(defthm consp-when-rulep (implies (rulep x) (consp x)) :rule-classes :compound-recognizer)