Proof Pearl: A Constructive Fixed Point Combinator for Recursive Functions
Type theories need to enforce some restrictions on recursive definitions in order to remain sound. Depending on the implementation, these restrictions may prevent the user from defining recursive functions as conveniently as in a functional programming language. This paper describes a fixed point combinator that can be applied to any functional. A fixed point equation can be derived for the recursive function produced, provided that all recursive calls are made on arguments that are smaller than the current argument, with respect to a decidable well-founded relation or a measure. The approach is entirely constructive, and does not require the user to program with dependent types. It supports partial functions, n-ary functions, mutual recursion, higher-order recursion and nested recursion. It has been implemented and experimented in Coq.
Report, March 2009