Prove that morphisms into initial objects are isomorphisms Suppose the following takes place in the category of sets.
Let $f:X \rightarrow 0$ be any morphism into the initial object. I want to prove that the unique ${!}:0 \rightarrow X$ is an inverse to $f$. That $f {!} =id$ is clear since $0$ is initial, but the other way i can't see what to do other than use the fact that the category has exponentials.
Solution (possible):
Since the unique arrow $0 \to X$ corresponds to any $X \times 0 \to X$ which correspond to $0 \to X^X$ of which there is only one, the constant map sending everything to the identity. Hence, ${!} \circ f = id$.
 A: It is not true in an arbitrary category. For example, in the category of sets and partial functions, the empty set is an initial object -- but the everywhere undefined function $X\to\varnothing$ is not an isomorphism unless $X$ is itself empty.
Therefore you have to use something that is specific to $\mathbf{Set}$ here. And then you might as well be concrete and admit that $\varnothing$ is the only initial object, and the only map into $\varnothing$ is the empty function $\varnothing\to\varnothing$, and that happens to be an isomorphism.
A: It generalizes to cartesian closed categories. You want to show that in such a category, if there is an arrow $X\to 0$, then $X\simeq 0$. 
So assume you have  such an arrow and consider the arrow $g: X\to X\times 0$ that you get from it and $id_X$, and $pr$ the projection $X\times 0\to X$. Then $g\circ pr : X\times 0 \to X\times 0$, and so as $X\times 0$ is initial in a ccc (I think I've shown this in another post), $g\circ pr = id_{X\times 0}$. Moreover by definition of $g$, $pr\circ g = id_X$.
Thus $X\simeq X\times 0 \simeq 0$, $X$ is initial and that works.
(I advise you to draw the diagrams to see it clearly)
If you want another proof that $X\times 0$ is initial in a cartesian closed category, let me know (that's where you use the exponentials)
