Functors between groupoids I want to prove that given two groupoids $G$ and $H$, a "functor candidate" $F:G \to H$ between them needs only to preserve compositions, that is, in the case of groupoids, to be a functor it is sufficient to only preserve compositions.
My attempt was:
Let $1_{g}$ to be an unit of $G$. We can write $1_{g} = 1_{g} \circ 1_{g}$. Applying $F$, we get $F(1_{g}) = F(1_{g}) \circ F(1_{g})$. Now, composing with $F(1_{g})^{-1}$ in both sides, we have $F(1_{g}) = 1_{F(g)}$.
Is that correct?
 A: Yes, your proof is correct.
Here is another way to look at the situation and your proof:

*

*Given any object $g$ of $G$, the assignment $F$ restricts to a multiplicative map from $\mathrm{End}_G(g)$ to $\mathrm{End}_H(F(g))$.
Both $\mathrm{End}_G(g)$ and $\mathrm{End}_H(F(g))$ are groups because $G$ and $H$ are groupoids.
The map $\mathrm{End}_G(g) \to \mathrm{End}_H(F(g))$ is thus a homomorphism of groups.
This entails that the neutral element of $\mathrm{End}_G(g)$ is mapped to the neutral element of $\mathrm{End}_H(F(g))$.
More explicitly, $1_g$ is mapped to $1_{F(g)}$.

This argumentation relies on the following fact from basic group theory:


*Given two groups $G$ and $H$, every multiplicative map from $G$ to $H$ maps the neutral element of $G$ to the neutral element of $H$.

This is essentially the claim from your question for the special case of one-object groupoids.
However, this special case is proven in practically every text on basic group theory.
And the proof we find there is the same as yours:


*In any group $G$, the only idempotent element is the neutral element: if $g^2 = g$, then by multiplying with $g^{-1}$ we arrive at $g = 1_G$.


*Let $f$ be a multiplicative map from $G$ to $H$. Then $1_G^2 = 1_G$, therefore $f(1_G)^2 = f(1_G^2) = f(1_G)$, and thus $f(1_G) = 1_H$.
