# Independence is not preserved across weak convergence

If $X_n$ and $Y_n$ are independent of each other i.e. for any $n$, $X_n \perp Y_n$, $X_n \to^d X$ and $Y_n\to^d Y$, it doesn't imply that $X$ and $Y$ are independent. Joint weak convergence will imply it though.

I was looking for the proof of the above via an example. I remember reading it somewhere but I couldn't seem to find it. I tried constructing it myself, but I didn't have much luck.

I'd appreciate it if someone could either point me to the result if it is available on math.stack or some other source. You could also give the counterexample.

Edit: I got some downvotes as it was unclear what I was asking for. Let me clarify. In the above sense, it is well known that weak convergence does not preserve independence. There is an example that illustrates this. I was looking for the example.

Let $U$, $V$ be two independent identically distributed random variables which are non-trivial (i.e. not almost surely constant). Define
$$X_n := U \qquad Y_n := V \qquad X := U \qquad Y := U.$$
Since all the random variables have the same distribution we clearly have $X_n \to X$ and $Y_n \to Y$ in distribution. Moreover, $X_n$ and $Y_n$ are independent for each $n \geq 1$, but $X$ and $Y$ fail to be independent.