Suppose we have two random variables $X, Y: \Omega \rightarrow \mathbb{R}$ defined in some probability space. I want a formal definition for the conditional distribution of $X$ given a value of the other variable say $Y = y$. We know that when $(X,Y)$ has density $f_{X,Y}$ with marginal distributions $f_X$ and $f_Y$ respectively, we define the conditional density (and so the conditional distribution) motivated by the discrete case as $$f_{X|Y=y}(\cdot, y) = \frac{f_{X,Y}(\cdot, y)}{f_Y(y)}$$
To this point I want to make an observation, we construct a probability distribution but not a random variable $X|Y=y$ whose density is $f_{X|Y=y}$.
I have two questions:
First
¿What is the formal definition for conditioning, if we dont have a joint density, we know only the law $P_{X,Y}$. I found the following definition without explanation:
$\textit{The conditional distribution}$ $P_{X|Y = y}$ $\textit{is the distribution of} \hspace{0,1cm}$ $\varphi(U,y)$ $\textit{where} \hspace{0,1cm}$ $\varphi:\mathbb{R}^2\rightarrow \mathbb{R}$ $\textit{is a borel function and}\hspace{0,1cm}$ $U$ $\textit{is chossen independent of}\hspace{0,1cm}$ $Y$ $\textit{and such that}$ $(\varphi(U,Y), Y)$ $\textit{is distributed as}$ $P_{X,Y}$.
Note that the condition $Y = y$ is given by $\varphi(U,y)$ and obiously in independence $U = X$ and $\varphi(x,y) = x$.
Second
Suppose now we have a probability distribution $P$ over $X\times Y$, where $X$ and $Y$ are arbitrary sets. One can talk about conditioning here?.
I will be very grateful if you give me any reference, I am very interested in question number two.