• 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
              • Events
                • Event
                  • Event-fix
                  • Event-case
                  • Eventp
                  • Event-equiv
                  • Event-propose
                  • Event-certify
                  • Event-endorse
                  • Event-augment
                  • Event-accept
                  • Event-commit
                  • Event-advance
                  • Event-kind
                  • Messages
                  • Event-list
                • 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
    • Event

    Event-kind

    Get the kind (tag) of a event structure.

    Signature
    (event-kind x) → kind
    Arguments
    x — Guard (eventp x).

    Definitions and Theorems

    Function: event-kind$inline

    (defun event-kind$inline (x)
      (declare (xargs :guard (eventp x)))
      (let ((__function__ 'event-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :propose))
                           :propose)
                          ((eq (car x) :endorse) :endorse)
                          ((eq (car x) :augment) :augment)
                          ((eq (car x) :certify) :certify)
                          ((eq (car x) :accept) :accept)
                          ((eq (car x) :advance) :advance)
                          (t :commit))
             :exec (car x))))

    Theorem: event-kind-possibilities

    (defthm event-kind-possibilities
      (or (equal (event-kind x) :propose)
          (equal (event-kind x) :endorse)
          (equal (event-kind x) :augment)
          (equal (event-kind x) :certify)
          (equal (event-kind x) :accept)
          (equal (event-kind x) :advance)
          (equal (event-kind x) :commit))
      :rule-classes
      ((:forward-chaining :trigger-terms ((event-kind x)))))