Positive Inductive-Recursive Definitions [chapter]

Neil Ghani, Lorenzo Malatesta, Fredrik Nordvall Forsberg
2013 Lecture Notes in Computer Science  
We introduce a new theory of data types which allows for the definition of data types as initial algebras of certain functors Fam C → Fam C. This theory, which we call positive inductive-recursive definitions, is a generalisation of Dybjer and Setzer's theory of inductive-recursive definitions within which C had to be discrete -our work can therefore be seen as lifting this restriction. This is a substantial endeavour as we need to not only introduce a type of codes for such data types (as in
more » ... bjer and Setzer's work), but also a type of morphisms between such codes (which was not needed in Dybjer and Setzer's development). We show how these codes are interpreted as functors on Fam C and how these morphisms of codes are interpreted as natural transformations between such functors. We then give an application of positive inductive-recursive definitions to the theory of nested data types. Finally we justify the existence of positive inductive-recursive definitions by adapting Dybjer and Setzer's set-theoretic model to our setting.
doi:10.1007/978-3-642-40206-7_3 fatcat:bmbq64zvbzdzjaj45xl5fyfbje