# Higher and lower analogues of Yoneda's lemma

Here's a statement of Yoneda's lemma for n-category.

Let C be a n-category and $C^{\wedge}=[C^o,n-1Cat]$ be the n-category of presheaves on C.

$C^o$ is the opposite n-category of C and $n-1Cat$ is the n-category of (n-1)-categories.

We have the Yeneda embedding:

$h_C:C \rightarrow C^{\wedge}$ , X being sent to the hom-presheaf $hom_C(-,X)$.

Now Yoneda's lemma says:

1) For $X \in C$ and $A \in C^{\wedge}$,

$hom_{C^{\wedge}}(h_C(X),A) \approx A(X)$ in the n-category $n-1Cat$ up to n-equivalence;

2) For $A \in C^{\wedge}$,

$hom_{C^{\wedge}}(h_C(-),A) \approx A$ in the n-category $C^{\wedge}$ up to n-equivalence.

I want to test the Yoneda in the case n=0.

Now a 0-category is, supposedly, an ensemble and a (-1)-category is either 1 or 0 (truth values). So the 0-category of (-1)-categories is

$$-1Cat=\{0,1\}$$.

Now let C be a 0-category ; $C^{\wedge}=[C^o,-1Cat]$ is nothing but the power set of C since a function of C in {0,1} defines a subset of C.

The Yoneda embedding is

$h_C:C \rightarrow C^{\wedge}$ , x being sent to the hom-presheaf $hom_C(-,x)=\{x\}$ (since $hom_C(y,x)=0$ if $y \neq x$), that is, x being sent to the singleton {x}.

So the Yoneda lemma gives:

$hom_{C^{\wedge}}(h_C(x),A) \approx A(x) = 0$ if $x \notin A$

and

$hom_{C^{\wedge}}(h_C(x),A) \approx A(x) = 1$ if $x \in A$

in the 0-category $-1Cat$ up to 0-equivalence which is equality.

Thus

$hom_{C^{\wedge}}(h_C(x),A) = 1$ as long as $x \in A$,

so this indeed makes $C^{\wedge}$ not just a set but a set with equivalence relation, also called setoid in nLab.

I don't actually expect this: Yoneda's lemma forces us to consider setoids instead of plain sets as 0-categories.

So now my question is: Given two 0-categories C and D,

[C, D] (functions of C in D) should be a 0-category, i.e., a setoid.

So what is the equivalence on [C,D]?

In the case of [C,{0,1}], a subset A and a singleton {x} are equivalent iff x is an element of A. Two functions A and B (i.e. two sunsets of C) are equivalent iff their intersection is not empty; indeed any subset is either equivalent to the empty set or the whole set C itself (if the 0-category C is strictly a set).

This is indeed rather confusing. I hope someone can perhaps clarify.

Or perhaps the Yoneda should not be applied in this rather trivial case at all?

• (Why do you insist on using French -- is "ifif" so too? -- when explaining their meaning takes much more space than just using English in the few times you need those words?) – Jules Lamers Mar 14 '17 at 16:11

The fact that you have to consider setiods shouldn't be too surprising, since if we're working ($n>0$)-categorically the distinction between sets and setoids isn't invariant under equivalence. If C and D are strict 0-categories (i.e., sets), then the equivalence relation is just the identity relation. If C and D are weak 0-categories (setoids), then $[C, D]$ is the weak 0-category (setoid) whose elements are the set functions $f : C \to D$ respecting the equivalence relation and where two functions $f, g: C \to D$ are equivalent if $f(c) \sim g(c)$ for all $c$ in $C$.
We can try to apply the Yoneda lemma to $(n,k)$-categories for all $n$ and $k$. If we try to do this for $(0,0)$-categories, then we need the $(0,0)$-category of $(-1,-1)$-categories, and I'm not sure that it is a good idea to define $(-1,-1)$-categories as truth values.
We can apply the Yoneda lemma to $(0,1)$-categories instead. Those are just posets (or, equivalently, preordered sets). The $(0,1)$-category of $(-1,0)$-categories is just the poset of truth values $\Omega = \{0,1\}$. The yoneda embedding $h_C : C \to [C^o,\Omega]$ is defined as follows: $h_C(x) = (- \leq x)$. Now, we have the Yoneda lemma: for every $A : C^o \to \Omega$, there is a natural isomorphism $[C^o,\Omega](h_C(x),A) \simeq A(x)$, which just says that $A(x)$ is true if and only if $y \leq x$ implies $A(y)$ for every $y \in C$.
Setoids appear because we are talking about $(0,1)$-categories (i.e., preordered sets) and there is a structure of a setoid on the set of objects of a $(0,1)$-category. If $C$ and $D$ are preordered sets, then $[C,D]$ is also a preordered set and hence there is a natural equivalence relation on $[C,D]$. Also, note that every $(0,1)$-category is equivalent to a $(0,1)$-category (a poset) in which the underlying setoid is discrete.