• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
          • Simplify-defun
          • Isodata
          • Tailrec
          • Schemalg
          • Expdata
          • Restrict
          • Casesplit
          • Simplify-term
          • Simplify-defun-sk
          • Parteval
          • Solve
          • Propagate-iso
          • Simplify
          • Wrap-output
          • Finite-difference
          • Drop-irrelevant-params
          • Copy-function
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Abnf
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Prime-field-constraint-systems
          • Soft
          • Bv
          • Imp-language
          • Event-macros
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Apt

    Copy-function

    Make a copy of a function, with recursive calls appropriately renamed.

    General Form:

    (copy-function fn
                   &key
                   :show-only          ; default nil
                   :print              ; default :result
                   :new-name           ; default :auto
                   :theorem-disabled   ; default nil
                   :function-disabled  ; default :auto
                   :verify-guards      ; default :auto
                   :guard-hints        ; default :auto
                   :measure            ; default :auto
                   :measure-hints      ; default :auto
                   :normalize          ; default t
                   )

    Inputs:

    fn — (required)

    The name of the function to transform.

    :show-only — default nil

    Whether to simply show the result, not create it.

    :print — default :result

    How much detail to print.

    :new-name — default :auto

    The name of the new function to be created.

    :theorem-disabled — default nil

    Whether to disable the 'becomes theorem'.

    :function-disabled — default :auto

    Whether to disable the new function.

    :verify-guards — default :auto

    Whether to verify the guards of the new function.

    :guard-hints — default :auto

    Hints to use for the guard proof.

    :measure — default :auto

    Measure to use for the new function.

    :measure-hints — default :auto

    Hints to use for the measure/termination proof.

    :normalize — default t

    Whether to normalize the new function body, as ACL2 usually does.

    Description:

    To inspect the resulting forms, call show-copy-function on the same arguments.