Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: The intuitive understanding of category theory


view this post on Zulip Jacques Carette (Apr 07 2021 at 16:20):

A lot of material on category theory is, understandably, very formal. At some level, this makes sense, as the definitions are quite general, and many definitions are subtle.

One way to build intuition is to give many examples. Many textbooks seem to choose a rather fraught route to that effect: they over-emphasize Set-based examples. While that might be comforting to the reader, it's also very misleading. Similarly, giving many examples of Monoidal Categories, all of which are Cartesian, is equally misleading. In a sense, I'd almost prefer to be given the 'weird' examples first, so as to not build up an incorrect image.

But perhaps this isn't even a good way to go about doing this. Giving many examples is still a way to delegate a lot of understanding to the reader:

  1. here's a lot of formal mumbo jumbo
  2. here's a bunch of examples that 'fit'
  3. no, I'm definitely not going to tell you "conceptually" what idea is being captured here. You figure it out. It's good for you.

I've built up my own private list of such things, but it's way too short. People who 'do' CT all the time, seem to have this understanding, but I am having a hard time finding resources that emphasize this. (Maybe the Catsters videos? I have yet to dive in.) One can get very far by treating CT as a formal game of pushing symbols around, but eventually it stops working.

Here's a few examples of intuitive understanding:

  1. a category is a typed monoid. It's a gadget that's good for studying things that compose, but you can only compose things that fit. It's like a monoid but where the underlying thing has shape aba \rightarrow b instead of \star .
  2. a functor is a category homomorphism. You map the things, you preserve the structure.
  3. a monoidal category is also exactly like a monoid, but where the underlying 'type' is a category. Lift everything up the obvious way, add a couple of rules to make sure things are coherent, and there you go. Here the shape is CDC \Rightarrow D.
  4. higher CT climbs up very uniformly: you take you aba \rightarrow b shape, slit is down the middle to get 2 arrows from the same aa to bb, and make a higher level arrow between those. It's very important that aa and bb are equal on-the-nose. Repeat. This is called the "globular" approach.
  5. the "principle of equivalence" is extremely important. The reason why so many of the fundamental definitions are the way they are is because they are all equivalence invariant. Simple example: products. Products are when you can represent "smushing together" two objects into a new object where the individual things you smushed are still visible (i.e. the projections) in just the right way. There might be many different ways of representing products (think different coordinate systems), but for all intents and purposes, you have abstraction: the internal representation just doesn't matter.
  6. In a way, because the fundamental shape is aba\rightarrow b and you have composition, that means that diagrams are super important. And finite diagrams, seen properly, are categories. And remember Functors? Together, they give rise to something way niftier: if you do a combinatorial enumeration of the simplest diagrams, look at diagrams as functors from those shapes into arbitrary categories, and you... reproduce the definition of many of the simple things! (product, coproduct, pushout, pullback). In fact, with a bit of constructive math and Kolmogorov complexity in hand, you see that even things like cones and cocones are not weird at all, but also amongst the simplest diagrams you can think of. Super fun. Though a bit opaque on the "meaning".

But then I'm still stuck, because some stuff doesn't have as a clear a picture. Let's pick pushout: sure, in Set, it's amalgamated sum. But that's a very object-centric view! So it's a terribly bad intuition. A categorical view would tell me a lot more about the arrows that get created. Thinking of pushout as generalizing amalgamated sum doesn't tell me anything for those categories with very few objects and huge wealth of morphisms.

I'm still struggling with developing non-set-based understanding of even basic things like co-equalisers (and equalisers). Never mind some of the other stuff I'm currently trying to understand, like regular categories, exact categories, extensive categories, coherent categories. At this point, all of these are 'purely formal' to me, and that makes me sad.

