• 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-stake2
          • Aleobft-dynamic
          • Aleobft-stake
            • 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
                  • Validator-states
                  • Transactions
                  • Blocks
                  • Addresses
                • Events
            • 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

    Update-network-state

    Update the state of the network in the system.

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

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

    Definitions and Theorems

    Function: update-network-state

    (defun update-network-state (network systate)
      (declare (xargs :guard (and (message-setp network)
                                  (system-statep systate))))
      (let ((__function__ 'update-network-state))
        (declare (ignorable __function__))
        (change-system-state systate
                             :network network)))

    Theorem: system-statep-of-update-network-state

    (defthm system-statep-of-update-network-state
      (b* ((new-systate (update-network-state network systate)))
        (system-statep new-systate))
      :rule-classes :rewrite)

    Theorem: correct-addresses-of-update-network-state

    (defthm correct-addresses-of-update-network-state
      (b* ((?new-systate (update-network-state network systate)))
        (equal (correct-addresses new-systate)
               (correct-addresses systate))))

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

    (defthm get-network-state-of-update-network-state
      (equal (get-network-state (update-network-state network systate))
             (message-set-fix network)))

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

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

    Theorem: update-network-state-of-message-set-fix-network

    (defthm update-network-state-of-message-set-fix-network
      (equal (update-network-state (message-set-fix network)
                                   systate)
             (update-network-state network systate)))

    Theorem: update-network-state-message-set-equiv-congruence-on-network

    (defthm update-network-state-message-set-equiv-congruence-on-network
      (implies (message-set-equiv network network-equiv)
               (equal (update-network-state network systate)
                      (update-network-state network-equiv systate)))
      :rule-classes :congruence)

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

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

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

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