The Stacks project

4.3 Opposite Categories and the Yoneda Lemma

Definition 4.3.1. Given a category $\mathcal{C}$ the opposite category $\mathcal{C}^{opp}$ is the category with the same objects as $\mathcal{C}$ but all morphisms reversed.

In other words $\mathop{\mathrm{Mor}}\nolimits _{\mathcal{C}^{opp}}(x, y) = \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(y, x)$. Composition in $\mathcal{C}^{opp}$ is the same as in $\mathcal{C}$ except backwards: if $\phi : y \to z$ and $\psi : x \to y$ are morphisms in $\mathcal{C}^{opp}$, in other words arrows $z \to y$ and $y \to x$ in $\mathcal{C}$, then $\phi \circ ^{opp} \psi $ is the morphism $x \to z$ of $\mathcal{C}^{opp}$ which corresponds to the composition $z \to y \to x$ in $\mathcal{C}$.

Definition 4.3.2. Let $\mathcal{C}$, $\mathcal{S}$ be categories. A contravariant functor $F$ from $\mathcal{C}$ to $\mathcal{S}$ is a functor $\mathcal{C}^{opp}\to \mathcal{S}$.

Concretely, a contravariant functor $F$ is given by a map $F : \mathop{\mathrm{Ob}}\nolimits (\mathcal{C}) \to \mathop{\mathrm{Ob}}\nolimits (\mathcal{S})$ and for every morphism $\psi : x \to y$ in $\mathcal{C}$ a morphism $F(\psi ) : F(y) \to F(x)$. These should satisfy the property that, given another morphism $\phi : y \to z$, we have $F(\phi \circ \psi ) = F(\psi ) \circ F(\phi )$ as morphisms $F(z) \to F(x)$. (Note the reverse of order.)

Definition 4.3.3. Let $\mathcal{C}$ be a category.

  1. A presheaf of sets on $\mathcal{C}$ or simply a presheaf is a contravariant functor $F$ from $\mathcal{C}$ to $\textit{Sets}$.

  2. The category of presheaves is denoted $\textit{PSh}(\mathcal{C})$.

Of course the category of presheaves is a proper class.

Example 4.3.4. Functor of points. For any $U\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ there is a contravariant functor

\[ \begin{matrix} h_ U & : & \mathcal{C} & \longrightarrow & \textit{Sets} \\ & & X & \longmapsto & \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(X, U) \end{matrix} \]

which takes an object $X$ to the set $\mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(X, U)$. In other words $h_ U$ is a presheaf. Given a morphism $f : X\to Y$ the corresponding map $h_ U(f) : \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(Y, U)\to \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(X, U)$ takes $\phi $ to $\phi \circ f$. We will always denote this presheaf $h_ U : \mathcal{C}^{opp} \to \textit{Sets}$. It is called the representable presheaf associated to $U$. If $\mathcal{C}$ is the category of schemes this functor is sometimes referred to as the functor of points of $U$.

Note that given a morphism $\phi : U \to V$ in $\mathcal{C}$ we get a corresponding natural transformation of functors $h(\phi ) : h_ U \to h_ V$ defined by composing with the morphism $U \to V$. This turns composition of morphisms in $\mathcal{C}$ into composition of transformations of functors. In other words we get a functor

\[ h : \mathcal{C} \longrightarrow \textit{PSh}(\mathcal{C}) \]

Note that the target is a “big” category, see Remark 4.2.2. On the other hand, $h$ is an actual mathematical object (i.e. a set), compare Remark 4.2.11.

reference

Lemma 4.3.5 (Yoneda lemma). Let $U, V \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$. Given any morphism of functors $s : h_ U \to h_ V$ there is a unique morphism $\phi : U \to V$ such that $h(\phi ) = s$. In other words the functor $h$ is fully faithful. More generally, given any contravariant functor $F$ and any object $U$ of $\mathcal{C}$ we have a natural bijection

\[ \mathop{\mathrm{Mor}}\nolimits _{\textit{PSh}(\mathcal{C})}(h_ U, F) \longrightarrow F(U), \quad s \longmapsto s_ U(\text{id}_ U). \]

