• 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
          • Aleobft-stake
          • Aleobft-proposals
            • Correctness
            • Definition
              • Initialization
              • Transitions
              • States
                • Committees
                • System-states
                • Certificates
                • Transactions
                • Proposals
                • Messages
                • Validator-states
                • Blocks
                  • Blocks-last-round
                  • Blocks-orderedp
                  • Block
                    • Block-fix
                    • Block-equiv
                    • Make-block
                    • Block->transactions
                    • Change-block
                    • Block->round
                    • Blockp
                    • Block-list
                  • Addresses
                • Events
                • Reachability
            • 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
    • Block

    Blockp

    Recognizer for block structures.

    Signature
    (blockp x) → *

    Definitions and Theorems

    Function: blockp

    (defun blockp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'blockp))
        (declare (ignorable __function__))
        (and (mbe :logic (and (alistp x)
                              (equal (strip-cars x)
                                     '(transactions round)))
                  :exec (fty::alist-with-carsp x '(transactions round)))
             (b* ((transactions (cdr (std::da-nth 0 x)))
                  (round (cdr (std::da-nth 1 x))))
               (and (transaction-listp transactions)
                    (posp round)
                    (evenp round))))))

    Theorem: consp-when-blockp

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