범주론

The definition and examples of functors

This post was machine-translated from the Korean original by Marvin (via Kimi). It may contain errors or awkward phrasing — the Korean original is the source of truth.

Definition and Basic Properties of Functors

If we adopt the philosophy of category theory, which regards the collection of all objects studied in mathematics together with the morphisms between them as a category, then it is natural to consider a category whose objects are these mathematical objects—that is, categories themselves. To do so, we must first define what a morphism between categories is.

Definition 1 A functor \(F:\mathcal{A}\rightarrow\mathcal{B}\) between two categories \(\mathcal{A},\mathcal{B}\) consists of the following data.

  • For each \(A\in\obj(\mathcal{A})\), an object \(F(A)\in\obj(\mathcal{B})\),
  • For each \(f\in\Hom_\mathcal{A}(A_1,A_2)\), a morphism \(F(f)\in\Hom_\mathcal{B}(F(A_1),F(A_2))\)

These satisfy the following conditions.

  • The image under \(F\) of the composition of two morphisms equals the composition of their images under \(F\). That is, \(F(g\circ f)=F(g)\circ F(f)\).
  • For any object \(A\in\obj(\mathcal{A})\), we have \(F(\id_A)=\id_{F(A)}\).

It is not difficult to show that the composition of functors is again a functor.

Lemma 2 For any categories \(\mathcal{A},\mathcal{B},\mathcal{C}\) and two functors \(F:\mathcal{A}\rightarrow \mathcal{B}, G:\mathcal{B}\rightarrow \mathcal{C}\), define \(G\circ F:\mathcal{A} \rightarrow \mathcal{C}\) by

  • For any \(A\in \mathcal{A}\), \((G\circ F)(A)=G(F(A))\),
  • For any \(f\in\Hom_\mathcal{A}(A_1,A_2)\), \((G\circ F)(f)=G(F(f))\)

Then \(G\circ F\) is a functor.

Proof

It suffices to verify the two conditions that a functor must satisfy, and these follow immediately from

\[(G\circ F)(g\circ f)=G(F(g\circ f))=G(F(g)\circ F(f))=G(F(g))\circ G(F(f))=(G\circ F)(g)\circ(G\circ F)(f)\]

and

\[(G\circ F)(\id_A)=G(F(\id_A))=G(\id_{F(A)})=\id_{G(F(A))}=\id_{(G\circ F)(A)}\]

.

Examples of Functors

We have seen that any preordered set can be viewed as a category. (§Categories, ⁋Example 3) The following example offers a new perspective on this. For a fixed category \(\mathcal{I}\) and any category \(\mathcal{A}\), we call a functor \(F:\mathcal{I}\rightarrow \mathcal{A}\) an \(\mathcal{I}\)-shaped diagram in \(\mathcal{A}\).

Example 3 Consider the set \(I_1=\{a,b,c\}\) equipped with the preorder relation given by \(a\leq b\leq c\). Then the category \(\mathcal{I}_1\) obtained from \((I_1,\leq)\) is represented by the following diagram

commuting_triangle

Now a functor \(F:\mathcal{I}_1 \rightarrow \mathcal{A}\) satisfies the condition

\[F(\beta)\circ F(\alpha)=F(\beta\circ\alpha)=F(\gamma)\]

That is, for the objects \(F(a),F(b),F(c)\) of \(\mathcal{A}\) and the morphisms \(F(\alpha):F(a) \rightarrow F(b)\), \(F(\beta):F(b) \rightarrow F(c)\), \(F(\gamma): F(a) \rightarrow F(c)\) between them, the following diagram

commuting_triangle_F

forms a commutative triangle (in the sense we have been considering). Conversely, any data satisfying these conditions can be realized as a functor from \(\mathcal{I}_1\) in this manner.

Similarly, if we equip the set \(I_2=\{a,b,c,d\}\) with the preorder relations \(a\leq b,c\) and \(b,c\leq d\), then a functor \(\mathcal{I}_2 \rightarrow \mathcal{A}\) becomes a commutative square.

To maintain this intuition, when we think of \(\mathcal{I}\rightarrow \mathcal{A}\) as a diagram, we denote the objects of \(\mathcal{I}\) by \(i,j,k,\dots\)

Example 4 Fix a locally small category \(\mathcal{A}\) and an object \(A\in\obj(\mathcal{A})\). Then assigning to each \(B\in\obj(\mathcal{A})\) the set \(\Hom_\mathcal{A}(A,B)\) defines a functor from \(\mathcal{A}\) to \(\Set\). To verify this, we need only assign to each \(f:B \rightarrow B'\) a morphism \(\Hom_\mathcal{A}(A,B)\rightarrow\Hom_\mathcal{A}(A,B')\), which we define as

