• 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
      • Riscv
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • 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
              • Transitions-accept
              • Transitions-create
              • Dags
              • Events-possiblep
              • Elections
              • Events-next
              • Event-next
              • Transitions-commit
              • Event-possiblep
                • Transitions-advance
                • Blockchains
                • Anchors
              • States
              • 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
    • Transitions

    Event-possiblep

    Check if an event is possible.

    Signature
    (event-possiblep event systate) → yes/no
    Arguments
    event — Guard (eventp event).
    systate — Guard (system-statep systate).
    Returns
    yes/no — Type (booleanp yes/no).

    Based on the event, we use the appropriate predicate.

    Definitions and Theorems

    Function: event-possiblep

    (defun event-possiblep (event systate)
     (declare (xargs :guard (and (eventp event)
                                 (system-statep systate))))
     (let ((__function__ 'event-possiblep))
       (declare (ignorable __function__))
       (event-case event
                   :create (create-possiblep event.certificate systate)
                   :accept (accept-possiblep event.message systate)
                   :advance (advance-possiblep event.validator systate)
                   :commit (commit-possiblep event.validator systate))))

    Theorem: booleanp-of-event-possiblep

    (defthm booleanp-of-event-possiblep
      (b* ((yes/no (event-possiblep event systate)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: event-possiblep-of-event-fix-event

    (defthm event-possiblep-of-event-fix-event
      (equal (event-possiblep (event-fix event)
                              systate)
             (event-possiblep event systate)))

    Theorem: event-possiblep-event-equiv-congruence-on-event

    (defthm event-possiblep-event-equiv-congruence-on-event
      (implies (event-equiv event event-equiv)
               (equal (event-possiblep event systate)
                      (event-possiblep event-equiv systate)))
      :rule-classes :congruence)

    Theorem: event-possiblep-of-system-state-fix-systate

    (defthm event-possiblep-of-system-state-fix-systate
      (equal (event-possiblep event (system-state-fix systate))
             (event-possiblep event systate)))

    Theorem: event-possiblep-system-state-equiv-congruence-on-systate

    (defthm event-possiblep-system-state-equiv-congruence-on-systate
      (implies (system-state-equiv systate systate-equiv)
               (equal (event-possiblep event systate)
                      (event-possiblep event systate-equiv)))
      :rule-classes :congruence)