Fibrational Induction Meets Effects
This paper provides several induction rules that can be used to prove properties of effectful data types. Our results are semantic in nature and build upon Hermida and Jacobs’ fibrational formulation of induction for polynomial data types and its extension to all inductive data types by Ghani, Johann, and Fumex. An effectful data type μ(TF) is built from a functor F that describes data, and a monad T that computes effects. Our main contribution is to derive induction rules that are generic over all functors F and monads T such that μ(TF) exists. Along the way, we also derive a principle of definition by structural recursion for effectful data types that is similarly generic. Our induction rule is also generic over the kinds of properties to be proved: like the work on which we build, we work in a general fibrational setting and so can accommodate very general notions of properties, rather than just those of particular syntactic forms. We give examples exploiting the generality of our results, and show how our results specialize to those in the literature, particularly those of Filinski and Støvring.
- 4.Fokkinga, M.: Monadic Maps and Folds for Arbitrary Datatypes. Technical Report, University of Twente (1994)Google Scholar
- 5.Filinski, A., Støvring, K.: Inductive Reasoning About Effectful Data Types. In: Proc. International Conference on Functional Programming, pp. 97–110 (2007)Google Scholar
- 8.Ghani, N., Johann, P., Fumex, C.: Generic Fibrational Induction (2011) (submitted)Google Scholar
- 10.Jacobs, B.: Categorical Logic and Type Theory. Studies in Logic and the Foundations of Mathematics, vol. 141. Elsevier (1999)Google Scholar
- 13.Moggi, E.: Computational Lambda-Calculus and Monads. In: Proc. Logic in Computer Science, pp. 14–23 (1989)Google Scholar