As the title states, I want to check my proof of the following:
Proposition. A topological space $(X, \tau)$ is $T_0$ if and only if there exists a set $I$ such that $(X,\tau)$ is homeomorphic to a subpspace of $S^I$ with $S = (\{0,1\}, \{\emptyset, \{1\}, \{0,1\}\})$ the Sierpinski space.
One direction is straightforward: since $S^I$ is a product of $T_0$, it is itself $T_0$ and so is every subspace. In particular, via the homeomorphism of $X$ with the subspace of $S^I$, we get that $X$ is $T_0$.
The other implication is the one I am having doubts about.
Suppose that $X \neq \emptyset$ (otherwise take $I = \emptyset$) and let $\mathcal{C} = \{f : X \to S : \text{$f$ is continuous} \}$ which is not empty, for example because $X \to \{1\} \hookrightarrow S$ is continuous. Now, consider
$$ \begin{align*} \Gamma : & \ X \longrightarrow \prod_{f \in \mathcal{C}}S \\ & x \longmapsto (f(x))_{f \in \mathcal{C}} \end{align*} $$
which is continuous because each $\pi_f \Gamma \equiv f$ is continuous. This function is injective: if $x \neq y$, since $X$ is $T_0$ without loss of generality there exists an open set $y \in U$ of $X$ with $x \not \in U$. Thus,
$$ \Gamma(x)_{\chi_{U}} = \chi_{U}(x) = 0 \neq 1 = \chi_{U}(y) = \Gamma(y)_{\chi_{U}} $$
and so $\Gamma(x) \neq \Gamma(y)$.
Moreover, $\Gamma$ is initial: the topology on $X$ is trivially generated by its open sets $U$ which can be expressed as
$$ U = \{x \in X : \chi_U(x) = 1 \} = \{x : \Gamma(x)_{\chi_U} = 1 \} = \Gamma^{-1}(\prod_{f \neq \chi_U}S \times \{1\}) $$
and so $\Gamma|^{\Gamma(X)} : X \to \Gamma(X)$ is a homeomorphism with $\Gamma(X)$ a subspace of $S^\mathcal{C}$.
Thoughts? If correct, I feel like my argument ended up being rather clumsy so I would appreciate any suggestions on how to improve it.