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: theory: category theory

Topic: monads


view this post on Zulip Morgan Rogers (he/him) (May 07 2021 at 08:22):

I have just discovered that the nLab page on monads contains only the bicategorical definition, with only a vague allusions to monads in Cat. Yet all of the examples are of monads in CAT (notably of monads on Set rather than in Set, as the subsection heading misleading notes), and this is true in CT more generally in my experience. Is there any reason why a definition so inaccessible to students, and more importantly to computer scientists whose existing understanding of CT might be limited, is prioritised? Shouldn't the "monad in a bicategory" definition be in a later section, for example?
I figured I should get some input before going ahead and making such changes.
I cross-posted to the nforum too, before anyone asks :wink:

view this post on Zulip Nathanael Arkor (May 07 2021 at 09:14):

Most likely, as with all nLab pages, this entry grew organically and whoever first wrote the definition was interested in the general definition at the time. I agree it would be an improvement to add the less general definition earlier in the page, if you have the time.

view this post on Zulip Nicolas Blanco (May 07 2021 at 11:50):

Another possibility would be to only have the basic definition of a monad (i.e. the one in Cat) there and to have the "monad in a bicategory" as a separated page (with a small section in monad introducing the idea and pointing to the "monad in bicategory" page)

view this post on Zulip Morgan Rogers (he/him) (May 07 2021 at 11:54):

That sounds like a good idea, although I don't know how to add a page to the nlab

view this post on Zulip Nathanael Arkor (May 07 2021 at 12:01):

My preference would just be to have another section. The definition of monad in a 2-category is identical to that in Cat specifically (in a bicategory you need to add in the structural operations, but even so this is not so different).

view this post on Zulip Nathanael Arkor (May 07 2021 at 12:02):

I imagine this is why the more general definition was given originally. It's easy to read off the definition in Cat.

view this post on Zulip Joe Moeller (May 07 2021 at 12:40):

My opinion is to keep it as one page. But if you want to add a new page, it's very easy. You edit the current page, add a link to the page that doesn't exist, then save it. The link will now be to a "Create xyz page" page.

view this post on Zulip Joe Moeller (May 07 2021 at 12:43):

eg, in the monad page somewhere, write "[[monad in a bicategory]]". When you save it should show up like "monad in a bicategory?". Then you click the question mark.

view this post on Zulip Nathanael Arkor (May 07 2021 at 12:44):

https://ncatlab.org/nlab/new/monad+in+a+bicategory

view this post on Zulip Joe Moeller (May 07 2021 at 12:45):

You should give a warning lol

view this post on Zulip Nick Hu (May 07 2021 at 13:29):

I also feel like the significance of monads in functional programming would've warranted at least a paragraph or so on the nLab page, but I'm not sure if it's considered off-topic

view this post on Zulip Joe Moeller (May 07 2021 at 13:30):

I don't think it's off topic. If anybody wants an appeal to authority, Emily Riehl gives a remark on the significance of monads in functional programming in her book.

view this post on Zulip Nick Hu (May 07 2021 at 13:34):

I meant more that an explicit description of Reader, Writer, State etc. doesn't seem to fit the tone of the nLab

view this post on Zulip Joe Moeller (May 07 2021 at 13:34):

Oh ok. I disagree, that should be in there.

view this post on Zulip Nathanael Arkor (May 07 2021 at 13:35):

There already are articles for specific monads in CS, e.g. https://ncatlab.org/nlab/show/state+monad (which suggests it does match the tone).

view this post on Zulip Joe Moeller (May 07 2021 at 13:35):

That simplifies this question then. Someone could just give a list of links to such pages.

view this post on Zulip Nick Hu (May 07 2021 at 13:37):

Nathanael Arkor said:

There already are articles for specific monads in CS, e.g. https://ncatlab.org/nlab/show/state+monad (which suggests it does match the tone).

Aha, I see they are peppered throughout the monad article too - like @Joe Moeller said, it might be worth putting a collated list in some subsection or something

view this post on Zulip Joe Moeller (May 07 2021 at 13:41):

I want to emphasize, the tone of the nLab is just a weighted aggregate of the tones of the authors, weighted by how active they are. If you think something doesn't match the tone, but you do think it's valuable information related to the sorts of topics discussed, then you should put it in there.

view this post on Zulip John Baez (May 07 2021 at 23:24):

Morgan Rogers (he/him) said:

That sounds like a good idea, although I don't know how to add a page to the nlab

It's super-easy, it works like this on most wikis: you create a link to the would-be page on some other page - just go in and type something like

This is a special case of a [[monad in a bicategory]]

view this post on Zulip John Baez (May 07 2021 at 23:25):

