bivariate Yoneda lemma

487 Views Asked by At

$\newcommand{\Hom}{\operatorname{Hom}}$Any category is equipped with a covariant hom-functor $\Hom(A,-)$, by letting the second argument vary. The covariant Yoneda lemma says $\operatorname{Nat}(\Hom(A,-),F)\cong F(A)$ for any covariant functor $F$.

Alternatively any category is equipped with a contravariant hom-functor, by instead letting the first argument vary. Then for contravariant functors $F\colon C^\mathrm{op}\to \operatorname{Set},$ we have the contravariant Yoneda lemma $\operatorname{Nat}(\Hom(-,X),F)\cong F(X).$

Instead of choosing one or the other argument to vary, we may let both vary. Giving the hom functor as a bivariate functor $\operatorname{Hom}(-,-)\colon C^\mathrm{op}\times C\to \operatorname{Set}$. Is there a Yoneda lemma for this functor as well?

2

There are 2 best solutions below

8
On BEST ANSWER

Show that $\mathsf{Nat}(\mathsf{Hom}(-_1,X)\times\mathsf{Hom}(A,-_2),P)\cong P(A,X)$ where $P:\mathcal C^{op}\times\mathcal C\to\mathbf{Set}$. You can prove this by currying and applying each variation of the Yoneda lemma. Or, you can realize that the two variants of the Yoneda lemma are the same statement, and the above is also just a special case of the Yoneda lemma.

3
On

To extend on the answer and comments of Derek Elkins.

Indeed, applying e.g. the covariant Yoneda lemma $\left[\,{\rm Nat}(\hom_{\mathcal C}(C,-),\,F)\,\simeq\,F(C)\right.$ for $\left. F:\mathcal C\to\mathcal Set\,\right]$ with $\mathcal C=\mathcal A^{op}\times\mathcal B$ and an arbitrary profunctor $F:\mathcal A^{op}\times\mathcal B\to\mathcal Set$ will produce $$ {\rm Nat}(\hom_{\mathcal A^{op}\times\mathcal B}((A,B),\,-),\,F)\,\simeq\,F(A,B) $$ where $\hom_{\mathcal A^{op}\times\mathcal B}((A,B),\, (X,Y))=\hom_{\mathcal A}(X,A)\times\hom_{\mathcal B}(B,Y)$.

Let $H_{A,B}$ denote this profunctor $H_{A,B}(X,Y)=\hom_{\mathcal A}(X,A)\times\hom_{\mathcal B}(B,Y)$.
Observe that this is basically the same as considering the disjoint union $\mathcal A+\mathcal B$ and freely joining an arrow $h_{A,B}:A\to B$:
the set of arrows $X\to Y$ arising this way, for $X\in Ob\,\mathcal A,\ Y\in Ob\,\mathcal B$, consists exactly of formal compositions $\beta\circ h_{A,B}\circ\alpha$ for arbitrary $\alpha:X\to A$ and $\beta:B\to Y$.
(In the above setting, we have $h_{A,B}=(1_A,1_B)\in H_{A,B}(A,B)$.)

We can also view any profunctor $F:\mathcal A^{op}\times\mathcal B\to\mathcal Set$ as a category containing $\mathcal A+\mathcal B$ by considering $F(A,B)$ as the set of (hetero-)morphisms 'from $A$ to $B$'. Compositions are given by the action of $F$ on morphisms.
Also, natural transformations $F\to G$ simply correspond to functors that are identical on $\mathcal A+\mathcal B$.

From this perspective, it's clear that ${\rm Nat}(H_{A,B},\,F)\cong F(A,B)$, since any morphism of profunctors $\Phi:H_{A,B}\to F$ is indeed uniquely determined by its image on the freely joined arrow $h_{A,B}$ which can be any arrow $A\to B$ in $F$, i.e. any element of $F(A,B)$.

It's easy to see that both the covariant and the contravariant Yoneda lemmas are consequences of this instance, by letting either $\mathcal A$ or $\mathcal B$ be the trivial, one element category.


To answer your original question, the bivariate hom functor has less to do with Yoneda, nevertheless we can have a similar statement:

For any 'endoprofunctor' $F:\mathcal A^{op}\times\mathcal A\to\mathcal Set$, we have $${\rm Nat}(\hom_{\mathcal A}(-,-),\,F)\,\simeq\,{\rm Nat}(I_1,I_2)\,\simeq\,\int_{\mathcal A}F$$ where $I_1,I_2:\mathcal A\to\mathcal F$ are the two embeddings of $\mathcal A$ into the category $\mathcal F$ constructed as above from $F$, and the integral denotes the end of $F$.
For the correspondence, observe that any natural transformation $\Phi:\hom_{\mathcal A}(-,-)\to F$ is determined by the images $t_A:=\Phi_{A,A}(1_A)\in F(A,A)$ of $1_A\in\hom_{\mathcal A}(A,A)$, and these elements $t_A$ need to satisfy a commutativity condition for each arrow $\alpha:A\to A'$.