Context:
Definition 2.1.18 (Automorphism group). Let $C$ be a category and let $X$ be an object of $C$. Then the set ${\rm Aut}_C(X) $of all isomorphisms $ X \to X$ in $C$ is a group with respect to composition in $C$ (Proposition 2.1.19), the
automorphism group of $X$ in $C$.
Doubt:
The following statement is proved in the book:
2.1.19.2. Let $G$ be a group. Then there exists a category $C$ and an object $X$ in $C$ such that $G \cong {\rm Aut}_C(X)$
The following proof is given:
We consider the category $C$ that contains only a single object $X$. We set $\text{Mor}_C(X,X) := G$ and we define the composition in $C$ via the composition
in $G$ by$$ \circ : \text{Mor}_C(X,X) \times \text{Mor}_C(X,X) \to \text{Mor}_C(X,X)$$
$$(g,h) \to g \cdot h$$
A straight forward computation proves the proposition.
In the above proof, how do we know there exists such an object $X$ such that we are allowed to set $\text{Mor}_C(X,X) :=G$?
More details:
I can't really explain my doubt in this context itself because my knowlege in CT is not much but I will try using another issue as analogy.
So suppose we are talking about Groups. To define a group, we says it's a set with a binary operation. Now, but to say this, shouldn't we have defined what the set looks like (out of ZFC) before we talk about the binary operation?
Best Answer
Whether and how an object $X$ exists depends on your formalization (though formalizatoins in which it doesn't I suspect are not common if they're to be used for formalizing mathematics).
Let me use the standard first-order logic formalization, in which a category has the following structure:
The axioms that make this structure a category are:
A more conceptual view is that the pair of functions $d,c\colon M\to O$ realize a family of sets of morphisms $\mathrm{Hom}(X,Y)=d^{-1}(X)\cap d^{-1}(Y)$ indexed by pairs of objects. Then the above definition amounts to a first-order encoding of the notion of a category as a collection of objects, equipped with a family of morphisms indexed by pairs of objects, and composition function defined on the family of compostable pairs, etc. However, the formal language of families isn't widely-used because one can get away with formalizing in first-order logic as above.
In any case, recall now that the structure of a monoid is a collection $M$ equipped with a binary function $m\colon M\times M\to M$ and an element $e\in M$. I claim that any choice of a singleton collection (collection with exactly one element) allows the construction of a category with one object (the element of the singleton) our of the monoid, and conversely that category with one object yields a monoid by forgetting its (singleton) collection of objects.
Let the singleton be $\{X\}$ and set $O=\{X\}$ (so that the category we are constructing has a single object the element $X$ of the singleton). Since functions $\{X\}\to M$ are in bijection with elements of $M$, the above element $e\in M$ corresponds to a function $e\colon\{X\}\to M$, i.e. a function $e\colon O\to M$ (I abuse notation and label both the same).
Moreover, there is a unique function $M\to\{X\}$ sending every element of $M$ to the element $X$. Let's use it twice with two distinct labels: $d,c\colon M\to O$. In that case $M\times_OM=\{(f,g)\in M\times M:d(f)=c(g)\}=M\times M$ since $d(f)=X=c(g)$ for all $(f,g)\in M\times M$. Note that we are interpreting the elements of the monoid as morphisms with domain and codomain $X$.
Thus our choice of a singleton for $O$ and identification of the unit of the monoid with a function out of $O$ and of the domain and codomain functions with the unique function from $M$ to $O$ augments the structure of a monoid into the structure of a category: $d,c:M\to O=\{X\}$, $e\colon O=\{X\}\to M$, and $m\colon M\times_O M=M\times M\to M$.
It is now straightforward to verify the category axioms hold for this structure if and only if the monoid axioms hold for the original structure, which are the associativity: $m(m(x,y),z)=m(x,m(y,z))$ for all $x,y,z$ and the unit axiom $x=m(e,x)=m(x,e)$ for every elements $x\in M$.
Now as to the existence of a singleton $\{X\}$, in usual set theory any set is contained in a singleton. In more general first-order logic, any element of a collection determines a subcollection consisting of exactly that object. If there are no sets or elements of collections, then there are simply neither monoids nor categires with one object, so the result still works.