• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • 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
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Bip32-key-tree

    Bip32-key-tree->root-depth

    Get the root-depth field from a bip32-key-tree.

    Signature
    (bip32-key-tree->root-depth x) → root-depth
    Arguments
    x — Guard (bip32-key-treep x).
    Returns
    root-depth — Type (bytep root-depth).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: bip32-key-tree->root-depth$inline

    (defun bip32-key-tree->root-depth$inline (x)
      (declare (xargs :guard (bip32-key-treep x)))
      (declare (xargs :guard t))
      (let ((__function__ 'bip32-key-tree->root-depth))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x)))
               (byte-fix (std::da-nth 1 x)))
             :exec (std::da-nth 1 x))))

    Theorem: bytep-of-bip32-key-tree->root-depth

    (defthm bytep-of-bip32-key-tree->root-depth
      (b* ((root-depth (bip32-key-tree->root-depth$inline x)))
        (bytep root-depth))
      :rule-classes :rewrite)

    Theorem: bip32-key-tree->root-depth$inline-of-bip32-key-tree-fix-x

    (defthm bip32-key-tree->root-depth$inline-of-bip32-key-tree-fix-x
      (equal (bip32-key-tree->root-depth$inline (bip32-key-tree-fix x))
             (bip32-key-tree->root-depth$inline x)))

    Theorem: bip32-key-tree->root-depth$inline-bip32-key-tree-equiv-congruence-on-x

    (defthm
     bip32-key-tree->root-depth$inline-bip32-key-tree-equiv-congruence-on-x
     (implies (bip32-key-tree-equiv x x-equiv)
              (equal (bip32-key-tree->root-depth$inline x)
                     (bip32-key-tree->root-depth$inline x-equiv)))
     :rule-classes :congruence)