Skorohod Representation Theorem Application I'm reading through the Skorohod representation theorem and finding this proof a little bit difficult to understand. My understanding of the proof in bullet point form is as follows:


*

*Define a new random variable Y on the same probability space as X.

*$Y_{n}$ has the same probability distribution as $X_{n}$ for all
positive n.

*Y has the same distribution as X.

*$Y_{n} \to Y$ as $n \to \infty$ with probability 1.

*Since g is a continuous func, $g(Y_{n}) \to g(Y)$ as $n \to \infty$
with probability 1.

*Thus $g(Y_{n}) \overset{d}\to g(Y)$ as $n \to \infty$.

*Lastly, we argue that $g(Y_{n})$ has the same distribution as
$g(X_{n})$ and $g(Y)$ has the same distribution as $g(X)$ so we are
done.
My questions are as follows: how do we get from step 2 to step 3? Is step 4 a direct result of using the Skorohod representation theorem? Why does $g(Y_{n}) \to g(Y)$ simply because g is a continuous function?

 A: Step 3 doesn't follow from step 2. Assertions 2,3,4 are directly a result of the Skorohod representation theorem; they correspond to the conclusions a,b,c in the Skorohod theorem that your link points to.
As for the claim that $g(Y_n)\to g(Y)$, this follows from continuity of $g$: If $x_n$ is a sequence of real numbers that converge to $x$, then $g(x_n)\to g(x)$ whenever $x$ is a continuity point for the function $g$. Applying this to $Y_n$ and $Y$, this means
$$
\{Y_n\to Y\}\subset \{g(Y_n)\to g(Y)\}$$
since, by assumption, $g$ is continuous at every point. But the event on the LHS has probability 1, therefore the event on the RHS also has probability 1.
A: Fisrt let me clarify something about your question because I think there is a little confusion here. Your question is not about the proof of the Skorohod representation theorem you are referring to (theorem 25) but about the proof the theorem (theorem 26) that uses Skorohod representation theorem. 
So now to answer your question you don't get step 2 from step 3, you get them both from the Skorohod representation theorem, the fact that those variables exist are a consequence of the theorem. Step 4 is also a property that you owe to this theorem. 
For the last question, ot is as follows. As $Y_n\to Y$ almost surely there exists a set let's say $A$ of probability one where for every $\omega\in A$ you have $Y_n(\omega) \to Y(\omega)$ (here we can take the same $\omega$ as all variables live in the same space which the main tool behind the theorem 25). So from the continuity property of $g$ on this very same set $A$, you have for every $\omega\in A$, $g(Y_n(\omega))\to g(y(\omega))$ as $Y_n(\omega) \to Y(\omega)$, id est with probability one, which is nothing else than the conclusion of theorem 26. 
Is the argument sufficiently detailed ?
Edit : step 7 :
As you noted you have $X_n$, $X$ and $Y_n$, $Y$ that have the same law. And $Y_n$ converging almost surely to $Y$. Almost sur convergence implies convergence in distribution so $Y_n$ also converge to $Y$ in distribution. As the laws of $Y_n$ and $X_n$ are equals you can replace as much $Y_n$ as you want and preserve the convergence in distribution moreover converging in distribution to $Y$ is equivalent to converge to $X$ once again the space $\Omega$ is irrelevant only matters the probability of the events which are equals as long as the laws are left unchanged. Passing to $g$ doesn't do any harm to this line of reasoning, as again the laws of $g(X_n)$ are the same the laws of $g(Y_n)$ (and the same holds for $g(Y)$ and $g(X)$). All this is pretty trivial but only when you can grab it with your hands. Again think of convergence in distribution as something you need laws and events to get, while almost sure convergence needs to holds for every almost every points of a probability space $\Omega$ but for this mode of convergence the laws of the random variables are irrelevant. Hope this helps a bit.
Best regards
A: Step 7. Use the following claim: If $Y\sim Z$ and $g$ measurable then $$g(Y)\sim g(Z).$$ 
In fact, assume that $\mathbb{P}_Y=\mathbb{P}_Z$. Since 
$$ {g(Y)}^{-1}(A) = Y^{-1}(g^{-1}(A)) ~\text{and}~ {g(Z)}^{-1}(A) = Z^{-1}(g^{-1}(A))$$
for all measurable $A$ we have
$$ \mathbb{P}_{g(Y)}(A) = \mathbb{P}_Y(g^{-1}(A)) = \mathbb{P}_Z(g^{-1}(A)) =\mathbb{P}_{g(Z)}(A) $$
for all measurable $A$.
Step 5. Moreover, if $Y_n\to Y$ with probability 1 and $g$ is $\mathbb{P}_Y$-a.s. continuous then $g(Y_n)\to g(Y)$ with probability 1.
