Convert a natural number to its minimum-length big-endian list of bytes, seen as sigits in base 256.
(nat=>bebytes* nat) → digits
Function:
(defun nat=>bebytes* (nat) (declare (xargs :guard (natp nat))) (let ((__function__ 'nat=>bebytes*)) (declare (ignorable __function__)) (nat=>bendian* 256 nat)))
Theorem:
(defthm byte-listp-of-nat=>bebytes* (b* ((digits (nat=>bebytes* nat))) (byte-listp digits)) :rule-classes :rewrite)
Theorem:
(defthm nat=>bebytes*-of-nfix-nat (equal (nat=>bebytes* (nfix nat)) (nat=>bebytes* nat)))
Theorem:
(defthm nat=>bebytes*-nat-equiv-congruence-on-nat (implies (nat-equiv nat nat-equiv) (equal (nat=>bebytes* nat) (nat=>bebytes* nat-equiv))) :rule-classes :congruence)