Worse still: ends and coends. In a sense, I'm kind of semi-comforted by my type-theoretic understanding of them. But still, unsatisfying. I've tried to read some long expositions on this, but got stuck because of lack of precision: there were various isomorphisms written down, but without ever saying which category these were in. Problem is, the isos could easily be interpreted as meaningful in many different categories. Even worse, the applications were then to isos of "big things" that were all squished down to a small space (a category). Slice categories have the same effect on me: why squish all these things together?

The main question: are there any texts that I should be reading that really doubles-down on non-Set-based conceptual understanding of categorical ideas?

view this post on Zulip Joshua Meyers (Apr 07 2021 at 17:15):

One such text is Memory Evolutive Systems by Ehresmann and Vanbremeersch. It can help you think of colimits in terms of human organizations

view this post on Zulip Jules Hedges (Apr 07 2021 at 17:30):

This sounds like a good question but potentially a very hard one... it sounds like your intuitions match mine pretty closely, so I'm interested in answers that give ways to upgrade to "better" opinions in some cases

view this post on Zulip Reid Barton (Apr 07 2021 at 17:50):

I would push back on this question a bit. I would argue it's not really possible to over-emphasize Set-based examples, because most examples of categories that arise in practice (though certainly not all) are Set-based to some extent or other. The category Set has a distinguished role in category theory, basically because a category is a category enriched in Set--the Yoneda lemma is one manifestation of this.

view this post on Zulip Reid Barton (Apr 07 2021 at 17:50):

regular categories, exact categories, extensive categories, coherent categories

These are all properties of a category that express various levels of Set-like-ness.

view this post on Zulip Jacques Carette (Apr 07 2021 at 18:23):

Reid Barton said:

regular categories, exact categories, extensive categories, coherent categories

These are all properties of a category that express various levels of Set-like-ness.

That is partly helpful, thanks. Now, more helpful still would be an intuitive idea of the Set-like-ness each tries to capture.

view this post on Zulip Simon Burton (Apr 07 2021 at 18:28):

Emily Riel's book has a lot of examples... it's the best i've seen in this regard.

view this post on Zulip Jacques Carette (Apr 07 2021 at 18:28):

Reid Barton said:

I would push back on this question a bit. I would argue it's not really possible to over-emphasize Set-based examples, because most examples of categories that arise in practice (though certainly not all) are Set-based to some extent or other. The category Set has a distinguished role in category theory, basically because a category is a category enriched in Set--the Yoneda lemma is one manifestation of this.

It's comforting (to me) that I am self-consistent: I am much more interested in Enriched CT. And I'm one of those really weird people who do E-categories, i.e. Setoid-enriched "at the bottom". Yoneda still works just fine. Luckily the intuitive understanding of a lot of concepts is quite independent of that.

view this post on Zulip Reid Barton (Apr 07 2021 at 18:35):

There's no real difference between Setoid and Set in this context, because classically they are the same.

view this post on Zulip Reid Barton (Apr 07 2021 at 18:36):

Some aggressively non-Set-like categories are things like the small categories that serve as index categories for diagrams, or Rel, or Set^op.

view this post on Zulip Reid Barton (Apr 07 2021 at 18:38):

Jacques Carette said:

Reid Barton said:

regular categories, exact categories, extensive categories, coherent categories

These are all properties of a category that express various levels of Set-like-ness.

That is partly helpful, thanks. Now, more helpful still would be an intuitive idea of the Set-like-ness each tries to capture.

These are really notions from categorical logic, and they have something to do with what fragments of first-order logic still work if we look at models in a category (rather than models in Set).

view this post on Zulip Reid Barton (Apr 07 2021 at 18:39):

e.g. at the start of this list would be something like "category with finite products", and there we can talk about the models of an algebraic theory

view this post on Zulip Jacques Carette (Apr 07 2021 at 18:40):

Reid Barton said:

There's no real difference between Setoid and Set in this context, because classically they are the same.

As you might have picked up, I'm trudging my way through things constructively.

view this post on Zulip Reid Barton (Apr 07 2021 at 18:44):

I know, but I don't think that's really relevant to your main question.

