Adjunctions! Everywhere! Carnegie Mellon University Thursday 19 th September 2013 Clive Newstead Abstract What do free groups, existential quantifiers and Stone-Čech compactifications all have in common? This isn t the start of a bad maths joke: in fact these things are all examples of left-adjoint functors. The category theoretic notion of an adjunction captures a number of interesting concepts in disparate areas of mathematics. Abstract nonsense is inevitable but I will exercise restraint in using it. Contents 1 Motivating examples from algebra 1 2 Categories and functors 2 3 Definition of an adjunction 3 4 Examples in mathematics 4 5 Why do we care? 6 References 9 Please send comments and corrections to cnewstead@cmu.edu.
Introduction The long-term goal of this talk is to convey the idea of what adjunctions are, why they re interesting from a metamathematical point of view, and why mathematicians (should) care about them. A salad of examples will be presented along the way. 1 Motivating examples from algebra Free groups Let X be a set. The free group on X, denoted by F X, is the group generated by the elements of X with no relations between them. For example, F { } = Z. Lemma 1.1 Let X be a set and G be a group. There is a natural correspondence between functions X G and group homomorphisms F X G. Proof If f : X G is a function, define f : F X G inductively by: (a) f(x) = f(x) for x X; (b) f(x 1 ) = f(x) 1 for x X; (c) f(x y) = f(x) f( y) for x X and y F X; Then f is a group homomorphism. Moreover it is the unique homomorphism F X G extending f. If g were another then we could prove that g = f by induction as above. Conversely, given a group homomorphism θ : F X G there is a function θ : X G given by θ(x) = θ(x) for x X. It is trivial that f = f, and an easy induction using (a) (c) above shows that θ = θ. Galois connections Let P = (P, P ) be a preorder, i.e. a set P equipped with a binary relation P which is: reflexive: p P p for all p P ; transitive: given p, q, r P, if p P q and q P r then p P r. Given preorders P and Q, a Galois connection between P and Q is a pair of order-preserving maps f : P Q : g such that, for all p P and q Q, f(p) Q q if and only if p P g(q) An example of a Galois connection comes from field theory. Given fields K L, let Int(L/K) = {fields F with K F L} 1
Given F Int(L/K) let Aut F (L) = {field homomorphisms θ : L L which fix everything in F } Aut K (L) and given H Aut K (L) let K H = {x K : θ(x) = x for all θ H} We can order Int(L/K) by reverse inclusion and Sub(Aut K (L)) by the subset relation. Then the assignments F Aut F (K) and H K H defines a Galois connection between Int(L/K) and Sub(Aut K (L)). The above examples illustrate the notion of an adjunction that will be defined later. Loosely speaking, an adjunction is a natural correspondence between maps of a certain kind. 2 Categories and functors Categories A category C is a collection of (C-)objects together with, for any two C-objects A and B, a collection of (C-)morphisms, typically denoted f : A B. Given a morphism f : A B, we say A is the domain and B is the codomain of f. The class of C-morphisms A B is denoted by Hom C (A, B). Categories satisfy some additional conditions: Given any two C-morphisms f : A B and g : B C, there is a composite morphism g f : A C; moreover the composition operation is required to be associative; Given any C-object A, there is an identity morphism 1 A : A A, which satisfies f 1 A = f for any f : A B and g 1 A = g for any g : C A. A convenient way of communicating how morphisms piece together is using commutative diagrams, which are best defined by example. Consider the following diagram A f B m g h C k D n E It asserts that there are morphisms f : A B, g : A C, h : B D, k : C D, m : B E, n : D E satisfying the relations h f = k g, n h = m We say a C-morphism f : A B is an isomorphism if there exists a C-morphism g : B A such that g f = 1 A and f g = 1 B. The following table lists some examples of categories, their objects and morphisms, and how the morphisms compose: 2
Cat. Objects Morphisms Composition Set sets functions usual composition Gp groups group homomorphisms usual composition k-mod k-spaces k-linear maps usual composition Top topological spaces continuous maps usual composition KHaus compact Hausdorff spaces continuous maps usual composition TopGp topological groups continuous homomorphisms usual composition Graph graphs graph homomorphisms usual composition digraph G vertices of G combinations of edges of G formal composition preorder P elements of P relations p P q transitivity Functors Given categories C and D, a functor F : C D assigns to each C-object A a D-object F A and to each C-morphism f : A B a D-morphism F f : F A F B. Functors must respect identity and composition, in the sense that F (g f) = F g F f and F (1 A ) = 1 F A. A functor can be thought of as a structure-preserving map between categories. (In fact, there is a category Cat whose objects are (small) categories and whose morphisms are functors!) Some examples of functors include: The forgetful functor U : Gp Set, which assigns to each group G its underlying set U G and to each group homomorphism f : G H its underlying set function Uf : UG UH. The free functor F : Set Gp, which assigns to each set X the free group F X and to each function f : X Y the unique extension to a group homomorphism f : F X F Y. Any order-preserving map f : P Q between preorder categories is a functor. Indeed, given p p we have f(p) f(p ), and f preserves associativity of composition by transitivity. Let k be a field and W be a k-space. Given a k-space V, define T W (V ) = V W, and given a k-linear map f : U V, define T W f : U W V W by f(u w) = f(u) w. Then T W defines a functor from the category of k-spaces to itself. Likewise, the assignments L W (V ) = L(V, W ) and L W (f : U V ) = f, where f(g) = f g, defines a functor from the category of k-spaces to itself. 3 Definition of an adjunction We now have the language we need to define an adjunction. Let C and D be categories, and let F : C D and G : D C be functors. An adjunction between F and G, denoted by (F G), is a family of bijections Φ A,B : Hom D (F A, B) = Hom C (A, GB) which is natural in A and in B, where A is a C-object and B is a D-object. 3
Given f : F A B we write Φ(f) = f : A GB to denote the morphism corresponding with f under the adjunction; likewise, given g : A GB we write Φ 1 (g) = ḡ : F A B to denote the morphism corresponding with g. This correspondence is natural in the following sense. Let f : F A B is a D-morphism and g : A GB be a C-morphism. Then If a : A A is a C-morphism then g a = ḡ F a; and If b : B B is a D-morphism then b f = Gb f If there is an adjunction (F G) then we say F is left-adjoint to G and that G is right-adjoint to F. 4 Examples in mathematics Free forgetful adjunctions Let F : Set Gp be the free group functor and U : Gp Set be the forgetful functor. The fact that (F U) is the content of Lemma 1.1. In fact, there are plenty more examples of free forgetful adjunctions. Let T be a finitary algebraic theory and let Mod(T ) denote the category of models of T and homomorphisms between them. Then there is a free forgetful adjunction F : Set Mod(T ) : U Galois connections Let P = (P, P ) be a preorder, i.e. a set P equipped with a binary relation P which is reflexive: x P x for all x P transitive: if x P y and y P z then x P z We can regard a preorder P as a category whose objects are elements of P and for which there is a unique morphism x y if x P y; under this interpretation, we call P a preorder category. If P and Q are preorder categories, then functors P Q are precisely order-preserving maps. A Galois connection between preorders P and Q is a pair of order-preserving maps f : P Q : g such that f(x) Q y x P g(y) for all x P and y Q. Proposition 4.1 Let P and Q be preorder categories. Let f : P Q : g be functors. Then f g if and only if the pair (f, g) is a Galois connection between P and Q. 4
Discrete forgetful trivial adjunction Let U : Top Set be the forgetful functor. It turns out that U has both a left-adjoint and a right-adjoint, which we ll suggestively denote by D and T, respectively. Let A be a set and X be a topological space. For (D U) we need continuous maps DA X to correspond with functions A UX. Letting DA = A equipped with the discrete topology (all sets are open), we get what we want: every function A X is continuous with respect to the discrete topology because all inverse images are open. For (U T ) we need functions UX A to correspond with continuous maps X T A. Letting T A = A equipped with the trivial topology (only and A are open), we get what we want: every function X A is continuous with respect to the trivial topology because the only inverse images of open sets are and X. So we obtain the nice result that endowing a set with the discrete topology is left-adjoint to the forgetful functor, which is itself left-adjoint to endowing a set with the trivial topology: D U T. Stone Čech compactifications Now let I : KHaus Top be the inclusion map from the category of compact Hausdorff topological spaces into the category of topological spaces. It just so happens that I has a left-adjoint β. For (β I), β will need to satisfy (at least) the following: given any topological space X, any compact Hausdorff space K and any continuous map f : X K, there exists a unique continuous map f : βx K such corresponding with f under the adjunction. What does this mean? By naturality, f = f id βx = f I(id βx ) = f ι where ι : X IβX = βx is the map in Top corresponding with id βx in KHaus. That is, given f : X K there is a unique f : βx K making the following diagram commute: βx ι X f! f K This is the universal property which characterises the Stone-Čech compactification of X. Many authors require that X be locally compact and Hausdorff, so that ι is a homeomorphism onto its image; but category theoretically speaking, this is the correct generalisation of the notion of a Stone-Čech compactification to all spaces. 5
Logical quantifiers Fix a first-order language L and let x = x 1... x n be a list of (distinct) variables from L. Define the category Fml( x) to have as objects L-formulae with at most x free. A morphism ϕ( x) ψ( x) is an entailment ϕ( x) ψ( x). Then Fml( x) is a preorder category ordered by entailment. Given a variable y x there is an inclusion functor y : Fml( x) Fml( xy), sending a formula to itself. A left-adjoint L : Fml( xy) Fml( x) must satisfy: for all formulae ϕ( xy) with at most xy free, and all formulae ψ with at most x free, we need Lϕ( xy) ψ( x) if and only if ϕ( xy) y ψ( x) Setting L = y, this is precisely the -introduction rule. ( If ϕ( xy) proves something which doesn t depend on y then any old y will do. ) Similarly, a right-adjoint R : Fml( xy) Fml( x) must satisfy: for all formulae ϕ( x) with at most x free, and all formulae ψ( xy) with at most xy free, we need y ϕ( x) ψ( xy) if and only if ϕ( x) Rψ( xy) Setting R = y, this is precisely the -introduction rule. ( If ϕ( x) proves something which depends on y then it had better do it no matter what y is. ) We arrive at the neat looking result that. 5 Why do we care? Preservation of limits Let J and C be a category. A diagram of shape J in C is a functor d : J C. When J is finite, especially when it is generated by a graph, this is quite hard to picture. With J as depicted, a diagram of shape J in a category C is just a commutative square, where d(j 1 ) = A, d(j 2 ) = B, etc., and d(α) = f, etc.: α j 1 j 2 A f B β γ d g h δ j 3 j 4 C k D A cone over d is a C-object C equipped with C-morphisms µ j : L d(j) for J -objects j such that, for all α : i j in J, d(α) µ i = µ j. 6
µ i d(i) C d(α) µ j d(j) A cone (L, λ j ) j ob J is a limit cone for d if for all cones (C, µ j ) j ob J there is a unique morphism u : C L such that λ j u = µ j for all J -objects j. The dual notions are cocones and colimit cocones. µ i d(i) d(i) λ i λ i µ i C! u L d(α) d(α) C! u L λ j µ j µ j d(j) d(j) λ j (L, λ j ) is a limit cone (L, λ j ) is a colimit cocone If the first time you ve come across a limit cone is in this seminar talk, the above is unlikely to make much sense. On this basis, here are some examples of limit cones: Products A product of two objects A and B is an object A B equipped with projection morphisms π A : A B A and π B : A B B such that, whenever X is an object with morphisms f A : X A and f B : X B, there exists a unique u : X A B with π A u = f A and π B u = f B. In the category Set, we can take A B to be the Cartesian product and π A, π B to be the usual coordinate maps. Then given f A : X A and f B : X B, we define u(x) = (f A (x), f B (x)). In a preorder category P, the product of x and y is an element z P such that z P x and z P y, and if z P x and z P y then z P z. But such an element is precisely a meet, i.e. a greatest lower bound: z = x y. (Note that, in a poset category, x y is unique!) Products are limit cones over diagrams of shape Terminal objects A terminal object in a category C is an object 1 such that, for all C-objects A, there is a unique morphism X 1. 7
In Set, singletons are terminal objects: the only function X { } is the constant function with value. In a poset category P, a terminal object is a greatest element: i.e. an element x such that y x for all y P. Terminal objects are limit cones over diagrams of shape Equalisers Given two parallel morphisms f, g : A B, the equaliser of f and g is an object E equipped with an morphism e : E A such that f e = g e and, if q : Q A satisfies f q = g q, then there is a unique u : Q E such that e u = q. In Set, the equaliser of f, g : A B is simply and e : E A is the inclusion map. E = {a A : f(a) = g(a)} A Equalisers are limit cones over diagrams of shape There are many more examples of limits. (There is also a useful dual notion called a colimit.) A functor F : C D preserves limits if, whenever d : J C is a diagram and (L, λ j ) j ob J is a limit cone for d in C, (F L, F λ j ) j ob J is a limit cone for F d in D. Theorem 5.1 Let C and D be categories and F : C D be a functor. If F has a left-adjoint then F preserves limits. If F has a right-adjoint then F preserves colimits Corollary 5.2 Given formulae φ( xy) and ψ( xy), y(ϕ( xy) ψ( xy)) yϕ( xy) yψ( xy) and y(ϕ( xy) ψ( xy)) yϕ( xy) yψ( xy) Proof We already saw that y y y. It s easy to see that and really are the meet (product) and join (coproduct) of our preorder, so they re (respectively) preserved by y and y. Corollary 5.3 There is no kind of quantifier Q such that Q or Q. Proof If Q then x would preserve limits, so we d have x(x = 0) x(x = 1) x(x = 0 x = 1) This is nonsense. Likewise, if Q then x would preserve colimits, so we d have x(x = 0 x 0) x(x = 0) x(x 0) Again, this is nonsense. 8
Corollary 5.4 Let X and Y be topological spaces. Then β(x Y ) = βx βy. Proof As a left-adjoint, β preserves colimits; disjoint unions ( coproducts in Top) are colimits. References [1] Steve Awodey. Category Theory. Oxford Logic Guides. Oxford University Press, 2010. [2] Saunders Mac Lane. Categories for the Working Mathematician. Categories for the Working Mathematician. Springer, 1998. [3] Colin McLarty. Elementary Categories, Elementary Toposes. Oxford University Press, 1992. 9