Function:
(defun insert-underscores (x) (declare (xargs :guard t)) (cond ((atom x) x) ((equal (mod (len x) 4) 0) (list* #\_ (car x) (insert-underscores (cdr x)))) (t (list* (car x) (insert-underscores (cdr x))))))
Theorem:
(defthm character-listp-of-insert-underscores (implies (force (character-listp x)) (character-listp (insert-underscores x))))