A Coalgebraic View of Bar Recursion and Bar Induction
We reformulate the bar recursion and induction principles in terms of recursive and wellfounded coalgebras. Bar induction was originally proposed by Brouwer as an axiom to recover certain classically valid theorems in a constructive setting. It is a form of induction on non-wellfounded trees satisfying certain properties. Bar recursion, introduced later by Spector, is the corresponding function definition principle.
We give a generalization of these principles, by introducing the notion of barred coalgebra: a process with a branching behaviour given by a functor, such that all possible computations terminate.
Coalgebraic bar recursion is the statement that every barred coalgebra is recursive; a recursive coalgebra is one that allows definition of functions by a coalgebra-to-algebra morphism. It is a framework to characterize valid forms of recursion for terminating functional programs. One application of the principle is the tabulation of continuous functions: Ghani, Hancock and Pattinson defined a type of wellfounded trees that represent continuous functions on streams. Bar recursion allows us to prove that every stably continuous function can be tabulated to such a tree, where by stability we mean that the modulus of continuity is its own modulus. Coalgebraic bar induction states that every barred coalgebra is wellfounded; a wellfounded coalgebra is one that admits proof by induction.
Capretta is grateful to the School of Computer Science that gave him a sabbatical semester. Uustalu was supported by the ERDF funded Estonian national CoE project EXCS and ICT national programme project Coinduction (the latter paid also Capretta’s visit to Tallinn), the Estonian Science Foundation grant no. 9475 and the Estonian Ministry of Education and Research institutional research grant no. IUT-3313.
- 3.Adámek, J., Milius, S., Moss, L.S., Sousa, L.: Well-pointed coalgebras. Log. Methods Comput. Sci. 9(3), article 2 (2013)Google Scholar
- 11.Escardó, M.H., Xu, C.: The inconsistency of a Brouwerian continuity principle with the Curry-Howard interpretation. In: Altenkirch, T. (ed.) 13th International Conference on Typed Lambda Calculi and Applications, TLCA 2015, Leibniz International Proceedings in Informatics, vol. 38, pp. 153–164. Dagstuhl Publishing, Saarbrücken (2015)Google Scholar
- 14.Hancock, P., Pattinson, D., Ghani, N.: Representations of stream processors using nested fixed points. Log. Methods Comput. Sci. 5(3), article 9 (2009)Google Scholar
- 19.Spector, C.: Provably recursive functionals of analysis: a consistency proof of analysis by an extension of principles in current intuitionistic mathematics. In: Dekker, F.D.E. (ed.) Recursive Function Theory: Proceedings of Symposia in Pure Mathematics. vol. 5, pp. 1–27. American Mathematical Society, Providence, RI (1962)Google Scholar
- 21.Taylor, P.: Towards a unified treatment of induction, I: The general recursion theorem. Manuscript (1996)Google Scholar