[guided]We want to prove that the condition on the first marginal survives passage to a weak limit. Let $\pi \in \overline{\Pi(\mu,\nu)}$. By the definition of topological closure, there exists a net $(\pi_\lambda)_{\lambda \in \Lambda}$ in $\Pi(\mu,\nu)$ such that $\pi_\lambda \Rightarrow \pi$ weakly in $\mathcal{P}(X \times Y)$. We use a net rather than a sequence so that the argument proves closedness directly in the [weak topology](/page/Weak%20Topology).
The first marginal is tested by bounded continuous functions on $X$. Let $f: X \to \mathbb{R}$ be bounded and continuous. To connect this test function on $X$ with weak convergence on $X \times Y$, pull it back along the first projection. Define
\begin{align*}
F: X \times Y &\to \mathbb{R}, \quad F(x,y) := f(p_X(x,y)) = f(x).
\end{align*}
The projection $p_X$ is continuous for the product topology, and $f$ is bounded and continuous, so $F = f \circ p_X$ is bounded and continuous on $X \times Y$. Therefore weak convergence of $\pi_\lambda$ to $\pi$ applies to this particular test function and gives
\begin{align*}
\int_{X \times Y} F \, d\pi_\lambda \to \int_{X \times Y} F \, d\pi.
\end{align*}
Now we use the fact that every $\pi_\lambda$ belongs to $\Pi(\mu,\nu)$. By definition of the coupling set, $(p_X)_\#\pi_\lambda = \mu$ for every $\lambda \in \Lambda$. The defining property of the pushforward measure says that integrating $f$ against the pushed-forward measure is the same as integrating $f \circ p_X$ against the original measure. Hence
\begin{align*}
\int_{X \times Y} F \, d\pi_\lambda = \int_X f \, d((p_X)_\#\pi_\lambda) = \int_X f \, d\mu.
\end{align*}
The left-hand side converges to $\int_{X \times Y} F \, d\pi$, while the right-hand side is independent of $\lambda$. Thus
\begin{align*}
\int_{X \times Y} F \, d\pi = \int_X f \, d\mu.
\end{align*}
Applying the pushforward identity once more, now to $\pi$, gives
\begin{align*}
\int_X f \, d((p_X)_\#\pi) = \int_X f \, d\mu.
\end{align*}
This equality holds for every bounded continuous function $f: X \to \mathbb{R}$. Since $X$ is Polish, bounded continuous functions determine Borel probability measures on $X$. Therefore $(p_X)_\#\pi = \mu$.[/guided]