• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
        • Simplify-defun
        • Isodata
        • Tailrec
        • 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
        • Std/util
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
        • Theories
        • Rule-classes
        • Proof-builder
        • Recursion-and-induction
        • Hons-and-memoization
        • Events
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
          • Make-event
          • Defmacro
          • Untranslate-patterns
          • Tc
          • Trans*
          • Macro-aliases-table
          • Macro-args
          • Defabbrev
          • User-defined-functions-table
          • Trans
          • Untranslate-for-execution
          • Add-macro-fn
          • Check-vars-not-free
          • Safe-mode
          • Macro-libraries
            • B*
            • Defunc
            • Fty
            • Apt
              • Simplify-defun
              • Isodata
              • Tailrec
              • 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
              • Std/util
              • Defdata
              • Defrstobj
              • Seq
              • Match-tree
              • Defrstobj
              • With-supporters
              • Def-partial-measure
              • Template-subst
              • Soft
              • Defthm-domain
              • Event-macros
              • Def-universal-equiv
              • Def-saved-obligs
              • With-supporters-after
              • Definec
              • Sig
              • Outer-local
              • Data-structures
            • Trans1
            • Defmacro-untouchable
            • Set-duplicate-keys-action
            • Add-macro-alias
            • Magic-macroexpand
            • Defmacroq
            • Trans!
            • Remove-macro-fn
            • Remove-macro-alias
            • Add-binop
            • Untrans-table
            • Trans*-
            • Remove-binop
            • Tcp
            • Tca
          • Interfacing-tools
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Apt

      Copy-function

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

      General Form:

      (copy-function fn
                     &key
                     :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
                     :show-only         ; default nil
                     :print             ; default :result
                     )

      Inputs:

      fn — (required)

      The name of the function to transform.

      :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.

      :show-only — default nil

      Whether to simply show the result, without actually creating it.

      :print — default :result

      How much detail to print, an apt::print-specifier.

      Description:

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