• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • 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
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
        • Aleobft
          • Aleobft-static
          • Aleobft-stake2
          • Aleobft-dynamic
            • Correctness
            • Definition
              • Initialization
              • Transitions
              • States
                • Committees
                • System-states
                • Certificates
                  • Certificate-set-unequivocalp
                  • Cert-with-author+round
                  • Certificate-sets-unequivocalp
                  • Certificate
                    • Certificatep
                      • Certificate-fix
                      • Make-certificate
                      • Certificate-equiv
                      • Certificate->transactions
                      • Change-certificate
                      • Certificate->round
                      • Certificate->previous
                      • Certificate->endorsers
                      • Certificate->author
                    • Certs-with-author
                    • Certs-with-authors+round
                    • Certs-with-round
                    • Unequivocal-certs-with-authors+round
                    • Unequivocal-cert-with-author+round
                    • Certificate-option
                    • Cert-set->author-set
                    • Cert-set->round-set
                    • Certificates-with-signer
                    • Certificates-ordered-even-p
                    • Certs-with-authors
                    • Certificate->signers
                    • Certificate-set
                    • Certificate-list
                  • Messages
                  • Validator-states
                  • Transactions
                  • Blocks
                  • Addresses
                • Events
            • Aleobft-stake
            • Aleobft-proposals
            • Library-extensions
          • Leo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Certificate

    Certificatep

    Recognizer for certificate structures.

    Signature
    (certificatep x) → *

    Definitions and Theorems

    Function: certificatep

    (defun certificatep (x)
     (declare (xargs :guard t))
     (let ((__function__ 'certificatep))
      (declare (ignorable __function__))
      (and
       (mbe
           :logic
           (and (alistp x)
                (equal (strip-cars x)
                       '(author round transactions previous endorsers)))
           :exec (fty::alist-with-carsp
                      x
                      '(author round transactions previous endorsers)))
       (b* ((author (cdr (std::da-nth 0 x)))
            (round (cdr (std::da-nth 1 x)))
            (transactions (cdr (std::da-nth 2 x)))
            (previous (cdr (std::da-nth 3 x)))
            (endorsers (cdr (std::da-nth 4 x))))
         (and (addressp author)
              (posp round)
              (transaction-listp transactions)
              (address-setp previous)
              (address-setp endorsers))))))

    Theorem: consp-when-certificatep

    (defthm consp-when-certificatep
      (implies (certificatep x) (consp x))
      :rule-classes :compound-recognizer)