• 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
                  • Validator-state
                    • Validator-state-fix
                    • Make-validator-state
                    • Validator-state-equiv
                    • Validator-statep
                      • Validator-state->proposed
                      • Validator-state->committed
                      • Validator-state->endorsed
                      • Validator-state->blockchain
                      • Change-validator-state
                      • Validator-state->round
                      • Validator-state->last
                      • Validator-state->dag
                    • Proposal-address-set-map
                  • 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
    • Validator-state

    Validator-statep

    Recognizer for validator-state structures.

    Signature
    (validator-statep x) → *

    Definitions and Theorems

    Function: validator-statep

    (defun validator-statep (x)
     (declare (xargs :guard t))
     (let ((__function__ 'validator-statep))
      (declare (ignorable __function__))
      (and
       (mbe
        :logic (and (alistp x)
                    (equal (strip-cars x)
                           '(round dag proposed
                                   endorsed last blockchain committed)))
        :exec (fty::alist-with-carsp
                   x
                   '(round dag proposed
                           endorsed last blockchain committed)))
       (b* ((round (cdr (std::da-nth 0 x)))
            (dag (cdr (std::da-nth 1 x)))
            (proposed (cdr (std::da-nth 2 x)))
            (endorsed (cdr (std::da-nth 3 x)))
            (last (cdr (std::da-nth 4 x)))
            (blockchain (cdr (std::da-nth 5 x)))
            (committed (cdr (std::da-nth 6 x))))
         (and (posp round)
              (certificate-setp dag)
              (proposal-address-set-mapp proposed)
              (proposal-setp endorsed)
              (natp last)
              (block-listp blockchain)
              (certificate-setp committed))))))

    Theorem: consp-when-validator-statep

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