If $a, b \in \mathbb{R}$ prove there is a rational $r \in (a, b)$ There is a hint that is given along with this which is to start by picking a $q >0$ such that $1/q < b - a$ so that the interval $(qa, qb)$ is of length greater than 1.
Using this hint I came up with the following proof:
We need to show there exists a rational $r$ in $(a, b)$. Suppose $r=p/q$ where $p \in \mathbb{Z}$, we then need to show $p$ exists.
Since $r \in (a,b)$, then $a < p/q < b$ or $qa < p < qb$, but we know $qb-qa > 1$, therefore there must exist exactly one integer, $p$, in the interval $(qa, qb)$ thus proving the inequality.
Hence we have shown $a < p/q < b$, so there exists a rational in $(a,b)$.
I am self learning, so I would love some feedback.
Thank you!
 A: The logic in your proof is strange. By using properties of $ r $ you're presupposing its existence, but that's precisely what you're trying to show. The idea, however, is good. Just don't use $ r $ before you have shown that it exists.
I'd rewrite your proof by proving the existence of such a $ q $ where $ \frac{1}{q} < b - a $, then take the interval $ (qa, qb) $ and show that it has length greater than one. From here, show that an interval of length greater than 1 must contain an integer. Now let $ p \in (qa, qb) $ be an integer, which you've shown exists, then conclude that $ \frac{p}{q} \in (a, b) $.
A: I think it would be more appropriate to rephrase the last part as follows: since the length of the interval $(qa,qb)$ is greater than one, there must exist one integer $p$ (not necessarily unique) such that $p \in (qa,qb)$ and the result follows.
A: You did well, and indeed you implemented a very good strategy to prove anything in mathematics: first you assume that such a $p$ exists, hoping to find some necessary condition easy to exploit. Then you actually find such a condition for $p$, i.e. $qa<p<qb$. Then, you come back to the original problem having a necessary condition for the existence of such a $p$, so you ask yourself if you can find at least a $p$ satisfying the necessary condition, and in this case this is easily done because you know that $qb-qa>1$. Then, having a $p$ that satisfies the necessary condition, you try to prove that this $p$ actually is the $p$ you're looking for (i.e. that it satisfies the relation $a<\frac{p}{q}<b$) and this is easily done because the necessary condition turns out to be sufficient in your case.
Notice that this strategy is analogous to the strategy one can use to solve a maze: start from the exit and come back to the start. My algebra teacher used to say: when you try to prove anything, you have to start from the conclusion, not from the hypothesis.
A final remark: notice that your proof works perfectly well not just in the real numbers but in any archimedean ordered field.