Then, click on that link and it will take you to the new, not-yet-written page. Then write stuff in it.

view this post on Zulip John Baez (May 07 2021 at 23:26):

Nick Hu said:

I meant more that an explicit description of Reader, Writer, State etc. doesn't seem to fit the tone of the nLab

It's fine if you put this information in some section (or page) that makes it clear you're discussing monads as used in programming - as opposed to how mathematicians think about monads.

view this post on Zulip John Baez (May 07 2021 at 23:48):

On the other hand, I think people on the nLab, including me, will feel a bit grumpy if "monad in a bicategory" gets made into a separate page, since for many of us that's what a monad really is. Of course, it has lots of important special cases...

view this post on Zulip John Baez (May 08 2021 at 00:02):

In addition, there are probably 10-50 links that will be broken if you move all material on monads in bicategories off the page "monad" and into a new page.

So, I recommend discussing massive changes like that on the nForum before making them.

view this post on Zulip John Baez (May 08 2021 at 00:20):

It's also important to leave a note saying what changes you've made - there's a box to do this that appears whenever you change an nLab page.

view this post on Zulip Nicolas Blanco (May 08 2021 at 09:57):

John Baez said:

In addition, there are probably 10-50 links that will be broken if you move all material on monads in bicategories off the page "monad" and into a new page.

So, I recommend discussing massive changes like that on the nForum before making them.

Good point. I didn't think of that.

view this post on Zulip Jules Hedges (May 08 2021 at 10:21):

Sigh, this thread suddenly reminded me about a lot of old discussions about how material suitable for [students / beginners / programmers / etc] could fit into the nLab. This is much easier said than done in practice, for reasons that are clear from this thread

view this post on Zulip Jules Hedges (May 08 2021 at 10:33):

