• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
          • Command-error
          • Sign
          • Init-from-mnemonic
          • Command-error-message
          • Stat
            • Stat-fix
            • Stat-equiv
            • Statp
              • Make-stat
              • Stat->keys
              • Stat->addresses
              • Change-stat
            • Next-key
            • Init-from-entropy
            • Process-command
            • Transaction-message
            • Maybe-command-error
            • Maybe-stat
            • Check-stat-file-present
            • Valid-key-path-p
            • String-to-byte-list
            • Load-stat
            • Mnemonic-message
            • Process-sign
            • Process-init-from-entropy
            • All-valid-key-paths-p
            • String-to-word
            • String-to-nat
            • Process-next-key
            • Wallet
            • Process-init-from-mnemonic
            • Check-stat-file-absent
            • Stat-wfp
            • Save-stat
            • Stat-addresses-bounded-p
            • Stat-all-valid-key-paths-p
            • Stat-priv-keys-p
            • Stat-root-depth-zero-p
            • Stat-path-prefix-in-tree-p
            • Crypto-hdwallet-executable
            • *stat-filepath*
            • *key-path-prefix*
            • *coin-type-index*
            • *purpose-index*
            • *external-chain-index*
            • *command-name-init-from-mnemonic*
            • *command-name-init-from-entropy*
            • *account-index*
            • *command-name-sign*
            • *command-name-next-key*
          • Apt
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Stat

    Statp

    Recognizer for stat structures.

    Signature
    (statp x) → *

    Definitions and Theorems

    Function: statp

    (defun statp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'statp))
        (declare (ignorable __function__))
        (and (consp x)
             (eq (car x) :state)
             (true-listp (cdr x))
             (eql (len (cdr x)) 2)
             (b* ((keys (std::da-nth 0 (cdr x)))
                  (addresses (std::da-nth 1 (cdr x))))
               (and (bitcoin::bip32-key-treep keys)
                    (natp addresses))))))

    Theorem: consp-when-statp

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