Print any arbitrary atom with no escaping, but obeying print-base, print-radix, and (for symbols) print-lowercase.
(print-atom x config acc) → new-acc
Function:
(defun print-atom (x config acc) (declare (xargs :guard (and (atom x) (printconfig-p config)))) (let ((acl2::__function__ 'print-atom)) (declare (ignorable acl2::__function__)) (b* (((when (symbolp x)) (let ((name (symbol-name x))) (if (printconfig->print-lowercase config) (downcase-string-aux name 0 (length (the string name)) acc) (revappend-chars name acc)))) ((when (characterp x)) (cons x acc)) ((when (stringp x)) (revappend-chars x acc))) (print-atom-aux x config acc))))
Theorem:
(defthm character-listp-of-print-atom (implies (character-listp acc) (b* ((new-acc (print-atom x config acc))) (character-listp new-acc))) :rule-classes :rewrite)