• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
        • Printtree
        • Base64
        • Charset-p
        • Strtok!
        • Cases
        • Concatenation
        • Html-encoding
          • Html-encode-string-aux
          • Html-encode-chars-aux
          • Html-encode-push
            • Html-encode-next-col
            • Distance-to-tab
            • Repeated-revappend
            • Html-encode-string-basic-aux
            • Html-encode-string
            • Html-encode-char-basic
            • Html-encode-chars-basic-aux
            • Html-encode-string-basic
          • 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
    • Html-encode-push

    Repeated-revappend

    Signature
    (repeated-revappend n x y) → *
    Arguments
    n — Guard (natp n).

    Definitions and Theorems

    Function: repeated-revappend

    (defun repeated-revappend (n x y)
      (declare (xargs :guard (natp n)))
      (let ((acl2::__function__ 'repeated-revappend))
        (declare (ignorable acl2::__function__))
        (if (zp n)
            y
          (repeated-revappend (- n 1)
                              x
                              (acl2::revappend-without-guard x y)))))

    Theorem: character-listp-of-repeated-revappend

    (defthm character-listp-of-repeated-revappend
      (implies (and (character-listp x)
                    (character-listp y))
               (character-listp (repeated-revappend n x y))))

    Theorem: repeated-revappend-of-nfix-n

    (defthm repeated-revappend-of-nfix-n
      (equal (repeated-revappend (nfix n) x y)
             (repeated-revappend n x y)))

    Theorem: repeated-revappend-nat-equiv-congruence-on-n

    (defthm repeated-revappend-nat-equiv-congruence-on-n
      (implies (acl2::nat-equiv n n-equiv)
               (equal (repeated-revappend n x y)
                      (repeated-revappend n-equiv x y)))
      :rule-classes :congruence)