Show every real number is the supremum of a set of rational numbers

I want to show that

Every real number $x$ is the supremum of a set of rational numbers $A$.

My attempt

Let $A := \{r \in \mathbb{Q} \,|\, r \lt x\}$ be a set of rational numbers which exists $\forall x \in \mathbb{R}$. $A$ is bounded from above by $x$ per definition and is non-empty (for example $\lfloor x-1 \rfloor \in A$). Thus $\sup(A)$ exists. I claim that $\sup(A) = x$ and show the two conditions of the supremum.

1. $\forall a \in A: a \le x$.

This is true by definition of $A$.

2. $\forall \varepsilon \gt 0 \,\exists a \in A: a \gt x-\varepsilon$.

Because $\mathbb{Q}$ is dense in $\mathbb{R}$, $\forall x,y \in \mathbb{R} \,\exists r \in \mathbb{Q}: x \lt r \lt y$. Let's choose the rational number $r \in \mathbb{Q}$, so that $x-\varepsilon \lt r \lt x$. Then $r \in A$ by definition of $A$ and $r \gt x-\varepsilon$ as needed. So 2. is true as well.

Therefore $x = \sup(A)$ is indeed the supremum of $A$.

Questions

Is the proof correct? Do you think I could write it better or simpler? Really any feedback is appreciated!

• It is correct and I don't think there is a shorter way. Commented Dec 8, 2017 at 21:45

Mistake 1: The reason for $A$ being non-empty is not that $x-1 \in A$ since that may not be a rational number.

Mistake 2: "I assume that $\sup(A)=x\ldots$" Actually you're claiming that $\sup(A)=x.$

Other than this the proof seems right.

• Yeah, you're right. How would one quickly show that the set is indeed non-empty?
– mdcq
Commented Dec 8, 2017 at 22:00
• Greatest integer less than $x$ would be in $A.$ Commented Dec 8, 2017 at 22:01
• Thanks. I will write it as $\lfloor x-1 \rfloor \in A$ into the question.
– mdcq
Commented Dec 8, 2017 at 22:06
• Now that proof is absolutely correct. Commented Dec 8, 2017 at 22:07