Return all initial elements of
(take-till-zero bytes) → bs
Function:
(defun take-till-zero (bytes) (declare (xargs :guard (byte-listp bytes))) (let ((__function__ 'take-till-zero)) (declare (ignorable __function__)) (if (endp bytes) nil (if (equal (car bytes) 0) nil (cons (car bytes) (take-till-zero (cdr bytes)))))))
Theorem:
(defthm byte-listp-of-take-till-zero (implies (and (byte-listp bytes)) (b* ((bs (take-till-zero bytes))) (byte-listp bs))) :rule-classes :rewrite)