• 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
        • Bip32
          • Bip32-wallet-structure
          • Bip32-key-trees
            • Bip32-extend-tree
            • Bip32-valid-depths-p
            • Bip32-key-tree
            • 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
        • 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
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bip32-key-trees

    Bip32-ckd*

    Key designated by a specified path in the tree with the specified root key.

    Signature
    (bip32-ckd* root path) → (mv error? key)
    Arguments
    root — Guard (bip32-ext-key-p root).
    path — Guard (ubyte32-listp path).
    Returns
    error? — Type (booleanp error?).
    key — Type (bip32-ext-key-p key).

    Definitions and Theorems

    Function: bip32-ckd*

    (defun bip32-ckd* (root path)
      (declare (xargs :guard (and (bip32-ext-key-p root)
                                  (ubyte32-listp path))))
      (bip32-ext-key-case root :priv
                          (b* (((mv error? key)
                                (bip32-ckd-priv* root.get path)))
                            (mv error? (bip32-ext-key-priv key)))
                          :pub
                          (b* (((mv error? key)
                                (bip32-ckd-pub* root.get path)))
                            (mv error? (bip32-ext-key-pub key)))))

    Theorem: booleanp-of-bip32-ckd*.error?

    (defthm booleanp-of-bip32-ckd*.error?
      (b* (((mv ?error? ?key)
            (bip32-ckd* root path)))
        (booleanp error?))
      :rule-classes :rewrite)

    Theorem: bip32-ext-key-p-of-bip32-ckd*.key

    (defthm bip32-ext-key-p-of-bip32-ckd*.key
      (b* (((mv ?error? ?key)
            (bip32-ckd* root path)))
        (bip32-ext-key-p key))
      :rule-classes :rewrite)

    Theorem: bip32-ext-key-kind-of-bip32-ckd*

    (defthm bip32-ext-key-kind-of-bip32-ckd*
      (equal (bip32-ext-key-kind (mv-nth 1 (bip32-ckd* root path)))
             (bip32-ext-key-kind root)))

    Theorem: bip32-ckd*-of-bip32-ext-key-fix-root

    (defthm bip32-ckd*-of-bip32-ext-key-fix-root
      (equal (bip32-ckd* (bip32-ext-key-fix root)
                         path)
             (bip32-ckd* root path)))

    Theorem: bip32-ckd*-bip32-ext-key-equiv-congruence-on-root

    (defthm bip32-ckd*-bip32-ext-key-equiv-congruence-on-root
      (implies (bip32-ext-key-equiv root root-equiv)
               (equal (bip32-ckd* root path)
                      (bip32-ckd* root-equiv path)))
      :rule-classes :congruence)

    Theorem: bip32-ckd*-of-ubyte32-list-fix-path

    (defthm bip32-ckd*-of-ubyte32-list-fix-path
      (equal (bip32-ckd* root (ubyte32-list-fix path))
             (bip32-ckd* root path)))

    Theorem: bip32-ckd*-ubyte32-list-equiv-congruence-on-path

    (defthm bip32-ckd*-ubyte32-list-equiv-congruence-on-path
      (implies (acl2::ubyte32-list-equiv path path-equiv)
               (equal (bip32-ckd* root path)
                      (bip32-ckd* root path-equiv)))
      :rule-classes :congruence)