Containers, monads and induction recursion

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.

[1]  Peter Dybjer,et al.  A general formulation of simultaneous inductive-recursive definitions in type theory , 2000, Journal of Symbolic Logic.

[2]  Ryu Hasegawa,et al.  Two applications of analytic functors , 2002, Theor. Comput. Sci..

[3]  Martin Hyland,et al.  Wellfounded Trees and Dependent Polynomial Functors , 2003, TYPES.

[4]  Jan M. Smith,et al.  Propositional Functions and Families of Types , 1989, Notre Dame J. Formal Log..

[5]  Ulf Norell,et al.  A Brief Overview of Agda - A Functional Language with Dependent Types , 2009, TPHOLs.

[6]  Peter Dybjer,et al.  Induction-recursion and initial algebras , 2003, Ann. Pure Appl. Log..

[7]  Thorsten Altenkirch,et al.  Containers: Constructing strictly positive types , 2005, Theor. Comput. Sci..

[8]  Peter Morris,et al.  Indexed Containers , 2009, 2009 24th Annual IEEE Symposium on Logic In Computer Science.

[9]  Peter Dybjer,et al.  A Finite Axiomatization of Inductive-Recursive Definitions , 1999, TLCA.

[10]  S. Lane Categories for the Working Mathematician , 1971 .

[11]  Peter Dybjer,et al.  Indexed induction-recursion , 2006, J. Log. Algebraic Methods Program..

[12]  Thorsten Altenkirch,et al.  Higher-Order Containers , 2010, CiE.

[13]  Anton Setzer,et al.  An extended predicative definition of the Mahlo universe , 2010 .