Proof. For the first statement, just take $\phi = s_ U(\text{id}_ U) \in \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(U, V)$. For the second statement, given $\xi \in F(U)$ define $s$ by $s_ V : h_ U(V) \to F(V)$ by sending the element $f : V \to U$ of $h_ U(V) = \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(V, U)$ to $F(f)(\xi )$. $\square$

Definition 4.3.6. A contravariant functor $F : \mathcal{C}\to \textit{Sets}$ is said to be representable if it is isomorphic to the functor of points $h_ U$ for some object $U$ of $\mathcal{C}$.

Let $\mathcal{C}$ be a category and let $F : \mathcal{C}^{opp} \to \textit{Sets}$ be a representable functor. Choose an object $U$ of $\mathcal{C}$ and an isomorphism $s : h_ U \to F$. The Yoneda lemma guarantees that the pair $(U, s)$ is unique up to unique isomorphism. The object $U$ is called an object representing $F$. By the Yoneda lemma the transformation $s$ corresponds to a unique element $\xi \in F(U)$. This element is called the universal object. It has the property that for $V \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ the map

\[ \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(V, U) \longrightarrow F(V),\quad (f : V \to U) \longmapsto F(f)(\xi ) \]

is a bijection. Thus $\xi $ is universal in the sense that every element of $F(V)$ is equal to the image of $\xi $ via $F(f)$ for a unique morphism $f : V \to U$ in $\mathcal{C}$.


Comments (13)

Comment #1325 by jojo on

This is real nipticking and maybe should be ignored.

The second phrase after Definition 4.3.1 i.e. "Composition in C^{opp}..." is (in my opinion) rather confusing, especially the last equality (indeed isn't defined). It might be better to either say that composition in the opposite category is done in the obvious way or to define things a little bit more carefully.

Comment #1347 by on

Nitpicky indeed! Not sure you are going to like my attempt at improvement which you can find here.

Comment #2149 by Maik Pickl on

Just want to report a very minor typo. In the second to last line it reads "Thus is universal in the sens...", there sens should be sense.

Comment #2377 by Anoop Singh on

In the proof of the Lemma 4.3.5 (Yoneda Lemma ), the last line it is written that but this is a typo i guess, it should be .

Comment #2380 by on

@#2377 Thanks! This was already pointed out by somebody over email and was fixed here.

Comment #4960 by on

The notation is never defined formally. Is this to be inferred through context?

Comment #5213 by on

@#4960: Well, it is defined later in Section 4.28. But we don't want to refer forward so I have removed the two instances where the notation was used before Section 4.28. Fixed here.

Comment #5811 by Zeyn Sahilliogullari on

I think that "universal object" should be replaced by "universal element", since:

  1. It seems this is the standard language, for example: https://ncatlab.org/nlab/show/universal+element
  2. ξ is an element of a set, it is not clear to me which category it is an object of.

Comment #5812 by on

Often the way this comes up in algebraic geometry is that is the category of schemes and sends a scheme to the set of isomorphism classes of certain kinds of geometric objects over and the terminology is chosen to make you think of this. For example might classify abelian schemes of relative dimension over with a polarization of degree and a full level structure. Then is representable, the object representing is the moduli scheme , and the universal object is the universal polarized abelian scheme with full level structure over .

Comment #6240 by Yuto Masamura on

typo in the next paragraph of Exaple 4.3.4 (maybe too small one to point out): I think we should add a period after "".

Comment #8427 by on

Maybe one could add to this section the definition of subfunctor (given in 26.15.3) stated in a general setting and also add the following remark: Let be a category and let be a morphism in . Suppose is a functor with a representation . For an object , define to be the image of the composite . Then is a subfunctor of and the natural transformation is an isomorphism if and only if is a monomorphism. Moreover, if these conditions hold and is the universal object for , then is the universal object for .


Post a comment

Your email address will not be published. Required fields are marked.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).

Unfortunately JavaScript is disabled in your browser, so the comment preview function will not work.

All contributions are licensed under the GNU Free Documentation License.




In order to prevent bots from posting comments, we would like you to prove that you are human. You can do this by filling in the name of the current tag in the following input field. As a reminder, this is tag 001L. Beware of the difference between the letter 'O' and the digit '0'.