Get the bytes field from a rlp-tree-leaf.
(rlp-tree-leaf->bytes x) → bytes
This is an ordinary field accessor created by fty::defprod.
Function:
(defun rlp-tree-leaf->bytes$inline (x) (declare (xargs :guard (rlp-treep x))) (declare (xargs :guard (equal (rlp-tree-kind x) :leaf))) (let ((__function__ 'rlp-tree-leaf->bytes)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (rlp-tree-kind x) :leaf) x))) (byte-list-fix (std::da-nth 0 (cdr x)))) :exec (std::da-nth 0 (cdr x)))))
Theorem:
(defthm byte-listp-of-rlp-tree-leaf->bytes (b* ((bytes (rlp-tree-leaf->bytes$inline x))) (byte-listp bytes)) :rule-classes :rewrite)
Theorem:
(defthm rlp-tree-leaf->bytes$inline-of-rlp-tree-fix-x (equal (rlp-tree-leaf->bytes$inline (rlp-tree-fix x)) (rlp-tree-leaf->bytes$inline x)))
Theorem:
(defthm rlp-tree-leaf->bytes$inline-rlp-tree-equiv-congruence-on-x (implies (rlp-tree-equiv x x-equiv) (equal (rlp-tree-leaf->bytes$inline x) (rlp-tree-leaf->bytes$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm rlp-tree-leaf->bytes-when-wrong-kind (implies (not (equal (rlp-tree-kind x) :leaf)) (equal (rlp-tree-leaf->bytes x) (byte-list-fix nil))))