I try to wrap my head around the construction of the slice category over an object. I keep reading that an arrow in a slice category (say $\mathbf{D}/D$) between objects $ h \colon X \rightarrow D $ and $ h' \colon X' \rightarrow D $ is an arrow $ j: X \rightarrow X' $ in the category $\mathbf{D}$ such that $ h' \circ j = h $.
Let us now consider the example of a category $\mathbf{C}$ having two distinct objects $A$ and $B$ and two distinct non-trivial arrows $f$ and $g$, both pointing from $A$ to $B$.
I understand that the objects in the slice catgory $\mathbf{C}/B$ are exactly $f$, $g$ and $1_B$. But now the identity arrow $1_A$ in $\mathbf{C}$ acts both as the identity arrow $1_f$ and the identity arrow $1_g$ in $\mathbf{C}/B$. So do we add "two copies" of $1_A$ as arrows in our slice category? Or do I understand something completely wrong? Sorry, I am a bit confused at the moment.
(I guess my question is basically, whether an arrow in the slice category $\mathbf{D}/D$ as above "actually is" more like a triple $(h, h', j)$ so that in the example of $\mathbf{C}/B$ we would get two distinguishable identity arrows $(f,f,1_A)$ and $(g,g,1_A)$. Of course I understand that one would not always express it like this in everyday math speak for the sake of simplicity. I just want to know whether I got the whole concept wrong.)
Your question makes perfect sense in that if we look at the definition in Wikipedia even Nlab, a category is defined as the "set of objects" $C_0$ plus the "set of morphisms" $C_1$ with two maps $s,t: C_1 \to C_0$. With this definition, one has to be careful when describing arrows in $C/B,$ for indeed if there is only one arrow $1_A \in (C/B)_1$ (and there was only one arrow in $1_A \in C_1!)$, then it is not clear what is $s$ and $t$ of it. So really then the arrow set $(C/B)_1$ has to be defined as the set of triangles $A \to C \to B$. In particular, $1_A$ then figures in two such triangles.
In the definition of a category, you could alternatively ask for a set of arrows $Mor(A,B)$ for every pair of objects $A, B$, which looks like a better definition to me. Then you can not speak of an arrow without specifying what its domain and codomain are. This is the second definition in the Nlab article above. You can also see a note there in the last paragraph of "Equivalence between the two definitions" speaking basically about the issue you put forward here.