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