\[\Hom_\mathcal{A}(A, f):\Hom_\mathcal{A}(A,B)\rightarrow\Hom_\mathcal{A}(A,B');\qquad \phi\mapsto f\circ\phi\]

covariant hom

Then we can verify that the assignment \(\Hom_\mathcal{A}(A,-)\) given by this data is indeed a functor.

Contravariant Functors

We can attempt to define a functor \(\Hom_\mathcal{A}(-,A)\) in the same manner as Example 4. However, in this case, as can be seen from the following diagram

contravariant Hom

\(\Hom_\mathcal{A}(f,A)\) becomes a morphism from \(\Hom_\mathcal{A}(B',A)\) to \(\Hom_\mathcal{A}(B,A)\).

Definition 5 A contravariant functor between two categories \(\mathcal{A},\mathcal{B}\) consists of the following data.

  • For each \(A\in\obj(\mathcal{A})\), an object \(F(A)\in\obj(\mathcal{B})\),
  • For each \(f\in\Hom_\mathcal{A}(A_1,A_2)\), a morphism \(F(f)\in\Hom_\mathcal{B}(F(A_2),F(A_1))\)

These satisfy the following conditions.

  • The image under \(F\) of the composition of two morphisms in \(\mathcal{A}\) equals the composition of their images under \(F\) in the reversed order. That is, \(F(g\circ f)=F(f)\circ F(g)\).
  • For any object \(A\in\obj(\mathcal{A})\), we have \(F(\id_A)=\id_{F(A)}\).

Because of this definition, functors as in Definition 1 are sometimes more precisely called covariant functors. However, the term functor usually refers only to covariant functors, because by the following definition every contravariant functor can be regarded as a certain kind of covariant functor.

Definition 6 Given a category \(\mathcal{A}\), the opposite category \(\mathcal{A}^\op\) of \(\mathcal{A}\) consists of the following data.

  • \(\obj(\mathcal{A}^\op)=\obj(\mathcal{A})\).
  • For any \(A,B\in \obj(\mathcal{A}^\op)=\obj(\mathcal{A})\), we have \(\Hom_{\mathcal{A}^\op}(A,B)=\Hom_{\mathcal{A}}(B,A)\).
  • For any \(A\in\obj(\mathcal{A})\), the identity \(\id_A\) in \(\mathcal{A}^\op\) is taken to be the same as the identity in \(\mathcal{A}\).
  • For any \(f\in\Hom_{\mathcal{A}^\op}(A,B),g\in\Hom_{\mathcal{A}^\op}(B,C)\), their composition \(g\circ^\op f\) is defined by viewing \(f,g\) as morphisms in \(\mathcal{A}\) and then composing them in \(\mathcal{A}\).
    That is, for \(f\in \Hom_\mathcal{A}(B,A),g\in\Hom_\mathcal{A}(C,B)\), the composition \(g\circ^\op f\) of \(f\) and \(g\) in \(\mathcal{A}^\op\) is defined as

    \[g\circ^\op f= f\circ g\in\Hom_{\mathcal{A}}(C,A)=\Hom_{\mathcal{A}^\op}(A,C)\]

Under this definition, we may restate Definition 5 as follows: a contravariant functor from \(\mathcal{A}\) to \(\mathcal{B}\) is simply nothing more than a (covariant) functor \(\mathcal{A}^\op \rightarrow \mathcal{B}\).

Bifunctor

The following definition consists only of things we already know, but giving it a name is occasionally useful.

Definition 7 For categories \(\mathcal{A}, \mathcal{B}, \mathcal{C}\), a functor \(\mathcal{A}\times \mathcal{B}\rightarrow \mathcal{C}\) is called a bifunctor.

Example 8 For any (locally small) category \(\mathcal{A}\), \(\Hom_\mathcal{A}(-,-): \mathcal{A}^\op\times \mathcal{A}\rightarrow \Set\) is a bifunctor.

To verify this, it suffices to check functoriality. By definition, a morphism in \(\mathcal{A}^\op\times \mathcal{A}\) has the form

\[(g,h):(A_1,A_2) \rightarrow (A_1',A_2');\qquad g\in \Hom_{\mathcal{A}^\op}(A_1,A_1'),\quad h\in \Hom_\mathcal{A}(A_2,A_2')\]

and via the bifunctor \(\Hom_\mathcal{A}(-,-)\) this morphism is sent to the morphism

\[\Hom_\mathcal{A}(g,h):\Hom_\mathcal{A}(A_1,A_2) \rightarrow \Hom_\mathcal{A}(A_1',A_2');\qquad f\mapsto h\circ f\circ g\]

. Here we have regarded the morphism \(g\) in \(\mathcal{A}^\op\) as a morphism \(A_1'\rightarrow A_1\) in \(\mathcal{A}\).

The Category \(\Cat\)

This allows us to define a category of categories. However, to avoid problems related to Russell’s paradox mentioned earlier, we generally consider the category of all small categories or the category of all locally small categories, rather than a category of all categories.

Definition 9 The category \(\Cat\) consists of the following data.

  • The objects of \(\Cat\) are small categories.
  • For any \(\mathcal{A},\mathcal{B}\in\obj(\Cat)\), \(\Hom_\Cat(\mathcal{A},\mathcal{B})\) is the collection of functors from \(\mathcal{A}\) to \(\mathcal{B}\).

Similarly, the category \(\CAT\) consists of the following data.

  • The objects of \(\CAT\) are locally small categories.
  • For any \(\mathcal{A},\mathcal{B}\in\obj(\CAT)\), \(\Hom_\CAT(\mathcal{A},\mathcal{B})\) is the collection of functors from \(\mathcal{A}\) to \(\mathcal{B}\).

We can verify that these data indeed form a category.

Definition 10 For locally small categories \(\mathcal{A}, \mathcal{B}\), a functor \(F:\mathcal{A}\rightarrow \mathcal{B}\) is faithful if for any \(A_1,A_2\in\obj(\mathcal{A})\), the map

\[\Hom_\mathcal{A}(A_1,A_2)\rightarrow\Hom_{\mathcal{B}}(F(A_1),F(A_2));\qquad f\mapsto F(f)\]

is injective. If this map is surjective, then \(F\) is called full.


References

[Rie] Emily Riehl. Category Theory in Context. Dover Publications, 2016.


댓글남기기