• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • 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-extend-tree
              • Bip32-valid-depths-p
              • Bip32-key-tree
                • Bip32-key-tree-fix
                • Make-bip32-key-tree
                • Bip32-key-treep
                  • Bip32-key-tree-equiv
                  • Bip32-key-tree->root-parent
                  • Bip32-key-tree->index-tree
                  • Bip32-key-tree->root-index
                  • Change-bip32-key-tree
                  • Bip32-key-tree->root-key
                  • Bip32-key-tree->root-depth
                • Bip32-path-set-closedp
                • Bip32-valid-keys-p
                • Bip32-index-tree
                • Bip32-path-in-tree-p
                • Bip32-ckd*
                • Bip32-get-pub-key-at-path
                • Bip32-get-priv-key-at-path
                • Bip32-ckd-priv*
                • Bip32-ckd-pub*
                • Bip32-path
                • Bip32-key-tree-priv-p
                • Bip32-path-set
              • Bip32-key-serialization
              • Bip32-key-derivation
              • Bip32-executable-attachments
              • Bip32-extended-keys
              • 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-key-tree

    Bip32-key-treep

    Recognizer for bip32-key-tree structures.

    Signature
    (bip32-key-treep x) → *

    Definitions and Theorems

    Function: bip32-key-treep

    (defun bip32-key-treep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'bip32-key-treep))
        (declare (ignorable __function__))
        (and (true-listp x)
             (eql (len x) 5)
             (b* ((root-key (std::da-nth 0 x))
                  (root-depth (std::da-nth 1 x))
                  (root-index (std::da-nth 2 x))
                  (root-parent (std::da-nth 3 x))
                  (index-tree (std::da-nth 4 x)))
               (and (bip32-ext-key-p root-key)
                    (bytep root-depth)
                    (ubyte32p root-index)
                    (byte-listp root-parent)
                    (bip32-index-treep index-tree)
                    (bip32-valid-keys-p root-key index-tree)
                    (bip32-valid-depths-p root-depth index-tree)
                    (implies (equal root-depth 0)
                             (equal root-index 0))
                    (equal (len root-parent) 4)
                    (implies (equal root-depth 0)
                             (equal root-parent (list 0 0 0 0))))))))

    Theorem: consp-when-bip32-key-treep

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