I was studying category theory and I was challenged by the following exercise.
How to express the fact that for any $x\in \mathrm{Ob}(\mathcal{C})$, in a category $\mathcal{C}$, the morphism $\operatorname{id}_x$ points from $x$ to $x$?
The answer says that it would be sufficient to write two equations: $\operatorname{dom}\circ \operatorname{ids} = \operatorname{id}_{\mathrm{Ob}(\mathcal{C})}$ and $\operatorname{cod}\circ \operatorname{ids} = \operatorname{id}_{\mathrm{Ob}(\mathcal{C})}$, where $\operatorname{dom}$ is a function that goes from the morphism to the domains, $\operatorname{cod}$ to the codomains and $\operatorname{ids}$ is a function that goes from the objects to the morphisms. Nothing is said about $\operatorname{id}_{\mathrm{Ob}(\mathcal{C})}$ and this is where I struggle a bit.
I think $\operatorname{id}_{\mathrm{Ob}(\mathcal{C})}$ is a function since its the result of the composition of two functions. More specifically it goes from $\mathrm{Ob}(\mathcal{C})$ to $\mathrm{Ob}(\mathcal{C})$.
I’m particularly puzzled by the fact that $\operatorname{id}_x$ is never mentioned. How can I express something about this morphism? How could the $\operatorname{id}_{\mathrm{Ob}(\mathcal{C})}$ function, which lives in the $\mathbf{Set}$ category, tell something about a morphism?
Evaluate both sides of the given equations:
$\operatorname{id}_{Ob(C)}(x) = x$, while $\operatorname{ids}(x) = \operatorname{id}_x$, hence $\operatorname{dom}(\operatorname{id}_x) = x$. Similarly, $\operatorname{cod}(\operatorname{id}_x)=x$, so the domain and codomain of $\operatorname{id}_x$ are both $x$.