• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
          • Pretty-printing-implementation
            • Missing-functionality
            • Printconfig
            • Cons-ppr1
            • Print-escaped-charlist
            • Atom-size
            • Print-escaped-str
            • Obj-size
            • Maybe-merge-flat
            • Ppr
            • Printer-instructions
            • Keyword-param-valuep
            • Print-flat-objs
            • Radix-print-int
            • Print-escaped-atom
            • Print-atom
            • Print-escaped-symbol
            • Radix-print-complex
            • Basic-print-complex
            • Radix-print-rat
            • Spaces1
              • Basic-print-rat
              • Basic-print-nat
              • Basic-print-int
              • Spaces
              • My-needs-slashes
              • Pinstlist->max-width
              • Nat-size
              • Special-term-num
              • Print-column
              • Print-base-fix
              • Int-size
              • Keyword-fix
              • Print-instruction
              • Pinst->width
              • In-home-package-p
              • Eviscerated->guts
              • Evisceratedp
              • Pprdot
            • Eviscerate
            • Pretty
            • Revappend-pretty
            • Pretty-list
          • Printtree
          • Base64
          • Charset-p
          • Strtok!
          • Cases
          • Concatenation
          • Html-encoding
          • Character-kinds
          • Substrings
          • Strtok
          • Equivalences
          • Url-encoding
          • Lines
          • Explode-implode-equalities
          • Ordering
          • Numbers
          • Pad-trim
          • Coercion
          • Std/strings/digit-to-char
          • Substitution
          • Symbols
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Pretty-printing-implementation

    Spaces1

    Signature
    (spaces1 n col hard-right-margin acc) → new-acc
    Arguments
    n — Guard (natp n).
    col — Guard (natp col).
    hard-right-margin — Guard (posp hard-right-margin).
    Returns
    new-acc — Type (character-listp new-acc), given (character-listp acc).

    Definitions and Theorems

    Function: spaces1

    (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: character-listp-of-spaces1

    (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)