Hausdorff topological spaces: Is the pointwise limit of a sequence of Borel measurable functions again Borel measurable? I'm trying to respond to @GEdgar's comment about extending this result to more general spaces.
Let $(X, \mathcal X)$ be a measurable space and $(E, d)$ a metric space. Let $f, f_n:X \to E$ such that $\lim_n f_n = f$ pointwise.

Theorem: If $f_n$ is Borel measurable for all $n$, then so is $f$.

My questions:

*

*Could you have a check on my below attempt?


*Does this theorem hold in case $E$ is a Hausdorff topological space?

Proof: Let $O$ be open in $E$. It suffices to show that $f^{-1}(O) \in \mathcal X$. Let
$$
O_m := \{x \in O \mid d(x, \partial O) > 1/(m+1)\} \quad \forall m \in \mathbb N.
$$
Then $O_m \subset O$ and $O_m$ is open in $E$. We have
$$
\begin{align}
&f(x) \in O \\
\iff &\lim_n f_n (x) \in O \\
\iff & \exists m \in \mathbb N,  \lim_n f_n (x) \in O_m\\
\iff & \exists m \in \mathbb N, \exists N \in \mathbb N, \forall n \ge N: f_n (x) \in O_m.
\end{align}
$$
It follows that
$$
f^{-1}(O) = \bigcup_{m \in \mathbb N} \bigcup_{N \in \mathbb N} \bigcap_{n \ge N} f_n^{-1} (O_m).
$$
Clearly, $f_n^{-1} (O_m) \in \mathcal X$ because $f_n$ is Borel measurable. This completes the proof.

Thank you @OliverDíaz so much for providing a reference containing a counter-example! Below is taken from Dudley's Real Analysis and Probability.

Now let $I=[0,1]$ with its usual topology. Then $I^I$ with product topology is a compact Hausdorff space by Tychonoff's Theorem (2.2.8). Such spaces have many good properties, but Theorem 4.2.2 does not extend to them (as range spaces), according to the following fact. Its proof assumes the axiom of choice (as usual, especially when dealing with a space such as $I^I$ ).
4.2.3. Proposition There exists a sequence of continuous (hence Borel measurable) functions $f_n$ from $I$ into $I^I$ such that for all $x$ in $I, f_n(x)$ converges in $I^I$ to $f(x) \in I^I$, but $f$ is not even Lebesgue measurable: there is an open set $W \subset I^I$ such that $f^{-1}(W)$ is not a Lebesgue measurable set in $I$.
