A presheaf on a category $C$ is a functor
from the opposite category $C^{op}$ of $C$ to the category Set of sets. Equivalently this may be thought of as a contravariant functor $F : C \to Set$.
More generally, given any category $S$, an $S$-valued presheaf on $C$ is a functor
Historically, the initial applications of presheaves and sheaves involved cases like $S = CRing$ (the category of commutative rings), $S =$Ab, $S = R$-$Mod$, etc. Later, especially with the development of topos theory, the primary importance of the category of set-valued (pre)sheaves as topos was recognized; these other cases could be considered algebraic objects which live in the topos. This article and the one on sheaf topos recognize these later developments by making the set-valued case the default (in other words, presheaf or sheaf without further qualification is understood to refer to the set-valued case).
The category of presheaves on $C$, usually denoted $Set^{C^{op}}$ or $[C^{op},Set]$, but often abbreviated as $\widehat{C}$, has:
functors $F : C^{op} \to Set$ as objects;
natural transformations between such functors as morphisms.
As such, it is an example of a functor category.
Speaking of functors as presheaves indicates operations that one wants to do apply to these functors, or certain properties that one wants to check.
when $S = Set$, and especially one is interested in the Yoneda embedding of a category $C$ into its presheaf category $[C^{op}, Set]$ for purposes of studying, for instance, limits, colimits, ind-objects, and pro-objects of $C$;
or when there is the structure of a site on $C$, such that it makes sense to ask if a given presheaf is actually a sheaf.
One generally useful way to think of presheaves is in the sense of space and quantity.
In the case where $S = Set$ and $C$ is small, an important general principle is that the presheaf category $[C^{op},Set]$ is the free cocompletion of $C$; see Yoneda extension. Intuitively, it is formed by taking $C$ and ‘freely throwing in small colimits’. The category $C$ is contained in $[C^{op},Set]$ via the Yoneda embedding
The Yoneda embedding sends each object $c \in C$ to the presheaf
Presheaves of this form, or isomorphic to those of this form, are called representable; among their properties, representable presheaves always turn colimits into limits, in the sense that a representable functor from $C^{op}$ to $Set$ turns colimits in $C$ (i.e., limits in $C^{op}$) into limits in $Set$ (i.e., colimits in $Set^{op}$). In general, such continuity is a necessary but not sufficient criterion for representability; however, nicely enough, it is sufficient when $C$ itself is a presheaf category. To see this, suppose $K$ is such a presheaf on $C = [D^{op}, Set]$, and let $G = K Y$, a presheaf on $D$. By the Yoneda lemma, we have a natural isomorphism between $[D^{op}, Set](Y(-), G)$ and $K Y(-)$. But by the free cocompletion property of the Yoneda embedding, a colimit-preserving functor on presheaves is entirely determined by its precomposition with $Y$; accordingly, our isomorphism must extend to an identification of $[C^{op}, Set](-, G)$ with $K(-)$, thus establishing the representability of $K$.
Any category of presheaves is complete and cocomplete, with both limits and colimits being computed pointwise. That is, to compute the limit or colimit of a diagram $F : D \to Set^{C^op}$, we think of it as a functor $F: D \times C^{op} \to Set$ and take the limit or colimit in the $D$ variable.
Every presheaf is a colimit of representable presheaves.
An elegant way to express this colimit for a presheaf $F : C^{op} \to Set$ is in terms of the coend identity
which follows by Yoneda reduction. See also co-Yoneda lemma.
More concretely: let $Y : C \to [C^{op}, Set]$ denote the Yoneda embedding and let $C_F := Y/F$ be the corresponding comma category, the category of elements of $F$:
and let $p : C_F \to C$ the canonical forgetful functor. Then the colimit over representables expression $F$ is
This is often written with some convenient abuse of notation as
Notice that these formulas can also be understood as those for the left Kan extension (see there) of $F$ along the identity functor.
Notice that for every $B \in [C^{op}, Set]$ and using the property of the hom-functor we have
by the Yoneda lemma.
By the definition of limit we have that
so for each natural transformation $\alpha \in Hom_{[C_F^{op}, Set]}(pt,B)$ and each object $h: Y(V)\to F\in C_F$, $\alpha_h$ is a map $\{*\}\to B(V)$, that is, it is an element of $B(V)$. However, by Yoneda, we know that each object $h:Y(V)\to F\in C_F$ specifies a unique element $h\in F(V)$. Then rephrasing this, $\alpha$ specifies a function $F(V)\to B(V)$. The naturality of this assignment is guaranteed by the naturality of the map $\alpha$. Then $\alpha$ induces a natural transformation $k^\alpha:F\to B$. It’s easy to check that $k$ defines an isomorphism:
Since this holds for all $B$, the claim follows, again using the Yoneda lemma.
Examples for presheaves are abundant. Here is a non-representative selection of some examples.
For $C$ a locally small category, every object $c \in C$ gives rise to the representable presheaf $Hom_C(-, c) : C^{op} \to Set$.
More generally, for $i : C \hookrightarrow D$ a subcategory of a locally small category $D$, every object $d \in D$ gives rise to the presheaf
Let’s spell this out in more detail: given a mophism $\phi : V \to U$ in $C$, we can take any morphism $f : i(U) \to X$ in $Hom_{D}(U,X)$ and turn it into a morphism $V \stackrel{f}{\to} U \stackrel{\phi}{\to} X$ in $Hom_{D}(i(V),X)$. This determines a map of set
So we have a functorial assignment of the form
Of course $i$ here could be any functor whatsoever. Asking if such a presheaf is representable is asking for a right adjoint functor of $i$.
A simplicial set is a presheaf on the simplex category
A globular set is a presheaf on the globe category.
A cubical set is a presheaf on the cube category.
A diffeological space is a concrete presheaf on CartSp.
An important class of presheaves is those on a category of open subsets $Op(X)$ of a topological space or smooth manifold $X$.
Traditional standard examples include: the presheaf of smooth functions on $X$, that assigns to each $U \subset X$ the set $C^\infty(C,\mathbb{R})$ of smooth functions and to each unclusion $V \subset U$ the corresponding restriction operation of functions.
… etc. pp.
presheaf