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.
In a category, a product of two objects ( and ) is:
That is:
Does this mean that there is only one map from to , or that there is only one map which meets the condition (of making the diagram commute)?
Is there an example of a diagram with 2 distinct maps which make the diagram commute?
When we say the diagram “must commute”, we mean that there is an (arbitrary) equivalence relation on arrows, and a partial (closed) binary operation on arrows (composition); in a category, it is not required that arrows with the same source and target are “equivalent”; but in a commutative diagram, this is essentially what is meant. Since the definition of a category includes that any arrows which can compose, do, we can look at any “path” through a commutative diagram (traveling along multiple arrows), and know that that path equals a single arrow traveling from the source of the first arrow to the target of the last arrow. If the diagram commutes, all paths with the same source and target are considered “equivalent”.
(I think this can be counterintuitive, sometimes. In the category of sets, the objects are particular sets, but the arrows, as functions, need not be surjective. If we think of the “result” of applying a function to a set as the image of that function, it seems like the arrows in the category of sets don’t actual “point at” their target object, but implicitly, at some subset of that object. But this is not the case. The target of an arrow in the category of sets is just the codomain of the function, not the image.)
I think my intuition is confused by the idea that you could have 2 paths between 2 objects, but they are not “the same”. It doesn’t correspond to the intuition of, say, a (cartographic) map: if I can take two different ways to get to the same destination, should not those routes be considered “equivalent”? Maybe we could change our criteria for equivalence: that two paths are equal in terms of something else, like, how much gas it took to drive them in my car. ?
A diagram of shape is called a “span”. Is a product equivalent to a “universal span”?
Julius Hamilton said:
- If there is a fourth object and it does have a map to both and , it must have a map to , for to be a “product”, and the map must be unique.
Does this mean that there is only one map from to , or that there is only one map which meets the condition (of making the diagram commute)?
It must be the unique morphism that makes a certain diagram commute. The definition is clearly stated here.
Julius Hamilton said:
- Thus, if there is no fourth object in the category, we are in the clear: the definition of a product is not violated.
I'm afraid you're being being overoptimistic: what you're calling the "fourth object" is not required to be distinct from the object , and their putative product - it can really be any object in the category, including , and . So it's not true that any category at most 3 objects automatically has products, as your comment "we are in the clear" seems to suggest.
It's a good exercise to write down an example of a category with 3 objects that does have products, and also a category with 3 objects that does not have products.
To constrain your search a bit, let me add: you can find both examples using categories that have at most one morphism from any object to any object.
It doesn’t correspond to the intuition of, say, a (cartographic) map: if I can take two different ways to get to the same destination, should not those routes be considered “equivalent”?
I would not consider walking to my office "equivalent" to taking a bus to the airport, hopping on a plane, hijacking the plane and then jumping off the plane and parachuting down to my office. The starting point and the endpoint of the two trips are the same, but the journeys themselves are very different.
Or, to put it using more math jargon: there's more information in a morphism than merely its source and target.
If you want to require that all morphisms with the same target and the same target are equal, you're allowed to, but adding this extra requirement singles out a special sort of category called a [[preorder]].
Thanks. I drew some diagrams of three object categories earlier and it was really helpful. I can share them later. The following is just a normal diagram of a product.
AC506A90-58BD-452F-A871-8A1F9E59A972.jpg
I am trying to figure out what the problem is if is not the only morphism from that makes the diagram commute.
Mike Shulman mentioned that the product is the terminal object in the category of spans (spans of 2 objects and , I assume). I find that really interesting.
I know the terminal object is defined as having only one arrow into it from all other objects.
In the category of sets, if is the Cartesian product of two sets, what can we imagine looks like?
If singleton, it selects an element from and . Assuming arrows and are always “projection maps” which map, for example, to (or ), then if “selected” , and selected , then in order to commute, has to map the only element of to .
If has more than one element, I think we can assume the same, just for possibly multiple ordered pairs in . So if , a set with two elements, has one map which maps one element to 1 in A, and the other to 2 in A; and another map which maps an element to 3 in B, and an element to 4 in B, then we know exactly which element in maps into: must be mapped to ordered pair , and to .
I think that is what the significance of the “uniqueness” of is - that for any two maps from to and , we know exactly which element in the product of and must map to in order to find the “corresponding” element.
So in a way, the product of two objects is like an object that can internally track the data of two other objects and is always in correspondence with them.
Julius Hamilton said:
So in a way, the product of two objects is like an object that can internally track the data of two other objects and is always in correspondence with them.
I drew a picture in this spirit, to elaborate on this point:
picture
Here, is a set with a single element. I'll call its single element . The function then "selects" the element , so that . Similarly, . (I was tempted to call these functions by the names and , corresponding to the elements they point out, but I thought that could potentially be needlessly confusing).
The function "projects to " by sending any pair to . Similarly, for any .
Given this, there is then a unique function so that the diagram I've drawn commutes. Namely, we must have .
We can also do this kind of thing in the opposite direction: if I pick some function from to , that will induce two functions if we wish for the diagram I drew above to commute. We'll get one from to and one from to , which pick out the coordinates of the element of that our function to picked out.
So, we have two equivalent things - in the sense that if you give me one, I can get the other by requiring the above diagram to commute:
This situation is very similar to the fact that specifying an element of and an element of is equivalent to specifying an element of .
John Baez said:
It's a good exercise to write down an example of a category with 3 objects that does have products, and also a category with 3 objects that does not have products.
To constrain your search a bit, let me add: you can find both examples using categories that have at most one morphism from any object to any object.
Since Julius didn't answer this puzzle I'll provide some answers.
Some answers
(In case anyone else is wondering how John Baez magicked up the "Some answers" block in Zulip, see "Spoilers" here)
reply to "some answers"
Eric M Downes said:
At the risk of speaking for them, I think one thing Julius is trying to highlight though, are the confusing vacuous possibilities in the definition of ; to wit, does an object need to have morphisms to both and in order to even be considered a candidate product?
Maybe your question was rhetorical but I'll answer it. Yes, any product of and must be, for starters, an object equipped with a morphism to and a morphism to . Then it must obey a universal property... which may be vacuous in some cases.
This is the definition with which I am familiar.
" is the object, unique up to isomorphism, with morphisms such that for every object with morphisms and , there exists a unique morphism ."
Since we are getting very precise and nitpicky, I'll admit I don't like the phrase " is the object", for three reasons. First, amateurs are often fooled into thinking that is the name of a specific object (i.e. unique up to equality rather than up to a unique isomorphism). Second, and relatedly, speaking of "the" object suggests that this object is unique up to equality. Third, "the" suggests that this object must exist. So for beginners I'd say this:
A product of and is an object equipped with morphisms such that for every object and pair of morphisms and , there exists a unique morphism such that .
Then I'd prove that when the product exists, it's unique up to a unique isomorphism. Then I'd say that given this, we allow ourselves to pick any one and call it . Later, when the beginner becomes sophisticated enough to understand the "generalized the" and homotopy type theory, we can revisit these matters.
In your discrete category, there is no such object with morphisms that could qualify for any distinct pair, so one might think there is no rule unsatisfied by "for all", e.g. we might have that a discrete category is vacuously a category-with-products.
One might, but I wouldn't. For a discrete category the universal clause is vacuously true so the definition reduces to
A product of and is an object equipped with morphisms such that TRUTH IS TRUE.
and thus
A product of and is an object equipped with morphisms .
but in a discrete category such an object exists iff . So we see that in a discrete category every object has a product with itself, but not with any other object.
I agree that my example of a 3-object category without binary products is a bit weird, and it's good to make up other examples that illustrate other things that can go wrong. But if my example was confusing that's probably good. Confusingly degenerate cases are a great way to check one's thinking.
I really like splitting up the definition into steps. (1) an object, (2) prove uniqueness up to isomorphism/unique-iso/equivalence/whatever. That's very ergonomic and good pedagogy -- its almost like you have deacdes of experience doing this! :)
It’s interesting how simple one’s understanding of something can become once you’ve worked through it from different angles. I now feel like the product is so simple.
The product object of some objects is an object with morphisms to each of the objects, which we call “projections”.
For any other object with a definable morphism to each of those objects, it corresponds to a specific map into the product object.
Thus, the product object indeed “contains the data” of a bunch of other objects.
I feel like it’s simpler and clearer now.
But that said, I don’t like my use of the word “contains”.
I’m curious if there is a method to convert any abstract category into a specific structure having that categorical structure.
Julius Hamilton said:
But that said, I don’t like my use of the word “contains”.
If you haven't seen it already, [[generalized element]] is a good place to look.
The basic idea is that any arrow can be thought of as an "element contained in ", but that different elements might have different "shapes", corresponding to different domains.
I find the geometric examples most intuitive. An ordinary point corresponds to a "point-shaped" element, whereas a curve corresponds to an "interval-shaped" element.
I like that.
I’ve been wondering if one ever studies a particular morphism in a category in view of its relationship to every other morphism.
Yes, one often does that! In fact, that is exactly how one proceeds, with morphisms, objects, etc.
A slight tweak to what you have said above: what if it were not per se the object that "contains the data" of , but the collection of morphisms to and from it that contains the key data?
Well, then, if that were so, would the proper place to learn more be inside the object, or... outside?
I’m trying to envision how you could describe “the relationships a morphism has to every other morphism in the category”.
For two arbitrary morphisms, what can be said about their “relationship”?
I was also wondering if constructing the arrow category provides useful information about the original category.
Well, how did we do it with objects?
If I have how do we express the relationships between them?
I’m wondering if we basically form a tower of categories where we look at “arrows” between arrows (like in a 2-category) and we can keep going up from there. For a finite category, would be really interesting to see what the “top level” of any given category is.
I think that I wanted to think of ways to express relationships between things that are more distant from each other - for example, two morphisms with morphisms between them. But now I realize that due to the law of composition on arrows, a path of morphisms would be equivalent to a single morphism that is their composition.
So I think I see why you said that it is enough to study just the morphisms to and from an object to all the other objects. This should capture all the information, I think.
(Yes, at least all the information that the category encodes.)
And yes, that tower of arrow categories is a decent picture to have. Do you know what a morphism between morphisms is called? That might be a good place to start.
For instance, one way to think of joins and meets on lattices (like max, min or lcm, gcd) is as idempotent monoids. That is, associative algebraic operations having and identities. And because they're associative, we can write things like
.
Once that makes sense to you... Another way to view them* is as maps from the powerset of the same lattice. . Recalling what a morphism is in a lattice/poset, what property is preserved here?
(* -- there can be issues with finiteness here; some infinite lattices are not "complete" (closed under sufficiently iterated applications of for subsets, which you can think of as a kind of generalized element.) In topology this happens with . But if your lattice is finite there are no issues, and that's what I recommend starting with to see the general patterns you're trying to internalize here.)
(Or if those aren't familiar enough to you, I highly recommend Spencer's suggestion above: find any simple generalized elements you're familiar with. Then ask what morphisms preserve the key property . Once you're certain what this is, what makes squares commute . It's helpful to do this within the same category, and between related categories.)
I will. Still wish I had a convenient way to draw diagrams on my phone.
I think CD doesn’t have diagonal arrows, but maybe I can get around that by mapping an object to itself with the identity arrow.
I was thinking about how if one is told, “the following is a diagram in a category”,
they can immediately know that this arrow exists:
But if we have either of these diagrams:
These arrows don’t necessitate the existence of further arrows.
I often think of categories as “directed multigraphs with an equivalence relation on paths”.
I thought of the axiom that arrows are closed under composition as adding arrows. But now I think one can see it as a way of contracting paths. It allows one to reduce multi-arrow paths to single arrows, so it allows you to specify a category with less arrows.
I’m wondering if this implies the ability to reduce a category to its generator arrows, and if every category (first the finite case, then the infinite case) has a single unique “reduction” to generator arrows, or not.
That tower of arrow categories is a decent picture to have.
Does it have a name?
Do you know what a morphism between morphisms is called?
I would say a 2-morphism, but I think it can also be seen as an endofunctor. In which case, we want to know all the endofunctors on a category , because we aren’t interested in re-mappings of the morphisms that don’t preserve categorical structure, because we want to make use of relationships discovered between the arrows to draw inferences about the original category and the relationship between its objects.
Now, I’ve heard that sometimes one studies an algebraic object by studying its symmetries. Furthermore, a one-object category is a monoid. So it seems like the set of endofunctors on a category is a monoid, under composition.
Then the question becomes what we can discover are relationships between a category and its category of endofunctors.
I’ll see if I can draw any interesting diagrams about this.
For instance, one way to think of joins and meets on lattices (like max, min or lcm, gcd) is as idempotent monoids.
Are you saying that lattices are monoids with the property that for all ? I’ll need to investigate this.
Another way to view them is as maps from the powerset of the same lattice.
The powerset presents all sub-selections of a collection of elements. Because the lattice operation should be associative, we can ask, “What is the join of …?” for any selection of elements in the lattice.
. Recalling what a morphism is in a lattice/poset, what property is preserved here?
In a posetal category, I think of a morphism as an element of the partial order relation. To say that is equivalent to saying . I think you are getting at that the above map is order-preserving, but I need to think a bit more about the big picture of what you are saying.
Are you saying that lattices are monoids with the property that for all ? I’ll need to investigate this.
Yes, idempotent commutative monoids can also be thought of either as join-semilattices, or as meet-semilattices, depending on how you define the order. One way to define it is to say if , and there the multiplication becomes the meet. The other way is to define if , and there the operation becomes the join.
find any simple generalized elements you're familiar with.
I have to digest this.
A “generalized element” is a morphism.
For example, a map from a singleton set to a set selects an element in .
But the idea is generalized to where a map selects multiple elements in its codomain, and if the map is non-injective, the domain acts more like an index of those elements in the codomain.
Then ask what morphisms preserve the key property .
I think you are saying that we can think of binary relations on sets as reflecting “properties” of those elements, but when generalized to “generalized elements”, the question is about endofunctors.
Once you're certain what this is, what makes squares commute . It's helpful to do this within the same category, and between related categories.
I don’t follow. I’d love a hint or a little clarification, please. Thanks.
Julius Hamilton said:
I will. Still wish I had a convenient way to draw diagrams on my phone.
I don't know if this works on a phone, and you may have seen it already, but this is what I use to draw diagrams quickly: https://q.uiver.app/ .
Thanks for the correction @Todd Trimble yes idempotent non-commutative monoids are known as "bands" I have recently learned... which makes sense really, given how self-involved musicians can be! XD
I’m quite excited to continue this conversation, since I have been studying monoid objects, thinking about categories of endofunctors, and can now connect these notions to the definition of a monad as a monoid object in the category of endofunctors.
Julius Hamilton said:
find any simple generalized elements you're familiar with.
I have to digest this.
A “generalized element” is a morphism. (...)
Yeah. And the domains of morphisms in may themselves be diagrams in a different category , e.g. when there is a projective functor ! So a morphism implicitly "projects" that "shape" into the codomain, like with plato's cave. So some generalized elements to think about (how do I form them, in what cat do theyblive, etc.) are: lines, loops, spans , etc.
I think you are saying that we can think of binary relations on sets as reflecting “properties” of those
elements, but when generalized to “generalized elements”, the question is about endofunctors.
Or just functors more generally. A Category encodes certain kinds of information, so to learn possibly relevant information that is "out of scope" of usually involves knowing about functors to other categories.
Regarding binary operators and relations. I like to curry binary-things into (left or right) actions becomes , or if the ambient category has exponential objects (internal homs). This is a great way to study groups, monoids, etc. but is also useful in programming.
So in a curried binary relation becomes a map from elements to a power set and a binary operator becomes a map returning functions from the set to itself. The object can be completed to a monoid if it is not already, and this monoid can be used to form a functor category , which is very powerful. But understand functors first!
Once you're certain what this is, what makes squares commute .
It's helpful to do this within the same category, and between related categories.
I don’t follow. I’d love a hint or a little clarification, please. Thanks.
I mean, within a category you might have higher structures on specific pairs of objects and morphisms, 2-morphisms and the like, as you alluded to, that correspond to commuting diagrams. Or you can have endofunctors defined on the whole category, functors to a different category, etc. etc.
But, beware that stuff gets abstract real quick! Now that you have a taste of universal properties by understanding what a categorical product is, you're primed to assemble a toolkit of categories to lock in that understanding, and keep "in pocket" whenever you encounter a new theorem/whatever.
At least have one system you understand decently well so you can build intuition and sanity check your ideas against it. So, the recommendation is
And Actually try to prove the claims that such-and-such is a category/morphism/pushout/product. It's painful at first, but 100% worth it.
I was suggesting to start with lattices because posets are easy and there are many examples of lattices in mathematics.
But generally I just recommend to have some sample categories in your toolkit. Especially if you learn best by working on projects, rather than reading and proving theorems. If mathematics isn't your thing, that's ok, instead perhaps use functional programming for examples. Bartosz Milewski has some great lectures on youtube and Scala is a very categorical language that is actually in-demand in industry.
Julius Hamilton said:
I’m quite excited to continue this conversation, since I have been studying monoid objects, thinking about categories of endofunctors, and can now connect these notions to the definition of a monad as a monoid object in the category of endofunctors.
Oh definitely check out Bartosz' lectures then!
And once you have done so, and have a sense for monads, I strongly recommend Maika Zwarte's talk on distributive laws and how they fail in certain cases -- its great to see examples where well-defined things don't compose, and monads are a source of such examples. It's very accessible and you can even implement the compositions she's talking about.
A monoid object requires a notion of product.
A product will be an object that in a way can represent the data of two objects - since it maps the “generalized element” (?) from some object to , to and , via projection morphisms.
Since a functor is a map (from objects to objects), and a family of maps (from each Hom-set to the corresponding Hom-set), a “product functor” needs to preserve the information of both of those things, for 2 functors. It can preserve info about each set of objects by taking the Cartesian product of those two sets. It can preserve info about the families of Hom-set mappings by taking the Cartesian product of the two families.
So for two distinct functors , , an element of the set of object maps would look like ordered pairs of objects, one from each category; for example, . And an element of the family of Hom-set mappings would be a pair of maps .
I think that in “set-enriched category theory”, the product of two functors is equivalent to the Cartesian product of the two sets of object maps, and the Cartesian product of the two families of Hom-set maps (assuming we can treat a “family” as a set).
So, let’s say then that the product of a functor with itself, , is well-defined. As a monoid object, we have the “monoid operation” .
Since this is a map between functors, I am going to assume this is a natural transformation; but I haven’t studied natural transformations much yet.
The map must be associative:
I am missing labels on the arrows because I am still working on understanding what an arrow labeled really means.
Then we also have the unitality map from a terminal object to represent the identity element. Will skip this for now.
The question will be, once I see more clearly what a monad is, why it is a useful construct; what we can do with it.
John Baez said:
There are also more interesting examples to think about, like the category with objects and 1 morphism from each object to itself and also 1 morphism and one morphism . Does this category have binary products?
I thought I knew the answer but am now thinking through some more particular details. This is just a partial answer.
I’m checking if an object is a product of two objects and by checking a few questions.
I’ll complete my answer soon. No need to give me the answer. Thanks.
Eric mentioned that in a lattice, every element is idempotent. I am curious if there is a category where an object is not idempotent with respect to the product.
I did actually do some drawing on the day you posted this message - (Chick Fil A napkin, lol):
065BC907-217B-4BEC-9461-B772DFF4C22B.jpg
I felt like it was very easy to “see” products. I think of them as the “nearest upstream element”.
Eric mentioned that the max function generates a lattice; which is what I mean by being “upstream”. I’m not sure if the max function is identifiable with products or if it is a special case of them.
(I found the first section of Probability Monads to be quite helpful for thinking about monoids in monoidal categories, and the particular case of a monad.)
Yeah that’s gonna be fun :star:
Then this unlocks the door to this https://en.m.wikipedia.org/wiki/Kleisli_category
Julius Hamilton said:
Eric mentioned that in a lattice, every element is idempotent. I am curious if there is a category where an object is not idempotent with respect to the product.
See if you can work out why (look at the definitions!) the categorical product becomes idempotent in a poset/lattice. Or see below for another example with clear definition.
Which is to say: IMO you will benefit most by slowing down a bit. Your ideas are valuable, get them down 100%, but never underestimate the value of thinking of simple and fundamental things, from a place where you honestly understand. Rushing does not help us especially in category theory; I apologize for possibly throwing too many ideas at you at once.
Your concept of a product on functors is a thing, and very interesting and worthy of investigation, but its not the best model for a generic natural transformation. I would strongly recommend slowing down and really just try to understand lattices, then functors first, applied to lattices. Work through the definitions and actually prove them out. Then more basic kinds of natural transformations. You'll be there soon enough.
Eric mentioned that the max function generates a lattice; which is what I mean by being “upstream”. I’m not sure if the max function is identifiable with products or if it is a special case of them.
As for the max, to be clearer: max
generates a "join semilattice", and is the product on . (why op?) To get something that isn't just a linear order, work over a set like .
If you want a non-op-example, use greatest common denominator/divisor on the integers using the following definition (hopefully you understand the mathese? if not ask)
where "divides" plays the part of and is defined: .
I think that is not as obvious as max, but still very accessible and will give you good experience working with the definitions to actually prove your ideas/conjectures/questions! Then you'll really start to get it -- you're very close, but first you have to suffer through the actual working out of the proofs. I know of no other way to really make durable progress.
David Egolf said:
(I found the first section of Probability Monads to be quite helpful for thinking about monoids in monoidal categories, and the particular case of a monad.)
Yes! You know @David Egolf, Paolo Perrone (who has done a lot of work with the Giry monad and is a great speaker) is giving a talk in our seminar series in about a month? I bet time spent on that paper above, before Paolo's talk will be beneficial. Thankfully, we record all talks, so you can still get most of the benefit if it takes longer, in case sheaves and topoi prove too delicious. :)
Awesome! And it's great to hear the talks will be recorded!