• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
          • Simplify-defun
          • Isodata
          • Tailrec
            • Tailrec-implementation
              • Tailrec-event-generation
                • Tailrec-gen-new-to-old-thm
                • Tailrec-gen-new-fn
                • Tailrec-gen-everything
                • Tailrec-gen-old-to-new-thm
                • Tailrec-gen-wrapper-fn
                • Tailrec-gen-domain-of-old-thm
                • Tailrec-gen-combine-left-identity-ground-thm
                • Tailrec-gen-appconds
                • Tailrec-gen-wrapper-to-old-thm
                • Tailrec-gen-old-to-wrapper-thm
                • Tailrec-gen-old-guard-of-alpha-thm
                • Tailrec-gen-alpha-fn
                • Tailrec-gen-domain-of-ground-base-thm
                • Tailrec-gen-test-of-alpha-thm
                • Tailrec-gen-old-as-new-term
                • Tailrec-gen-base-guard-thm
                • Tailrec-gen-alpha-component-terms
                  • Tailrec-gen-combine-op
                  • Tailrec-gen-id-var-u
                  • Tailrec-gen-alpha-component-terms-aux
                  • Tailrec-gen-var-v
                  • Tailrec-gen-var-u
                  • Tailrec-gen-var-w
                • Tailrec-fn
                • Tailrec-macro-definition
                • Tailrec-input-processing
            • Schemalg
            • Restrict
            • Expdata
            • Casesplit
            • Simplify-term
            • Simplify-defun-sk
            • Parteval
            • Solve
            • Wrap-output
            • Propagate-iso
            • Simplify
            • Finite-difference
            • Drop-irrelevant-params
            • Copy-function
            • Lift-iso
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Tailrec-event-generation

    Tailrec-gen-alpha-component-terms

    Generate the terms of the components of the result of \alpha.

    Signature
    (tailrec-gen-alpha-component-terms alpha-name old$ wrld) 
      → 
    terms
    Arguments
    alpha-name — Guard (symbolp alpha-name).
    old$ — Guard (symbolp old$).
    wrld — Guard (plist-worldp wrld).
    Returns
    terms — A pseudo-term-listp.

    These are the terms (nth 0 (alpha x1 ... xn)), ... (nth n-1 (alpha x1 ... xn)).

    The recursion constructs the terms in reverse order, with i going from n down to 1, exiting when it reaches 0.

    Definitions and Theorems

    Function: tailrec-gen-alpha-component-terms-aux

    (defun tailrec-gen-alpha-component-terms-aux
           (i alpha-name formals terms)
      (declare (xargs :guard (and (natp i)
                                  (symbolp alpha-name)
                                  (symbol-listp formals)
                                  (pseudo-term-listp terms))))
      (let ((__function__ 'tailrec-gen-alpha-component-terms-aux))
        (declare (ignorable __function__))
        (if (zp i)
            terms
          (b* ((i-1 (1- i))
               (term (cons 'nth
                           (cons (cons 'quote (cons i-1 'nil))
                                 (cons (cons alpha-name formals)
                                       'nil)))))
            (tailrec-gen-alpha-component-terms-aux
                 i-1 alpha-name
                 formals (cons term terms))))))

    Function: tailrec-gen-alpha-component-terms

    (defun tailrec-gen-alpha-component-terms (alpha-name old$ wrld)
      (declare (xargs :guard (and (symbolp alpha-name)
                                  (symbolp old$)
                                  (plist-worldp wrld))))
      (let ((__function__ 'tailrec-gen-alpha-component-terms))
        (declare (ignorable __function__))
        (b* ((formals (formals old$ wrld))
             (n (len formals)))
          (tailrec-gen-alpha-component-terms-aux
               n alpha-name formals nil))))