RLP encoding of a scalar.
(rlp-encode-scalar scalar) → (mv error? encoding)
This corresponds to
The first result of this function is an error flag,
which is
Function:
(defun rlp-encode-scalar (scalar) (declare (xargs :guard (natp scalar))) (rlp-encode-bytes (nat=>bebytes* (nfix scalar))))
Theorem:
(defthm booleanp-of-rlp-encode-scalar.error? (b* (((mv ?error? ?encoding) (rlp-encode-scalar scalar))) (booleanp error?)) :rule-classes :rewrite)
Theorem:
(defthm byte-listp-of-rlp-encode-scalar.encoding (b* (((mv ?error? ?encoding) (rlp-encode-scalar scalar))) (byte-listp encoding)) :rule-classes :rewrite)
Theorem:
(defthm rlp-encode-scalar-of-nfix-scalar (equal (rlp-encode-scalar (nfix scalar)) (rlp-encode-scalar scalar)))
Theorem:
(defthm rlp-encode-scalar-nat-equiv-congruence-on-scalar (implies (acl2::nat-equiv scalar scalar-equiv) (equal (rlp-encode-scalar scalar) (rlp-encode-scalar scalar-equiv))) :rule-classes :congruence)