Recognizer for event structures.
(eventp x) → *
Function:
(defun eventp (x) (declare (xargs :guard t)) (let ((__function__ 'eventp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :create)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((certificate (std::da-nth 0 (cdr x)))) (certificatep certificate)))) ((eq (car x) :accept) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((message (std::da-nth 0 (cdr x)))) (messagep message)))) ((eq (car x) :advance) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((validator (std::da-nth 0 (cdr x)))) (addressp validator)))) (t (and (eq (car x) :commit) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((validator (std::da-nth 0 (cdr x)))) (addressp validator))))))))
Theorem:
(defthm consp-when-eventp (implies (eventp x) (consp x)) :rule-classes :compound-recognizer)