Half of proof to show rational numbers are dense in the reals Question
I did exercise 2.15 in introduction to real analysis by Lee Larson:
Prove the following as a corollary of theorem 2.19:
$\forall a, b \in \mathbb{R}: a < b \implies (a, b) \cap \mathbb{Q} \ne \emptyset $
I split the proof into 3 cases: 


*

*$a$ is not rational, 

*$b$ is not rational, and

*both $a$ and $b$ are rational.


Is there a simpler way?

Theorem 2.19a
Let $\mathbb{F}$ be an ordered field, $A \subset \mathbb{F}$, $\alpha \in \mathbb{F}$.
$\alpha$ is the least upper bound (lub) of $A$ iff:


*

*$(\alpha, \infty) \cap A = \emptyset$, and

*$\forall \varepsilon > 0: (\alpha - \varepsilon, \alpha] \cap A \ne \emptyset$
Theorem 2.19b
Similarly, $\alpha$ is greatest lower bound (glb) of $A$ iff:


*

*$(-\infty, \alpha) \cap A = \emptyset$, and

*$\forall \varepsilon > 0: (\alpha, \alpha + \varepsilon] \cap A \ne \emptyset$

Attempt to prove
Let $\mathbb{F} = \mathbb{R}$ and $A = \mathbb{Q}$.
I think $b$ is the least upper bound of $(a, b)$. That means $\alpha = b$.
By theorem 2.19a, I get $\forall \varepsilon > 0: (b - \varepsilon, b] \cap \mathbb{Q} \ne \emptyset$.
Choose $\varepsilon = b - a$, which is greater than 0. 
Then, $(a, b] \cap \mathbb{Q} \ne \emptyset$. Therefore, if $b \notin \mathbb{Q}$, $(a, b) \cap \mathbb{Q} \ne \emptyset$.
Similarly, $[a, b) \cap \mathbb{Q} \ne \emptyset$ by theorem 2.19b. Therefore, if $a \notin \mathbb{Q}$, $(a, b) \cap \mathbb{Q} \ne \emptyset$.
If $a \in \mathbb{Q}$ and $b \in \mathbb{Q}$, $(a + b) / 2$ is a rational number between $a$ and $b$.
 A: Your proof does not seem right. In your application of Theorem 2.19, what is the set "$A$" (as in the statement of Theorem 2.19) you're using? Is it $\mathbb{Q}$? Is it $(a,b)\cap\mathbb{Q}$?
In your proof, what is "$\alpha$"? Are you defining it as the supremum of $(a,b)$, or of $(a,b)\cap\mathbb{Q}$?
This application of Theorem 2.19 is not correct, and as the remainder of you proof relies on it...

Your approach of "following the book to the letters" is quite good in my opinion to get the hang of proofs and "pure mathematics", even if time consuming.
The idea for the solution should be the following: The rational numbers are numbers of the form $k/n$, where $k$ is integer and $n$ is natural. If we fix $n$ and look at all the possible values for $k$, we get the set $\left\{\ldots,-2/n,-1/n,0,1/n,2/n,\ldots\right\}$, which essentially "divides" the real line into a bunch of intervals of diameter $1/n$. If $n$ is very large, then $1/n$ is very small, so any real number will be in one of those intervals $[k/n,(k+1)/n]$, and thus at a distance $\leq 1/n$ from $k/n$.
We thus need to make this intuitive process more precise, by approximating either end ($a$ or $b$) of the interval $(a,b)$ to some number of the form $k/n$. Even more specifically, letting $n$ very large, we try to find the number $k/n$ which "is closest to $a$, and greater to $a$", and hope that it is at the same time smaller than $b$.

Here's the general outline to the solution I wrote to this very question a long time ago (in my first Calculus exam), which formalizes the idea above:


*

*First recall the "Least Element Principle": Every nonempty subset of the natural numbers, $\mathbb{N}=\left\{1,2,\ldots\right\}$, has a minimum. (If you are really formal, you're probably using the following definition: The set of natural numbers in a field $F$ is "the intersection of all subsets $A$ of $F$ which contain $1$ and which satisfy the following property: if $a\in A$ then $a+1\in A$ as well".)

*Now recall that as a consequence, $\mathbb{N}$ is unbounded in $\mathbb{R}$.

*Equivalently, for every $\varepsilon>0$ there exists $n\in\mathbb{N}$ such that $0<1/n<\varepsilon$.

*First assume $a\geq 0$. Using the previou item, there is $n$ such that $0<1/n<b-a$. Using the Least Element Principle and unboundedness of $\mathbb{N}$, choose the smallest $k$ such that $na<k$, so $a<k/n$. By minimality of $k$, $k-1\leq na$, so $k/n\leq a+1/n<a+(b-a)=b$. It follows that $a<k/n<b$.

*In general, using unboundedness of $\mathbb{N}$, let $N$ be a natural number larger than $\max(|a|,|b|)$. Then $0\leq N+a<N+b$. By the case above, there is a rational $x$ with $N+a<x<N+b$, so $x-N$ is also rational and $a<x-N<b$.
