Public key designated by a specified path in the tree with the specified root public key.
(bip32-ckd-pub* root path) → (mv error? key)
Function:
(defun bip32-ckd-pub* (root path) (declare (xargs :guard (and (bip32-ext-pub-key-p root) (ubyte32-listp path)))) (b* ((root (mbe :logic (bip32-ext-pub-key-fix root) :exec root)) ((when (endp path)) (mv nil root)) ((mv error? next) (bip32-ckd-pub root (car path))) ((when error?) (mv t root))) (bip32-ckd-pub* next (cdr path))))
Theorem:
(defthm booleanp-of-bip32-ckd-pub*.error? (b* (((mv ?error? ?key) (bip32-ckd-pub* root path))) (booleanp error?)) :rule-classes :rewrite)
Theorem:
(defthm bip32-ext-pub-key-p-of-bip32-ckd-pub*.key (b* (((mv ?error? ?key) (bip32-ckd-pub* root path))) (bip32-ext-pub-key-p key)) :rule-classes :rewrite)
Theorem:
(defthm bip32-ckd-pub*-of-bip32-ext-pub-key-fix-root (equal (bip32-ckd-pub* (bip32-ext-pub-key-fix root) path) (bip32-ckd-pub* root path)))
Theorem:
(defthm bip32-ckd-pub*-bip32-ext-pub-key-equiv-congruence-on-root (implies (bip32-ext-pub-key-equiv root root-equiv) (equal (bip32-ckd-pub* root path) (bip32-ckd-pub* root-equiv path))) :rule-classes :congruence)
Theorem:
(defthm bip32-ckd-pub*-of-ubyte32-list-fix-path (equal (bip32-ckd-pub* root (ubyte32-list-fix path)) (bip32-ckd-pub* root path)))
Theorem:
(defthm bip32-ckd-pub*-ubyte32-list-equiv-congruence-on-path (implies (acl2::ubyte32-list-equiv path path-equiv) (equal (bip32-ckd-pub* root path) (bip32-ckd-pub* root path-equiv))) :rule-classes :congruence)