6

Many books define a function or map as a "rule" that "assigns" to each element of a set $A$ one and only one element of a set $B$. This was unsatisfying for me given the vagueness of the terms within quotation marks.

Then, I came across a definition of function as a (binary) relation with certain properties. Hence, a function $f:A\rightarrow B$ is a subset of $A\times B$ with certain properties (to ensure that for each element of $A$ there corresponds only one of $B$). This made me happy.

Now, I just started studying category theory, and the definition of a functor confused me: in many different places I saw definitions along these lines: (this is from another post, the one that I refer in the end of the question)

A (covariant) functor $F:\cal C\to D$ of categories sends objects of $\cal C$ to those of $\cal D$, and similarly morphisms in $\cal C$ to morphisms of $\cal D$, such that the following three hold true:

  1. Identities are preserved: $F\,\mathrm{id}_A=\mathrm{id}_{FA}$.
  2. Sources and targets are preserved: If $A\xrightarrow{f}B$, then $FA\xrightarrow{Ff}FB$.
  3. Composition is preserved: If $A\xrightarrow{f}B\xrightarrow{g}C$, then $FA\xrightarrow{Ff}FB\xrightarrow{Fg}FC$.

So it seems that we are back to the mysterious concept of "sending objects to..." Now, I am not very familiar with concepts like class, maybe a functor can me seen as a relation between classes (instead of sets) or something along those lines i.e. can be seen as a function in a generalized sense for classes. I wonder...

(Note: I am aware of the question what is the difference between functor and function?, already asked in here. It is very different from this one, of course, despite the similarities in the title).

soap
  • 2,694
  • 1
    Unless you have a relatively sophisticated understanding of sets, I think you may have rested on your laurels a bit too early. While for finite sets describing functions this way is (reasonably) hunky dory, when you consider infinite sets you need to describe them indirectly somehow; you clearly can't just list out the elements. A key tool is the axiom of specification which lets you make sets like ${x\in A\mid P(x)}$ for a predicate $P$. But what's a predicate but a "rule" for "assigning" truth values? There is an answer to this. I'm just cautioning to not let up on the critical analysis. – Derek Elkins left SE Feb 10 '18 at 15:37
  • @DerekElkins yes, I agree :) – soap Feb 11 '18 at 08:00

3 Answers3

4

The objects of a category can be extremely big, such as the category of all sets. So,in order to aviod paradox(such as Russel's famous one),we can't call the "set" of all sets is a "set", but a class(changing a name means different "things" so the operation of a set can't be completely applied to a class).

In the same vein, we can't call the "map" between two categories a "function", because the function maps set to set. So,we choose another name "functor".

In addition,there'are more stories to be told,because a functor not only maps an object to an object, but also morphisms to morphisms. So, you can think about a functor as a "function"(which indeed is not) between both objects and morphisms.

For your another confusion, in axiomatic set theory, the sets are the most elementary things, and the functions are indeeded defined based on sets.(A function between $A$ and $B$,$f:A \to B$ is defined to be a subset of $A \times B$), and similarly we can also define a "map" between to class. So, you may not concern about "sending objects to" since it can be defined rigorously.

Focus
  • 754
2

If you require that the domain of a function is a set, then a functor $F \colon \mathcal{C} \to \mathcal{D}$ is not a function because a part of its "domain" is $\text{Obj}(\mathcal{C})$ which is not a set, just a class (e.g. $\text{Obj}(\mathbf{Set})$ is the class of all the sets, which is not a set because it is too "large").

If the category $\mathcal{C}$ is small (i.e. if both $\text{Obj}(\mathcal{C})$ and $\text{Hom}(\mathcal{C})$ are actually sets), then you can see the functor $F \colon \mathcal{C} \to \mathcal{D}$ as a special case of function.

  • Unless you identify $\text{Obj}(\mathcal C)$ with a subset of $\text{Hom}(\mathcal C)$, i.e. an "arrows only" presentation of category theory, a functor won't just be a function. It will at the very least be two functions: one for objects and another for arrows. – Derek Elkins left SE Feb 10 '18 at 15:44
  • 1
    @DerekElkins - I don't agree. You can say that the functor $F \colon \mathcal{C} \to \mathcal{D}$ is a function from $\text{Obj}(\mathcal{C}) \cup \text{Hom}(\mathcal{C})$ to $\text{Obj}(\mathcal{D}) \cup \text{Hom}(\mathcal{D})$ (suppose $\mathcal{D}$ small) such that if $C \in \text{Obj}(\mathcal{C})$ then $FC \in \text{Obj}(\mathcal{D})$, if $f \in \text{Hom}(\mathcal{C})$ then $Ff \in \text{Hom}(\mathcal{D})$, and the usual conditions of a functor. It is not elegant or natural, but it is possible. – Taroccoesbrocco Feb 10 '18 at 16:15
  • 2
    Ugh. I have to say that you're right, but you're also definitely right about it not being elegant or natural. Personally, I don't even like glomming the homsets together and view functors as a pair of a (class) function $F:\text{Obj}(\mathcal C)\to\text{Obj}(\mathcal D)$ and an $\text{Obj}(\mathcal C)\times\text{Obj}(\mathcal C)$-indexed family of functions $F_{AB}:\text{Hom}(A,B)\to\text{Hom}(FA,FB)$. – Derek Elkins left SE Feb 10 '18 at 16:24
  • @DerekElkins - I have the same taste as you! – Taroccoesbrocco Feb 10 '18 at 16:28
2

There is not much difference, you just have to talk about classes (as e.g. in NBG) instead of sets (as in ZFC), as categories are usually "too big" to be sets.

Given two classes $C$ and $D$, there exists the class $C\times D$. An appropriate sub-class then can be seen as a "function" $C\to D$. It is just not possible to talk about the set/class of all functions anymore. I think this might be a reason why we distinguish between functions (from sets to classes) and functors (from classes to classes).

M. Winter
  • 29,928