• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
      • 100-theorems
      • Arithmetic
      • Bit-vectors
        • Sparseint
        • Bitops
          • Bitops/merge
            • Merge-64-u8s
            • Merge-64-bits
            • Merge-32-u8s
            • Merge-32-u4s
            • Merge-32-u2s
            • Merge-32-u16s
            • Merge-32-bits
            • Merge-16-bits
            • Merge-16-u32s
            • Merge-16-u16s
            • Merge-16-u8s
            • Merge-16-u4s
            • Merge-16-u2s
            • Merge-8-bits
            • Merge-8-u2s
            • Merge-8-u64s
            • Merge-8-u4s
            • Merge-8-u32s
            • Merge-8-u16s
            • Merge-8-u8s
            • Merge-4-bits
            • Merge-4-u8s
            • Merge-4-u4s
            • Merge-4-u16s
            • Merge-4-u2s
            • Merge-4-u64s
            • Merge-4-u32s
            • Merge-4-u128s
            • Merge-2-u64s
            • Merge-2-u256s
            • Merge-2-u16s
            • Merge-2-u128s
            • Merge-2-bits
            • Merge-2-u8s
            • Merge-2-u4s
            • Merge-2-u32s
            • Merge-2-u2s
            • Merge-unsigneds
            • Merge-unsigneds-aux
            • Indexed-subst-templates
            • Bitops-compatibility
            • Bitops-books
            • Logbitp-reasoning
            • Bitops/signed-byte-p
            • Fast-part-select
            • Bitops/integer-length
            • Bitops/extra-defs
            • Install-bit
            • Trailing-0-count
            • Bitops/defaults
            • Logbitp-mismatch
            • Trailing-1-count
            • Bitops/rotate
            • Bitops/equal-by-logbitp
            • Bitops/ash-bounds
            • Bitops/fast-logrev
            • Limited-shifts
            • Bitops/part-select
            • Bitops/parity
            • Bitops/saturate
            • Bitops/part-install
            • Bitops/logbitp-bounds
            • Bitops/ihsext-basics
            • Bitops/fast-rotate
            • Bitops/fast-logext
            • Bitops/ihs-extensions
          • Bv
          • Ihs
          • Rtl
        • Algebra
      • Testing-utilities
    • Bitops/merge

    Indexed-subst-templates

    Signature
    (indexed-subst-templates name from by how-many &key 
                             (base-subst '(acl2::make-tmplsubst))) 
     
      → 
    *
    Arguments
    name — Guard (symbolp name).
    from — Guard (integerp from).
    by — Guard (integerp by).
    how-many — Guard (natp how-many).
    base-subst — Guard (acl2::tmplsubst-p base-subst).

    Definitions and Theorems

    Function: indexed-subst-templates-fn

    (defun indexed-subst-templates-fn (name from by how-many base-subst)
     (declare (xargs :guard (and (symbolp name)
                                 (integerp from)
                                 (integerp by)
                                 (natp how-many)
                                 (acl2::tmplsubst-p base-subst))))
     (let ((__function__ 'indexed-subst-templates))
      (declare (ignorable __function__))
      (if (zp how-many)
          nil
       (cons
        (b* (((acl2::tmplsubst base-subst)))
         (acl2::change-tmplsubst
            base-subst
            :atoms (append (cons (cons name from) 'nil)
                           base-subst.atoms)
            :strs
            (append (cons (cons (symbol-name name)
                                (coerce (explode-atom from 10) 'string))
                          'nil)
                    base-subst.strs)))
        (indexed-subst-templates name (+ from by)
                                 by (1- how-many)
                                 :base-subst base-subst)))))