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: categorical product from adjunction


view this post on Zulip simon (Aug 02 2025 at 10:38):

Greetings, currently I try to learn about adjunctions as I came across them in the video series "Programming with Categories". I went back to Milewski's videos and found (https://youtu.be/7Q8E2ZBS7pQ?si=K9uj4oxM8NeYfY4p&t=2126):

image.png

He talks about the unique morphism h and prepending (at 37:49 in the vid). My understanding from https://en.wikipedia.org/wiki/Adjoint_functors#Definition_via_Hom-sets and https://en.wikipedia.org/wiki/Hom_functor is that I would go from C×C(Δa×b,<a,b>) to C×C(Δc,<a,b>) via C×C(Δh,<a,b>), i.e. prepending Δh to <fst,snd>. I searched the web but did not find examples for the naturality condition with the hom-set definition and products.
Am I getting something wrong or is it a mistake in the video?

view this post on Zulip Ruby Khondaker (she/her) (Aug 02 2025 at 10:49):

The relevant adjunction here is Hom((Z,Z),(A,B))Hom(Z,A×B)\text{Hom}((Z, Z), (A, B)) \cong \text{Hom}(Z, A \times B)

I.e. you can “package” two arrows Z -> A, Z -> B into a single arrow Z -> A x B, reversibly!

view this post on Zulip simon (Aug 02 2025 at 11:04):

That makes sense; I want to see how to 'recover' the universal construction definition of the product from the hom-functor definition. So in your example, how does it look if you add the unique morphism that 'condenses' (Z,Z) into (A×B,A×B)?

view this post on Zulip Ruby Khondaker (she/her) (Aug 02 2025 at 13:10):

simon said:

That makes sense; I want to see how to 'recover' the universal construction definition of the product from the hom-functor definition. So in your example, how does it look if you add the unique morphism that 'condenses' (Z,Z) into (A×B,A×B)?

So this ends up being a consequence of the yoneda lemma! The natural transformation Hom(,A×B)Hom(Δ(),(A,B))\text{Hom}(-, A \times B) \to \text{Hom}(\Delta(-), (A, B)) is determined by where it sends the identity. So you look at Hom(A×B,A×B)Hom((A×B,A×B),(A,B))\text{Hom}(A \times B, A \times B) \to \text{Hom}((A \times B, A \times B), (A, B)) - following the identity gives you the projections!

Then the "universal construction" follows from this natural transformation being an isomorphism, i.e. producing a bijection between Hom(Z,A×B)\text{Hom}(Z, A \times B) and Hom((Z,Z),(A,B))\text{Hom}((Z, Z), (A, B)). Specifically, the forward direction is post-composing with the projections πA,πB\pi_A, \pi_B, and the backward direction is the "universal arrow making the diagram commute" part.

view this post on Zulip simon (Aug 03 2025 at 22:49):

So this ends up being a consequence of the yoneda lemma! The natural transformation Hom(,A×B)Hom(Δ(),(A,B))\text{Hom}(-, A \times B) \to \text{Hom}(\Delta(-), (A, B)) is determined by where it sends the identity. So you look at Hom(A×B,A×B)Hom((A×B,A×B),(A,B))\text{Hom}(A \times B, A \times B) \to \text{Hom}((A \times B, A \times B), (A, B)) - following the identity gives you the projections!

To be honest, I haven't looked at the Yoneda-Lemma yet and before the "Programming with Categories" videos, I did not intend to pick up Adjunctions before Yoneda-Lemma and representable functors. The part of a natural transformation from LRL \circ R to 1C1_{C} giving us Hom(Δ(A×B),(A,B))\text{Hom}(\Delta(A \times B),(A,B)), i.e. the projections is clear so far.

Then the "universal construction" follows from this natural transformation being an isomorphism, i.e. producing a bijection between Hom(Z,A×B)\text{Hom}(Z, A \times B) and Hom((Z,Z),(A,B))\text{Hom}((Z, Z), (A, B)). Specifically, the forward direction is post-composing with the projections πA,πB\pi_A, \pi_B, and the backward direction is the "universal arrow making the diagram commute" part.

These are both objects in Set\mathbf{Set} but in my head only the arrows going down on either side in the Hom-set diagram (like the one in the screenshot) are appending/prepending. But since this is a category, why not have morphisms between Hom(Z,A×B)\text{Hom}(Z, A \times B) and Hom((Z,Z),(A,B))\text{Hom}((Z, Z), (A, B))? That confuses me a little as it seems we mix e.g. ZZ and (Z,Z)(Z,Z) which live in left/right category respectively. But then again, it makes sense that going from Hom(Z,A×B)\text{Hom}(Z, A \times B) to Hom((Z,Z),(A,B))\text{Hom}((Z, Z), (A, B)) means we prepended a morphism that projects from the product to its two coordinates (in case that is what you meant). But then wouldn't that mean we also prepended sth. so that we now take a (Z,Z)(Z,Z) instead of just a ZZ?

Apart from that, thank you for your time and patience to answer my questions.

