• 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
              • System-states
                • Validators-state
                • System-state
                • Update-validator-state
                • Update-network-state
                • Get-validator-state
                  • Correct-addresses
                  • Get-network-state
                • 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
    • System-states

    Get-validator-state

    Retrieve the state of a correct validator from the system.

    Signature
    (get-validator-state val systate) → vstate
    Arguments
    val — Guard (addressp val).
    systate — Guard (system-statep systate).
    Returns
    vstate — Type (validator-statep vstate).

    Definitions and Theorems

    Function: get-validator-state

    (defun get-validator-state (val systate)
      (declare (xargs :guard (and (addressp val)
                                  (system-statep systate))))
      (declare (xargs :guard (in val (correct-addresses systate))))
      (let ((__function__ 'get-validator-state))
        (declare (ignorable __function__))
        (validator-state-fix
             (omap::lookup (address-fix val)
                           (system-state->validators systate)))))

    Theorem: validator-statep-of-get-validator-state

    (defthm validator-statep-of-get-validator-state
      (b* ((vstate (get-validator-state val systate)))
        (validator-statep vstate))
      :rule-classes :rewrite)

    Theorem: get-validator-state-of-address-fix-val

    (defthm get-validator-state-of-address-fix-val
      (equal (get-validator-state (address-fix val)
                                  systate)
             (get-validator-state val systate)))

    Theorem: get-validator-state-address-equiv-congruence-on-val

    (defthm get-validator-state-address-equiv-congruence-on-val
      (implies (address-equiv val val-equiv)
               (equal (get-validator-state val systate)
                      (get-validator-state val-equiv systate)))
      :rule-classes :congruence)

    Theorem: get-validator-state-of-system-state-fix-systate

    (defthm get-validator-state-of-system-state-fix-systate
      (equal (get-validator-state val (system-state-fix systate))
             (get-validator-state val systate)))

    Theorem: get-validator-state-system-state-equiv-congruence-on-systate

    (defthm get-validator-state-system-state-equiv-congruence-on-systate
      (implies (system-state-equiv systate systate-equiv)
               (equal (get-validator-state val systate)
                      (get-validator-state val systate-equiv)))
      :rule-classes :congruence)