I'm reading a book and there is some strange proof (strange for me) of the theorem that within each interval, no matter how small, there are rational points. Proof: we need only take a denominator $n$ large enough so that the interval $[0, \frac{1}{n}]$ is smaller than the interval $[A, B]$ in question; then at least one of the fractions $\frac{m}{n}$ must lie within the interval.
I can't understand how they figured out that $[A, B]$ contains at least one $\frac{m}{n}$ and how it's connected to the interval $[0, \frac{1}{n}]$.