(spaces1 n col hard-right-margin acc) → new-acc
Function:
(defun spaces1 (n col hard-right-margin acc) (declare (xargs :guard (and (natp n) (natp col) (posp hard-right-margin)))) (let ((acl2::__function__ 'spaces1)) (declare (ignorable acl2::__function__)) (b* ((n (nfix n)) (col (nfix col)) (hard-right-margin (acl2::pos-fix hard-right-margin))) (cond ((zp n) acc) ((> col hard-right-margin) (spaces1 n 0 hard-right-margin (cons #\Newline acc))) (t (spaces1 (- n 1) (+ 1 col) hard-right-margin (cons #\Space acc)))))))
Theorem:
(defthm character-listp-of-spaces1 (implies (character-listp acc) (b* ((new-acc (spaces1 n col hard-right-margin acc))) (character-listp new-acc))) :rule-classes :rewrite)