The function
(lebs2osp bits) → bytes
The
Function:
(defun lebs2osp (bits) (declare (xargs :guard (bit-listp bits))) (let ((__function__ 'lebs2osp)) (declare (ignorable __function__)) (b* ((l (len bits)) (padlen (- (* 8 (ceiling l 8)) l)) (padded (append bits (repeat padlen 0)))) (acl2::bits=>lebytes padded))))
Theorem:
(defthm byte-listp-of-lebs2osp (b* ((bytes (lebs2osp bits))) (byte-listp bytes)) :rule-classes :rewrite)
Theorem:
(defthm len-of-lebs2osp (b* ((?bytes (lebs2osp bits))) (equal (len bytes) (ceiling (len bits) 8))))