Recognizer for bip32-ext-key structures.
(bip32-ext-key-p x) → *
Function:
(defun bip32-ext-key-p (x) (declare (xargs :guard t)) (let ((__function__ 'bip32-ext-key-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :priv)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (bip32-ext-priv-key-p get)))) (t (and (eq (car x) :pub) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((get (std::da-nth 0 (cdr x)))) (bip32-ext-pub-key-p get))))))))
Theorem:
(defthm consp-when-bip32-ext-key-p (implies (bip32-ext-key-p x) (consp x)) :rule-classes :compound-recognizer)