• 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
              • Last-anchor-voters-p-of-next
                • Validator-last-anchor-voters-p
                • Last-anchor-voters-p
                • Last-anchor-voters-p-when-init
              • 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
              • 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
    • Last-anchor-voters-def-and-init-and-next

    Last-anchor-voters-p-of-next

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

    A create or accept event does not modify the last committed anchor. It may add certificates to the DAG, which may be successors of the last committed anchor, but since successors is monotone, the inequality of more than f voting stake is preserved.

    A commit event changes the last committed anchor, but its preconditions include the fact that the new anchor has more than f voting stake. Since our invariant is phrased in terms of successors certificates, we need a lemma that relates the stake of successors to the voting stake returned by leader-stake-votes; this needs non-equivocation because leader-stake-votes would count the stake of equivocal certificates multiple times, while cert-set->author-set applied to successors-loop counts the stake of each author only once. Since the event also extends the blockchain, as in other proofs we need to show that the extension of the blockchain does not modify the committee active at the round of the successors.

    An advance event does not change the last committed anchor or the DAG, and thus the successors of the anchor.

    Definitions and Theorems

    Theorem: validator-last-anchor-voters-p-of-create-next

    (defthm validator-last-anchor-voters-p-of-create-next
      (implies
           (and (system-committees-fault-tolerant-p systate)
                (no-self-endorsed-p systate)
                (signer-records-p systate)
                (signer-quorum-p systate)
                (unequivocal-dags-p systate)
                (same-committees-p systate)
                (last-anchor-present-p systate)
                (create-possiblep cert systate)
                (in val (correct-addresses systate))
                (validator-last-anchor-voters-p
                     (get-validator-state val systate)))
           (validator-last-anchor-voters-p
                (get-validator-state val (create-next cert systate)))))

    Theorem: last-anchor-voters-p-of-create-next

    (defthm last-anchor-voters-p-of-create-next
      (implies (and (last-anchor-voters-p systate)
                    (system-committees-fault-tolerant-p systate)
                    (no-self-endorsed-p systate)
                    (signer-records-p systate)
                    (signer-quorum-p systate)
                    (unequivocal-dags-p systate)
                    (same-committees-p systate)
                    (last-anchor-present-p systate)
                    (create-possiblep cert systate))
               (last-anchor-voters-p (create-next cert systate))))

    Theorem: validator-last-anchor-voters-p-of-accept-next

    (defthm validator-last-anchor-voters-p-of-accept-next
      (implies
           (and (system-committees-fault-tolerant-p systate)
                (signer-quorum-p systate)
                (unequivocal-signed-certs-p systate)
                (unequivocal-dags-p systate)
                (same-committees-p systate)
                (last-anchor-present-p systate)
                (accept-possiblep msg systate)
                (messagep msg)
                (in val (correct-addresses systate))
                (validator-last-anchor-voters-p
                     (get-validator-state val systate)))
           (validator-last-anchor-voters-p
                (get-validator-state val (accept-next msg systate)))))

    Theorem: last-anchor-voters-p-of-accept-next

    (defthm last-anchor-voters-p-of-accept-next
      (implies (and (last-anchor-voters-p systate)
                    (system-committees-fault-tolerant-p systate)
                    (signer-quorum-p systate)
                    (unequivocal-signed-certs-p systate)
                    (unequivocal-dags-p systate)
                    (same-committees-p systate)
                    (last-anchor-present-p systate)
                    (accept-possiblep msg systate)
                    (messagep msg))
               (last-anchor-voters-p (accept-next msg systate))))

    Theorem: validator-last-anchor-voters-p-of-advance-next

    (defthm validator-last-anchor-voters-p-of-advance-next
      (implies
           (and (advance-possiblep val systate)
                (in val1 (correct-addresses systate))
                (validator-last-anchor-voters-p
                     (get-validator-state val1 systate)))
           (validator-last-anchor-voters-p
                (get-validator-state val1 (advance-next val systate)))))

    Theorem: last-anchor-voters-p-of-advance-next

    (defthm last-anchor-voters-p-of-advance-next
      (implies (and (last-anchor-voters-p systate)
                    (advance-possiblep val systate))
               (last-anchor-voters-p (advance-next val systate))))

    Theorem: stake-of-successors-loop-to-leader-stake-votes

    (defthm stake-of-successors-loop-to-leader-stake-votes
     (implies
         (and (certificate-setp certs)
              (certificate-set-unequivocalp certs)
              (addressp prev)
              (<= (cardinality (cert-set->round-set certs))
                  1))
         (equal (committee-members-stake
                     (cert-set->author-set (successors-loop certs prev))
                     commtt)
                (leader-stake-votes prev certs commtt))))

    Theorem: stake-of-successors-to-leader-stake-votes

    (defthm stake-of-successors-to-leader-stake-votes
      (implies
           (and (certificate-setp dag)
                (certificate-set-unequivocalp dag))
           (equal (committee-members-stake
                       (cert-set->author-set (successors cert dag))
                       commtt)
                  (leader-stake-votes
                       (certificate->author cert)
                       (certs-with-round (1+ (certificate->round cert))
                                         dag)
                       commtt))))

    Theorem: validator-last-anchor-voters-p-of-commit-next

    (defthm validator-last-anchor-voters-p-of-commit-next
      (implies
           (and (last-blockchain-round-p systate)
                (ordered-blockchain-p systate)
                (unequivocal-dags-p systate)
                (commit-possiblep val systate)
                (addressp val)
                (in val1 (correct-addresses systate))
                (validator-last-anchor-voters-p
                     (get-validator-state val1 systate)))
           (validator-last-anchor-voters-p
                (get-validator-state val1 (commit-next val systate)))))

    Theorem: last-anchor-voters-p-of-commit-next

    (defthm last-anchor-voters-p-of-commit-next
      (implies (and (last-anchor-voters-p systate)
                    (last-blockchain-round-p systate)
                    (ordered-blockchain-p systate)
                    (unequivocal-dags-p systate)
                    (commit-possiblep val systate)
                    (addressp val))
               (last-anchor-voters-p (commit-next val systate))))

    Theorem: last-anchor-voters-p-of-event-next

    (defthm last-anchor-voters-p-of-event-next
      (implies (and (last-anchor-voters-p systate)
                    (system-committees-fault-tolerant-p systate)
                    (last-blockchain-round-p systate)
                    (ordered-blockchain-p systate)
                    (no-self-endorsed-p systate)
                    (signer-records-p systate)
                    (signer-quorum-p systate)
                    (unequivocal-signed-certs-p systate)
                    (unequivocal-dags-p systate)
                    (same-committees-p systate)
                    (last-anchor-present-p systate)
                    (event-possiblep event systate))
               (last-anchor-voters-p (event-next event systate))))