• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • 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
            • Dag-certificate-next
            • Omni-paths-def-and-implied
            • Ordered-blockchain
              • Ordered-blockchain-p-of-next
                • Ordered-blockchain-p
                • Ordered-blockchain-p-when-init
                • Ordered-blockchain-p-of-events-next
                • Ordered-blockchain-p-when-reachable
              • 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
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Ordered-blockchain

    Ordered-blockchain-p-of-next

    Preservation of the invariant: if the invariant holds in a system state, it also holds in the next system state.

    The only kind of event that modifies the blockchain is commit. All the other events leave the blockchain unchanged, and it is thus easy to prove that they preserve the invariant.

    For commit event, we need to assume a previously proved invariant, namely last-blockchain-round. We use previously proved theorems about extend-blockchain and collect-anchors. We also need to open up commit-possiblep, to expose certain needed constraints on the involved round numbers. The last-blockchain-round-p assumption serves to tie the last committed round in the validator state to the round of the newest block of the blockchain prior to the addition of the new blocks, to complete the relieving of the hypotheses of the aforementioned theorems about extend-blockchain and collect-anchors.

    Definitions and Theorems

    Theorem: ordered-blockchain-p-of-create-next

    (defthm ordered-blockchain-p-of-create-next
      (implies (ordered-blockchain-p systate)
               (ordered-blockchain-p (create-next cert systate))))

    Theorem: ordered-blockchain-p-of-accept-next

    (defthm ordered-blockchain-p-of-accept-next
      (implies (and (ordered-blockchain-p systate)
                    (accept-possiblep msg systate))
               (ordered-blockchain-p (accept-next msg systate))))

    Theorem: ordered-blockchain-p-of-advance-next

    (defthm ordered-blockchain-p-of-advance-next
      (implies (and (ordered-blockchain-p systate)
                    (advance-possiblep val systate))
               (ordered-blockchain-p (advance-next val systate))))

    Theorem: ordered-blockchain-p-of-commit-next

    (defthm ordered-blockchain-p-of-commit-next
      (implies (and (ordered-blockchain-p systate)
                    (last-blockchain-round-p systate)
                    (commit-possiblep val systate))
               (ordered-blockchain-p (commit-next val systate))))

    Theorem: ordered-blockchain-p-of-event-next

    (defthm ordered-blockchain-p-of-event-next
      (implies (and (ordered-blockchain-p systate)
                    (last-blockchain-round-p systate)
                    (event-possiblep event systate))
               (ordered-blockchain-p (event-next event systate))))