• 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
          • Definition
            • Initialization
            • Transitions
            • States
              • Committees
              • System-states
              • Certificates
                • Certificate-set-unequivocalp
                • Certificate-sets-unequivocalp
                • Cert-with-author+round
                • Certs-with-authors+round
                • Certs-with-author
                • Certs-with-round
                • Unequivocal-certs-with-authors+round
                • Unequivocal-cert-with-author+round
                • Certificate
                • Cert-set->author-set
                • Certificate-option
                • Cert-set->round-set
                • Certs-with-authors
                • Certificate-list-orderedp
                  • Certs-with-signer
                  • Certificate->signers
                  • Certificate-list-evenp
                  • Certificate->transactions
                  • Certificate->previous
                  • Certificate->author
                  • Certificate->round
                  • Certificate-set
                  • Certificate-list
                • Messages
                • Transactions
                • Proposals
                • Validator-states
                • Blocks
                • Addresses
              • Events
              • Reachability
            • 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
    • Certificates

    Certificate-list-orderedp

    Check if a list of certificates has even and strictly increasing (right to left) round numbers.

    Signature
    (certificate-list-orderedp certs) → yes/no
    Arguments
    certs — Guard (certificate-listp certs).
    Returns
    yes/no — Type (booleanp yes/no).

    This is analogous to blocks-orderedp, but for certificates instead of blocks. The reason for having this predicate on certificates is that blockchains are extended from sequences of anchors, which are lists of certificates; the reason why blocks have even and strictly increasing round numbers is that the collected lists of anchors also have strictly increasing, even round numbers.

    Definitions and Theorems

    Function: certificate-list-orderedp

    (defun certificate-list-orderedp (certs)
      (declare (xargs :guard (certificate-listp certs)))
      (let ((__function__ 'certificate-list-orderedp))
        (declare (ignorable __function__))
        (b* (((when (endp certs)) t)
             ((when (endp (cdr certs))) t)
             ((unless (> (certificate->round (car certs))
                         (certificate->round (cadr certs))))
              nil))
          (certificate-list-orderedp (cdr certs)))))

    Theorem: booleanp-of-certificate-list-orderedp

    (defthm booleanp-of-certificate-list-orderedp
      (b* ((yes/no (certificate-list-orderedp certs)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: certificate-list-orderedp-of-certificate-list-fix-certs

    (defthm certificate-list-orderedp-of-certificate-list-fix-certs
      (equal (certificate-list-orderedp (certificate-list-fix certs))
             (certificate-list-orderedp certs)))

    Theorem: certificate-list-orderedp-certificate-list-equiv-congruence-on-certs

    (defthm
     certificate-list-orderedp-certificate-list-equiv-congruence-on-certs
     (implies (certificate-list-equiv certs certs-equiv)
              (equal (certificate-list-orderedp certs)
                     (certificate-list-orderedp certs-equiv)))
     :rule-classes :congruence)