• 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

      Drop-irrelevant-params

      Removes some irrelevant parameters from a function.

      General Form:

      (drop-irrelevant-params fn
                              param-or-params-to-drop
                              &key
                              :new-name               ; default :auto
                              :build-wrapper          ; default nil
                              :theorem-disabled       ; default nil
                              :function-disabled      ; default :auto
                              :measure-hints          ; default :auto
                              :verify-guards          ; default :auto
                              :guard-hints            ; default :auto
                              :untranslate            ; default :macros
                              :show-only              ; default nil
                              :print                  ; default :result
                              )

      Inputs:

      fn — (required)

      The function to transform (a defined function).

      param-or-params-to-drop — (required)

      The param to drop (a symbol), or a list of such.

      :new-name — default :auto

      The new name to use, or :auto to have the transformation generate a name. If the target function is defined in a mutual-recursion, we support :map syntax for the :new-name option.

      :build-wrapper — default nil

      Whether to build a wrapper function.

      :theorem-disabled — default nil

      Whether to disable the 'becomes theorem'.

      :function-disabled — default :auto

      Whether to disable the new function.

      :measure-hints — default :auto

      Hints to use for the measure/termination proof.

      :verify-guards — default :auto

      Whether to verify guards of the new function(s).

      :guard-hints — default :auto

      Hints to use for the guard proof.

      :untranslate — default :macros

      How to untranslate the function body after changing it.

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

      An irrelevant parameter is one that is not used in the body of the function except (perhaps) to calculate new values for the same parameter in recursive calls.

      This transform supports dropping multiple irrelevant parameters simultaneously. (I suppose all irrelevant parameters can be used to generate new values for any other irrelevant parameters -- and still be considered irrelevant).