Skip to main content Accessibility help

Containers, monads and induction recursion

  • NEIL GHANI (a1) and PETER HANCOCK (a1)

Induction recursion offers the possibility of a clean, simple and yet powerful meta-language for the type system of a dependently typed programming language. At its crux, induction recursion allows us to define a universe, that is a set U of codes and a decoding function T : U → D which assigns to every code u : U, a value T, u of some type D, e.g. the large type Set of small types or sets. The name induction recursion refers to the build-up of codes in U using inductive clauses, simultaneously with the definition of the function T, by structural recursion on codes.

Our contribution is to (i) bring out explicitly algebraic structure which is less visible in the original type-theoretic presentation – in particular showing how containers and monads play a pivotal role within induction recursion; and (ii) use these structures to present a clean and high level definition of induction recursion suitable for use in functional programming.

Hide All
Abbott, M., Altenkirch, T. and Ghani, N. (2005) Containers – constructing strictly positive types. Theoretical Computer Science 342 327. (Applied Semantics: Selected Topics.)
Altenkirch, T., Levy, P. and Staton, S. (2010) Higher order containers. Computability in Europe.
Bove, A., Dybjer, P. and Norell, U. (2009) A brief overview of agda – a functional language with dependent types. In: Theorem Proving in Higher Order Logics, 22nd International Conference, TPHOLs 2009. Springer Lecture Notes in Computer Science 5674 73782009.
Dybjer, P. (1994) Inductive families. Formal Aspects of Computing 6 440465.
Dybjer, P. (2000) A general formulation of simultaneous inductive-recursive definitions in type theory. The Journal of Symbolic Logic 65 (2) 525549.
Dybjer, P. and Setzer, A. (1999) A finite axiomatization of inductive-recursive definitions. In: Girard, J.-Y. (eds.) Typed Lambda Calculi and Applications. Springer Lecture Notes in Computer Science 1581 129146.
Dybjer, P. and Setzer, A. (2001) Indexed induction-recursion. In: Kahle, R., Schroeder-Heister, P. and Stärk, R. (eds.) Proof Theory in Computer Science. Springer-Verlag Lecture Notes in Computer Science 2183 93113.
Dybjer, P. and Setzer, A. (2003) Induction-recursion and initial algebras. Annals of Pure and Applied Logic 124 (1–3) 147.
Dybjer, P. and Setzer, A. (2006) Indexed induction-recursion. Journal of Logic and Algebraic Programming 66 149.
Gambino, N. and Hyland, M. (2004) Well-founded trees and dependent polynomial functors. In: Types for Proofs and Programs. Springer-Verlag Lecture Notes in Computer Science 3085 210225.
Hasegawa, R. (2002) Two applications of analytic functors. Theoretical Computer Science 272 (1–2) 113175. ISSN
Kahle, R. and Setzer, A. (2010) An extended predicative definition of the Mahlo universe. In: Ways of ProofTheory. Festschrift on the occasion of Wolfram Pohler's retirement, Ontos Verlag.
Mac Lane, S. (1998) Categories for the Working Mathematician, 2nd edition, Graduate Texts in Mathematics, Springer. ISBN 0387984038.
Martin-Löf, P. (1973) An intuitionistic theory of types: Predicative part. In: Logic Colloquium '73, North-Holland, Amsterdam 73118.
Morris, P. and Altenkirch, T. (2009) Indexed containers. In: 24th IEEE Symposium in Logic in Computer Science (LICS 2009).
Smith, J. M. (1989) Propositional functions and families of types. Notre Dame Journal of Formal Logic 30 (3) 442458.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Mathematical Structures in Computer Science
  • ISSN: 0960-1295
  • EISSN: 1469-8072
  • URL: /core/journals/mathematical-structures-in-computer-science
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed