# Functors between sets, posets, and groups

I found the following statements in some lecture notes in category theory:

A functor between sets $$S$$ and $$T$$ is a function from $$S$$ to $$T$$

A functor between two groups $$G$$ and $$H$$ is a group homomorphism from $$G$$ to $$H$$

A functor between two posets $$P$$ and $$Q$$ is a monotone function from $$P$$ to $$Q$$

1. Consider the second statement. A group was defined as a category with one object in which every arrow is an isomorphism. Then what is the definition of a group homomorphism in this setting? What exactly do I need to check to establish the claim? Here is what I have. Suppose $$G$$ is the category with object $$\ast$$ and $$H$$ is a category with object $$\clubsuit$$ and let $$\alpha:G\to H$$ be a functor. By the definition of a functor, $$\alpha(\ast)=\clubsuit$$, and if $$g:\ast\to \ast$$ is an arrow in $$G$$, then $$\alpha(g):\clubsuit\to \clubsuit$$ is an arrow in $$H$$. The remaining conditions on $$\alpha$$ are: $$\alpha(g_1\circ g_2)=\alpha(g_1)\circ \alpha(g_2)$$ and $$\alpha(id_\ast)=id_\clubsuit$$. But without knowing the definition of a group homomorphism when a group is defined as a category, I don't know how to proceed.

2. A poset can also be considered as a skeletal preorder. (A preorder is a category in which there is at most one arrow between any two objects.) In this definition, what is the definition of a monotone map between such categories?

3. A set is a category where the objects are the elements of a set and the only arrows are the identity arrows. What is a function between such categories?

• You can view a poset $P$ as a category, in which the objects are the elements of the set, and $P(x,y)$ is (i) empty if $x\not\leq y$; and (ii) consists of exactly one arrow if $x\leq y$ (when $x=y$, you get the “identity” arrow). If you view posets $P$ and $Q$ as categories, then a function $F\colon P\to Q$ would be a map that sends $Ob(P)$ to $Ob(Q)$ (that is, the elements of $P$ to the elements of $Q$); if $x\leq y$, then the functor maps the unique function $P(x,y)$ to the unique function $Q(F(x),F(y))$, which means you need $F(x)\leq F(y)$. (Cont) – Arturo Magidin Feb 3 at 20:42
• Thus, $F$ is “really” a monotone function from $P$ to $Q$. Conversely a monotone function from $P$ to $Q$ defines a functof from $P$-as-a-category to $Q$-as-a-category. Groups can be viewed as categories with one object, where each element of the group corresponds to an invertible morphism from the object to itself. Verify that defining functors between $G$-as-a-category and $H$-as-a-category is equivalent to defining a group homomorphism from $G$ to $H$. A set is a category in which the objects are the elements, and you have an identity map from each to itself and no more. Do it for them. – Arturo Magidin Feb 3 at 20:44
• @ArturoMagidin "if $x\le y$, then the functor maps the unique ..." Why is $P(x,y)$ a function (and a unique function)? I thought from the very first line of your comment that $P(x,y)$ is the set of arrows from $x$ to $y$. Similarly, what is $Q(F(x),F(y))$ then? Why is it a function? And the last part, "you need $F(x)\le F(y)$" -- why do I need it? Are you defining a monotone function or are you proving something already? – user634426 Feb 3 at 21:07
• $P(x,y)$ is a unique function by definition. We define the category associated to $P$ as a category where the arrow set is either empty or a singleton; empty is $x\not\leq y$, and a singleton when $x\leq y$. $Q(F(x),F(y))$ is either a singleton, if $F(x)\leq_Q F(y)$, or empty, if $F(x)\not\leq_Q F(y)$. By definition. – Arturo Magidin Feb 3 at 22:11
• I am explaining the comment. If you associate a category to a poset this way, then defining a functor between the posets-as-categories is the same thing as defining a monotone function between the posets. Similarly, if you associate a one-object category with all arrows invertible to a group, then a functor between the groups-as-categories is the same thing as a group homomorphism between the corresponding groups. – Arturo Magidin Feb 3 at 22:13

A category $$\mathbf{C}$$ is a collection of objects, $$Ob(\mathbf{C})$$, and for each $$x,y\in Ob(\mathbf{C})$$, a collection of arrows $$\mathbf{C}(x,y)$$ satisfying a number of conditions (existence of identity arrows, a partially defined associative operation of composition, etc).

A functor $$\mathcal{F}$$ between two categories $$\mathbf{C}$$ and $$\mathbf{D}$$ is a function $$\mathcal{F}\colon Ob(\mathbf{C})\to Ob(\mathbf{D})$$, and for each $$x,y\in Ob(\mathbf{C})$$ a function $$\mathcal{F}\colon\mathbf{C}(x,y)\to \mathbf{D}(\mathcal{F}(x),\mathcal{F}(y))$$ that maps the identity arrows to the identity arrows and respects composition (so $$\mathcal{F}(g\circ f) = \mathcal{F}(g)\circ\mathcal{F}(h)$$).

1. Given a set $$S$$ (in the usual sense of “set”), we can define a category associated to set $$S$$, call it $$\mathbf{S}$$, in which $$Ob(\mathbf{S}) = S$$ (so the objects of the category are the elements of $$S$$), and where the arrow collection is defined by letting $$\mathbf{S}(x,y)=\varnothing$$ if $$x\neq y$$, and $$\mathbf{S}(x,x) = \{\mathrm{id}_x\}$$.

Now suppose that $$S$$ and $$T$$ are sets. If $$f\colon S\to T$$ is a function as we usually understand it, then we can use $$f$$ to define a functor between the categories $$\mathbf{S}$$ and $$\mathbf{T}$$ associated to $$S$$ and $$T$$: use $$f$$ to maps $$Ob(\mathbf{S})$$ to $$Ob(\mathbf{T})$$; when $$x\neq y$$, the empty map sends $$\mathbf{S}(x,y)$$ to $$\mathbf{T}(f(x),f(y))$$; and we map the identity arrow $$\mathrm{id}_x\in \mathbf{S}(x,x)$$ to the identity arrow in $$\mathbf{T}(f(x),f(x))$$. Verify that this is a functor.

Conversely, suppose we have a functor $$\mathcal{F}$$ from the category $$\mathbf{S}$$ associated to $$S$$ to the category $$\mathbf{T}$$ associated to $$T$$. This means a function $$\mathcal{F}\colon Ob(\mathbf{S})\to Ob(\mathbf{T})$$ (which amounts to a function from $$S$$ to $$T$$), and a map of arrow sets; since the arrow sets are either empty or the identity, the part on arrows is obvious.

Thus, to every set function $$f\colon S\to T$$ we get a functor $$\mathcal{F}\colon\mathbf{S}\to\mathbf{T}$$, and to every functor $$\mathcal{F}\colon\mathbf{S}\to\mathbf{T}$$ you get a set function $$\mathcal{F}\colon S=Ob(\mathbf{S}) \to Ob(\mathbf{T})=T$$. Verify that in fact these two associations are inverses of each other: if you start with a function, get the functor from it, and then the function from the functor, you get back the original function. If you start with a functor, get the function from it, and then the functor from the function, you get the original functor. Thus, the functors between $$\mathbf{S}$$ and $$\mathbf{T}$$ are really the same thing as the set maps between $$S$$ and $$T$$.

2. Similarly for groups-as-a-category. If $$G$$ is a group, you associate to it a category $$\mathbf{G}$$ whose object set is a single element $$\star$$, and whose only arrow set, $$\mathbf{G}(\star,\star)$$ has one arrow for each element of $$G$$, with composition given by multiplication in $$G$$: if $$a_g,a_h$$ are arrows, corresponding to the elements $$g$$ and $$h$$ in $$G$$, then the composition $$a_g\circ a_h$$ is the arrow corresponding to the element $$gh$$, that is, $$a_g\circ a_h = a_{gh}$$. Here, $$a_e=\mathrm{id}_{\star}$$.

If $$f\colon G\to H$$ is a group homomorphism, you get a functor between the categories $$\mathbf{G}$$ and $$\mathbf{H}$$ by mapping the obect of $$\mathbf{G}$$ to the object of $$\mathbf{H}$$, and mapping the arrow $$a_g$$ in $$\mathbf{G}$$ to the arrow $$a_{f(g)}$$ of $$\mathbf{H}$$. Verify that this association respects composition, so that you get a functor from $$\mathbf{G}$$ to $$\mathbf{H}$$.

Conversely, given a functor $$\mathcal{F}\colon\mathbf{G}\to\mathbf{H}$$, you get a map from the arrow of $$\mathbf{G}$$ to the arrows of $$\mathbf{H}$$, which must satisfy $$\mathcal{F}(a_{gh}) = \mathcal{F}(a_g\circ a_h) = \mathcal{F}(a_g)\circ\mathcal{F}(a_h)$$. Suppose that this map sends the arrow $$a_g$$ to an arrow in $$\mathbf{H}$$, which corresponds to some element of $$H$$; call this element $$f(g)$$, so that we get a (set theoretic) function from $$G$$ ot $$H$$. Verify that this function $$f\colon G\to H$$ defined by $$f$$ is in fact a group morphism.

Finally, verify that these assignments (morphism to functor, functor to morphism) are inverses to each other, so that defining functors between the categories $$\mathbf{G}$$ and $$\mathbf{H}$$ amounts to the same thing as defining a group homomorphism from $$G$$ to $$H$$.

