Get the root-index field from a bip32-key-tree.
(bip32-key-tree->root-index x) → root-index
This is an ordinary field accessor created by fty::defprod.
Function:
(defun bip32-key-tree->root-index$inline (x) (declare (xargs :guard (bip32-key-treep x))) (declare (xargs :guard t)) (let ((__function__ 'bip32-key-tree->root-index)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x)) (root-key (bip32-ext-key-fix (std::da-nth 0 x))) (root-depth (byte-fix (std::da-nth 1 x))) (root-index (ubyte32-fix (std::da-nth 2 x))) (root-parent (byte-list-fix (std::da-nth 3 x))) (index-tree (bip32-index-tree-fix (std::da-nth 4 x)))) (if (equal root-depth 0) 0 root-index)) :exec (std::da-nth 2 x))))
Theorem:
(defthm ubyte32p-of-bip32-key-tree->root-index (b* ((root-index (bip32-key-tree->root-index$inline x))) (ubyte32p root-index)) :rule-classes :rewrite)
Theorem:
(defthm bip32-key-tree->root-index$inline-of-bip32-key-tree-fix-x (equal (bip32-key-tree->root-index$inline (bip32-key-tree-fix x)) (bip32-key-tree->root-index$inline x)))
Theorem:
(defthm bip32-key-tree->root-index$inline-bip32-key-tree-equiv-congruence-on-x (implies (bip32-key-tree-equiv x x-equiv) (equal (bip32-key-tree->root-index$inline x) (bip32-key-tree->root-index$inline x-equiv))) :rule-classes :congruence)