A Type of Partial Recursive Functions
Our goal is to define a type of partial recursive functions in constructive type theory. In a series of previous articles, we studied two different formulations of partial functions and general recursion. We could obtain a type only by extending the theory with either an impredicative universe or with coinductive definitions. Here we present a new type constructor that eludes such entities of dubious constructive credentials. We start by showing how to break down a recursive function definition into three components: the first component generates the arguments of the recursive calls, the second evaluates them, and the last computes the output from the results of the recursive calls. We use this dissection as the basis for the introduction rule of the new type constructor. Every partial recursive function is associated with an inductive domain predicate; evaluation of the function requires a proof that the input values satisfy the predicate. We give a constructive justification for the new construct by interpreting it into the base type theory. This shows that the extended theory is consistent and constructive.
Unable to display preview. Download preview PDF.
- 1.Audebaud, P.: Partial objects in the calculus of constructions. In: Kahn, G. (ed.) Proceedings of the Sixth Annual IEEE Symp. on Logic in Computer Science, LICS 1991, July 1991, pp. 86–95. IEEE Computer Society Press, Los Alamitos (1991)Google Scholar
- 10.Capretta, V., Uustalu, T., Vene, V.: Recursive coalgebras from comonads. In: Proceedings of the Workshop on Coalgebraic Methods in Computer Science (CMCS 2004). Electronic Notes in Theoretical Computer Science, vol. 106, pp. 43–61 (2004)Google Scholar
- 14.Constable, R.L., Smith, S.F.: Partial objects in constructive type theory. In: Logic in Computer Science, Ithaca, New York, pp. 183–193. IEEE, Los Alamitos (1987)Google Scholar
- 18.Martin-Löf, P.: Intuitionistic Type Theory. Bibliopolis, 1984. Notes by Giovanni Sambin of a series of lectures given in Padua (June 1980)Google Scholar
- 23.Setzer, A.: A data type of partial recursive functions in Martin-Löf Type Theory, http://www.cs.swan.ac.uk/~csetzer/articles/setzerDataTypeParRecPostProceedings.ps
- 24.The Coq Development Team. LogiCal Project. The Coq Proof Assistant. Reference Manual. Version 8. INRIA (2004), http://pauillac.inria.fr/coq/coq-eng.html