3. If $$P$$ is a poset, then we can define a category $$\mathbf{P}$$ associated to $$P$$ by letting $$Ob(\mathbf{P}) = P$$, and for $$x,y\in P$$, letting $$\mathbf{P}(x,y)$$ be the empty set if $$x\not\leq_P y$$, and letting $$\mathbf{P}(x,y)$$ be a singleton if $$x\leq y$$. With this definition, every monotone function $$f\colon P\to Q$$ of posets defines a functor between the categories $$\mathbf{P}$$ and $$\mathbf{Q}$$: you use $$f$$ to define the map between objects of $$\mathbf{P}$$ and $$\mathbf{Q}$$. When $$x\not\leq_P y$$, then you need a map from the empty set $$\mathbf{P}(x,y)$$ to the set $$\mathbf{Q}(f(x),f(y))$$, which is the empty map. When $$x\leq_P y$$, since $$f$$ is monotone we have $$f(x)\leq_Q f(y)$$, so you need a map from the singleton set $$\mathbf{P}(x,y)$$ to the singleton set $$\mathbf{Q}(f(x),f(y))$$, which is just the only possible function: sends the single element of the first to the single element of the latter.

And every functor $$\mathcal{F}\colon\mathbf{P}\to\mathbf{Q}$$ defines a function between $$P$$ and $$Q$$ (by looking at what it does to objects); you need to verify that this function is monotone. This will follow from the fact that $$\mathcal{F}$$ is a functor: if $$x\leq_P y$$, then you must have a map from the singleton set $$\mathbf{P}(x,y)$$ to the set $$\mathbf{Q}(\mathcal{F}(x),\mathcal{F}(y))$$. Therefore, the latter cannot be empty, which means that we must have $$\mathcal{F}(x)\leq_Q\mathcal{F}(y)$$. Thus, the function is in fact monotone: if $$x\leq_P y$$, then $$\mathcal{F}(x)\leq_Q \mathcal{F}(y)$$.

These assignments (monotone function to functor, functor to monotone function) are inverses of each other, so that functors between $$\mathbf{P}$$ and $$\mathbf{Q}$$ are essentially the same thing as monotone functions between $$P$$ and $$Q$$.

That is what those comments are saying.

The point is that these three statements cannot be read literally. Classically, sets, groups and posets are not categories. They have their own definitions in the framework of set theory, which are different from those you can find in introductory texts on category theory.

The standard meaning of the cliché "[things of the type $$X$$] are [things of the type $$Y$$]" in category theory is that the category of all things of the type $$X$$ and the category of all things of the type $$Y$$ are equivalent. Therefore, in order to check these statements, one should construct equivalences between some categories.

Example 1. The category of sets and mappings (functions) between them $$\mathbf{Set}$$ is equivalent to the category of discrete categories and functors between them $$\mathbf{DiskCat}$$, hence we can say "sets are discrete categories", "mappings (functions) are functors between discrete categories".

Example 2. The category of groups and homomorphisms between them $$\mathbf{Grp}$$ is equivalent to the category of groupoids with one object (groupoid=category, where all morphisms are isomorphisms) and functors between them $$\mathbf{OneObjGrpd}$$, hence we can say "groups are groupoids with one object", "group homomorphisms are functors between groupoids with one object". See, for example, my answer about the same construction for monoids (if we consider the category of groupoids with fixed single object, then it will be even isomorphic to $$\mathbf{Grp}$$ with set-theoretic (universal-algebraic) definition of groups and group homomorphisms).

Example 3. The category of posets and monotonic mappings between them $$\mathbf{Poset}$$ is equivalent to the category of skeletal preorders and functors between them $$\mathbf{SkPreord}$$, hence we can say "posets are skeletal preorders", "monotonic mappings are functors between skeletal preorders". See, for example, the part of description of the same construction for prosets in another answer.

• But the claims I gave are stated after the definitions of those notions (sets, groups, posets) as categories. And the notion of equivalence of categories is given after this claim. So I don't think that it's supposed to mean the equivalence of categories. – user634426 Feb 3 at 20:43
• Yes it is; the thing is given a category that is a group $G$, you can find an actual group $G$; and the statement is that a functor between two categories that are groups corresponds to a group morphisms between the actual groups – Max Feb 3 at 20:49
• @user634426 To be pedantic, the definitions of sets, groups and posets you mentioned are not actually definitions of sets, groups and posets. They are definitions of dicrete categories, groupoids with one object and skeletal preorders. Standard definitions of sets, groups and posets are usually supposed to be known even in introductory category-theoretic texts. As for the definition of equivalence of categories: probably the logical sequence of claims in lecture notes you mentioned is not optimal - in this case the authors may want reader to read these parts intuitively. – Oskar Feb 3 at 20:54