Variations on Inductive-Recursive Definitions Neil Ghani 1 , Conor McBride 1 , Fredrik Nordvall Forsberg 1 , and Stephan Spahn 2 1 University of Strathclyde, Glasgow, Scotland {neil.ghani, conor.mcbride, fredrik.nordvall-forsberg}@strath.ac.uk 2 Middlesex University, London, England stephanspahn1@me.com Abstract Dybjer and Setzer introduced the definitional principle of inductive-recursively defined families — i.e. of families (U : Set, T : U D) such that the inductive definition of U may depend on the recursively defined T — by defining a set DS DE of codes. Each c : DS DE defines a functor c : Fam D Fam E, and (U, T)= µc : Fam D is exhibited as the initial algebra of c . This paper considers the composition of DS-definable functors: Given F : Fam C Fam D and G : Fam D Fam E, is G F : Fam C Fam E DS-definable, if F and G are? We show that this is the case if and only if powers of families are DS-definable, which seems unlikely. To construct composition, we present two new systems UF and PN of codes for inductive-recursive definitions, with UF DS PN. Both UF and PN are closed under composition. Since PN defines a potentially larger class of functors, we show that initial algebras of PN-functors exist by adopting Dybjer-Setzer’s proof for DS. Digital Object Identifier 10.4230/LIPIcs... 1 Introduction Codes for simultaneous inductive-recursive definitions were introduced in a series of papers by Dybjer and Setzer [7, 8, 9]. An initial motivation [6] for introducing inductive-recursive definitions was to give generic rules that can be specialised to define most types occurring in in Martin-Löf Type Theory [13], including inductive type families [5] and Tarski-style universes [14]. By an inductive-recursive definition one can define not only a type, but more generally a family (U : Set, T : U D) of types for some D : Set 1 , where the inductive definition of U may depend on the recursively defined T; examples can be found in Section 2. To represent such definitions, Dybjer and Setzer introduced a set DS DE of codes representing functors Fam D Fam E. The family (U, T)= µc : Fam D arises as the initial algebra of a functor c : Fam D Fam D represented by a code c : DS DD. Induction recursion is important as it is the strongest form of inductive definition we have, surpassing, for example, inductive definitions [11] and inductive families [3]. This paper asks the following fundamental and significant question: Is the theory of inductive-recursive definitions, as currently understood, optimal? We still believe that conceiving of inductive-recursive definitions as initial algebras in the category Fam D is the right thing to do. However, the current set of codes for generating such functors may not actually be optimal for this purpose. We come to this conclusion by considering the question of composition of codes. Given c : Fam C Fam D and d : Fam D Fam E represented by Dybjer-Setzer codes c : DS CD and d : DS DE respectively, is d c : Fam C Fam E DS-definable, i.e. does there exist a code d c : DS CE such that d c = d c ? A positive answer would allow modularity in © Neil Ghani, Conor McBride, Fredrik Nordvall Forsberg and Stephan Spahn; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany