Let $(X_n)_{n\geq1}$ be a sequence of random variables weakly converging to $X$ ($X_n\Rightarrow X$) as $n\rightarrow \infty$. I am trying to determine the most general conditions on a function $f$ such that we have the joint weak convergence $(X_n, f(X_n))\Rightarrow (X,f(X))$ as $n\rightarrow \infty$. Using the following:
$$\mathbb{P}(X_n \in A, f(X_n)\in B)=\mathbb{P}(X_n\in A \cap f^{-1}(B)),$$
where $A$ and $B$ are Borel sets, it would appear that we can conclude via the weak convergence of $(X_n)_{n\geq1}$. However, I am not sure how rigorous this argument is, and for which functions $f$ this would hold? I have a feeling the result should hold if $f$ is just measurable. I am not sure how one could prove this, but the idea comes from the fact that the continuous mapping theorem is also valid for measurable functions with a negligible set of discontinuities. Any comments or ideas would be greatly appreciated.
Let $f:\mathbb R\to\mathbb R$ be the characteristic function of $(-\infty,0]$.
Let it be that $X_n=\frac1{n}$ a.s. and $X=0$ a.s.
For every continuous and bounded $g:\mathbb R\to\mathbb R$ we have: $$\mathbb Eg(Xn)=g\left(\frac1{n}\right)\to g(0)=\mathbb Eg(X)$$
This means that $X_n$ converges weakly to $X$.
But $f(X_n)=0$ a.s. and $f(X)=1$ a.s. so $f(X_n)$ is not converging weakly to $f(X)$.
Then evidently $(X_n,f(X_n))$ is not converging weakly to $(X,f(X))$.
On the other hand if $g:\mathbb{R}^{2}\to\mathbb{R}$ is a continuous and bounded function, then $$h:=g\circ\left(1\times f\right)\circ\delta$$ where $\delta:\mathbb{R}\to\mathbb{R}^{2}$ is prescribed by $x\mapsto\langle x,x\rangle$ will be continuous and bounded if $f$ is continuous.
If $X_{n}$ converges weakly to $X$ - we find: $$\mathbb{E}g\left(X_{n},f\left(X_{n}\right)\right)=\mathbb{E}h\left(X_{n}\right)\to\mathbb{E}h\left(X\right)=\mathbb{E}g\left(X,f\left(X\right)\right)$$ This for every continuous and bounded $g$.
This justifies the statement that $\left(X_{n},f\left(X_{n}\right)\right)$ convergences weakly to $\left(X,f\left(X\right)\right)$ if $f$ is continuous.
edit:
This proof also works if the condition that $f$ is continuous is replaced by the condition that $X$ is a.s. not a discontinuity point of function $f$ (hence is a.s. not a discontinuity point of function $h$).