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: forgetful functors


view this post on Zulip Chris Oei (Feb 08 2023 at 21:52):

So my background is in physics / computer science, but I haven't seen much pure math. I'm trying to get a firmer grasp on functors (I think they might be useful in something I'm working on), and so I thought I'd try to construct a very simple functor that operates a category of some very simple sets. My guess is that rather than creating a "forgetful functor", I've created a "not (forgetful functor)", not to be confused with a "(not forgetful) functor". :grinning_face_with_smiling_eyes: Anyone know of a tutorial that has examples of this "balls in baskets" variety, or can provide a simple example or two of a forgetful functor? I heard something about a forgetful functor that maps groups onto sets, but that didn't translate into something concrete enough to give me an intuitive sense (it's been nearly 4 decades since I last thought about sets, and I've become rather forgetful).

view this post on Zulip John Baez (Feb 08 2023 at 21:55):

Every group is a set equipped with a multiplication, inverses etc., and there's a functor

F:GrpSet F: \mathsf{Grp} \to \mathsf{Set}

sending each group to its set. This is an example of a forgetful functor, since it 'forgets' that our group is a group, and just remembering its set.

This is the most obvious functor from groups to sets.

I just hope you were talking about groups in the mathematical sense!

view this post on Zulip Chris Oei (Feb 08 2023 at 21:58):

Thanks, and I remember the Grp -> Set example from the Cats4AI videos, but my understanding of both groups and sets is sadly deficient, so I'm looking for examples I understand more thoroughly. I had thought that taking a transit map of New York and "forgetting" bus routes while preserving train routes would be a forgetful functor, but I ran into the case above, which seems to violate the structure preserving condition.

view this post on Zulip John Baez (Feb 08 2023 at 22:05):

I'm sure you can define various functors that describe forgetting bus routes while preserving train routes, but a functor can't make morphisms "disappear" - it has to send morphisms to morphisms.

view this post on Zulip John Baez (Feb 08 2023 at 22:06):

So you have to do something else. For example, you could create a category where the objects are maps with bus and train routes, and another category where the objects are maps with just train routes, and a functor from the former category to the latter, which forgets the bus routes.

view this post on Zulip John Baez (Feb 08 2023 at 22:07):

I am not saying what the morphisms are in these categories; there are various choices.

view this post on Zulip John Baez (Feb 08 2023 at 22:08):

Then you have to say what the functor does to morphisms, and check the functor axioms.

view this post on Zulip David Egolf (Feb 08 2023 at 22:08):

I could be wrong about this, but I think a forgetful functor usually goes from a category where there are more conditions on morphisms to one where there are less. For example, a morphism between groups has to satisfy more conditions than a morphism between sets. So, we can expect there to be more morphisms around in the category a forgetful functor maps to, because we've forgotten about some of the structure that restricts how many can exist.

view this post on Zulip John Baez (Feb 08 2023 at 22:09):

Right: you can forget properties that the morphisms should have, thus allowing more morphisms. But you can't forget morphisms!

view this post on Zulip John Baez (Feb 08 2023 at 22:13):

By the way, @Chris Oei, did you check out this?

It could be helpful: it's a way to ask questions of some of the best explainers of category theory on the planet.

view this post on Zulip John Baez (Feb 08 2023 at 22:14):

(I'm not trying to get you to stop asking questions here: that's also good! I just wondered if you're aware of this event.)

view this post on Zulip Chris Oei (Feb 08 2023 at 22:23):

Yep -- I'm looking forward to that. :grinning_face_with_smiling_eyes:

OK, maybe this is an example for a forgetful functor? It maps a square to a line by collapsing it along one dimension, so instead of morphisms going missing like before they're mapped onto identity morphisms. https://www.christopheroei.com/s2/f9858ba5e8cb38a8c5faa9c1db836772b88cef12cdbb632d586580a06d74338c.png

view this post on Zulip John Baez (Feb 08 2023 at 22:37):

There probably is a functor like this!

I just want to mention that your pictures are not full pictures of categories. A category is more than just a graph (a bunch of dots and arrows between dots). You can compose arrows (=morphisms), etc. So in your left hand picture, where you have a morphism from the red circle on top to the circle below it and to the right, and then a morphism from that one to the one on the bottom, you have to be able to compose them and get a morphism from the top to the bottom.

view this post on Zulip John Baez (Feb 08 2023 at 22:38):

Maybe you left out this composite morphism because it would clutter the picture. I'm just warning you that it must exist... and your functor needs to know what to send it to.

view this post on Zulip John Baez (Feb 08 2023 at 22:39):

You can deal with this, of course. I'm not saying it's a fatal problem.

view this post on Zulip Chris Oei (Feb 08 2023 at 22:43):

Ah, good to know! I heard the morphisms had to be composable, but I didn't realize until now that the result from every composition had to explicitly exist.
So assuming the collapse-along-a-dimension thing is a structure-preserving functor, I guess something that collapses scale should also be a functor. So, condensing a transit map of every bus station in the entire United States to a map that just shows the bus routes between cities ought to be a functor, right? I'll have to construct the implied routes due to composition, as you mentioned above, though.

view this post on Zulip John Baez (Feb 08 2023 at 22:47):

So, condensing a transit map of every bus station in the entire United States to a map that just shows the bus routes between cities ought to be a functor, right?

You have to make up the categories you're talking about before we can decide if this thing is a functor. There will be some way to do this... but probably different ways, good for different purposes.

I heard the morphisms had to be composable, but I didn't realize until now that the result from every composition had to explicitly exist.

Yes. It's probably good to really learn the definition of a category before engaging in these explorations. Or maybe not: I play music without knowing what chords I'm playing. :upside_down:

view this post on Zulip Chris Oei (Feb 08 2023 at 23:03):

I was thinking along the lines of https://www.christopheroei.com/s2/b7d61b19e6f88d8b4c83da1c46df3baf9b9bd7ba6693b14016f955c100ee1a37.png
which I guess is a functor only if you assume everything inside the city is fully connected/Uber-able.

I suppose I should get back to formal definitions, but I think talking through these maybe-functors and seeing which succeed and which fail has helped my understanding immensely. Thanks!

view this post on Zulip John Baez (Feb 08 2023 at 23:07):

Sure! If I were you I might try to come up with examples of categories, looking at the definition of category to see which would-be examples are actually examples. You can sort of draw categories - but morphisms need to have composites, which is a bit hard to draw, and composition needs to be associative, and there need to be identity morphisms.

Once I had a few categories I could play games like "how many functors are there from this category to that one?"

view this post on Zulip Chris Oei (Feb 09 2023 at 00:03):

Cool! I'll do exactly that. One last thing: this process of filling in implied/missing composites... For the examples I've come up with above (finite number of elements and morphisms), it seems straightforward to write an algorithm/computer program that fills in the composites. I imagine there's probably a term real mathematicians use that describes this, and I'm curious what that term is, assuming there is such a thing.

view this post on Zulip Jason Erbele (Feb 09 2023 at 00:10):

By the way, when you are drawing up examples of categories, you don't need to have morphisms going both ways between two objects (it may be helpful to think of one-way streets). There can also be more than one morphism that takes you from one object to another (it may be helpful to think of some leg of a trip where you can choose between bus, train, and walking). This can make it harder to keep the bookkeeping straight when you look at composite morphisms, but it's good to at least be aware of these non-constraints.

view this post on Zulip Spencer Breiner (Feb 09 2023 at 00:17):

It's worth noting that there are two (not formally, but actually in practice) kinds of categories.

view this post on Zulip Spencer Breiner (Feb 09 2023 at 00:25):

Usually when people talk about forgetful functors, they are talking about semantic categories. An intuitive example might be "graphs with distances on the edges" and distance-reducing graph maps. This has a forgetful functor to unlabeled graphs.

view this post on Zulip John Baez (Feb 09 2023 at 00:55):

Chris Oei said:

Cool! I'll do exactly that. One last thing: this process of filling in implied/missing composites... For the examples I've come up with above (finite number of elements and morphisms), it seems straightforward to write an algorithm/computer program that fills in the composites.

"Filling in the composites" is not as straightforward as you seem to think: there are different ways to do it. For example suppose I draw three objects x,y,zx, y, z and three morphisms f:xy,g:xyf: x \to y, g: x \to y and h:yzh : y \to z. Then we have composites hf:xzh \circ f : x \to z and hg:xzh \circ g: x \to z, but these may or may not be equal. There's one category where they are equal, and another where they are not.

view this post on Zulip John Baez (Feb 09 2023 at 00:56):

So you have lots of decisions to make, and you have to make these decisions in a way that makes the associative law hold.

view this post on Zulip John Baez (Feb 09 2023 at 00:57):

But if you always decide to not make composites equal unless you're forced to by the associative law (or the other law), then things become systematic. This is then called the "free category on a graph", and there's a lot to say about it.

view this post on Zulip Chris Oei (Feb 09 2023 at 00:58):

@Spencer Breiner Ah, I see... that's why the examples seemed so abstract. I've seen many more problems in physics and engineering than I have in math, and I sometimes have a hard time mapping the formal mathematical definition of something into something I'm more familiar with. For example, physicists often study 1-dimensional systems that are really simplifications of 3 (or more)-dimensional systems, so the idea that collapsing along a dimension might be a functor is particularly meaningful to me. Similarly, a physicist might look at the same phenomena at different scales, and the idea that phase transitions/renormalization/fractals might be connected to functors is also interesting.

view this post on Zulip Chris Oei (Feb 09 2023 at 01:03):

John Baez said:

"Filling in the composites" is not as straightforward as you seem to think:...

Very good to know -- I would have missed that entirely and come up with some very wrong conclusions at some point.

view this post on Zulip John Baez (Feb 09 2023 at 01:29):

Okay. So you should really draw some examples of categories with all the composites drawn in. And definitely a bunch of examples where there are multiple morphisms from one object x to some other object y.

view this post on Zulip John Baez (Feb 09 2023 at 01:37):

Only if there are multiple morphisms from one object to another does the associative law have any "bite" to it - otherwise it's automatically true!