I would guess that "monad" is by far the concept of category theory that most people have heard of, even if they have no idea what it is - far more than categories themselves. So I'd guess that the page for monads is likely to be a lot of people's first nLab page they see. (Monads are slowly becoming folkloric in programming, for example, due to their secret inclusion in C#, which is quite a widely used language. And there's...... a few more programmers than there are category theorists in the world.) Ignoring them would be a reasonable thing to do, as long as it's done consciously and not by accident

view this post on Zulip Nick Hu (May 08 2021 at 10:35):

We wouldn't even have to ignore them; one signposted link to Bartosz Milewski's blog would probably be sufficient

view this post on Zulip Fawzi Hreiki (May 08 2021 at 11:41):

Thing is, I can't imagine any programmer who's looking to learn about monads but who doesn't know the basics of CT benefiting much from any potential nLab treatment of the topic.

view this post on Zulip Fawzi Hreiki (May 08 2021 at 11:42):

There are better resources for someone like that, e.g. Bartosz Milewski's blog as Nick said

view this post on Zulip John Baez (May 08 2021 at 15:43):

Jules Hedges said:

I would guess that "monad" is by far the concept of category theory that most people have heard of, even if they have no idea what it is - far more than categories themselves. So I'd guess that the page for monads is likely to be a lot of people's first nLab page they see. (Monads are slowly becoming folkloric in programming, for example, due to their secret inclusion in C#, which is quite a widely used language. And there's...... a few more programmers than there are category theorists in the world.) Ignoring them would be a reasonable thing to do, as long as it's done consciously and not by accident.

So far most people working on the nLab are interested in n-categories, not computer programming.

But we should indeed change the article to make it more friendly to programmers. The way to do this is have an introductory paragraph saying this is a concept important in programming and also many areas of mathematics, and that while "a monad on a category" is the classic version of this concept, it generalizes to "a monad in a bicategory". This paragraph should also have links pointing people to subsections, like

which cover these various aspects.

view this post on Zulip John Baez (May 08 2021 at 15:44):

The material already in the article should be preserved, but reorganized a bit so people mainly interested in one of these three topics can quickly get to it.

view this post on Zulip John Baez (May 08 2021 at 15:45):

This would take just an hour of work for someone who was able to quickly add some basics about "monads in computer science". I don't really know enough to do this.

view this post on Zulip John Baez (May 08 2021 at 15:45):

Then that section could slowly be improved by various people.

view this post on Zulip John Baez (May 08 2021 at 15:45):

This is how it usually works in the nLab or Wikipedia....

view this post on Zulip John Baez (May 08 2021 at 15:46):

Later, if the sections grow too large, the article could be subdivided, but that's something that requires more consent from everyone, because it'll break links, or at least partially break them.

view this post on Zulip John Baez (May 08 2021 at 15:48):

Fawzi Hreiki said:

Thing is, I can't imagine any programmer who's looking to learn about monads but who doesn't know the basics of CT benefiting much from any potential nLab treatment of the topic. There are better resources for someone like that, e.g. Bartosz Milewski's blog as Nick said.

Right, but the section on "Monads for programming" should point people to that. It could be pretty short, with a link to that.

view this post on Zulip John Baez (May 08 2021 at 15:48):

I'm not going to actually do the stuff I'm recommend doing, since it's not me who is complaining about the nLab article on monads.

view this post on Zulip John Baez (May 08 2021 at 15:52):

I change the nLab when there's a topic I actually understand well that I don't like their explanation of - like the article on determinants of quaternionic matrices.

view this post on Zulip Morgan Rogers (he/him) (May 08 2021 at 19:49):

John Baez said:

This would take just an hour of work for someone who was able to quickly add some basics about "monads in computer science". I don't really know enough to do this.

There already exists a separate page with this title, which might reduce the workload.

view this post on Zulip Morgan Rogers (he/him) (May 08 2021 at 19:51):

I shall get around to implementing at least the changes I suggested in the near future, and possibly the more extensive suggestions that have appeared above.

view this post on Zulip John Baez (May 08 2021 at 19:54):

Great! So if there's lots to say about monads in computer science - and I'm sure there is - it can be put in the separate page with that title. But the page "monad" can, right at the top, point computer scientists to that other page. That's so easy I'll do it now, and you can improve what I do in any way you like later.

view this post on Zulip Timothy Porter (May 11 2021 at 12:01):

Just to help the discussion, here is the direct
link: https://ncatlab.org/nlab/show/monad+%28in+computer+science%29

view this post on Zulip dusko (May 12 2021 at 08:07):

John Baez said:

So far most people working on the nLab are interested in n-categories, not computer programming.

But we should indeed change the article to make it more friendly to programmers. The way to do this is have an introductory paragraph saying this is a concept important in programming and also many areas of mathematics, and that while "a monad on a category" is the classic version of this concept, it generalizes to "a monad in a bicategory". This paragraph should also have links pointing people to subsections, like

which cover these various aspects.

i know next to nothing about the web publishing, and never dared to get too close to nLab (though i do use it!) --- so i am saying this from the position of total ignorance about the publishing side.

but i would think that it is unfair to the concept of monad to split it in 10 concepts of monad because there are 10 different presentations. the whole point of category theory is to study concepts invariant under presentation. it should be a tool for hiding the implementation details. so then it should practice what it preaches. there are no 3 concepts of monad. the fact that there are 3 groups of people thinking about them in different ways is a matter of their herd behavior. it has nothing to do with monads.

view this post on Zulip Fawzi Hreiki (May 12 2021 at 09:33):

I don’t think it’s a situation of 3 different concepts. It’s often worth it to explicate the same concept from different view points

view this post on Zulip Fawzi Hreiki (May 12 2021 at 09:33):

Especially when a particular viewpoint may be more insightful for a particular audience

view this post on Zulip John Baez (May 12 2021 at 18:08):

I think the best solution - typical on various wikis - is to have a nice article on monads that covers all the main viewpoints and especially how they fit together, but then, if this gets too long, to have it link to other articles that delve into specific topics in more detail. There's already an article on monadicity theorems. There could be an article on monads widely used in programming, etc. etc.

Usually on wikis the way these articles develop is by having lots of people modify them over and over, and discussing the changes. For Wikipedia you can see these discussions on the talk pages. For the nLab, this happens on the nForum. So really this conversation would be more useful over there.

view this post on Zulip dusko (May 12 2021 at 22:20):

yes. i spoke up only because there seems to be a whole movement (including among my students and people i really like and respect) of: "i use monads but i could never understand what all those category theorists mean by monads". that feels to me almost like a cargo cult: a mutual disregard... for the sake of some sort of "cultural stability"? monads would be there if none of us were around, just like nature would still be computing all of its elliptic integrals if we never wrote them down in any of our various ways. sun would still rise at the same time in the same place. it's fun to keep figuring out a 1000 ways to think of monads, but we should make sure that everyone understands that they are out there for all of us to understand totally differently the day after tomorrow. sort of like what noether did for groups.

and THANK YOU all for the nLab!

view this post on Zulip Matteo Capucci (he/him) (May 16 2021 at 11:44):

My fav nLab pages start with a good 'idea' section and build up the abstraction. I think 'operads' is a good example, iirc. So you definitely start with monads on a cat, then explain the 'monoid in endofunctors' thing, then go on with the Australian bicategorical definition. Anyone can stop when they like, and you can see all the rungs of the abstraction ladder.

view this post on Zulip Jules Hedges (May 16 2021 at 12:50):

That's also my preference. But many category theorists make the exact opposite choice when they write: start with the most abstract formulation they can manage, and then work downwards to special cases

view this post on Zulip Reid Barton (May 16 2021 at 13:26):

It helps to know your audience, or in the case of the nLab (where the audience is "people who clicked on a link to the nLab") accept that no single exposition will be the best for everybody.

view this post on Zulip Reid Barton (May 16 2021 at 13:27):

In the case of monads in particular, one could probably argue that anyone who knows what a bicategory is also already knows what a monad is, so there's no real purpose to starting with the general notion.

view this post on Zulip Nathanael Arkor (May 16 2021 at 13:29):

I agree that people who know what a bicategory is will know what a monad on a category is, but they won't necessarily know that a monad can be internalised in any bicategory.

view this post on Zulip Nathanael Arkor (May 16 2021 at 13:30):

But as long as there's a table of contents, it's not really a problem to start off with the less general notion.

view this post on Zulip John Baez (May 16 2021 at 19:36):

But many category theorists make the exact opposite choice when they write: start with the most abstract formulation they can manage, and then work downwards to special cases.

It's not really a conscious decision. It's just much easier to write starting from the top down. You don't need to think, you just say what you know. If I just did that, I could write ten times as much as I do now.

The nLab pages that start with a good "idea" section are the ones where someone deliberately put work into exposition, instead of just jotting down the stuff they know.

But I think the former always starts with someone doing the latter. So if you want a page to have a nice "idea" section, add it. If you have an idea of what it should be like, you're well on the road to writing it.

view this post on Zulip Mike Shulman (May 16 2021 at 21:32):

Nor are category theorists unique in this. (-:

view this post on Zulip Mike Shulman (May 16 2021 at 21:33):

It's just that in category theory the "top" tends to be further up. (-:

view this post on Zulip Timothy Porter (May 17 2021 at 11:25):

The problem with ideas sections is there is no universal agreement as to what a `good' ideas section is.

view this post on Zulip Fawzi Hreiki (May 17 2021 at 11:55):

Nevertheless, I think the ideas section is one of the best parts of the nLab. Mathematicians are often reluctant to provide (perhaps vague) intuition for a concept even though such intuition would definitely help those learning

view this post on Zulip Fawzi Hreiki (May 17 2021 at 11:56):

Also, it’s a good way to not lose the bigger picture

view this post on Zulip Fawzi Hreiki (May 17 2021 at 11:57):

E.g. the ideas section of the nLab page on modules which motivates the concept as a ring theoretic version of a group action and also as a generalisation of vector bundles

view this post on Zulip Nick Hu (May 17 2021 at 12:46):

Fawzi Hreiki said:

Nevertheless, I think the ideas section is one of the best parts of the nLab. Mathematicians are often reluctant to provide (perhaps vague) intuition for a concept even though such intuition would definitely help those learning

Yes I've always found it puzzling. It seems to me that almost any theorem in any paper can get 100% value-added by just adding one or two sentences beginning 'Informally, this construction is like...' or something like that

view this post on Zulip Fawzi Hreiki (May 17 2021 at 12:55):

I mean it depends who the paper is for

view this post on Zulip Fawzi Hreiki (May 17 2021 at 12:56):

If it’s a technical result for experts in the field then that’s probably a waste of space

view this post on Zulip Fawzi Hreiki (May 17 2021 at 12:56):

But in books for learning I agree

view this post on Zulip John van de Wetering (May 17 2021 at 13:58):

Fawzi Hreiki said:

If it’s a technical result for experts in the field then that’s probably a waste of space

Experts in a field also think intuitively about concepts before formalizing them. But then they somehow deem it beneath them to include those intuitions in a paper

view this post on Zulip Nick Hu (May 17 2021 at 14:01):

Fawzi Hreiki said:

If it’s a technical result for experts in the field then that’s probably a waste of space

I don't think I would agree with this

view this post on Zulip Nick Hu (May 17 2021 at 14:04):

Mostly because I can't believe that someone can really take a Bourbaki approach to understanding an extremely technical result, even if it's in your field. You can develop the intuition from the formal definitions, but (at least for me) this is a pretty lengthy process, so why not just include them the first place? Mathematics is fundamentally about communication, so it seems like this omission for some vague notion of 'cleanliness' (my best guess, I'm not sure why mathematicians feel this way) is a failure in the first instance

view this post on Zulip Fawzi Hreiki (May 17 2021 at 14:39):

In fact you’re probably right about that

view this post on Zulip Fawzi Hreiki (May 17 2021 at 14:39):

I was thinking more about technicalities rather than technical in the sense of difficult