Skip to main content Accessibility help
Hostname: page-component-55597f9d44-5zjcf Total loading time: 0.37 Render date: 2022-08-12T13:30:19.086Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "useRatesEcommerce": false, "useNewApi": true } hasContentIssue true

Two extensions of system F with (co)iteration and primitive (co)recursion principles

Published online by Cambridge University Press:  01 September 2009

Favio Ezequiel Miranda-Perea*
Departamento de Matemáticas, Facultad de Ciencias UNAM, Circuito Exterior S/N. Ciudad Universitaria, 04510 México, D.F. México;
Get access


This paper presents two extensions of the second order polymorphic lambda calculus, system F, with monotone (co)inductive types supporting (co)iteration, primitive (co)recursion and inversion principles as primitives. One extension is inspired by the usual categorical approach to programming by means of initial algebras and final coalgebras; whereas the other models dialgebras, and can be seen as an extension of Hagino's categorical lambda calculus within the framework of parametric polymorphism. The systems are presented in Curry-style, and are proven to be terminating and type-preserving. Moreover their expressiveness is shown by means of several programming examples, going from usual data types to lazy codata types such as streams or infinite trees.

Research Article
© EDP Sciences, 2009

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)


Abel, A., Matthes, R. and Uustalu, T., Iteration and coiteration schemes for higher-order and nested datatypes. Theoret. Comput. Sci. 333 (2005) 366. CrossRef
Böhm, C. and Berarducci, A, Automatic synthesis of typed Λ-programs on term algebras. Theoret. Comput. Sci. 39 (1985) 135154. CrossRef
R.L. Crole, Categories for Types. Cambridge Mathematical Textbooks. Cambridge University Press (1993).
M.A. Cunha, Recursion patterns as hylomorphisms. Technical Report DI-PURe-03.11.01, Department of Informatics, University of Minho (2003).
B.A. Davey and H.A. Priestley, Introduction to Lattices and Order, 2nd edn. Cambridge University Press (2002).
Dybkjær, H. and Melton, A., Comparing Hagino's categorical programming language and typed lambda-calculi. Theoret. Comput. Sci. 111 (1991) 145189. CrossRef
H. Geuvers, Inductive and coinductive types with iteration and recursion. In Proceedings of the 1992 workshop on types for proofs and programs, Båstad, Sweden. Edited by B. Nordström, K. Petterson, G. Plotkin (1992) 183–207. Available via herman/
J. Gibbons and G. Jones, The under-appreciated unfold. In Proceedings 3rd ACM SIGPLAN international conference on functional programming, Baltimore, Maryland (1998) 273–279.
J.Y. Girard, Une extension de l'interpretation de Gödel à l'analyse, et son application à l'élimination des coupures dans l'analyse et la théorie des types. Second Scandinavian Logic Symposium. Edited by J.E. Fenstad. North-Holland (1971) 63–92.
J.Y. Girard, Interprétation fonctionnelle et élimination des coupures dans l'arithmetique d'ordre supérieur. Thèse de Doctorat d'État, Université de Paris VII (1972).
J.Y. Girard, Y. Lafont and P. Taylor, Proofs and Types. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press (1989).
J. Greiner, Programming with inductive and co-inductive types. Technical Report CMU-CS-92-109, Carnegie-Mellon University (1992)
T. Hagino, A typed lambda calculus with categorical type constructors. In Category Theory and Computer Science. Edited by D.H. Pitt, A. Poigné and D.E. Rydeheard. Lect. Notes Comput. Sci. 283 (1987).
T. Hagino, A Categorical programming language. Ph.D. Thesis CST-47-87 (also published as ECS-LFCS-87-38). Department of Computer Science, University of Edinburgh (1987).
Jacobs, B. and Rutten, J., A tutorial on (co)algebras and (co)induction. EATCS Bull. 62 (1997) 222259.
Kabanov, J. and Vene, V., Recursion schemes for dynamic programming. In Proc. 8th Int. Conf. on Mathematics of Program Construction, MPC 06. Edited by T. Uustalu. Lect. Notes Comput. Sci. 4014 (2006) 235252. CrossRef
J.L. Krivine, Lambda-calculus, types and models. Ellis Horwood Series in Computers and their Applications. Ellis Horwood, Masson (1993).
S. Mac Lane, Categories for the Working Mathematician, 2nd. edn., Vol. 5. Graduate Texts in Mathematics. Springer Verlag (1998).
R. Matthes, Extensions of system F by iteration and primitive recursion on monotone inductive types. Dissertation Universität München (1999). Available via matthes/dissertation/
Matthes, R., Monotone (co)inductive types and positive fixed-point types. RAIRO-Theor. Inf. Appl. 33 (1999) 309328. CrossRef
Matthes, R., Monotone fixed-point types and strong normalization. In Computer Science Logic. Edited by G. Gottlob, E. Grandjean, K. Seyr. 12th International Workshop, Brno, Czech Republic, August 24–28, 1998. Lect. Notes Comput. Sci. 1584 (1999) 298312. CrossRef
Matthes, R., Monotone inductive and coinductive constructors of rank 2. In Computer Science Logic 2001. Lect. Notes Comput. Sci. 2142 (2001) 600614. CrossRef
Matthes, R., Non-strictly positive fixed-points for classical natural deduction. Ann. Pure Appl. Logic 133 (2005) 205230. CrossRef
Meijer, E., Fokkinga, M. and Paterson, R., Functional programming with bananas, lenses, envelopes and barbed wire. In FPCA 91. Edited by J. Hughes. Lect. Notes Comput. Sci. 523 (1991) 124144. CrossRef
N.P. Mendler, Recursive types and type constraints in second-order lambda calculus. In Proceedings of the 2nd Annual Symposium on Logic in Computer Science, Ithaca, N.Y. IEEE Computer Society Press, Washington D.C. (1987) 30–36.
Mendler, N.P., Inductive types and type constraints in the second-order lambda calculus. Ann. Pure Appl. Logic 51 (1991) 159172. CrossRef
F.E. Miranda-Perea, On extensions of AF2 with monotone and clausular (co)inductive definitions. Ph.D. Thesis, Ludwig-Maximilians-Universität München, Germany (2004).
F.E. Miranda-Perea, Some remarks on type systems for course-of-value recursion. In Proceedings of the third workshop on Logical and Semantic Frameworks with Applications (LSFA 2008). Electronic Notes in Theoretical Computer Science 247 (2009).
Parigot, M., Recursive programming with proofs. Theoret. Comput. Sci. 94 (1992) 335356. CrossRef
E. Poll and J. Zwanenburg, From algebras and coalgebras to dialgebras. In Coalgebraic Methods in Computer Science (CMCS'2001). Electronic Notes in Theoretical Computer Science 44 (2001).
J. Reynolds, Towards a theory of type structure. In Proc. Colloque sur la Programmation. Edited by B. Robinet. Lect. Notes Comput. Sci. 19 (1974).
Rutten, J.J.M.M., Automata and coinduction (an exercise in coalgebra). In Proceedings of CONCUR '98. Edited by D. Sangiorgi and R. de Simone. Lect. Notes Comput. Sci. 1466 (1998) 194218. CrossRef
Z. Spławski and P. Urzyczyn, Type fixpoints: iteration vs. recursion. In Proc. International Conference on Functional Programming. ACM Press (1999), pp 102–113.
Tait, W.W., A realizability interpretation of the theory of species. In Logic Colloquium Boston 1971/72. Edited by R. Parikh. Lect. Notes Math. 453 (1975) 240251. CrossRef
Turner, D., Total functional programming. J. Universal Comput. Sci. 10 (2004) 751768.
Uustalu, T. and Vene, V., Primitive (co)recursion and course-of-value (co)iteration, categorically. Informatica 10 (1999) 526.
Uustalu, T. and Vene, V., Least and greatest fixed-points in intuitionistic natural deduction. Theoret. Comput. Sci. 272 (2002) 315339. CrossRef
V. Vene, Categorical programming with inductive and coinductive types. Diss. Math. Univ. Tartuensis 23, Univ. Tartu (2000).
P. Wadler, Theorems for free. In Proc. 4th international conference on functional programming languages and computer architecture. Imperial College, London (1989), pp 347–359.
G.C. Wraith, A note on categorical datatypes. In Category Theory and Computer Science. Edited by D. Pitts et al. Lect. Notes Comput. Sci. 389 (1989).

Save article to Kindle

To save this article to your Kindle, first ensure is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the or variations. ‘’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Two extensions of system F with (co)iteration and primitive (co)recursion principles
Available formats

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Two extensions of system F with (co)iteration and primitive (co)recursion principles
Available formats

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Two extensions of system F with (co)iteration and primitive (co)recursion principles
Available formats

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *