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: On the definition of a monoid


view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:35):

Hello, friends. For quite some time, I've been confused with the seemingly many definitions of a monoid in category theory.
The first definition I was introduced to was simply the regular set theoretic definition of (M,,e)(M,\cdot,e). Then, to see this as a category, one would say that set MM was the only object, the morphisms would be elements of MM, and the composition would be \cdot.
(This definition would seem to imply that a monoid would be any small category with a single object).

After reading more, we get to a second definition, where a monoid is an object $M \in \text{Set}$, together with a pair of morphisms
μ:M×MM\mu: M \times M \to M and η:1M\eta: 1 \to M, which satisfy a commutative diagram. This diagram encodes the idea of associativity and neutral element. From this idea, we get again a triple (M,μ,η)(M, \mu, \eta), but now we have avoided talking about elements. Yet, our definition of a monoid is not a category anymore.

How do we then reconcile these two definitions?

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:44):

I think this this gap is best filled by thinking of the "internal" definition of category:
a category consists of

satisfying some relations.

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:45):

Taking the pullback in the definition of composition means you're only defining the composition operation on pairs of maps which happen to coincide: source of one is target of the other.

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:46):

Then if you ask what happens when |Ob|=1, you'll see they must always coincide, so composition is just a map  ⁣:Mor×MorMor\circ \colon Mor \times Mor \to Mor, and this is your μ\mu.

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:47):

Oh, and I forgot to mention units, but I hope the point is clear.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:48):

Thanks for the response, @Joe Moeller

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:49):

BTW, it seems that every locally small category with a single object is a monoid.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:49):

I suppose that the other implication is not true, right?

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:49):

I mean, there are monoids that are not locally small categories with a single object...

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:50):

I guess this would clarify in part the confusion in my part. Because when I was first presented the notion of a monoid, this idea of a category with a single object and morphisms was stuck as "this IS what a category that is a monoid looks like".

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:53):

They're equivalent. For any monoid, you can make up a one-object category. You described it above. Maybe I don't understand your confusion.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:53):

Hmm. So for example, what is the definition of a monad as a single object category?

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:54):

My confusion stems in part from the fact that a monad seems very distinct from this single object with morphisms.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:54):

At least the definitions I saw, they said that a monad was a monoid in the category of endofunctors.

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:54):

Ah, yeah, the point is being obscured by terminology. I might say "set monoid" and "monoid object" to separate the two things.

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:55):

A set monoid is a monoid object in Set. A monad is a monoid object in End(C).

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:56):

But, can a monad be described as a locally small category with a single object?

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:56):

I mean, a single object FF which is the endofunctor, a natural transformation that is the identity, and some composition...

view this post on Zulip Joe Moeller (Mar 01 2023 at 16:56):

No, that's a thing that works for set monoids specifically. This gap can be bridged too though.

view this post on Zulip Reid Barton (Mar 01 2023 at 16:57):

This is sort of a "hot take" but I think the idea that a monoid is a category with a single object is more confusing than helpful. Rather, there is a correspondence between monoids and categories with a single object.

view this post on Zulip Reid Barton (Mar 01 2023 at 16:57):

So, I would reconcile your two definitions by throwing away the first one.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:58):

So... They are not equivalent, only in for monoids in the Set category?

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:59):

If the definition of a monoid (set, topological, etc) is NOT equivalent to a category with a single object. Then I agree with @Reid Barton

view this post on Zulip Reid Barton (Mar 01 2023 at 16:59):

I didn't say that they aren't "equivalent". Only that they're not the same thing.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:59):

So they are equivalent??

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 16:59):

I mean, not only set monoids,as @Joe Moeller pointed out.

view this post on Zulip Joe Moeller (Mar 01 2023 at 17:00):

Monoid objects in Set are equivalent to one-object categories.

view this post on Zulip Joe Moeller (Mar 01 2023 at 17:00):

Monoid objects in other monoidal categories (V,)(V, \otimes) are equivalent to one-object VV-enriched categories.

view this post on Zulip Nicolas Blanco (Mar 01 2023 at 17:01):

When you think of a set monoid as a one-object category the monoid is not the object but the set of endomorphisms on this object, with multiplication given by composition. So if you want to see a monoid internal to a category C as a one-object "category" you need form an object in C. That's were enriched categories come in the picture.

view this post on Zulip Joe Moeller (Mar 01 2023 at 17:03):

Yes, Nicolas's point is I think the most common stumbling block for understanding this stuff. The one object of a monoid is nothing at all, or perhaps completely arbitrary. Looking at it from another angle, the one object is the thing which your monoid is the endomorphism monoid of.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:05):

Haven't studied enriched categories yet (I'll try to take a look)... A monad is a "monoid" in the category of endofunctors. Can one "categorify" this monad such that it becomes a category with a single object FF (functor), with natural transformations and morphism and a composition operator between them?

view this post on Zulip Reid Barton (Mar 01 2023 at 17:09):

Well it can't become an ordinary category, since then it would be an ordinary monoid (= monoid object of Set).

view this post on Zulip Nathanael Arkor (Mar 01 2023 at 17:10):

A monad on a category CC is a [C,C][C, C]-enriched category with one object.

view this post on Zulip Nathanael Arkor (Mar 01 2023 at 17:11):

Though this is not a perspective that one encounters very often.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:11):

Ok, thanks!

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:11):

This is helping me understand what I was not understanding.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:11):

I always tried to see how I could write a monad as an ordinary category with a single object.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:12):

It's good to know that such view is limited to Sets and alike. Hence, it makes sense that one cannot do this with monads.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:13):

Any suggestions on an easy intro to enriched categories?

view this post on Zulip Reid Barton (Mar 01 2023 at 17:13):

In careful writing it would be good to distinguish between "monoid" (= monoid object of Set) and "monoid object" (= potentially in a different monoidal category), in my view.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:15):

So a "monoid" object, is defined "universally" like one defines "terminal" or "initial" objects or "products".

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:15):

Is this correct?

view this post on Zulip Reid Barton (Mar 01 2023 at 17:26):

Davi Sales Barreira said:

Any suggestions on an easy intro to enriched categories?

Do you already know what a monoidal category is?

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:29):

Reid Barton said:

Davi Sales Barreira said:

Any suggestions on an easy intro to enriched categories?

Do you already know what a monoidal category is?

Not really.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:30):

I mean, I have seen the defintion, with the tensor functor and the pentagram. I think I understood the idea behind it. Like how one wants to say that two sets (A,B)×C(A,B) \times C and A×(B,C)A\times(B,C) are equivalent.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:30):

Hence, the use of natural transformations to apply this "soft" equality between such sets.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:31):

But I'm not very versed in the subject.

view this post on Zulip Nicolas Blanco (Mar 01 2023 at 17:52):

Davi Sales Barreira said:

So a "monoid" object, is defined "universally" like one defines "terminal" or "initial" objects or "products".

Not really universally. When we say that an object is define universally it implies that it is unique (up to unique isomorphism) in a given category. While there are many monoid objects in a given category.

view this post on Zulip Ralph Sarkis (Mar 01 2023 at 17:52):

Maybe take a look at Seven Sketches, it covers Preorder-enriched categories.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:57):

Nicolas Blanco said:

Davi Sales Barreira said:

So a "monoid" object, is defined "universally" like one defines "terminal" or "initial" objects or "products".

Not really universally. When we say that an object is define universally it implies that it is unique (up to unique isomorphism) in a given category. While there are many monoid objects in a given category.

Thanks @Nicolas Blanco . I've re-read the definitions, and I see what you are saying.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 17:58):

Thanks, @Ralph Sarkis . I've read Seven Sketches a while ago. I remember that I did not quite understand the whole discussion on preorder enriched-cats. Now that I have more experience, I'll take a look again.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 18:02):

Thanks everyone for all the inputs. Things are starting to click together...
One more question. I've seen this other definition of a monoid:

A monoid is a lax monoidal function from the trivial category 1\mathbb 1 to a monoidal category.

Is this equivalent to saying that a monoid is an object in a monoidal category, or is it yet another overloading of the term "monoid"?

view this post on Zulip Nicolas Blanco (Mar 01 2023 at 18:06):

Yes it is equivalent. Since the initial category as only one object the functor picks an object into your monoidal category. The lax monoidality of the functor gives you the maps that make it an internal monoid.

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 18:09):

I mean, a functor M:1SetM: \mathbb 1 \to \mathbf{Set} take the object 11 to a set AA, and the identity to the identity...

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 18:10):

What else is it to act upon if 1\mathbb 1 has only this object and this morphism?

view this post on Zulip Nicolas Blanco (Mar 01 2023 at 18:25):

It is not just a functor but a lax monoidal functor meaning that you have natural transformations giving functions M(1)×M(1)M(1×1)M(1)\times M(1) \to M(1 \times 1) and 1M(1)1 \to M(1). But since the initial category as only one object 1×1=11\times 1 = 1. So the first function gives you multiplication and the second the unit.

view this post on Zulip David Egolf (Mar 01 2023 at 18:41):

Isn't the terminal category the one with a single object? On the nlab, "initial category" appears to redirect to the "empty category" article.

view this post on Zulip Joe Moeller (Mar 01 2023 at 18:43):

yes, the initial category has no objects. the terminal category has one object, and only an identity arrow.

view this post on Zulip Nicolas Blanco (Mar 01 2023 at 18:48):

Wait, yes sorry. We should replace every initial by terminal in the discussion :speak_no_evil:

view this post on Zulip Davi Sales Barreira (Mar 01 2023 at 18:56):

David Egolf said:

Isn't the terminal category the one with a single object? On the nlab, "initial category" appears to redirect to the "empty category" article.

My bad. It was "trivial" not initial.

view this post on Zulip John Baez (Mar 01 2023 at 21:35):

Davi Sales Barreira said:

So... They are not equivalent, only in for monoids in the Set category?

Part of your confusion was due to this: about 98% of mathematicians mean "monoid object in the monoidal category (Set,×\times)" when they say "monoid". For example that would be the definition on Wikipedia. About 2% of mathematicians, or fewer, mean "monoid object in any monoidal category" when they say "monoid". So if you're reading different things, or talking to different people, you need to make sure which definition they're using!

view this post on Zulip John Baez (Mar 01 2023 at 21:38):

I'm sure you have it cleared up by now, but anyone who says "a monoid is a one-object category" is using the first definition of "monoid", the one that 95% of mathematicians use. Anyone who says "a monad is a monoid in..." is using the second definition.

view this post on Zulip Matteo Capucci (he/him) (Mar 02 2023 at 06:56):

Davi Sales Barreira said:

But, can a monad be described as a locally small category with a single object?

Every monoid M in Set gives you a one-object Set-category, as you say. This is sometimes called the 'delooping' of M.
This construction generalizes to the following: every monoid object M in a monoidal category V 'deloops' to a V-[[enriched category]] with only one dummy object and a V-object of morphisms, namely M.
Thus a monad deloops to a locally small category enriched in End(C).

view this post on Zulip Matteo Capucci (he/him) (Mar 02 2023 at 06:56):

Ah, I see this has already been pointed out