view this post on Zulip Reid Barton (Apr 07 2021 at 18:47):

(or at least not to how I interpreted the question!)

view this post on Zulip Jacques Carette (Apr 07 2021 at 18:48):

We agree: I don't think that makes any difference to the question(s) that I have asked.

view this post on Zulip Reid Barton (Apr 07 2021 at 19:58):

So one thing to say is that notions in category theory vary in how subject-specific they are in practice. If you just look at the definition of a coherent category, or a filtered category, or a monoidal category, you might get the impression that they are all properties/structure that make sense for any category, which from a logical perspective is correct. But in practice, if I talk about a coherent category, not only does the category resemble Set (insofar as Set is a coherent category), but implicitly I am probably thinking about the category as something that could play the role of Set, in some specific context. In other words, Set is not just a coherent category; it is the archetypal coherent category. In this case the intuition should be about what properties all coherent categories share and what properties they do not share, but all the categories involved are quite Set-like.

On the other hand, if I talk about a filtered category, then it's reasonable to assume I intend to use it as the indexing diagram of a colimit in some other category (moreover, that other category is probably Set-like to the extent that filtered colimits in it have some useful properties). The category Set happens to be filtered, too, because it has a terminal object. But it sounds weird to even say that, because it's very rare to consider a colimit indexed over all of Set.

Finally, some notions like monoidal category really are applicable across a wide range of domains--and I totally agree that if you've only seen the cartesian ones, then you're missing out on a lot of important and interesting examples.

view this post on Zulip Reid Barton (Apr 07 2021 at 20:13):

As for intuition, I think we can broadly distinguish two kinds. I'll take coproducts as my example notion.

First, there are the formal features of coproducts which work in any category (or at least any category that has coproducts!) For example,

Then there's intuition about how coproducts work in different categories.

Now if a new category comes along we can ask whether its coproducts behave like any of these examples that we already know about. Is that intuition about coproducts though? It kind of seems like we are rather using coproducts as a way to ask: do coproducts of Xs behave like coproducts of Ys? If so we might hope that our intuition about Y transfers to X.

view this post on Zulip Jacques Carette (Apr 07 2021 at 21:38):

The intuition about filtered category is new to me - thanks.

I prefer to never build my intuition "by cases". The whole point is that there is a single definition of coproduct, and so there's a single concept. That is shows up in very different guises is exactly what makes building up intuition so hard. How do I know that there are only 3 templates for coproduct? Could there be 17? \infty-many? With perhaps a big \infty instead of a puny countable one?

view this post on Zulip John Baez (Apr 07 2021 at 22:39):

Intuition involves knowing how to apply a tool in somewhat different ways to different cases, so I think it always gets built up by looking at examples.

There's a single definition of coproduct, and then lots of theorems that show how coproducts work under various conditions: for example products always distribute over coproducts in a cartesian closed category, but almost never in an abelian category. Each of these theorems becomes memorable when you know a few examples that illustrate it. The process of learning these theorems, and these examples, is never-ending - or more precisely, it ends only when you get tired of it, or die.

view this post on Zulip Morgan Rogers (he/him) (Apr 08 2021 at 10:18):

Jacques Carette said:

Giving many examples is still a way to delegate a lot of understanding to the reader:

  1. here's a lot of formal mumbo jumbo
  2. here's a bunch of examples that 'fit'
  3. no, I'm definitely not going to tell you "conceptually" what idea is being captured here. You figure it out. It's good for you.

I think this is a product of how category theory research progresses. One model of this goes:

etc. etc. In other words, CT starts with a picture, expands it by stripping away extraneous details, and then finds itself in a much bigger world whose full extent is unknown. It takes a long time to go from that point to a big picture of the extended world, and in the mean time any exposition is going to be limited to the level of understanding that has already been achieved, aka the well-understood examples, even if they're not representative of the full general situation.

The above applies to questions of the kind "what is a monoidal category?", which could conceivably have an eventual answer in the form of a classification or decomposition theorem. On the other hand, a question like "what is a coproduct?" where the expected answer describes the 'behaviour' of a coproduct, cannot have a full answer outside of a fixed context. Any property you might state of a coproduct is either provable from the definition or is only true under certain assumptions, and one can find a pathological category where it breaks. (Logically speaking that might at first glance seem to be a very strong claim, but it's really a claim about how elementary the axioms of category theory are: there is room for literally anything to happen)

view this post on Zulip Jacques Carette (Apr 08 2021 at 12:56):

That makes complete sense, i.e. the process by which category theory research progresses, and its ensuing effect.

Back to coproduct: there are two ways to approach a conceptual understanding. One is, as you say, to look at all its "models" and prove some kind of classification or decomposition theorem. I was rather seeking the other kind of understanding: an explanation of what the definition itself means. i.e. what idea ends up being captured by it. It is too facile to say "it generalizes disjoint union" - that is true, but insufficiently helpful.

A simpler example is perhaps epimorphism. While the definition originated from generalizing surjectivity, saying that it is about right-cancellativity is much more helpful. That makes it (to me?) much easier to see why epi in Top\mathrm{Top} involves density. epimorphisms are those morphisms which for the purposes of deciding equality 'do nothing' when they are applied first. If morphism equality is oblivious to certain features, then epimorphisms are allowed to ignore these features too. In Set\mathrm{Set}, you can't ignore points, so epis must be surjective. In other places (like in Ring\mathrm{Ring}) it's the same: when morphisms are completely determined by a 'part', epis must be surjective only on that part, not on the whole.

Surely I'm not the first to see that explanation. It's kind of obvious from the examples...

view this post on Zulip Morgan Rogers (he/him) (Apr 08 2021 at 14:25):

Jacques Carette said:

I was rather seeking the other kind of understanding: an explanation of what the definition itself means. i.e. what idea ends up being captured by it. It is too facile to say "it generalizes disjoint union" - that is true, but insufficiently helpful.

So you want plain language intuition for coproducts? Like an interpretation of the universal property? Something like, "a coproduct is the universal way of combining the outputs of a pair of objects in a category, while a product is the universal way of combining their inputs"?

view this post on Zulip Simon Burton (Apr 08 2021 at 14:48):

Reid Barton said:

Can you say a little bit more about how this is related to "stable" phenomena ?

view this post on Zulip Jacques Carette (Apr 08 2021 at 15:08):

@_Morgan Rogers (he/him)|277473 said:

So you want plain language intuition for coproducts? Like an interpretation of the universal property? Something like, "a coproduct is the universal way of combining the outputs of a pair of objects in a category, while a product is the universal way of combining their inputs"?

Yes, like that. Except that I think of morphisms as having inputs/outputs (and even that is misleading, take $$\mathrm{Rel}$$ for example); I prefer to think of morphisms as oriented rather than use input/output.  That's why I think of categories as monoids on gadgets of *shape* $$a \rightarrow b$$.

Objects, to me, don't have inputs or outputs. They are mere classifiers of the two sides of morphisms. Somehow, to me, the universal property should talk about the injectors, the same way the universal property of products talks about projectors.

view this post on Zulip John Baez (Apr 08 2021 at 17:05):

A simpler example is perhaps epimorphism. While the definition originated from generalizing surjectivity, saying that it is about right-cancellativity is much more helpful.

It's interesting that this is helpful, because this is exactly what the definition says: ff is an epi iff gf=gf    g=ggf = g'f \implies g = g'.

view this post on Zulip John Baez (Apr 08 2021 at 17:07):

Is the helpful part saying the words "right cancellative"? I imagine this is only helpful if the person learning this has already heard the words "right cancellative" being used somewhere. Otherwise the person would ask "what does right cancellative mean?", and you have to say ff is right cancellative iff gf=gf    g=ggf = g'f \implies g = g'.

view this post on Zulip John Baez (Apr 08 2021 at 17:07):

But I agree that talking through a definition in many different ways is helpful: it gets different neurons firing, and builds up useful associations.

view this post on Zulip Joshua Meyers (Apr 08 2021 at 17:22):

I was rather seeking the other kind of understanding: an explanation of what the definition itself means. i.e. what idea ends up being captured by it. It is too facile to say "it generalizes disjoint union" - that is true, but insufficiently helpful.

How about this: We think of morphism f:ACf:A\to C as a way that AA "acts on" CC. Then we have Hom(A+B,C)Hom(A,C)×Hom(B,C)\text{Hom}(A+B,C)\cong \text{Hom}(A,C)\times\text{Hom}(B,C), so A+BA+B is an object whose action on any object CC is determined uniquely by an action of AA on CC and an action of BB on CC.

Another way: We interpret a morphism f:ACf:A\to C as a way that AA is represented in CC. Then A+BA+B is an object whose representations in CC are comprised of a representation of AA in CC and a representation of BB in CC.

Another way: We interpret a morphism f:ACf:A\to C as a generalized element of CC, and we say that this generalized element of "of AA type". Then if A+BA+B exists, we have a way of pairing generalized elements xCx\in C of AA type and yCy\in C of BB type to get an element [x,y]C[x,y]\in C of A+BA+B type.

Another way: We interpret a morphism f:ACf:A\to C as an observation about the framework AA encoded in the framework CC. Then A+BA+B is a framework any observation of which in a framework CC is comprised of an observation of AA and an observation of BB, both in the framework CC.

Another way: We interpret a morphism f:ACf:A\to C as a way of converting a resource AA into a resource CC. Then A+BA+B is a resource whose conversion to CC entails converting AA to CC (in some way) and converting BB to CC, and nothing more.

view this post on Zulip Jacques Carette (Apr 08 2021 at 17:23):

I agree, I didn't mean that "right cancellative" is any more helpful than the definition itself. Oops. It is the unwinding of the definition itself that is useful, and how it interacts with equality and 'cancellation'.

view this post on Zulip Jacques Carette (Apr 08 2021 at 17:27):

To try to kick my bad set-derived habits into a different gear, I really like to think about categories that have tons of morphisms but few objects. The category of R-matrices (i.e. N\mathbf{N} as objects, morphisms are n×mn \times m matrices) is always a good one. There is so little that happens at the object level that all object-think needs to be thrown out to really understand what this category is about.

view this post on Zulip John Baez (Apr 08 2021 at 17:31):

Another good way to build intuition for epimorphisms is to compare some related notions, like regular epimorphism. This shows that there are other useful ways to generalize the idea of surjections in Set, which have different properties.

view this post on Zulip Joshua Meyers (Apr 08 2021 at 17:31):

Another nice class of examples is toy examples. Try drawing a graph and defining a composition operations and identities and see what coproducts are in it. See if you can see what happens for every graph with less than nn arrows.

view this post on Zulip Joshua Meyers (Apr 08 2021 at 17:37):

Jacques Carette said:

To try to kick my bad set-derived habits into a different gear, I really like to think about categories that have tons of morphisms but few objects. The category of R-matrices (i.e. N\mathbf{N} as objects, morphisms are n×mn \times m matrices) is always a good one. There is so little that happens at the object level that all object-think needs to be thrown out to really understand what this category is about.

Also good to think about posets.

view this post on Zulip Morgan Rogers (he/him) (Apr 09 2021 at 08:00):

Jacques Carette said:

Objects, to me, don't have inputs or outputs. They are mere classifiers of the two sides of morphisms. Somehow, to me, the universal property should talk about the injectors, the same way the universal property of products talks about projectors.

You can exactly dualize whatever intuition you have for products. So the coproduct of AA and BB is the universal object admitting a morphism from AA and a morphism from BB :shrug:
If you think you have a better handle on products, then just look at the opposites of your favourite categories and use that to build intuition about coproducts.