Check if a key tree consists of private keys.
(bip32-key-tree-priv-p tree) → yes/no
We check whether the root is an extended private key.
Function:
(defun bip32-key-tree-priv-p (tree) (declare (xargs :guard (bip32-key-treep tree))) (bip32-ext-key-case (bip32-key-tree->root-key tree) :priv))
Theorem:
(defthm booleanp-of-bip32-key-tree-priv-p (b* ((yes/no (bip32-key-tree-priv-p tree))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm bip32-key-tree-priv-p-of-bip32-key-tree-fix-tree (equal (bip32-key-tree-priv-p (bip32-key-tree-fix tree)) (bip32-key-tree-priv-p tree)))
Theorem:
(defthm bip32-key-tree-priv-p-bip32-key-tree-equiv-congruence-on-tree (implies (bip32-key-tree-equiv tree tree-equiv) (equal (bip32-key-tree-priv-p tree) (bip32-key-tree-priv-p tree-equiv))) :rule-classes :congruence)