Merge first
(merge-first-split-bytes n bytes) → (mv merged-num rest)
Function:
(defun merge-first-split-bytes (n bytes) (declare (xargs :guard (and (natp n) (byte-listp bytes)))) (let ((__function__ 'merge-first-split-bytes)) (declare (ignorable __function__)) (b* (((mv first rest) (split-bytes n bytes))) (mv (merge-bytes first) rest))))
Theorem:
(defthm natp-of-merge-first-split-bytes.merged-num (b* (((mv ?merged-num common-lisp::?rest) (merge-first-split-bytes n bytes))) (natp merged-num)) :rule-classes :type-prescription)
Theorem:
(defthm byte-listp-of-merge-first-split-bytes.rest (implies (byte-listp bytes) (b* (((mv ?merged-num common-lisp::?rest) (merge-first-split-bytes n bytes))) (byte-listp rest))) :rule-classes :rewrite)
Theorem:
(defthm width-of-mv-nth-0-merge-first-split-bytes (b* (((mv ?merged-num common-lisp::?rest) (merge-first-split-bytes n bytes))) (implies (and (equal m (* 8 n)) (natp n)) (unsigned-byte-p m merged-num))))
Theorem:
(defthm len-of-mv-nth-1-merge-first-split-bytes (b* (((mv ?merged-num common-lisp::?rest) (merge-first-split-bytes n bytes))) (equal (len rest) (nfix (- (len bytes) (nfix n))))))