범주론

Functor

Definition and examples of functors

Posted Updated

Definition and Basic Properties of Functors

If we accept the philosophy of category theory that views the collection of all objects studied in mathematics and the morphisms between them as a category, then we can naturally also consider a category whose objects are the mathematical objects we have defined, that is, categories. To do this, we must first define what a morphism between categories is.

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

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

These satisfy the following conditions:

  • Sending the composite of two morphisms by \(F\) is equal to composing each morphism after sending it by \(F\). That is, \(F(g\circ f)=F(g)\circ F(f)\) holds.
  • For any object \(A\in\obj(\mathcal{A})\), \(F(\id_A)=\id_{F(A)}\) holds.

For any category \(\mathcal{A}\), the assignment sending each object and each morphism to itself is a functor. We call this the identity functor of \(\mathcal{A}\) and denote it by \(\id_\mathcal{A}\).

It is not difficult to show that the composition of functors is 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}\), if we 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 show only the two conditions that a functor must satisfy, and this is clear 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. (§Category, ⁋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\}\) and the preorder relation given by the following relation \(a\leq b\leq c\). Then, from \((I_1,\leq)\), the resulting category \(\mathcal{I}_1\) can be represented by the following diagram:

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

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

That is, for the objects of \(\mathcal{A}\), \(F(a),F(b),F(c)\), and 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

becomes a commutative triangle (in the sense we have considered previously). Conversely, all data satisfying this condition can be regarded as a functor from \(\mathcal{I}_1\) in this manner.

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

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

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)\) is a functor from \(\mathcal{A}\) to \(\Set\). To verify this, it suffices to assign to each \(f:B \rightarrow B'\) a morphism \(\Hom_\mathcal{A}(A,B)\rightarrow\Hom_\mathcal{A}(A,B')\), which we define by

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

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

Contravariant Functors

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

\(\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 \(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})\), a corresponding object \(F(A)\in\obj(\mathcal{B})\),
  • For each \(f\in\Hom_\mathcal{A}(A_1,A_2)\), a corresponding morphism \(F(f)\in\Hom_\mathcal{B}(F(A_2),F(A_1))\)

These satisfy the following conditions:

  • Sending the composite of two morphisms in \(\mathcal{A}\) by \(F\) is equal to sending each morphism by \(F\) and then composing them in reversed direction. That is, \(F(g\circ f)=F(f)\circ F(g)\) holds.
  • For any object \(A\in\obj(\mathcal{A})\), \(F(\id_A)=\id_{F(A)}\) holds.

Because of this definition, the functor in Definition 1 is also called, more precisely, a covariant functor. However, by functor one usually means only a covariant functor, because by the following definition every contravariant functor can be thought of as a certain kind of covariant functor.

Definition 6 Let a category \(\mathcal{A}\) be given. Then 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})\), \(\Hom_{\mathcal{A}^\op}(A,B)=\Hom_{\mathcal{A}}(B,A)\) holds.
  • For any \(A\in\obj(\mathcal{A})\), the identity \(\id_A\) in \(\mathcal{A}^\op\) is given as 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 composite \(g\circ^\op f\) is defined by viewing \(f,g\) as morphisms of \(\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 composite of \(f\) and \(g\) in \(\mathcal{A}^\op\), \(g\circ^\op f\), is defined by

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

Under this definition, to restate Definition 5, a contravariant functor from \(\mathcal{A}\) to \(\mathcal{B}\) is simply 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 often useful.

Definition 7 For three 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}\) is of 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 through 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 viewed the morphism \(g\) in \(\mathcal{A}^\op\) as a morphism \(A_1'\rightarrow A_1\) in \(\mathcal{A}\).

The Category \(\Cat\)

Through this, we can define the category of categories. However, to avoid the problem 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 the 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}\).
  • Composition of morphisms in \(\Cat\) is given by functor composition as in Lemma 2.
  • For any \(\mathcal{A}\in\obj(\Cat)\), the identity at \(\mathcal{A}\) is given by the identity functor \(\id_\mathcal{A}\).

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}\).
  • Composition of morphisms in \(\CAT\) is given by functor composition as in Lemma 2.
  • For any \(\mathcal{A}\in\obj(\CAT)\), the identity at \(\mathcal{A}\) is given by the identity functor \(\id_\mathcal{A}\).

We can verify that these data indeed form categories. On the other hand, since the collection of functors between two small categories is a set, \(\Cat\) is locally small, but \(\CAT\) is not. This is because, while a category \(\mathcal{A}\) whose collection of objects is not a set and has no morphisms other than identities, and a category \(\mathcal{B}\) with two objects and no morphisms other than identities are both locally small, a functor from \(\mathcal{A}\) to \(\mathcal{B}\) corresponds to assigning one of the two objects of \(\mathcal{B}\) to each object of \(\obj(\mathcal{A})\), so their collection is not a set. That is, the locally small assumption made after §Category, ⁋Definition 4 does not apply to \(\CAT\) itself.

Definition 10 For locally small categories \(\mathcal{A}, \mathcal{B}\), a functor \(F:\mathcal{A}\rightarrow \mathcal{B}\) is called 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, \(F\) is said to be full.


References

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


Comments

  • Public repository: a deleted comment stays in the Git history.
  • The password and the email are encrypted and kept in Cloudflare KV alone.

No comments yet.

Leave a comment