I am trying to formally justisty a "rearrangement" algorithm, which rearranges the samples of two random variables to reflect a certain joint distribution.
Suppose that we have two pairs $(X_1,Y_1),(X_2,Y_2)$ of random variables. $X_1$ and $X_2$ are marginally equal with marginal distribution $F_X$, and $Y_1$ and $Y_2$ are marginally equal with marginal distribution $F_Y$. The difference is that $X_1,Y_1$ are independent, while $X_2,Y_2$ are dependent with some unknown joint distribution.
It is known that the empirical distributions of $X_1$ and $X_2$ converge uniformly to $F_X$ (law of large numbers/ Glivenko-Cantelli), and the same counts for $Y_1,Y_2$. From a heuristic point, it thus makes sense that: Suppose we draw samples for $X_1,Y_1$. There exists almost surely a way to rearrange the samples, such that the empirical distribution of $X_1 + Y_1$ converges to the distribution of $X_2 + Y_2$.
In other words, since marginally we cannot distinguish samples from $X_1,X_2$ and $Y_1,Y_2$, we can arrange the a priori independent samples in a way that we get the dependent structure of $X_2,Y_2$.
I am having troubles to find a mathematically sound argument for this. Are there any theorems related to this?