• 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
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • 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
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
        • Aleobft
          • Aleobft-static
          • Aleobft-dynamic
          • Aleobft-arxiv
            • 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
                  • Validator-states
                  • Blocks
                  • Addresses
                • Events
                • Reachability
            • Aleobft-stake
            • Aleobft-proposals
            • Library-extensions
          • Leo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • System-states

    Get-network-state

    Retrieve the state of the network in the system.

    Signature
    (get-network-state systate) → network
    Arguments
    systate — Guard (system-statep systate).
    Returns
    network — Type (message-setp network).

    This is a thin layer, but it provides slightly more abstraction.

    Definitions and Theorems

    Function: get-network-state

    (defun get-network-state (systate)
      (declare (xargs :guard (system-statep systate)))
      (let ((__function__ 'get-network-state))
        (declare (ignorable __function__))
        (system-state->network systate)))

    Theorem: message-setp-of-get-network-state

    (defthm message-setp-of-get-network-state
      (b* ((network (get-network-state systate)))
        (message-setp network))
      :rule-classes :rewrite)

    Theorem: get-network-state-of-update-validator-state

    (defthm get-network-state-of-update-validator-state
     (equal
         (get-network-state (update-validator-state val vstate systate))
         (get-network-state systate)))

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

    (defthm get-network-state-of-system-state-fix-systate
      (equal (get-network-state (system-state-fix systate))
             (get-network-state systate)))

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

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