• 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
              • Trim-blocks-for-round
              • Bonded-committee-at-round-loop-to-trim-blocks-for-round
              • Same-bonded-committees-longer-shorter
              • Same-committees-list-extension-equivalences
                • Trim-blocks-for-round-of-shorter
                • Same-active-committees-when-nofork
                • Trim-blocks-for-round-of-longer
                • Same-committees-p
                • Trim-blocks-for-round-of-append-yields-first
                • Bonded-committee-at-round-to-trim-blocks-for-round
                • Trim-blocks-for-round-no-change
                • Same-active-committees-longer-shorter
                • Same-committees-p-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
              • 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
    • Same-committees-def-and-implied

    Same-committees-list-extension-equivalences

    Equivalence between two ways to phrase list extensions.

    As explained in same-committees-def-and-implied, the interesting case of the proof is that of a longer blockchain extending a shorter blockchain. In lists-noforkp, the extension is expressed in terms of nthcdr. However, for some of our proofs, a formulation in terms of append is more convenient. Here we provide a bridge between the two formulations.

    We also prove an equivalence (really, an implication) between two ways to address the rightmost element of the extension. The extension is the (take ...) term in the formula, and the two ways of addressing the rightmost element are as the last one of the extension and as the nth of the longer list.

    This is really a generic theorem about lists, not specific to AleoBFT. We could consider putting it into a library, ideally in some more general form. Or perhaps there is a way to use more general list theorems in the proofs of this invariant.

    Definitions and Theorems

    Theorem: same-committees-list-extension-equivalences

    (defthm same-committees-list-extension-equivalences
      (implies
           (and (< (len list1) (len list2))
                (equal list1
                       (nthcdr (- (len list2) (len list1))
                               list2)))
           (and (equal (append (take (- (len list2) (len list1)) list2)
                               list1)
                       list2)
                (equal (nth (1- (- (len list2) (len list1)))
                            list2)
                       (car (last (take (- (len list2) (len list1))
                                        list2)))))))