In category theory, a branch of mathematics, a subfunctor is a special type of functor which is an analogue of a subset.
Let C be a category, and let F be a functor from C to the category of sets Set. A functor G from C to Set is a subfunctor of F if
This relation is often written as G ⊆ F.
For example, let 1 be the category with a single object and a single arrow. A functor F:1→Set maps the unique object of 1 to some set S and the unique identity arrow of 1 to the identity function 1S on S. A subfunctor G of F maps the unique object of 1 to a subset T of S and maps the unique identity arrow to the identity function 1T on T. Notice that 1T is the restriction of 1S to T. Consequently, subfunctors of F correspond to subsets of S.
Subfunctors in general are like global versions of subsets. For example, if one imagines the objects of some category C to be analogous to the open sets of a topological space, then a functor from C to the category of sets gives a set-valued presheaf on C, that is, it associates sets to the objects of C in a way which is compatible with the arrows of C. A subfunctor then associates a subset to each set, again in a compatible way.
The most important examples of subfunctors are subfunctors of the Hom functor. Let c be an object of the category C, and consider the functor Hom(−, c). This functor takes an object c′ of C and gives back all of the morphisms c′→c. A subfunctor of Hom(−, c) gives back only some of the morphisms. Such a subfunctor is called a sieve, and it is usually used when defining Grothendieck topologies.
Subfunctors are also used in the construction of representable functors on the category of ringed spaces. Let F be a functor from the category of ringed spaces to the category of sets, and let G ⊆ F. Suppose that this inclusion morphism G→F is representable by open immersions, i.e., for any representable functor Hom(−, X) and any morphism Hom(−, X)→F, the fibered product G×FHom(−, X) is a representable functor Hom(−, Y) and the morphism Y→X defined by the Yoneda lemma is an open immersion. Then G is called an open subfunctor of F. If F is covered by representable open subfunctors, then, under certain conditions, it can be shown that F is representable. This is a useful technique for the construction of ringed spaces. It was discovered and exploited heavily by Alexandre Grothendieck, who applied it especially to the case of schemes. For a formal statement and proof, see Grothendieck, Elements de Geometrie Algebrique, vol. 1, 2nd ed., chapter 0, section 4.5.