Why are $X$ and $Y$ independent if joint density is separable and the universe is a rectangle? From "The probability Tutoring Book"  by Carol Ash,

If a joint density function $f_{x,y}(x,y)$ is separable and the universe is a rectangle, then $X$ and $Y$ are independent.

My question is why is this true?
I know that a function is separable if it can be written as the product of two functions, each of which is only dependent on one variable.
The second requirement simply means $a \leq X \leq b$ and $c \leq Y \leq d$, right?
But I'm not understanding why these two conditions make X and Y independent...
Also, if I have three variables, then does this "theorem" still hold true if the density is separable and $a \leq X \leq b\text{ and }c \leq Y \leq d\text{ and } e \leq Z\leq f$?
 A: If the joint density $f_{X,Y}(x,y) = g(x) h(y)$ for some functions $g$ and $h$, we have in particular
$$ \eqalign{1 &= \int_{-\infty}^\infty \int_{-\infty}^\infty\; dx \; dy\; g(x) h(y) \cr
&= \int_{-\infty}^\infty dx\; g(x)\; \int_{-\infty}^\infty dy\; h(y) }$$
If $\int_{-\infty}^\infty dx\; g(x) = a $, $
\int_{-\infty}^\infty dy\; h(y) = 1/a$.  We can replace $g(x)$ by $g(x)/a$ and $h(y)$ by $a h(y)$, and we get $\int_{-\infty}^\infty g(x) = 1$ and $\int_{-\infty}^\infty h(y) = 1$.  Now for any $x_0$,
$$P(X \le x_0) = P(X \le x_0, Y < \infty) = \int_{-\infty}^{x_0} dx\; g(x)\; \int_{-\infty}^\infty dy\; h(y) = 
\int_{-\infty}^{x_0} dx\; g(x)$$
$$P(Y \le y_0) = P(X < \infty, Y \le y_0) = \int_{-\infty}^{\infty} dx\; g(x)\; \int_{-\infty}^{y_0} dy\; h(y) = 
\int_{-\infty}^{y_0} dx\; h(x)$$
and
$$P(X \le x_0, Y \le y_0) = \int_{-\infty}^{x_0} dx\; g(x)\; \int_{-\infty}^{y_0} dy\; h(y) = 
P(X \le x_0) P(Y \le y_0) $$
From this you can obtain $P(X \in A, Y \in B) = P(X \in A) P(Y \in B)$ for all Borel sets $A$ and $B$, and therefore $X$ and $Y$ are independent.
