A Study of Categories of Algebras and Coalgebras
Total Page:16
File Type:pdf, Size:1020Kb
A Study of Categories of Algebras and Coalgebras Jesse Hughes May, 2001 Department of Philosophy Carnegie Mellon University Pittsburgh PA 15213 Thesis Committee Steve Awodey, Co-Chair Dana Scott, Co-Chair Jeremy Avigad Lawrence Moss, Indiana University Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy Abstract This thesis is intended to help develop the theory of coalgebras by, first, taking classic theorems in the theory of universal algebras and dualizing them and, second, developing an internal logic for categories of coalgebras. We begin with an introduction to the categorical approach to algebras and the dual notion of coalgebras. Following this, we discuss (co)algebras for a (co)monad and develop a theory of regular subcoalgebras which will be used in the internal logic. We also prove that categories of coalgebras are complete, under reasonably weak conditions, and simultaneously prove the well-known dual result for categories of algebras. We close the second chapter with a discussion of bisimulations in which we introduce a weaker notion of bisimulation than is current in the literature, but which is well-behaved and reduces to the standard definition under the assumption of choice. The third chapter is a detailed look at three theorem's of G. Birkhoff [Bir35, Bir44], presenting categorical proofs of the theorems which generalize the classical results and which can be easily dualized to apply to categories of coalgebras. The theorems of interest are the variety theorem, the equational completeness theorem and the subdirect product representation theorem. The duals of each of these theorems is discussed in detail, and the dual notion of \coequation" is introduced and several examples given. In the final chapter, we show that first order logic can be interpreted in categories of coalgebras and introduce two modal operators to first order logic to allow reasoning about \endomorphism-invariant" coequations and bisimulations internally. We also develop a translation of terms and formulas into the internal language of the base category, which preserves and reflects truth. Lastly, we introduce a Kripke-Joyal style semantics for L(E ), as well as a pointwise semantics which reflects the intuition of coequation forcing at a point or subset of a coalgebra. Acknowledgments I have been fortunate to have two advisors on this dissertation. I first became in- terested in the subject thanks to Dana Scott, who helped guide the questions and suggested the Birkhoff's theorem research in particular. Steve Awodey taught me everything I know about category theory, but I am grateful anyway. Both advisors helped my writing immensely, in addition to guiding my research, and I am thankful for their patience and wisdom. When Dana first suggested I look into coalgebras, he pointed me to Vicious Cir- cles, by Jon Barwise and Larry Moss. Since that book was the start of my study of coalgebras, it seemed only fair that Larry Moss should have to read this dissertation. He graciously agreed to be my outside reader. I am grateful for the advice he and Jeremy Avigad gave as members of my committee. My research has benefited through discussions and correspondence with many people, including Peter Aczel, Jiˇr´ı Ad´amek, Andrej Bauer, Lars Birkedal, Steve Brookes, Corina C^ırstea, Federico do Marchi, Neil Ghani, Jeremy Gibbons, Peter Gumm, Bart Jacobs, Alexander Kurz, Bill Lawvere, John Reynolds, Tobias Schr¨oder James Worrell and Jaap van Oosten and others I'm sure to have missed here. I also want to thank the organizers of the Coalgebraic Methods for Computer Science workshop for providing a great opportunity to meet and discuss our research. On a more personal note, I could not have completed this work without the extraordinary patience and generosity of my wife, Ling Cheung. In fact, I am the rare husband who's also grateful for the extended visits of his mother-in-law, Siu Kai Lam. She helped out considerably when two graduate students were overwhelmed with a newborn, Quincy Prescott Hughes. I also enjoyed the distractions from my work, including Penguins hockey, regular fishing trips with Dirk Schlimm, exciting demolition derbies at New Alexandria and captivating and suspenseful games of Peek- a-boo with Quincy. iii Contents Introduction 1 Chapter synopsis 4 Chapter 1. Algebras and coalgebras 7 1.1. Algebras and coalgebras for an endofunctor 7 Γ 1.2. Structural features of E and EΓ 16 1.3. Subalgebras 22 1.4. Congruences 27 1.5. Initial algebras and final coalgebras 32 Chapter 2. Constructions arising from a (co)monad 47 2.1. (Co)monads and (co)algebras 47 2.2. Subcoalgebras 61 2.3. Subcoalgebras generated by a subobject 73 2.4. Limits in categories of coalgebras revisited 77 2.5. Bisimulations 89 2.6. Coinduction and bisimulations 105 2.7. n-simulations 109 Chapter 3. Birkhoff's variety theorem 113 3.1. The classical theorem 114 3.2. A categorical approach 115 3.3. Categories of algebras 125 3.4. Uniformly Birkhoff categories 127 3.5. Deductive closure 135 3.6. The coalgebraic dual of Birkhoff's variety theorem 140 3.7. Uniformly co-Birkhoff categories 153 3.8. Invariant coequations 162 3.9. Behavioral covarieties and monochromatic coequations 168 Chapter 4. The internal logic of E 175 4.1. Preliminary results 175 4.2. Transfer principles 186 v vi CONTENTS 4.3. A Kripke-Joyal style semantics 198 4.4. Pointwise forcing of coequations 200 Concluding remarks and further research 205 Appendix A. Preliminaries 209 A.1. Notation 209 A.2. Factorization systems 209 A.3. Predicates and Subobjects 212 A.4. Relations 214 A.5. Monads and comonads 216 Appendix. Bibliography 219 Appendix. Index 223 Introduction The theory of universal algebras has been well-developed in the twentieth cen- tury. The theory has also proved especially fruitful, with early results (like Birkhoff's variety theorem) providing a basis for model theory and other results providing an abstract understanding of familiar principles of induction, recursion and freeness. The theory of coalgebras is considerably younger and less well developed. Coalgebras arise naturally, as Kripke models for modal logic, as automata and objects for object oriented programming languages in computer science, etc. Hence, one would like a unified theory of coalgebras to play a role analogous to that of the theory of algebras. This goal is aided by the duality between algebras and coalgebras. Statements about categories of algebras yield dual statements about categories of coalgebras. One can then investigate whether there are reasonable assumptions about the categories of coalgebras that yield the dual theorems. Algebras, in their commonest form, can be understood as a set together with some operations on the set. In other words, algebras are structures for a signature. The term algebras are examples of free algebras, where freeness is easily expressed in terms of adjoint functors. Such free algebras (which are initial objects in a related category of algebras) come with the proof principle of induction, which can be understood in terms of minimality. That is, the principle of induction is equivalent to the property that an algebra has no non-trivial subalgebras. The property of definition by recursion is exactly the property that an algebra is an initial object. Thus, these familiar topics of universal algebra are well-suited for a categorical setting. We can use the tools of category theory to investigate freeness, induction and recursion as special cases of adjointness, minimality and initiality, respectively. In particular, these algebraic properties can be represented as standard categorical properties applied to categories of algebras (in which the structure of the category leads to the well-known algebraic properties). Coalgebras can also be regarded as a set together with certain operations on it, but with a key difference. Where an algebra is intended to model combinatorial op- erations, a coalgebra models a set with various unary operations whose codomain is a (typically) more complex structure. These operations can be viewed as \destructors" which take an element of the coalgebra to its constituent parts. Compare this view 1 2 INTRODUCTION with the notion that an algebras operations give a means (not necessarily unique) of \constructing" an element out of a tuple. Consider, for instance, a set S of A-labeled binary trees1 which is closed under the \childOf" relation. That is, if x 2 S, then both the left and right subtrees of x (if they exist) are also in S. Then S has a natural coalgebraic structure consisting of three destructor functions. Given any x 2 S, we may ask for the label of x. We may also ask for the left child or right child of x, assuming that there is an \error state" which can be returned if x has no such child . These three structure maps define a signature Σ for a category of coalgebras in the same way that a set with some combinatorial operations define a signature for a category of algebras (i.e., a similarity type). Any set X, together with three operations, a:X /A; l :X /X + 1; r :X /X + 1; is a Σ-coalgebra. Equivalently, any set X with a single map ha; l; ri:X /A × (X + 1) × (X + 1) is a coalgebra of the same type as our set S of binary trees. Indeed, any such structured set can be regarded as a set of trees itself. We can use the theory of algebras in order to develop the theory of coalgebras. The duality is apparent in the distinguished initial algebra/final coalgebra. The initial algebra is the initial (i.e., \least") fixed point of the associated functor, while the final coalgebra is the final (i.e., \greatest") fixed point.