Recognizer for certificate structures.
(certificatep x) → *
Function:
(defun certificatep (x) (declare (xargs :guard t)) (let ((__function__ 'certificatep)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(proposal endorsers))) :exec (fty::alist-with-carsp x '(proposal endorsers))) (b* ((proposal (cdr (std::da-nth 0 x))) (endorsers (cdr (std::da-nth 1 x)))) (and (proposalp proposal) (address-setp endorsers))))))
Theorem:
(defthm consp-when-certificatep (implies (certificatep x) (consp x)) :rule-classes :compound-recognizer)