Active committee at a given round.
(active-committee-at-round round blocks all-vals) → commtt?
As explained in lookback,
the active committee for a given round,
i.e. the one in charge of the round,
is the one bonded at the earlier round
whose distance is
Note that there is no guarantee that there is a bonded committee
at round
The role of the
We show that the bonded committee, if calculable,
has members in
Function:
(defun active-committee-at-round (round blocks all-vals) (declare (xargs :guard (and (posp round) (block-listp blocks) (address-setp all-vals)))) (let ((__function__ 'active-committee-at-round)) (declare (ignorable __function__)) (if (> (pos-fix round) (lookback)) (bonded-committee-at-round (- (pos-fix round) (lookback)) blocks all-vals) (genesis-committee))))
Theorem:
(defthm committee-optionp-of-active-committee-at-round (b* ((commtt? (active-committee-at-round round blocks all-vals))) (committee-optionp commtt?)) :rule-classes :rewrite)
Theorem:
(defthm active-committee-at-earlier-round-when-at-later-round (implies (and (active-committee-at-round later blocks all-vals) (< (pos-fix earlier) (pos-fix later))) (active-committee-at-round earlier blocks all-vals)))
Theorem:
(defthm active-committee-at-previous-round-when-at-round (implies (and (active-committee-at-round round blocks all-vals) (> (pos-fix round) 1)) (active-committee-at-round (1- round) blocks all-vals)))
Theorem:
(defthm active-committee-at-previous2-round-when-at-round (implies (and (active-committee-at-round round blocks all-vals) (> (pos-fix round) 2)) (active-committee-at-round (- round 2) blocks all-vals)))
Theorem:
(defthm active-committee-at-previous3-round-when-at-round (implies (and (active-committee-at-round round blocks all-vals) (> (pos-fix round) 3)) (active-committee-at-round (- round 3) blocks all-vals)))
Theorem:
(defthm active-committee-at-round-when-no-blocks (implies (endp blocks) (b* ((commtt (active-committee-at-round round blocks all-vals))) (implies commtt (equal commtt (genesis-committee))))))
Theorem:
(defthm active-committee-at-round-subset-all-vals (implies (and (address-setp all-vals) (subset (committee-members (genesis-committee)) all-vals)) (b* ((?commtt? (active-committee-at-round round blocks all-vals))) (implies commtt? (subset (committee-members commtt?) all-vals)))))
Theorem:
(defthm active-committee-at-round-iff-round-upper-bound (iff (active-committee-at-round round blocks all-vals) (<= (nfix (- (pos-fix round) (lookback))) (+ 2 (blocks-last-round blocks)))))
Theorem:
(defthm active-committee-at-round-of-round-leq-2+lookback (implies (and (blocks-ordered-even-p blocks) (<= (pos-fix round) (+ 2 (lookback)))) (equal (active-committee-at-round round blocks all-vals) (genesis-committee))))
Theorem:
(defthm active-committee-at-round-of-append (implies (and (blocks-ordered-even-p (append blocks1 blocks)) (active-committee-at-round round blocks all-vals)) (equal (active-committee-at-round round (append blocks1 blocks) all-vals) (active-committee-at-round round blocks all-vals))))
Theorem:
(defthm active-committee-at-round-of-pos-fix-round (equal (active-committee-at-round (pos-fix round) blocks all-vals) (active-committee-at-round round blocks all-vals)))
Theorem:
(defthm active-committee-at-round-pos-equiv-congruence-on-round (implies (acl2::pos-equiv round round-equiv) (equal (active-committee-at-round round blocks all-vals) (active-committee-at-round round-equiv blocks all-vals))) :rule-classes :congruence)
Theorem:
(defthm active-committee-at-round-of-block-list-fix-blocks (equal (active-committee-at-round round (block-list-fix blocks) all-vals) (active-committee-at-round round blocks all-vals)))
Theorem:
(defthm active-committee-at-round-block-list-equiv-congruence-on-blocks (implies (block-list-equiv blocks blocks-equiv) (equal (active-committee-at-round round blocks all-vals) (active-committee-at-round round blocks-equiv all-vals))) :rule-classes :congruence)
Theorem:
(defthm active-committee-at-round-of-address-set-fix-all-vals (equal (active-committee-at-round round blocks (address-set-fix all-vals)) (active-committee-at-round round blocks all-vals)))
Theorem:
(defthm active-committee-at-round-address-set-equiv-congruence-on-all-vals (implies (address-set-equiv all-vals all-vals-equiv) (equal (active-committee-at-round round blocks all-vals) (active-committee-at-round round blocks all-vals-equiv))) :rule-classes :congruence)