For conditional random variable, I have seen the formula $P(A|B) = \frac{P(A \cap B)}{P(B)}$. But I have also noticed, especially when conditioning on random variables, one just "subs in" the condition into the argument of the probability. What is the justification behind this / when can we do this?
For example: If I have $$P(X+Y=s |Y=y)$$ I would just "sub in" $Y=y$ into the argument and say $P(X+y=s|Y=y)$,
What allows me to do this?
Note that $$\Pr\left(X+Y=s|Y=y\right) = \frac{\Pr\left(X+Y=s \text{ and } Y=y\right)}{\Pr\left(Y=y\right)}.$$ Now, the system of equations $X+Y=s$ and $Y=y$ is equivalent to $X+y=s$ and $Y=y$. As such, we have $$\Pr\left(X+Y=s|Y=y\right) = \frac{\Pr\left(X+y=s \text{ and } Y=y\right)}{\Pr\left(Y=y\right)} = \Pr\left(X+y=s |Y=y \right).$$