Pretty-print identation spaces.
The non-blank content of each line is indented at a certain level. The level is passed as argument here. We indent by increments of 4 spaces; this could be an option in the future. Thus, we return a string (which is also a message) consisting of a number of spaces equal to 4 times the level.
Function:
(defun pprint-indent (level) (declare (xargs :guard (natp level))) (let ((__function__ 'pprint-indent)) (declare (ignorable __function__)) (implode (repeat (* 4 (lnfix level)) #\Space))))
Theorem:
(defthm msgp-of-pprint-indent (b* ((part (pprint-indent level))) (msgp part)) :rule-classes :rewrite)
Theorem:
(defthm pprint-indent-of-nfix-level (equal (pprint-indent (nfix level)) (pprint-indent level)))
Theorem:
(defthm pprint-indent-nat-equiv-congruence-on-level (implies (acl2::nat-equiv level level-equiv) (equal (pprint-indent level) (pprint-indent level-equiv))) :rule-classes :congruence)