Collect all the anchors in a DAG, starting from a given anchor.
(collect-all-anchors last-anchor dag vals) → all-anchors
This is a specialization of collect-anchors that does not stop at the last committed rounds, but instead goes all the way to the start of the DAG.
The input
Function:
(defun collect-all-anchors (last-anchor dag vals) (declare (xargs :guard (and (certificatep last-anchor) (certificate-setp dag) (address-setp vals)))) (declare (xargs :guard (and (in last-anchor dag) (evenp (certificate->round last-anchor)) (not (emptyp vals))))) (let ((__function__ 'collect-all-anchors)) (declare (ignorable __function__)) (collect-anchors last-anchor (- (certificate->round last-anchor) 2) 0 dag vals)))
Theorem:
(defthm certificate-listp-of-collect-all-anchors (b* ((all-anchors (collect-all-anchors last-anchor dag vals))) (certificate-listp all-anchors)) :rule-classes :rewrite)