[proofplan]
We first reduce the theorem to the case $0 \leq a < b$, because intervals crossing $0$ already contain the rational $0$, and intervals on the negative side can be reflected through the origin. In the nonnegative case, the [Archimedean property](/page/Archimedean%20Property) gives a denominator $n$ with mesh size $1/n$ smaller than the interval length $b-a$. We then choose the least integer multiple of $1/n$ that reaches or passes $b$, and the preceding multiple lies strictly between $a$ and $b$.
[/proofplan]
[step:Reduce the interval to the nonnegative case]
It suffices to prove the result under the additional hypothesis $0 \leq a < b$. Indeed, if $a < 0 < b$, then $c := 0$ satisfies $c \in \mathbb{Q}$ and $a < c < b$. If $a < b \leq 0$, then $0 \leq -b < -a$; applying the nonnegative case to the interval $(-b, -a)$ gives $c' \in \mathbb{Q}$ with $-b < c' < -a$. Since $\mathbb{Q}$ is closed under additive inverses, $c := -c' \in \mathbb{Q}$, and multiplying the inequalities by $-1$ gives $a < c < b$.
[guided]
We want to avoid carrying sign cases through the Archimedean argument. The only case we need to prove directly is therefore the case $0 \leq a < b$.
First suppose $a < 0 < b$. Define $c := 0$. Since $0 \in \mathbb{Q}$ and the inequalities $a < 0 < b$ hold by assumption, this gives the required rational number in $(a,b)$.
Now suppose $a < b \leq 0$. Then multiplying the inequality $a < b$ by $-1$ reverses the order:
\begin{align*}
0 \leq -b < -a.
\end{align*}
If the theorem has been proved for nonnegative intervals, we may apply it to the [real numbers](/pages/1303) $-b$ and $-a$. This gives a rational number $c' \in \mathbb{Q}$ such that
\begin{align*}
-b < c' < -a.
\end{align*}
Define $c := -c'$. Since $c' \in \mathbb{Q}$ and the rationals are closed under additive inverses, $c \in \mathbb{Q}$. Multiplying the displayed inequalities by $-1$ reverses their order and gives
\begin{align*}
a < -c' < b.
\end{align*}
Thus $a < c < b$. Hence proving the theorem for $0 \leq a < b$ proves it for all real intervals.
[/guided]
[/step]
[step:Choose a denominator whose mesh is smaller than the interval length]
Assume now that $0 \leq a < b$. Since $b-a > 0$, the [Archimedean Corollary](/theorems/738) gives $n \in \mathbb{N}$ such that
\begin{align*}
\frac{1}{n} < b-a.
\end{align*}
In particular, because $a \geq 0$, we also have
\begin{align*}
\frac{1}{n} < b-a \leq b.
\end{align*}
[/step]
[step:Select the least grid point that reaches or passes $b$]
By the [Archimedean Property](/theorems/737), applied to the real number $nb$, there exists $N \in \mathbb{N}$ such that $N > nb$. Define
\begin{align*}
T := \left\{k \in \mathbb{N} : \frac{k}{n} \geq b\right\}.
\end{align*}
Since $N > nb$ and $n \in \mathbb{N}$ implies $n>0$, division by $n$ gives $N/n > b$, so $N \in T$. Hence $T$ is nonempty. By the [Well-Ordering Principle](/theorems/721), there exists a least element $m \in T$.
Moreover, $1 \notin T$, because the previous step gave $1/n < b$. Therefore $m \neq 1$, so $m-1 \in \mathbb{N}$. Since $m$ is the least element of $T$, we have $m-1 \notin T$, and hence
\begin{align*}
\frac{m-1}{n} < b.
\end{align*}
[guided]
The purpose of this step is to locate the first multiple of $1/n$ that reaches or passes the right endpoint $b$.
We first need to know that such a multiple exists. Apply the Archimedean Property to the real number $nb$. This gives $N \in \mathbb{N}$ such that
\begin{align*}
N > nb.
\end{align*}
Since $n \in \mathbb{N}$, we have $n>0$, so division by $n$ preserves the inequality:
\begin{align*}
\frac{N}{n} > b.
\end{align*}
Now define the [set](/pages/1142) of natural-number indices whose grid points reach or pass $b$:
\begin{align*}
T := \left\{k \in \mathbb{N} : \frac{k}{n} \geq b\right\}.
\end{align*}
The inequality $N/n > b$ implies $N \in T$, so $T$ is nonempty. Since $T \subset \mathbb{N}$ is a nonempty set of natural numbers, the Well-Ordering Principle gives a least element $m \in T$.
We also need the previous grid point $m-1$ to be a natural number, so we must rule out $m=1$. From the denominator choice,
\begin{align*}
\frac{1}{n} < b.
\end{align*}
Therefore $1 \notin T$. Since $m \in T$, this implies $m \neq 1$, and hence $m-1 \in \mathbb{N}$. By minimality of $m$, no smaller natural number belongs to $T$, so $m-1 \notin T$. Unpacking the definition of $T$, this means
\begin{align*}
\frac{m-1}{n} < b.
\end{align*}
[/guided]
[/step]
[step:Verify that the preceding grid point is rational and lies inside the interval]
Define
\begin{align*}
c := \frac{m-1}{n}.
\end{align*}
Since $m-1 \in \mathbb{N}$ and $n \in \mathbb{N}$ with $n \neq 0$, we have $c \in \mathbb{Q}$. The previous step proves $c < b$. Since $m \in T$, we have $m/n \geq b$, and therefore
\begin{align*}
c
= \frac{m-1}{n}
= \frac{m}{n} - \frac{1}{n}
\geq b - \frac{1}{n}
> b - (b-a)
= a.
\end{align*}
Thus $a < c < b$ with $c \in \mathbb{Q}$, completing the proof.
[/step]