Zorn's Lemma implies Axiom of Choice

Zorn's Lemma implies Axiom of Choice

Does my attempt look fine or contain logical flaws/gaps? Any suggestion is greatly appreciated. Thank you for your help!

My attempt:

Let $$S$$ be a collection of nonempty sets and $$F$$ be the collection of all functions $$f$$ for which $${\rm dom}(f) \subseteq S$$ and $$f(X)\in X$$ for all $$X \in {\rm dom}(f)$$. The set $$F$$ is ordered by inclusion $$\subseteq$$.

Assume that $$C$$ is a chain in $$(F,\subseteq)$$. Let $$f_0=\bigcup C$$. It is easy to verify that $$f_0 \in F$$ and $$f_0$$ is an upper bound of $$C$$. Then $$F$$ has a maximal element $$\bar f$$ by Zorn's Lemma. To accomplish the proof, we next show that $${\rm dom}(\bar f)=S$$. If not, $${\rm dom}(\bar f) \subsetneq S$$ and thus $$S \setminus {\rm dom}(\bar f) \neq \emptyset$$. Take some $$\bar X \in S \setminus {\rm dom}(\bar f)$$ and $$\bar x\in \bar X$$. Clearly, $$\bar f \bigcup \{(\bar X,\bar x)\}\in F$$. This contradicts the minimality of $$\bar f$$. This completes the proof.