Patrick Stevens bio photo

Patrick Stevens

Former mathematics student at the University of Cambridge; now a software engineer.

Email Twitter Github Stackoverflow

I don’t have strong preconceptions about this chapter. The previous chapter I knew would contain general constructions, and I was looking forwards to that, but this one is more unfamiliar to me. I’ll be doing pages 53 through 61 of Awodey here - coproducts.

The first bits are stuff I recognise from when I flicked through Categories for the Working Mathematician, I think. Or something. Anyway, I recognise the notion of formal duality and the very-closely-related semantic duality. (Like the difference between “semantic truth” and “syntactic truth” in first-order logic.) It’s probably a horrible sin to say it, but both of these are just obvious, once they’ve been pointed out.

Now the definition of a coproduct. The notation is extremely suggestive, and I’d have preferred to try and work out what the coproduct was without that hint. and are “ways of selecting - and -shaped subsets of any object” (yes, that’s not fully general, but for intuition I’ll pretend I’m in a concrete category). So for any , and for any way of selecting an -shaped and a -shaped subset of , we can find a unique way of selecting an -shaped subset according to the commuting-diagram condition. I’m still a bit unclear as to what that all means, so I whizz down to the Sets example below.

In Sets, if we can find an -shaped subset of some set , and a -shaped subset, then we can find a subset which is shaped like the disjoint union of and in a unique way. (Note that our arrows need not be injective, which is why the -shaped subset exists. For instance, if , and our -shaped subset and -shaped subset of were both , then the -shaped subset would be simply . Both selections of shape end up pointing at the same element.)

This leads me to wonder: what about in the category of sets with injections as arrows? Now it seems that the coproduct is only defined on disjoint sets, because the arrows which pick out - and -shaped subsets now need to have distinct images in so that the coproduct may pick out an -shaped subset.

The free-monoids coproduct: given any “co-test object” , and any two monoid homomorphisms selecting subsets of corresponding to the shapes of and , there should be a natural way to define a shape corresponding to some kind of union. The shape of corresponds exactly to “where we send the generators”, so we can see intuitively that . This is very much not a proof, and I’ll make sure to check the diagrammatic proof from the book first; that proof is fine with me. “Forgetful functor preserves products -> a structure-imposing functor preserves coproducts” has a certain appeal to it, but I don’t quickly see a sense in which the structure can be imposed in general.

Coproduct of two topological spaces: given a co-test topological space , and two continuous functions into which pick out subspaces of shape and , we want to find a space such that for all - and -shape subspaces of , there is a unique -shaped subspace of composed of the same shapes as the - and -subspaces. Then it’s fairly clear that should be the disjoint union of and (compare with the fact that the forgetful functor to Set again yields the correct Set coproduct), but what topology? Surely it should be the “product” given by sets of the form (open in , open in ), since -shaped subspaces of this will map directly into -shaped subspaces of the co-test space, etc.

Coproducts, therefore, are a way of putting two things next to each other, and this is pointed out in the next paragraph, where the coproduct of two posets is the “disjoint union” of them. The coproduct of two rooted posets is what I’d have guessed, as well, given that we need to make sure the coproduct is also rooted.

Coproduct of two elements in a poset: that’s easy by duality, since the opposite category of a poset is just the same poset with the opposite ordering. The product is the greatest lower bound, so the coproduct must be the least upper bound. How does this square with the idea of “put the two elements side by side”? This category is not concrete, so we need to work out what we mean by “an element of shape ”. Since an arrow is precisely the fact that , we have that for every element of the poset, all elements which compare less than or equal to that element have “images of shape ” in . Therefore, the coproduct condition says “for every co-test object , for every pair of images of shape in , the there is an image of shape in which restricts to the images of shape and respectively”. With a bit of mental gymnastics, that does correspond to being the least upper bound.

Coproduct of two formulae in the category of proofs: an arrow from one formula to another is a deduction. An “image of shape in ” - an arrow - is therefore a statement that we can deduce from . We want a formula such that for any co-test formula , and for any images of in , there is a unique image of in which respects the shapes of and in . Hang on - at this point I realise that the opposite category of the category of proofs is the “category of negated proofs”, and the “opposite category” functor is simply taking “not” of everything. That’s because the contrapositive of a statement is equivalent to the statement. Therefore since the product is the “and”, the coproduct should be the “or” (which is the composition of “not-and-not”, or “dual-product-dual). I’ll keep going anyway.

We need to be able to prove from , and to prove from . That’s already mighty suggestive. Moreover, if there’s a proof of from , there needs to be a unique corresponding proof of from . That’s enough for my intuition to say “this is OR, beyond all reasonable doubt”.

I now look at the book’s explanation of this. Of course, I omitted to perform an actual proof that OR formed the coproduct, and that bites me here: identical arrows must yield identical proofs, but any proof which goes via “a OR b” must be different from one which ignores b. Memo: need to prove the intuitions.

Coproduct of two monoids. Ah, this is a cunning idea, viewing a monoid as a sub-monoid of its free monoid. We already know how to take the coproduct of two free monoids, and we can do the equiv-rel trick that worked with the category of proofs above. Is it possible that in general we do coproducts by moving into a free construction and then quotienting back down? I’m struggling to see how free posets might work, so I’ll shelve that idea for now.

I went to sleep in between the previous paragraph and this one, so I’m now in a position to write out a proper proof that the coproduct of two monoids is as stated. I did it without prompting in a very concrete way: given a word(‘s equivalence class) in , and two maps and , we send the letter to , etc. The book gives a more abstract way of doing it. I don’t feel like I could come up with that myself in a hurry without a better categorical idea of “quotient by an equivalence relation”. At least this way gave me a good feel for why we needed to do the quotient: otherwise our could have been replaced by . The map is unique in this setting. Indeed, suppose for some . We may wlog that is just one character long, since any longer and we could use that are “homomorphic” to find a character where they differed. (That’s where we need that we’re working with equivalence classes.) Wlog . Then ; but that means because the map also needs to commute with .

I make sure to note that the forgetful functor Mon to Sets doesn’t preserve coproducts.

Aha! An example I’ve seen recently in a different context. (Oops, I’ve glanced to the bottom of the page, Proposition 3.11. I’ll wait til I actually get there.)

I’m confused by the “in effect we have pairs of elements” idea. What about a word like ? Then we don’t get a pair of elements containing . Ah, I see - Awodey is implicitly pairing with in that example. I’d have preferred to have that spelled out. Now I do see that the underlying set of the coproduct should be the same as that of the product, and that the given coproduct is indeed a coproduct.

Now my “aha” moment from earlier. I’ve seen this fact referenced a few days ago on StackExchange. I can follow the proof, and I see where it relies on abelian-ness, but don’t really see much of an idea behind it. The obvious arrows and are picked, but it seems to be something of a trick to pick the zero homomorphism . In hindsight, it’s the only homomorphism we could have picked, but it would have taken me a while to think of it.

I skim over the bit about abelian categories, and over the various dual notions to products (like “coproducts are unique up to isomorphism”, “the empty coproduct is an initial object” etc).

Summary

This was a bit less intuitive than the idea of the product. Instead of having “finding -shaped things in and means we can find a -shaped thing in the product”, we have “finding - and -shaped things in means we can find a coproduct-shaped thing in too”, but it took me a while to fix this in my mind, and it still seems to me a little less easy for something to be a coproduct: we’ve been bothering with equivalence classes more.