
Categories and Computability J.R.B. Cockett ∗ Department of Computer Science, University of Calgary, Calgary, T2N 1N4, Alberta, Canada April 4, 2014 Contents 1 Introduction 3 1.1 Categories and foundations . 3 1.2 Categories and computer science . 4 1.3 Categories and computability . 4 I Basic Categories 6 2 Categories and examples 7 2.1 The definition of a category . 7 2.1.1 Categories as graphs with composition . 7 2.1.2 Categories as partial semigroups . 8 2.1.3 Categories as enriched categories . 9 2.1.4 The opposite category and duality . 9 2.2 Examples of categories . 10 2.2.1 Preorders . 10 2.2.2 Finite categories . 11 2.2.3 Categories enriched in finite sets . 11 2.2.4 Monoids . 13 2.2.5 Path categories . 13 2.2.6 Matrices over a rig . 13 2.2.7 Kleene categories . 14 2.2.8 Sets . 15 2.2.9 Programming languages . 15 2.2.10 Products and sums of categories . 16 2.2.11 Slice categories . 16 ∗Partially supported by NSERC, Canada. 1 3 Elements of category theory 18 3.1 Epics, monics, retractions, and sections . 18 3.2 Functors . 20 3.3 Natural transformations . 23 3.4 Adjoints . 25 3.4.1 The universal property . 25 3.5 Basic properties of adjoints . 28 3.6 Basic limits and colimits . 31 3.6.1 Initial and final objects . 31 3.6.2 Binary products and coproducts . 32 3.6.3 Limits and colimits of diagrams . 36 3.7 Special limits: equalizers and pullbacks . 38 3.8 Completeness and cocompleteness . 41 4 Exercises for part I 44 II Restriction Categories 47 5 Introduction to restriction 48 5.1 Restriction basics . 49 5.2 M-categories . 54 5.3 Joins and meets . 60 5.4 Cartesian restriction categories . 64 6 Turing categories 68 6.1 Examples . 70 6.1.1 The classical recursion category . 70 6.1.2 Variation . 71 6.1.3 Reflexive objects . 71 6.1.4 Classifying categories . 72 6.1.5 Turing categories vs. Kleene categories . 72 6.2 Comparing Turing structures . 73 6.3 Comparing Turing morphisms . 74 6.4 Partial Combinatory Algebras . 78 6.5 Examples of PCAs . 82 7 Recursion categories 84 7.1 Recursiveness . 84 7.2 Finite interleaving . 86 7.3 Undecidability . 87 7.4 The recursion theorem and Rice's theorem . 89 7.5 G¨odelincompleteness . 92 7.6 General interleaving . 94 8 Exercises for Part II 98 2 1 Introduction It is impossible to give a complete view of category theory in a short sequence of lectures such as these and at the same time begin to illustrate an application. It is, therefore, inevitable that I will present a very biased and selective sampling. Since its inception in 1945 (with Eilenberg and Mac Lane's paper [13]) category theory has found use as a fundamental tool in almost all areas of mathematics, it has had a profound effect on logic and philosophy, and it has been seriously applied both in the foundations of physics and, increasingly since the mid 1980's, to the foundations of computer science in programming semantics. The second part of these notes describe another important area of application to computer science: computability. Despite the obvious potential for categorical methods to provide new insights in this area, computability (and complexity) has still not received the level of categorical attention it deserves. This makes it a particularly appropriate target for a series of lectures as there are plenty of opportunities to contribute! 1.1 Categories and foundations Category theory starts with a beguilingly simple notion: a category is just a directed graph with a composition defined on the edges. However, as more structure (mediated by functors, natural transformations, limits, and colimits) is added to this modest beginning, a fundamentally new and powerful mathematical perspective begins to emerge .... the reverberations of which are still working their way through the body of mathematics. Prior to the 1950's work in the foundations of mathematics was almost all reductionist. This approach to foundations originated in Cantor's creation of set theory. It is easy to forget that shortly after its formulation around the turn of the 20th century this foundation was beset by \paradoxes" and was widely criticized. Indeed, it was not until the work of Russell, Whitehead, and Zermelo which established axiomatic set theory, that Cantor's sets were viewed as laying a foundation for mathematics. The antinomies which had plagued the foundations of mathematics had been quite embarrassing, and it was almost, with relief that the Mathematical establishment embraced the solution offered by axiomatic set theory. In 1926, when some mathematicians { following the \intuitionistic" views of Brouwer { continued to question this newly lain foundation, it was hardly surprising that Hilbert, representing the establishment, famously declared: \No one shall expel us from the paradise that Cantor has created for us". Ironically it was only a few years later in 1931 that G¨odel'swork left Hilbert's program in tatters. Brouwer's \intuitionistic" views, although in some sense vindicated, never became mainstream. In fact, the focus in Mathematics had by that time already shifted away from foundational issues toward new and more applied frontiers { analysis, topology, algebraic geometry, number theory, combinatorics, etc. { and to other developments, such as Bourbaki's program to organize and systematize mathematics at a more abstract level. By the 1950's large tracts of new mathematics had been developed and documented. The relationships between these diverse developments had begun to assume an importance which, on the one hand, could not have been foreseen and, on the other, was simply not addressed at all by a reductionist approach to foundation. The development of category theory brought to the table a potent antidote to the reductionist program. Not only did it allow for the expression of relationships between areas of mathematics but also it provided methods to directly encode behavior in terms of admissible transformations. 3 It embodies an approach to mathematics very much in the tradition of Klein's Erlangen Program (involving transformation groups in geometry), and Noether's abstract approach to algebra. Most importantly category theory allowed the systematic discussion of behavior in a manner which avoided the detailed bottom-up development of internal structure. This enabled mathematicians to focus on structural interactions without actually worrying about exactly how the structures might arise. Considering that, famously, it took 360 pages of Principia Mathematica to prove 1 + 1 = 2, this was an immensely important innovation. Mathematical structures had become increasingly sophisticated and a reductionist approach to all structure had become a millstone around the neck of progress. It was simply too much work to connect securely to increasingly distant and irrelevant foundations. 1.2 Categories and computer science In 1987 Andre Scedrov and John Gray arranged a research conference at the University of Boulder (Colorado) entitled \Categories in Computer Science and Logic." If one were to try to pinpoint exactly when category theory became a respectable tool in computer science this meeting (and its aftermath) stands out. John Reynolds, already a prominent computer scientist, and Jean- Yvres Girard, a young French logician, had independently invented the polymorphic λ-calculus. John Reynold had naively suggested a set theoretic semantics and had discovered somewhat to his dismay that not only was his semantics flawed but that he could prove that there could be no such semantics. The fact that one could compute perfectly well with this calculus displayed a serious gap between set theoretic semantics and what was apparently required for computation. Consequently Reynolds had asked both logicians and category theorists where the semantics of such systems lay. It turned out that category theorists already had an answer and part of the meeting was dedicated to an exposition (by Andy Pitts and Edmund Robinson) of that answer. The answer involved topos theory and altogether too many categorical steps for John Reynolds to digest at the meeting itself, however, he undertook to learn category theory and subsequently made substantial use of it in his work. The seeds of a number of other burgeoning interactions between these subjects (logic, category theory, and computer science) were also latent at that meeting. To mention just one: Jean-Yvres Girard was present and gave an exposition of linear logic and its proof theory. Subsequently in the proceedings Robert Seely [28] provided a categorical semantics for this system in Barr's ∗- autonomous categories. This developed into a continuing interaction between categorical proof theory, logic, and computer science which is still central as it has important implications for the semantics of concurrency and more generally in systems in which resources are limited. 1.3 Categories and computability An area in which one might have expected computer science and category theory to have had a potentially significant interaction is right at the foundations of computer science, namely, at computability and complexity theory. Realizability topoi (due to Martin Hyland and Dana Scott) are built on top of a model of computability, and these were instrumental in answering Reynolds question. Thus, already computability issues were indirectly present. In the same year as the Boulder Conference, a very influential paper by Robert Di Paola and Alex Heller on \recursion theory without elements" [12] was published in the Journal of Symbolic Logic. It outlined a 4 categorical approach to computability theory. Their work set in motion a rather different program to understand computability categorically. Di Paola and Heller's paper was based on a categorical formulation of partiality and almost immediately Pino Rosolini and Edmund Robinson [26] pointed out that there was a cleaner foun- dation using what they called P-categories.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages100 Page
-
File Size-