• 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
                  • Message
                    • Message-fix
                    • Message-case
                    • Message-equiv
                    • Messagep
                    • Message-certificate
                    • Message-proposal
                    • Message-endorsement
                    • Message-kind
                    • Make-endorsement-messages
                    • Make-certificate-messages
                    • Make-proposal-messages
                    • Message-set
                  • Validator-states
                  • Blocks
                  • 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
    • Message

    Message-kind

    Get the kind (tag) of a message structure.

    Signature
    (message-kind x) → kind
    Arguments
    x — Guard (messagep x).

    Definitions and Theorems

    Function: message-kind$inline

    (defun message-kind$inline (x)
      (declare (xargs :guard (messagep x)))
      (let ((__function__ 'message-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :proposal))
                           :proposal)
                          ((eq (car x) :endorsement) :endorsement)
                          (t :certificate))
             :exec (car x))))

    Theorem: message-kind-possibilities

    (defthm message-kind-possibilities
      (or (equal (message-kind x) :proposal)
          (equal (message-kind x) :endorsement)
          (equal (message-kind x) :certificate))
      :rule-classes
      ((:forward-chaining :trigger-terms ((message-kind x)))))