Stake of a validator with respect to a committee.
(committee-validator-stake val commtt) → stake
The validator may or may not be a member of the committee. If it is not a member, we return 0; otherwise, we return its stake in the committee.
Function:
(defun committee-validator-stake (val commtt) (declare (xargs :guard (and (addressp val) (committeep commtt)))) (let ((__function__ 'committee-validator-stake)) (declare (ignorable __function__)) (if (in (address-fix val) (committee-members commtt)) (committee-member-stake val commtt) 0)))
Theorem:
(defthm natp-of-committee-validator-stake (b* ((stake (committee-validator-stake val commtt))) (natp stake)) :rule-classes :rewrite)
Theorem:
(defthm committee-validator-stake-of-address-fix-val (equal (committee-validator-stake (address-fix val) commtt) (committee-validator-stake val commtt)))
Theorem:
(defthm committee-validator-stake-address-equiv-congruence-on-val (implies (address-equiv val val-equiv) (equal (committee-validator-stake val commtt) (committee-validator-stake val-equiv commtt))) :rule-classes :congruence)
Theorem:
(defthm committee-validator-stake-of-committee-fix-commtt (equal (committee-validator-stake val (committee-fix commtt)) (committee-validator-stake val commtt)))
Theorem:
(defthm committee-validator-stake-committee-equiv-congruence-on-commtt (implies (committee-equiv commtt commtt-equiv) (equal (committee-validator-stake val commtt) (committee-validator-stake val commtt-equiv))) :rule-classes :congruence)