# $X_n\to 0$ in probability implies $E[f(X_n)]\to f(0)$ for $f$ uniformly cts and bounded

Let $f$ be a uniformly continuous and bounded function. I've shown that if $X_n\to 0$ in probability, then $f(X_n)\to f(0)$ in probability as well. Now I want to say that $$\lim_{n\to\infty} E(f(X_n))=\lim_{n\to\infty}\int_{\Omega}f(X_n)dP=\int_{\Omega}\lim_{n\to\infty}f(X_n)dP=\int_{\Omega}f(0)dP=f(0).$$

The second equality should hold from DCT since $f$ is bounded. However, the third equality is where I'm unsure if I'm using the fact that $f(X_n)$ converges to $f(0)$ in probability, because it looks like I'm using almost everywhere convergence which isn't implied by convergence in probability. Can someone please help clear this up?

edit: I've solved the problem a different way by splitting up the integral over where the difference between $f(X_n)$ and $f(0)$ is bigger/less than some epsilon, but I'm just curious if I can do it the way above.

Recall the following two statements:

Lemma 1 (subsequence principle): A sequence $(a_n)_{n \in \mathbb{N}}$ converges to a limit $a$ if, and only if, any subsequence of $(a_n)_{n \in \mathbb{N}}$ contains a further subsequence which converges to $a$.

Lemma 2: If $Y_n \to Y$ in probability, then there exists a subsequence $(Y_{n(k)})_{k \in \mathbb{N}}$ which converges almost surely to $Y$.

Take any subsequence $(X_{n(k)})_{k \in \mathbb{N}}$ of $(X_n)_{n \in \mathbb{N}}$. By Lemma 2, there exists a subsequence $(X_{n_{k_\ell}})_{\ell \in \mathbb{N}}$ which converges almost surely to $0$. Using the argument explained in the opening question, we find

$$\lim_{\ell \to \infty} \mathbb{E}(f(X_{n_{k_{\ell}}})) = f(0).$$

Obviously, the limit $f(0)$ does not depend on the chosen subsequence. Applying the subsequence principle, we conclude that $\mathbb{E}(f(X_n))$ converges to $f(0)$.

The dominated convergence theorem holds when the almost convergence is replaced by convergence in probability. Indeed, if $\left(Y_n\right)_{n\geqslant 1}$ to $0$ in probability and $\sup_n\left|Y_n\right|$ is integrable, then for each sub-sequence $\left(Y_{n_k}\right)_{k\geqslant 1}$, we can extract a subsequence $\left(Y_{n'_k}\right)_{k\geqslant 1}$ which converges to $0$ almost surely. By the dominated convergence theorem, we get $\mathbb E\left|Y_{n'_k}\right|\to 0$. In order to deduce the convergence for the whole sequence, argue by contradiction and apply the previous reasoning.