• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Riscv
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
          • Correctness
          • Definition
            • Initialization
            • Transitions
            • States
              • Committees
                • Max-faulty-for-total
                • Bonded-committee-at-round
                • Committee-members-stake
                • Active-committee-at-round
                • Update-committee-with-transaction
                • Committee-quorum-stake
                • Lookback
                • Committee-option
                • Update-committee-with-transaction-list
                • Committee-after-blocks
                • Same-bonded-committees-p
                • Same-active-committees-p
                • Committee
                • Committee-member-stake
                  • Committee-total-stake
                  • Committee-max-faulty-stake
                  • Committee-nonemptyp
                  • Committee-members
                  • Address-pos-map
                  • Genesis-committee
                • System-states
                • Certificates
                • Messages
                • Transactions
                • Proposals
                • Validator-states
                • Blocks
                • Addresses
              • Events
              • Reachability
            • Library-extensions
          • Aleovm
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Committees

    Committee-member-stake

    Stake of a member of the committee.

    Signature
    (committee-member-stake member commtt) → stake
    Arguments
    member — Guard (addressp member).
    commtt — Guard (committeep commtt).
    Returns
    stake — Type (posp stake).

    We look up the member's address in the map.

    Definitions and Theorems

    Function: committee-member-stake

    (defun committee-member-stake (member commtt)
     (declare (xargs :guard (and (addressp member)
                                 (committeep commtt))))
     (declare (xargs :guard (in (address-fix member)
                                (committee-members commtt))))
     (let ((__function__ 'committee-member-stake))
       (declare (ignorable __function__))
       (pos-fix (omap::lookup (address-fix member)
                              (committee->members-with-stake commtt)))))

    Theorem: posp-of-committee-member-stake

    (defthm posp-of-committee-member-stake
      (b* ((stake (committee-member-stake member commtt)))
        (posp stake))
      :rule-classes (:rewrite :type-prescription))

    Theorem: committee-member-stake-of-address-fix-member

    (defthm committee-member-stake-of-address-fix-member
      (equal (committee-member-stake (address-fix member)
                                     commtt)
             (committee-member-stake member commtt)))

    Theorem: committee-member-stake-address-equiv-congruence-on-member

    (defthm committee-member-stake-address-equiv-congruence-on-member
      (implies (address-equiv member member-equiv)
               (equal (committee-member-stake member commtt)
                      (committee-member-stake member-equiv commtt)))
      :rule-classes :congruence)

    Theorem: committee-member-stake-of-committee-fix-commtt

    (defthm committee-member-stake-of-committee-fix-commtt
      (equal (committee-member-stake member (committee-fix commtt))
             (committee-member-stake member commtt)))

    Theorem: committee-member-stake-committee-equiv-congruence-on-commtt

    (defthm committee-member-stake-committee-equiv-congruence-on-commtt
      (implies (committee-equiv commtt commtt-equiv)
               (equal (committee-member-stake member commtt)
                      (committee-member-stake member commtt-equiv)))
      :rule-classes :congruence)