On page 217 - 218 of the pdf of this book, the author derives the Poisson Distribution using gamma and exponential densities. The author defines $S_n$ to be the sum of a sequence of independent exponentially distributed random variables ($X_1 + X_2 .... + X_n$) with parameter $\lambda$ and $Y$ to count the number of emissions in a time interval $t$, and then states the following:
$$P(Y = n) = P(S_n < t \space and \space S_{n+1} > t) = P(S_n < t) - P(S_{n+1} <t)$$
The reasoning being that $S_{n+1} < t$ is a subset of the event $S_{n} < t$
I don't understand why $P(Y = n)$ is equal to $P(S_{n} < t < S_{n+1})$, why the event $S_{n+1} < t$ is a subset of $S_{n} < t$ (and not the other way around?), and why we take the difference of the two?
Is the $\lambda$ defined for the sequence of exponential densities, in the gamma density (used to model $S_n$), and the final Poisson distribution, all the same?
To simulate a Poisson random variable ($W$) with parameter $\lambda$ using exponential densities, the author proposes that $-\frac{1}{\lambda}log(rnd)$ (which simulates an exponential density with parameter $\lambda$) be run sequentially until $S_{n} < 1 < S_{n+1}$ and the $n$ returned is the simulated value for $W$. Would I replace the $1$ with $t$ if I want to simulate a Poisson random variable with parameter $\lambda t$?