• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Omaps
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
        • Printtree
        • Base64
        • Charset-p
        • Strtok!
        • Cases
        • Concatenation
        • Character-kinds
        • Html-encoding
        • Substrings
        • Strtok
        • Equivalences
        • Url-encoding
        • Lines
        • Explode-implode-equalities
        • Ordering
        • Numbers
          • Decimal
            • Parse-nat-from-string
            • Parse-nat-from-charlist
            • Nat-to-dec-chars
            • Dec-digit-char-p
            • Dec-digit-chars-value
            • Dec-digit-char-listp
            • Take-leading-dec-digit-chars
            • Dec-digit-char-value
            • Dec-digit-char-list*p
            • Nat-to-dec-string-width
            • Nat-to-dec-string
            • Dec-digit-string-p
            • Strval
            • Skip-leading-digits
            • Nat-to-dec-string-size
            • Int-to-dec-string-width
            • Int-to-dec-string
            • Nonzero-dec-digit-char-p
            • Nat-to-dec-string-list
            • Int-to-dec-string-list
            • Revappend-nat-to-dec-chars
              • Revappend-nat-to-dec-chars-aux
            • Hex
            • Octal
            • Binary
          • 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
    • Revappend-nat-to-dec-chars

    Revappend-nat-to-dec-chars-aux

    Signature
    (revappend-nat-to-dec-chars-aux n acc) → *
    Arguments
    n — Guard (natp n).

    Definitions and Theorems

    Function: revappend-nat-to-dec-chars-aux

    (defun revappend-nat-to-dec-chars-aux (n acc)
     (declare (xargs :guard (natp n)))
     (let ((acl2::__function__ 'revappend-nat-to-dec-chars-aux))
      (declare (ignorable acl2::__function__))
      (mbe
       :logic
       (append (basic-nat-to-dec-chars n) acc)
       :exec
       (if (zp n)
           acc
        (cons
         (the
             character
             (code-char (the (unsigned-byte 8)
                             (+ (the (unsigned-byte 8) 48)
                                (the (unsigned-byte 8)
                                     (rem (the unsigned-byte n) 10))))))
         (revappend-nat-to-dec-chars-aux
              (the unsigned-byte
                   (truncate (the unsigned-byte n) 10))
              acc))))))