view this post on Zulip Ruby Khondaker (she/her) (Aug 03 2025 at 23:06):

It’s a little difficult for me to parse what you’re saying, but my gut instinct is that you’re overthinking this.

An element of Hom(Z,A×B)\text{Hom}(Z, A \times B) is just a morphism h:ZA×Bh : Z \to A \times B. And an element of Hom((Z,Z),(A,B))\text{Hom}((Z, Z), (A, B)) is just a pair of morphisms f:ZA,g:ZBf : Z \to A, g : Z \to B.

Given h:ZA×Bh : Z \to A \times B, we get the pair (πAh,πBh)Hom((Z,Z),(A,B))(\pi_A \circ h, \pi_B \circ h) \in \text{Hom}((Z, Z), (A, B)). This is just postcomposition.

Moreover, the universal property tells us that given f:ZA,g:ZBf : Z \to A, g : Z \to B, there is a unique h:ZA×Bh : Z \to A \times B such that f=πAh,g=πBhf = \pi_A \circ h, g = \pi_B \circ h. This is precisely the statement that the above map is bijective, i.e. an isomorphism in Set!

view this post on Zulip simon (Aug 04 2025 at 19:51):

image.png

I when I kept looking at your reply, I remembered the part in the screenshot above. From that point of view, it makes sense to go back and forth between HomC((Z,Z),(A,B))\text{Hom}_{\mathcal{C}}((Z,Z),(A,B)) and HomD(Z,A×B)\text{Hom}_{\mathcal{D}}(Z,A \times B). My thinking was, "why would we suddenly compose morphisms from C\mathcal{C} with morphisms from D\mathcal{D}". When going from HomD(Z,A×B)\text{Hom}_{\mathcal{D}}(Z,A \times B) to HomC((Z,Z),(A,B))\text{Hom}_{\mathcal{C}}((Z,Z),(A,B)), we have to clone the morphism from the frist hom-set before we can append the projections — which was not obvious to me at all. Given the statement with the natural isomorphism between the hom-sets, it also makes sense, why (h,h)(h,h) is unique. For what it's worth, I put together a diagram to make it easier to follow where I am coming from (not claiming it is complete or free of errors):
adjunction_from_product.drawio.png

As you can see, the hom-sets connected by the red dotted lines have a morphism going up on each side. In the diagram seen in the screenshot in my first post, they go in the opposite direction — therefore I asked if I took a wrong turn somewhere.

Apart from that, if (π1,π2)(π1,π2) is the component of ϵ\epsilon at A×BA \times B, what is the other component that creates the commuting rectangle in C\mathcal{C}? (even if it is a commuting triangle because the other component is id(Z,Z)id_{(Z,Z)}, but then, from which object in D\mathcal{D} is it mapped to?)

view this post on Zulip Ruby Khondaker (she/her) (Aug 04 2025 at 19:55):

simon said:

image.png

I when I kept looking at your reply, I remembered the part in the screenshot above. From that point of view, it makes sense to go back and forth between HomC((Z,Z),(A,B))\text{Hom}_{\mathcal{C}}((Z,Z),(A,B)) and HomD(Z,A×B)\text{Hom}_{\mathcal{D}}(Z,A \times B). My thinking was, "why would we suddenly compose morphisms from C\mathcal{C} with morphisms from D\mathcal{D}". When going from HomD(Z,A×B)\text{Hom}_{\mathcal{D}}(Z,A \times B) to HomC((Z,Z),(A,B))\text{Hom}_{\mathcal{C}}((Z,Z),(A,B)), we have to clone the morphism from the frist hom-set before we can append the projections — which was not obvious to me at all. Given the statement with the natural isomorphism between the hom-sets, it also makes sense, why (h,h)(h,h) is unique. For what it's worth, I put together a diagram to make it easier to follow where I am coming from (not claiming it is complete or free of errors):
adjunction_from_product.drawio.png

As you can see, the hom-sets connected by the red dotted lines have a morphism going up on each side. In the diagram seen in the screenshot in my first post, they go in the opposite direction — therefore I asked if I took a wrong turn somewhere.

Apart from that, if (π1,π2)(π1,π2) is the component of ϵ\epsilon at A×BA \times B, what is the other component that creates the commuting rectangle in C\mathcal{C}? (even if it is a commuting triangle because the other component is id(Z,Z)id_{(Z,Z)}, but then, from which object in D\mathcal{D} is it mapped to?)

Ah, perhaps the other component is exactly what you're looking for! So, again, the principle is to "follow the identity" - this time we just go in the other direction.

Thus, we start with Hom((Z,Z),(Z,Z))\text{Hom}((Z, Z), (Z, Z)) - the adjunction then tells us this is in bijection with Hom(Z,Z×Z)\text{Hom}(Z, Z \times Z). Following the identity element gets us the diagonal or duplication map ZZ×ZZ \to Z \times Z, sending z(z,z)z \mapsto (z, z). Maybe this is what you meant by needing to "clone" the morphism from the first homset?