• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
          • Bip32
            • Bip32-wallet-structure
            • Bip32-key-trees
            • Bip32-key-serialization
            • Bip32-key-derivation
            • Bip32-executable-attachments
            • Bip32-extended-keys
              • Bip32-chain-code
              • Bip32-ext-pub-key
              • Bip32-ext-priv-key
              • Bip32-ext-key
                • Bip32-ext-key-fix
                • Bip32-ext-key-case
                • Bip32-ext-key-equiv
                • Bip32-ext-key-p
                  • Bip32-ext-key-pub
                  • Bip32-ext-key-priv
                  • Bip32-ext-key-kind
              • Bip32-master-key-generation
            • Bech32
            • Bip39
            • Bip44
            • Base58
            • Bip43
            • Bytes
            • Base58check
            • Cryptography
            • Bip-350
            • Bip-173
          • 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
    • Bip32-ext-key

    Bip32-ext-key-p

    Recognizer for bip32-ext-key structures.

    Signature
    (bip32-ext-key-p x) → *

    Definitions and Theorems

    Function: bip32-ext-key-p

    (defun bip32-ext-key-p (x)
      (declare (xargs :guard t))
      (let ((__function__ 'bip32-ext-key-p))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :priv))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((get (std::da-nth 0 (cdr x))))
                           (bip32-ext-priv-key-p get))))
                   (t (and (eq (car x) :pub)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 1))
                           (b* ((get (std::da-nth 0 (cdr x))))
                             (bip32-ext-pub-key-p get))))))))

    Theorem: consp-when-bip32-ext-key-p

    (defthm consp-when-bip32-ext-key-p
      (implies (bip32-ext-key-p x) (consp x))
      :rule-classes :compound-recognizer)