Q:

Axiom of choice and function with empty codomain

I'm having a little problem here, namely if the axiom of choice (Wikipedia) is
$$\forall X \left[ \emptyset \notin X \implies \exists f: X \to \bigcup X \quad \forall A \in X \, ( f(A) \in A ) \right]$$
and I choose the nonempty $X=\{\emptyset\}\neq \emptyset$ for which only $\emptyset\in X$ and hence $A=\emptyset$, then I get
$$\exists f:\{\emptyset\}\to\emptyset\ \  \text{such that}\ \  f(\emptyset) \in \emptyset.$$ 
The last point seems wrong in itself though. Of course, there is no actual value $f(\emptyset)$, so $f(\emptyset) \in \emptyset$ doesn't say much. It might be just taken to be a legal statement. I haven't seen that written down anywhere though.

A:

Note that $X=\{\varnothing\}$ satisfies the statement vacuously, so it's fine. You can change the statement to the following:
$$\forall X\exists f\left[f\colon X\to\bigcup X\cup\{\varnothing\}\land\forall A\in X(f(A)\in A\lor A=\varnothing)\right]$$
It allows $\varnothing\in X$, and therefore $X=\{\varnothing\}$. But it's harder to understand it this way, so it's easier to just require $\varnothing\notin X$.

