• 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
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • 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
              • Messages
              • Transactions
                • Transaction
                  • Transaction-fix
                  • Transaction-case
                  • Transaction-equiv
                  • Transactionp
                    • Transaction-bond
                    • Transaction-unbond
                    • Transaction-other
                    • Transaction-kind
                  • Transaction-list
                • 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
    • Transaction

    Transactionp

    Recognizer for transaction structures.

    Signature
    (transactionp x) → *

    Definitions and Theorems

    Function: transactionp

    (defun transactionp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'transactionp))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :bond))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 2)
                         (b* ((validator (std::da-nth 0 (cdr x)))
                              (stake (std::da-nth 1 (cdr x))))
                           (and (addressp validator)
                                (posp stake)))))
                   ((eq (car x) :unbond)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((validator (std::da-nth 0 (cdr x))))
                           (addressp validator))))
                   (t (and (eq (car x) :other)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 1))
                           (b* ((unwrap (std::da-nth 0 (cdr x))))
                             (any-p unwrap))))))))

    Theorem: consp-when-transactionp

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