• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • 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
            • Unequivocal-dags-def-and-init
            • Same-committees-def-and-implied
            • Dag-omni-paths
            • Signer-records
            • Unequivocal-dags-next
            • Quorum-intersection
            • Dag-previous-quorum-def-and-init-and-next
            • Unequivocal-signed-certificates
            • Signed-previous-quorum
            • Nonforking-anchors-def-and-init-and-next
            • Successor-predecessor-intersection
            • Fault-tolerance
            • Last-anchor-voters-def-and-init-and-next
            • Signer-quorum
            • Committed-redundant-def-and-init-and-next
            • Nonforking-blockchains-def-and-init
            • Blockchain-redundant-def-and-init-and-next
            • No-self-endorsed
            • Last-anchor-present
            • Anchors-extension
            • Nonforking-blockchains-next
            • Backward-closure
            • Last-blockchain-round
              • Last-blockchain-round-p-of-next
              • Last-blockchain-round-p
                • Last-blockchain-round-p-when-init
                • Last-blockchain-round-p-when-reachable
                • Last-blockchain-round-p-of-events-next
              • Dag-certificate-next
              • Omni-paths-def-and-implied
              • Ordered-blockchain
              • Simultaneous-induction
              • System-certificates
              • Last-anchor-def-and-init
              • Last-anchor-next
              • Dag-previous-quorum
              • Signed-certificates
              • Committed-anchor-sequences
              • Omni-paths
              • Last-anchor-voters
              • Unequivocal-dags
              • Nonforking-blockchains
              • Nonforking-anchors
              • Committed-redundant
              • Same-committees
              • Blockchain-redundant
            • Definition
            • 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
    • Last-blockchain-round

    Last-blockchain-round-p

    Definition of the invariant: for each correct validator in the system, the last committed round is 0 if the blockchain is empty, or the round of the newest block in the blockchain otherwise.

    Definitions and Theorems

    Theorem: last-blockchain-round-p-necc

    (defthm last-blockchain-round-p-necc
      (implies
           (last-blockchain-round-p systate)
           (implies (in val (correct-addresses systate))
                    (b* (((validator-state vstate)
                          (get-validator-state val systate)))
                      (equal vstate.last
                             (blocks-last-round vstate.blockchain))))))

    Theorem: booleanp-of-last-blockchain-round-p

    (defthm booleanp-of-last-blockchain-round-p
      (b* ((yes/no (last-blockchain-round-p systate)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: last-blockchain-round-p-of-system-state-fix-systate

    (defthm last-blockchain-round-p-of-system-state-fix-systate
      (equal (last-blockchain-round-p (system-state-fix systate))
             (last-blockchain-round-p systate)))

    Theorem: last-blockchain-round-p-system-state-equiv-congruence-on-systate

    (defthm
       last-blockchain-round-p-system-state-equiv-congruence-on-systate
      (implies (system-state-equiv systate systate-equiv)
               (equal (last-blockchain-round-p systate)
                      (last-blockchain-round-p systate-equiv)))
      :rule-classes :congruence)

    Theorem: last-blockchain-round-p-necc-fixing

    (defthm last-blockchain-round-p-necc-fixing
      (implies (and (last-blockchain-round-p systate)
                    (in (address-fix val)
                        (correct-addresses systate)))
               (b* (((validator-state vstate)
                     (get-validator-state val systate)))
                 (equal vstate.last
                        (blocks-last-round vstate.blockchain)))))