# The Category Theoretic Solution of Recursive Program Schemes

• Stefan Milius
• Lawrence S. Moss
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3629)

## Abstract

This paper provides a general account of the notion of recursive program schemes, their uninterpreted and interpreted solutions, and related concepts. It can be regarded as the category-theoretic version of the classical area of algebraic semantics. The overall assumptions needed are small indeed: working only in categories with “enough final coalgebras” we show how to formulate, solve, and study recursive program schemes. Our general theory is algebraic and so avoids using ordered, or metric structures. Our work generalizes the previous approaches which do use this extra structure by isolating the key concepts needed to study recursion, e. g., substitution in infinite trees, including second-order substitution. As special cases of our interpreted solutions we obtain the usual denotational semantics using complete partial orders, and the one using complete metric spaces. Our theory also encompasses implicitly defined objects which are not usually taken to be related to recursive program schemes at all. For example, the classical Cantor two-thirds set falls out as an interpreted solution (in our sense) of a recursive program scheme. In this short version of our paper we can only sketch some proofs.

## References

1. 1.
Aczel, P., Adámek, J., Milius, S., Velebil, J.: Infinite Trees and Completely Iterative Theories: A Coalgebraic View. Theoret. Comput. Sci. 300, 1–45 (2003)
2. 2.
Adámek, J.: On a Description of Terminal Coalgebras and Iterative Theories. Electron. Notes Theor. Comput. Sci. 82(1) (2003)Google Scholar
3. 3.
Adámek, J., Milius, S., Velebil, J.: Free Iterative Theories: A Coalgebraic View. Math. Structures Comput. Sci. 13, 259–320 (2003)
4. 4.
Adámek, J., Milius, S., Velebil, J.: From Iterative Algebras to Iterative Theories. Electron. Notes Theor. Comput. Sci. 106, 3–24 (2004); full version submitted and available at the URL, http://www.iti.cs.tu-bs.de/~milius
5. 5.
Adámek, J., Milius, S., Velebil, J.: Elgot Algebras. Electron. Notes Theor. Comput. Sci., available at the URL, http://www.iti.cs.tu-bs.de/~milius (to appear)
6. 6.
Adámek, J., Porst, H.E.: On tree coalgebras and coalgebra presentations. Theoret. Comput. Sci. 311, 257–283 (2004)
7. 7.
Adámek, J., Reitermann, J.: Banach’s Fixed-Point Theorem as a Base for Data-Type Equations. Appl. Categ. Structures 2, 77–90 (1994)
8. 8.
Adámek, J., Trnková, V.: Automata and Algebras in Categories. Kluwer Academic Publishers, Dordrecht (1990)
9. 9.
America, P., Rutten, J.: Solving Reflexive Domain Equations in a Category of Complete Metric Spaces. J. Comput. System Sci. 39, 343–375 (1989)
10. 10.
Arnold, A., Nivat, M.: The metric space of infinite trees. Fund. Inform. III(4), 445–476 (1980)
11. 11.
Barnsley, M.F.: Fractals everywhere. Academic Press, London (1988)
12. 12.
Barr, M.: Terminal coalgebras in well-founded set theory. Theoret. Comput. Sci. 114, 299–315 (1993)
13. 13.
Barwise, J., Moss, L.S.: Vicious Circles. CSLI Publications, Stanford (1996)Google Scholar
14. 14.
Bloom, S.L.: All Solutions of a System of Recursion Equations in Infinite Trees and Other Contraction Theories. J. Comput. System Sci. 27, 225–255 (1983)
15. 15.
Bloom, S.L., Ésik, Z.: Iteration Theories: The equational logic of iterative processes. EATCS Monographs on Theoretical Computer Science. Springer, Berlin (1993)
16. 16.
Courcelle, B.: Fundamental properties of infinite trees. Theoret. Comput. Sci. 25(2), 95–169 (1983)
17. 17.
Elgot, C.C.: Monadic Computation and Iterative Algebraic Theories. In: Rose, H.E., Shepherdson, J.C. (eds.) Logic Colloquium 1973. North-Holland Publishers, Amsterdam (1975)Google Scholar
18. 18.
Elgot, C.C., Bloom, S.L., Tindell, R.: On the Algebraic Structure of Rooted Trees. J. Comput. System Sci. 16, 361–399 (1978)
19. 19.
Ghani, N., Lüth, C., De Marchi, F.: Solving Algebraic Equations using Coalgebra. Theor. Inform. Appl. 37, 301–314 (2003)
20. 20.
Guessarian, I.: Algebraic Semantics. LNCS, vol. 99. Springer, Heidelberg (1981)
21. 21.
Lambek, J.: A Fixpoint Theorem for Complete Categories. Math. Z. 103, 151–161 (1968)
22. 22.
Leinster, T.: General self-similarity: an overview, e-print math.DS/0411343 v1Google Scholar
23. 23.
Leinster, T.: A general theory of self-similarity I, e-print math.DS/041344Google Scholar
24. 24.
Leinster, T.: A general theory of self-similarity II, e-print math.DS/0411345Google Scholar
25. 25.
Matthes, R., Uustalu, T.: Substitution in Non-Wellfounded Syntax with Variable Binding. In: Gumm, H.P. (ed.) Electron. Notes Theor. Comput. Sci., vol. 82 (2003)Google Scholar
26. 26.
Milius, S.: Completely Iterative Algebras and Completely Iterative Monads. Inform. and Comput. 196, 1–41 (2005)
27. 27.
Milius, S., Moss, L.S.: The Category Theoretic Solution of Recursive Program Schemes, full version, available at the URL http://www.iti.cs.tu-bs.de/milius
28. 28.
Moss, L.S.: Parametric Corecursion. Theoret. Comput. Sci. 260(1–2), 139–163 (2001)
29. 29.
Moss, L.S.: The Coalgebraic Treatment of Second-Order Substitution and Uninterpreted Recursive Program Schemes, preprint (2002)Google Scholar
30. 30.
Worrell, J.: On the Final Sequence of a Finitary Set Functor. Theoret. Comput. Sci. (accepted for publication)Google Scholar