Removes some irrelevant parameters from a function.
(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 )
The function to transform (a defined function).
The param to drop (a symbol), or a list of such.
The new name to use, or
:auto to have the transformation generate a name. If the target function is defined in amutual-recursion , we support:map syntax for the:new-name option.
Whether to build a wrapper function.
Whether to disable the 'becomes theorem'.
Whether to disable the new function.
Hints to use for the measure/termination proof.
Whether to verify guards of the new function(s).
Hints to use for the guard proof.
How to untranslate the function body after changing it.
Whether to simply show the result, without actually creating it.
How much detail to print, an apt::print-specifier.
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).