Say that $Y$ is a continuous random variable, and $X$ is a discrete one. $$ \Pr(X=x|Y=y) = \frac{\Pr(X=x)\Pr(Y=y|X=x)}{\Pr(Y=y)} $$
As we know, $\Pr(Y=y) = 0$ because $Y$ is a continuous random variable. And based on this, I am tempted to conclude that the probability $\Pr(X=x|Y=y)$ is undefined.
However, Wikipedia claims here that it is actually defined as follows: $$ \Pr(X=x|Y=y) = \frac{\Pr(X=x) f_{Y|X=x}(y)}{f_Y(y)} $$
Question: Any idea how did Wikipedia manage to get that probability defined?
My attempt
Here is my attempt in order to get that Wikipedia outcome in terms of limits: $$\begin{split}\require{cancel} \Pr(X=x|Y=y) &= \frac{\Pr(X=x)\Pr(Y=y|X=x)}{\Pr(Y=y)}\\ &= \lim_{d \rightarrow 0}\frac{\Pr(X=x) \big(d \times f_{Y|X=x}(y)\big)}{\big(d \times f_Y(y)\big)}\\ &= \lim_{d \rightarrow 0}\frac{\Pr(X=x) \big(\cancel{d} \times f_{Y|X=x}(y)\big)}{\big(\cancel{d} \times f_Y(y)\big)}\\ &= \frac{\Pr(X=x) f_{Y|X=x}(y)}{f_Y(y)}\\ \end{split}$$
Now, $\Pr(X=x|Y=y)$ seems to be defined to be $\frac{\Pr(X=x) f_{Y|X=x}(y)}{f_Y(y)}$, which matches that Wikipedia claim.
Is that how Wikipedia did it?
But I am still feeling that I am abusing calculus here. So I think that $\Pr(X=x|Y=y)$ is undefined, but in the limit as we get as close as possible to define $\Pr(Y=y)$ and $\Pr(Y=y|X=x)$, but not eyactly, then $\Pr(X=x|Y=y)$ is defined.
But I am largely unsure about many things, including the limits trick that I did there, I feel that maybe I am not even fully understanding the meaning of what I did.