Extension theorem for collect-anchors, for a single DAG.
This is proved by induction on
the anchors that form the extension.
We have two anchors,
In the base case,
(equal (cons anchor1 (collect-anchors anchor (- (certificate->round anchor) 2) 0 dag blockchain)) (append (list anchor) (collect-anchors anchor (- (certificate->round anchor) 2) 0 dag blockchain)))
The cons on the left side arises
thanks to the dag-omni-paths-p hypothesis,
which tells us that there is a path from
In the step case,
Theorem:
(defthm collect-anchors-to-append-of-collect-anchors (implies (and (certificate-setp dag) (dag-has-committees-p dag blockchain) (dag-in-committees-p dag blockchain) (in anchor dag) (evenp (certificate->round anchor)) (equal (certificate->author anchor) (leader-at-round (certificate->round anchor) (active-committee-at-round (certificate->round anchor) blockchain))) (dag-omni-paths-p anchor dag) (in anchor1 dag) (evenp (certificate->round anchor1)) (natp round) (evenp round) (< round (certificate->round anchor1)) (>= round (certificate->round anchor))) (equal (collect-anchors anchor1 round 0 dag blockchain) (append (collect-anchors anchor1 round (certificate->round anchor) dag blockchain) (collect-anchors anchor (- (certificate->round anchor) 2) 0 dag blockchain)))))