February 19, 2021

Constructing the Real Numbers (2) - Cauchy Sequences

Constructing the Real Numbers (2) - Cauchy Sequences

Contents

  1. Our Requirements
  2. Equivalent Cauchy Sequences
  3. The Construction
  4. Addition
  5. Multiplication
  6. Order
  7. Where is $\Q$?
  8. Verification

Our Requirements

In my last post we explored the nature of the gaps in the rational number line. In doing so, we defined Cauchy sequences and discovered that rational Cauchy sequences do not always converge to a rational number! We decided to call a metric space complete if every Cauchy sequence in that space converges to a point in the same space.

We determined that any Cauchy sequence in $\Q$ that does not converge indicates a gap in $\Q$, since points of the sequence grow closer and closer together, seemingly narrowing in on something, yet that something (their limit) is somehow missing from the space.

As an example, take this Cauchy sequence from the last post:

$$(1,\ 1.4,\ 1.41,\ 1.414,\ 1.4142,\ 1.41421,\ 1.414213,\ \ldots).$$

Here is a plot of its early behavior. As you can imagine, its early behavior is a good indication of its later behavior.

non-convergent-cauchy-sequence-1-1

If you're curious, I generated this plot with the following formula:

$$x_n = \frac{1}{10^n}\lfloor 10^n\sqrt{2}\rfloor.$$

While it might be cheating to use $\sqrt{2}$ in the definition, you cannot deny that every term in the sequence is rational!

Certainly in any sane universe, this sequence would be approaching $\sqrt{2}$. But the rational numbers aren't sane in this regard, since there is no such rational number among them. Thus, this sequence which should clearly converge does not actually do so.

We don't want our real numbers to do this. We want every Cauchy sequence to converge. We want our real numbers to be complete.

We would like $\R$ to have at least as much algebraic structure as $\Q$, so we should demand that the real numbers form an ordered field just like the rationals do. If you need a refresher on the axioms of an ordered field, they can be found in one of my earlier posts.

Furthermore, we want our $\R$ to contain a subfield $\hat{\Q}$ which mimics $\Q$ in the sense that they are isomorphic as fields. This isomorphism will allow us to treat the rational numbers as though they're a subfield of the real numbers, despite technically being fundamentally different types of objects.

We also want our real numbers to extend the rationals, in that their arithmetic operations and their order should be compatible between $\Q$ and $\hat{\Q}$.

So to summarize, we are looking to construct a complete ordered field which extends the rationals. Achieving all of this is not as difficult as you might think!

Equivalent Cauchy Sequences

Your first thought might (or might not) be to simply use the set of all rational Cauchy sequences as our real numbers. After all, every rational number $p$ corresponds to a constant rational Cauchy sequence $(p,\ p,\ p,\ \ldots)$. Furthermore, the Cauchy sequences that don't converge can in some sense be thought of as representing the gap, i.e. the number it ought to be converging to. As one example, the rational Cauchy sequence $(1,\ 1.4,\ 1.41,\ \ldots)$ from above might not technically converge, but what's stopping us from just naming that sequence itself $\sqrt{2}$?

This is almost what we do, but there's an issue with trying to define the real numbers that way. To understand the issue with such a definition, observe the following.

non-convergent-cauchy-sequence-2

This is another rational Cauchy sequence that ought to converge to $\sqrt{2}$ but technically doesn't. There are actually way more of them, these Cauchy sequences that all narrow in on the same gap. Infinitely many, in fact, for every gap! Therefore they should all represent the same real number. That is, according to the idea above, all of these sequences would be named $\sqrt{2}$.

But the real numbers aren't "the real numbers plus infinite other Cauchy sequences floating around." We'd have to choose just one Cauchy sequence to represent each real number. So which one do we choose? There's no obvious candidate, since if we tried to pick out only the constant sequences then the "irrational" numbers wouldn't be defined since no constant rational Cauchy sequence can fail to converge.

This leaves us with two options. The first is to invoke the axiom of choice to choose just one Cauchy sequence to represent each real number and look the other way, whistling. Or the other option is to group all similarly-tailed Cauchy sequences into one set, and then call that entire set one real number.

We're going to take the second approach. But in order to do so, we need to determine precisely how to identify similarly-tailed Cauchy sequences. After all, it's not like we can just say they converge to the same limit, since they don't converge at all. Not to fear! If we subtract two things that are both "converging" to the same thing, their difference ought to converge to zero, regardless of whether the minuend and subtrahend converged. (Yes, I definitely had to look those terms up.)

To make this more rigorous, let $\mathcal{C}$ denote the set of all rational Cauchy sequences. This set is our prototype for $\R$, but we need to shrink it first. We can define an "addition" $\oplus$ on $\mathcal{C}$ by adding sequences term-wise. That is, if $(x_0,\ x_1,\ x_2,\ \ldots)$ and $(y_0,\ y_1,\ y_2,\ \ldots)$ are Cauchy sequences in $\mathcal{C}$ then their sum is

$$(x_0,\ x_1,\ x_2,\ \ldots) \oplus (y_0,\ y_1,\ y_2,\ \ldots) = (x_0+y_0,\ x_1+y_1,\ x_2+y_2,\ \ldots).$$

Theorem. The sum of two rational Cauchy sequences is a rational Cauchy sequence.

Proof. Let $(x_0,\ x_1,\ x_2,\ \ldots)$ and $(y_0,\ y_1,\ y_2,\ \ldots)$ be rational Cauchy sequences. Then for any rational number $\epsilon>0$, there exists a natural number $N$ such that $\abs{x_n-x_m}<\frac{\epsilon}{2}$ and $\abs{y_n-y_m}<\frac{\epsilon}{2}$ whenever $n,m>N$. But then

$$\begin{align}
\abs{(x_n+y_n) - (x_m+y_m)} &= \abs{(x_n-x_m) + (y_n-y_m)} \\[.8em]
&\le \abs{x_n-x_m} + \abs{y_n-y_m} \\[.5em]
&< \frac{\epsilon}{2} + \frac{\epsilon}{2} \\[.5em]
&= \epsilon,
\end{align}$$

by the triangle inequality, and so it follows that $(x_0+y_0,\ x_1+y_1,\ x_2+y_2,\ \ldots)$ is a Cauchy sequence.

That each term in the sum is rational follows from the fact that $\Q$ is closed under addition.

Of course, we can use the above addition to define a subtraction $\ominus$ in the obvious way. Now look, the two $\sqrt{2}$-tending rational Cauchy sequences depicted above might not converge, but their difference is a Cauchy sequence which converges to zero!

difference-of-similarly-tailed-non-convergent-cauchy-sequences

Now we can definitively identify which rational Cauchy sequences represent the same real number. Let's do this, using the power of equivalence relations. If you need a refresher on this topic, see my earlier post.

Definition. We define the relation $\sim_\R$ on the set $\mathcal{C}$ as follows:

$(x_0,\ x_1,\ x_2,\ \ldots) \sim_\R (y_0,\ y_1,\ y_2,\ \ldots)$ if and only if $\displaystyle\lim_{n\to\infty}(x_n-y_n) = 0$.

for any rational Cauchy sequences $(x_0,\ x_1,\ x_2,\ \ldots)$ and $(y_0,\ y_1,\ y_2,\ \ldots)$.

Of course, we need to prove that this relation $\sim_\R$ is actually an equivalence relation.

Theorem. The relation $\sim_\R$ on the set $\mathcal{C}$ of rational Cauchy sequences is an equivalence relation.

Proof. It suffices to show that $\sim_\R$ is reflexive, symmetric and transitive.

We argue first that $\sim_\R$ is reflexive. Suppose $\mathbf{x}=(x_n)_{n\in\N}$ is a rational Cauchy sequence. Then certainly

$$\begin{align}
\lim_{n\to\infty}(x_n-x_n) &= \lim_{n\to\infty}(0) \\[.5em]
&= 0,
\end{align}$$

and so it follows that $\mathbf{x} \sim_\R \mathbf{x}$. Thus, $\sim_\R$ is reflexive.

We argue next that $\sim_\R$ is symmetric. Suppose $\mathbf{x}=(x_n)_{n\in\N}$ and $\mathbf{y}=(y_n)_{n\in\N}$ are rational Cauchy sequences for which $\mathbf{x} \sim_\R \mathbf{y}$. Then

$$\lim_{n\to\infty}(x_n - y_n) = 0,$$

and so

$$\begin{align}
\lim_{n\to\infty}(y_n - x_n) &= -\lim_{n\to\infty}(y_n - x_n) \\[.5em]
&= 0.
\end{align}$$

Therefore, $\mathbf{y} \sim_\R \mathbf{x}$, and so $\sim_\R$ is symmetric.

Lastly, we argue that $\sim_\R$ is transitive. Suppose $\mathbf{x}=(x_n)_{n\in\N}$, $\mathbf{y}=(y_n)_{n\in\N}$ and $\mathbf{z}=(z_n)_{n\in\N}$ are rational Cauchy sequences for which both $\mathbf{x} \sim_\R \mathbf{y}$ and $\mathbf{y} \sim_\R \mathbf{z}$. Then

$$\begin{align}
\lim_{n\to\infty}(x_n - y_n) &= 0 \\[.5em]
\lim_{n\to\infty}(y_n - z_n) &= 0.
\end{align}$$

Thus,

$$\begin{align}
\lim_{n\to\infty}(x_n - z_n) &= \lim_{n\to\infty}(x_n-y_n+y_n-z_n) \\[.5em]
&= \lim_{n\to\infty}(x_n-y_n) + \lim_{n\to\infty}(y_n-z_n) \\[.5em]
&= 0 + 0 \\[.8em]
&= 0,
\end{align}$$

and so $\mathbf{x} \sim_\R \mathbf{z}$. Thus $\sim_\R$ is transitive, completing the proof.

The Construction

Since the relation $\sim_\R$ as defined above is an equivalence relation, we are free to construct its equivalence classes. Each equivalence class is determined completely by the behavior of its constituent sequences' tails. That is, two rational Cauchy sequences are in the same equivalence class if their difference tends to zero.

If we construct the quotient group modulo $\sim_\R$, i.e. the set of all these equivalence classes, we obtain the real numbers.

Definition. We define the set of real numbers to be the quotient set

$$\R=\mathcal{C}/\negthickspace\sim_\R.$$

Intuitively, this is what $\R$ looks like as we have defined it:

quotient-set-1

To reiterate, each real number in our construction is a collection of Cauchy sequences whose pairwise differences tend to zero, that is, they are similarly-tailed. We can denote the equivalence class of a rational Cauchy sequence $(x_0,\ x_1,\ x_2,\ \ldots)$ by $[(x_0,\ x_1,\ x_2,\ \ldots)]$. Of course, for any two similarly-tailed sequences $\mathbf{x}, \mathbf{y}\in\mathcal{C}$ with $\mathbf{x} \sim_\R \mathbf{y}$ we have that $[\mathbf{x}] = [\mathbf{y}]$.

For example,

$$\begin{align}
[(1,\ 1,\ 1,\ \ldots)] &= [(0,\ \tfrac{1}{2},\ \tfrac{3}{4},\ \ldots)] \\[.5em]
&= [(0,\ 0.9,\ 0.99,\ \ldots)].
\end{align}$$

Of course, we still have to define the arithmetic operations on the real numbers, as well as their order. These definitions must be well defined. For example, we will be defining the sum of two real numbers by choosing a representative Cauchy sequence for each out of the infinitude of Cauchy sequences that form the equivalence class corresponding to each summand. The sum will then be the equivalence class of the resulting Cauchy sequence. This process cannot depend on which representatives we choose.

To better illustrate this, let's use an analogy from $\Q$. Certainly $\frac{1}{2}$ and $\frac{2}{4}$ represent the same rational number, just as $\frac{2}{3}$ and $\frac{6}{9}$ represent the same rational number. Going back to the construction of the rationals in my earlier post, this is because $(1, 2)$ and $(2, 4)$ belong to the same equivalence class under the relation $\sim_\Q$, and likewise $(2, 3)$ and $(6, 9)$ are representatives of the same equivalence class. We require that

$$\frac{1}{2} + \frac{2}{3} = \frac{2}{4} + \frac{6}{9},$$

or else there is something wrong with our addition, namely it is not well defined. The same idea applies to our real numbers, except instead of fractions our representatives are now rational Cauchy sequences.

Addition

To make notation more concise going forward, I will start writing sequences in the form $(x_n)$, rather than $(x_0,\ x_1,\ x_2,\ \ldots)$ or $(x_n)_{n=0}^\infty$ as I have been thus far. This is shorthand, and in my opinion not great practice, but it certainly will make what comes easier to follow.

Definition. Let $[(x_n)]$ and $[(y_n)]$ be real numbers. We define their sum to be

$$\begin{align}
[(x_n)] + [(y_n)] &= [(x_n+y_n)] \\[.5em]
&= [(x_n) \oplus (y_n)],
\end{align}$$

where $\oplus$ represents the addition that we defined earlier for rational Cauchy sequences.

We need to check that this definition is well-defined. That is, if we pick two representatives $(a_n) \sim_\R (b_n)$ for the same real number and two representatives $(c_n) \sim_\R (d_n)$ for another real number, we need to check that

$$(a_n) \oplus (c_n) \sim_\R (b_n) \oplus (d_n).$$

This will ensure that

$$[(a_n)] + [(c_n)] = [(b_n)] + [(d_n)].$$

To do so, we'd need to show that the difference between $(a_n) \oplus (c_n)$ and $(b_n) \oplus (d_n)$ tends to zero, as per the definition of our equivalence relation $\sim_\R$. This is how we will proceed in the following proof.

Theorem. Addition of real numbers is well defined.

Proof. Suppose $[(a_n)] = [(b_n)]$ and that $[(c_n)] = [(d_n)]$, where all involved sequences are rational Cauchy sequences and their equivalence classes are real numbers. It suffices to show that

$$\lim_{n\to\infty}\big((a_n+c_n)-(b_n+d_n)\big)=0.$$

Since $(a_n) \sim_\R (b_n)$, we know that

$$\lim_{n\to\infty}(a_n-b_n) = 0.$$

Similarly, since $(c_n) \sim_\R (d_n)$, we know that

$$\lim_{n\to\infty}(c_n-d_n) = 0.$$

It follows that

$$\begin{align}
\lim_{n\to\infty}\big((a_n+c_n)-(b_n+d_n)\big) &= \lim_{n\to\infty}\big((a_n-b_n)+(c_n-d_n)\big) \\[.5em]
&= \lim_{n\to\infty}(a_n-b_n) + \lim_{n\to\infty}(c_n-d_n) \\[.5em]
&= 0 + 0 \\[.5em]
&= 0,
\end{align}$$

as desired. Thus, addition of real numbers is independent of the representatives chosen and is therefore well defined.

Lastly, we define the additive identity on $\R$ as follows:

Definition. The additive identity on $\R$ is the real number $0=[(0,\ 0,\ 0,\ \ldots)]$.

This shouldn't require too much explanation. We need an additive identity in order to turn $\R$ into a field later on.

Theorem. The additive identity as defined above is actually an identity for the addition defined on $\R$.

Proof. Let $[(x_n)]$ be any real number. Then

$$\begin{align}
[(x_0,\ x_1,\ x_2,\ \ldots)] + [(0,\ 0,\ 0,\ \ldots)] &= [(x_0+0,\ x_1+0,\ x_2+0,\ \ldots)] \\[.5em]
&= [(x_0,\ x_1,\ x_2,\ \ldots)],
\end{align}$$

and so $[(0,\ 0,\ 0,\ \ldots)]$ is a right identity. The proof that it is a left identity is completely symmetrical to the above.

Multiplication

Defining multiplication is only slightly more difficult. It is defined exactly as you might expect, but it requires a bit more machinery to show that our multiplication is well defined.

Just as we defined a sort of addition on the set of rational Cauchy sequences, we can define a "multiplication" $\odot$ on $\mathcal{C}$ by multiplying sequences term-wise. That is, if $(x_n)$ and $(y_n)$ are rational Cauchy sequences then their product is

$$(x_n)\odot (y_n) = (x_n\cdot y_n).$$

First, we need to show that the set $\mathcal{C}$ is closed under this multiplication. That is, we need to prove that the product of rational Cauchy sequences is a rational Cauchy sequence. The proof is not particularly difficult, but we would hit a roadblock without the following lemma.

Lemma. Every rational Cauchy sequence is bounded. That is, if $(x_n)\in\mathcal{C}$ then there exists $B\in\Q$ such that $\abs{x_n}<B$ for every $n\in\N$.

Proof. Recall that, since $(x_n)$ is a rational Cauchy sequence, for any rational $\epsilon>0$ there exists a natural number $N$ for which $\abs{x_n-x_m}<\epsilon$ whenever $n,m>N$.

Choose $\epsilon=1$ and $m=N+1$. Then according to the above, it is certainly the case that $\abs{x_n-x_{N+1}}<1$ whenever $n>N$. Combining this fact with the triangle inequality, we see that

$$\begin{align}
\abs{x_n} &= \abs{x_n-x_{N+1} + x_{N+1}} \\[.5em]
&\le \abs{x_n-x_{N+1}} + \abs{x_{N+1}} \\[.5em]
&< 1 + \abs{x_{N+1}}
\end{align}$$

for every $n>N$.

If we set

$$B_1 = 1 +\abs{x_{N+1}},$$

we see that $B_1$ is certainly a rational number and that it serves as a bound for all $\abs{x_n}$ when $n>N$.

What remains is a finite number of terms, $0\le n\le N$, and these are easy to bound. Simply set

$$B_2 = 1 + \max\{\abs{x_0},\ \abs{x_1},\ \ldots,\ \abs{x_N}\}.$$

Then certainly $\abs{x_n} < B_2$ whenever $0\le n\le N$. Choosing $B=\max\{B_1,\ B_2\}$, we find that $\abs{x_n}<B$ for all natural numbers $n$, and thus $(x_n)$ is bounded.

In case you didn't make it through that whole thing, basically what we did was notice that all the terms of any Cauchy sequence will be less than a distance of $1$ apart from each other if we go sufficiently far out, so all terms in the tail are certainly bounded. We then observed that this leaves only a finite number of terms at the beginning of the sequence, and finitely many numbers are always bounded by their maximum. Combining these two ideas, we established that all terms in the sequence are bounded.

Armed with this lemma, we can now prove what we set out to before.

Theorem. The product of two rational Cauchy sequences is a rational Cauchy sequence.

Proof. Let $(x_k)$ and $(y_k)$ be rational Cauchy sequences. Then they are both bounded. That is, there exists a rational number $B$ for which $\abs{x_k}<B$ and $\abs{y_k}<B$ for all $k$.

Now choose any rational $\epsilon>0$. Since $(x_k)$ and $(y_k)$ are Cauchy sequences, there exists $N$ such that $\abs{x_n-x_m}<\frac{\epsilon}{2B}$ and $\abs{y_n-y_m}<\frac{\epsilon}{2B}$ whenever $n,m>N$. Again, using the triangle inequality as always,

$$\begin{align}
\abs{x_n \cdot y_n - x_m \cdot y_m} &= \abs{x_n \cdot y_n - x_n \cdot y_m + x_n \cdot y_m - x_m \cdot y_m} \\[1em]
&= \abs{x_n \cdot (y_n - y_m) + y_m \cdot (x_n - x_m)} \\[1em]
&\le \abs{x_n}\cdot\abs{y_n-y_m} + \abs{y_m}\cdot\abs{x_n-x_m} \\[1em]
& < B\cdot\abs{y_n-y_m} + B\cdot\abs{x_n-x_m} \\[.8em]
& < B\cdot\frac{\epsilon}{2B} + B\cdot\frac{\epsilon}{2B} \\[.3em]
&= \frac{2B\epsilon}{2B} \\[.5em]
&= \epsilon
\end{align}$$

whenever $n>N$. Furthermore, since $x_k$ and $y_k$ are rational for every $k$, so is $x_k\cdot y_k$. It follows that $(x_k\cdot y_k)$ is a rational Cauchy sequence.

We are finally armed with the tools needed to define multiplication of real numbers.

Definition. Let $[(x_n)]$ and $[(y_n)]$ be real numbers. We define their product to be

$$\begin{align}
[(x_n)] \cdot [(y_n)] &= [(x_n\cdot y_n)] \\[.5em]
&= [(x_n) \odot (y_n)],
\end{align}$$

where $\odot$ represents the multiplication that we defined for rational Cauchy sequences.

Of course, we need to show that this multiplication is well defined. The proof closely mimics the analogous proof for addition, with a few minor alterations.

Theorem. Multiplication of real numbers is well defined.

Proof. Suppose $[(a_n)] = [(b_n)]$ and that $[(c_n)] = [(d_n)]$, where all involved sequences are rational Cauchy sequences and their equivalence classes are real numbers. It suffices to show that

$$\lim_{n\to\infty}(a_n\cdot c_n-b_n\cdot d_n)=0.$$

Since $(a_n) \sim_\R (b_n)$, we know that

$$\lim_{n\to\infty}(a_n-b_n) = 0.$$

Similarly, since $(c_n) \sim_\R (d_n)$, we know that

$$\lim_{n\to\infty}(c_n-d_n) = 0.$$

We note also that, because they are Cauchy sequences, $(a_n)$ and $(b_n)$ are bounded by some rational number $B$.

It follows that

$$\begin{align}
\lim_{n\to\infty}(a_n \cdot c_n - b_n \cdot d_n) &= \lim_{n\to\infty}(a_n \cdot c_n - a_n \cdot d_n + a_n \cdot d_n - b_n \cdot d_n) \\[.5em]
&= \lim_{n\to\infty}\big(a_n \cdot (c_n - d_n) + d_n \cdot (a_n - b_n) \big) \\[.5em]
&= \lim_{n\to\infty}\big(a_n \cdot (c_n - d_n)\big) + \lim_{n\to\infty}\big(d_n \cdot (a_n - b_n) \big) \\[.5em]
&\le \lim_{n\to\infty}\big(B \cdot (c_n - d_n)\big) + \lim_{n\to\infty}\big(B \cdot (a_n - b_n) \big) \\[.5em]
&= B\cdot\lim_{n\to\infty}(c_n - d_n) + B\cdot\lim_{n\to\infty}(a_n - b_n) \\[.5em]
&= 0 + 0 \\[.5em]
&= 0,
\end{align}$$

as desired. Thus, multiplication of real numbers is independent of the representatives chosen and is therefore well defined.

Lastly, we define the multiplicative identity on $\R$ as follows:

Definition. The multiplicative identity on $\R$ is the real number $1=[(1,\ 1,\ 1,\ \ldots)]$.

Again, we should check that this is truly an identity.

Theorem. The multiplicative identity as defined above is actually an identity for the multiplication defined on $\R$.

Proof. Let $[(x_n)]$ be any real number. Then

$$\begin{align}
[(x_0,\ x_1,\ x_2,\ \ldots)] \cdot [(1,\ 1,\ 1,\ \ldots)] &= [(x_0\cdot 1,\ x_1\cdot 1,\ x_2\cdot 1,\ \ldots)] \\[.5em]
&= [(x_0,\ x_1,\ x_2,\ \ldots)],
\end{align}$$

and so $[(1,\ 1,\ 1,\ \ldots)]$ is a right identity. The proof that it is a left identity is completely symmetrical to the above.

Order

The last definition we need is that of the order given to our newly constructed real numbers. This turns out to be really easy, so be relieved that I saved it for last.

Definition. Let $[(x_n)]$ and $[(y_n)]$ be real numbers. Their order is determined as follows: $[(x_n)] \le [(y_n)]$ if and only if there exists a natural number $N$ for which $x_n \le y_n$ whenever $n>N$.

This basically means that if we reach a point after which one sequence is forever less than the other, then the real number it represents is less than the real number that the other sequence represents. This seems fairly sensible, and it is possible to show that this is a partial order on $\R$ but I will omit that since this post is getting ridiculously long and there's still a lot left to cover.

I will also omit the proof that this order is well defined, despite its definition involving equivalence class representatives. This proof is not terribly difficult, so I'd encourage you to attempt it yourself if you're interested. The trick here is that just because a particular $N$ works for one pair doesn't necessarily mean the same $N$ will work for the other pair!

Where is $\Q$?

I promised that we would find a subfield $\hat{\Q}$ of $\R$ which is isomorphic to the field $\Q$ of rational numbers. I will do this in a somewhat roundabout way, first constructing a field homomorphism from $\Q$ into $\R$, definining $\hat{\Q}$ as the image of this homomorphism, and then establishing that the homomorphism is actually an isomorphism onto its image.

First, we need to establish that $\R$ is in fact a field with the defined operations of addition and multiplication, and with the defined additive and multiplicative identities. Proving this is exhausting but not difficult, since every single field axiom is trivially satisfied. I give a few examples in the following section. If you want to work through a few more of them, be my guest. The only field axiom that is not immediately obvious is the existence of multiplicative inverses.

Now we define a function $\varphi:\Q\to\R$ as follows. For any rational number $x\in\Q$,

$$\varphi(x) = [(x,\ x,\ x,\ \ldots)].$$

That is, we identify each rational number with the equivalence class of the constant Cauchy sequence determined by that number. Note that there are also plenty of other sequences in the same equivalence class, but for each rational number we have a "preferred" representative as given above. This is akin to choosing the canonical form of a fraction as its preferred representation, despite the fact that there are infinitely many representatives for the same rational number.

That $\varphi$ is a field homomorphism follows easily, since

$$\begin{align}
\varphi(x+y) &= [(x+y,\ x+y,\ x+y,\ \ldots)] \\[.5em]
&= [(x,\ x,\ x,\ \ldots)] + [(y,\ y,\ y,\ \ldots)] \\[.5em]
&= \varphi(x) + \varphi(y)
\end{align}$$

for any rational numbers $x$ and $y$, so $\varphi$ preserves addition. Similarly,

$$\begin{align}
\varphi(x \cdot y) &= [(x\cdot y,\ x\cdot y,\ x\cdot y,\ \ldots)] \\[.5em]
&= [(x,\ x,\ x,\ \ldots)] \cdot [(y,\ y,\ y,\ \ldots)] \\[.5em]
&= \varphi(x) \cdot \varphi(y),
\end{align}$$

so $\varphi$ preserves multiplication. Lastly, we need to check that $\varphi$ preserves the multiplicative identity. But this is clear, since

$$\varphi(1) = [(1,\ 1,\ 1,\ \ldots)].$$

This means that $\varphi$ is indeed a field homomorphism, and thus its image, $\hat{\Q}=\im\varphi$, is a subfield of $\R$. Now of course $\varphi$ is an isomorphism onto its image. That is, we can create a new function $\hat{\varphi}:\Q\to\hat{\Q}$, defined by $\hat{\varphi}(x)=\varphi(x)$ for any $x\in\Q$, and this function is a new homomorphism that behaves exactly like $\varphi$ except it is bijective since we've restricted the codomain to equal its image. That is to say, $\hat{\varphi}$ is a field isomorphism!

What does this all mean? It means that $\hat{\Q}$ is really just $\Q$ with its elements renamed via that map $\hat{\varphi}$, and that their algebra is also exactly the same once you take this renaming into account. Really then, $\Q$ and $\hat{\Q}$ can be thought of as being the same field, since field isomorphisms are equivalences in the category of fields.

All of this can be taken to mean that $\R$ is indeed an extension of $\Q$, and that we can for all intents and purposes treat $\Q$ as a subfield of $\R$ and rational numbers as elements of the reals. This is the precise sense in which $\Q$ sits inside $\R$.

Verification

As I mentioned above, the fact that $\R$ is an ordered field is not particularly interesting to prove. In fact, most of the constituent proofs feel as if you're not really doing anything at all, because $\R$ inherits most of its algebraic properties directly from $\Q$. That's because its construction in terms of sequences is termwise-rational. As an example, addition of real numbers is commutative because

$$\begin{align}
[(x_n)] + [(y_n)] &= [(x_n+y_n)] \\[.5em]
&= [(y_n+x_n)] \\[.5em]
&= [(y_n)] + [(x_n)].
\end{align}$$

This follows because $x_n$ and $y_n$ are rational for every $n$, and thus we always have that $x_n+y_n=y_n+x_n$ because the rational numbers are commutative. Hopefully this makes clearer what I meant by "inheriting" algebraic properties. Almost all of the field axioms follow from simple arguments like this.

The one field axiom that requires any real thought to prove is the existence of multiplicative inverses. I will do so right now, explicitly constructing multiplicative inverses for each nonzero real number.

Theorem. Every nonzero real number has a multiplicative inverse.

Proof. Let $x=[(x_n)]$ denote a nonzero real number. Note that being nonzero requires only that the sequence $(x_n)$ does not converge to zero. It is perfectly possible that some finite number of terms of the sequence are zero. Notice how this prevents us from defining a multiplicative inverse for $x$ as an equivalence class of a sequence of its reciprocals, since some terms might not be defined due to division by zero.

However, since only finitely many terms can be zero, there must exist a natural number $N$ such that $x_n\ne 0$ for every $n>N$. Define

$$y=\big[\big( \underbrace{1,\ 1,\ \ldots,\ 1}_{\text{N times}},\ \frac{1}{x^{N+1}},\ \frac{1}{x^{N+2}},\ \ldots \big)\big].$$

We argue that $y$ is a multiplicative inverse for $x$. Note that

$$\begin{align}
y\cdot x &= \big[\big(x_0,\ x_1,\ \ldots,\ x_N,\ x_{N+1},\ x_{N+2},\ \ldots\big)\big] \cdot \big[\big(1,\ 1,\ \ldots,\ 1,\ \frac{1}{x^{N+1}},\ \frac{1}{x^{N+2}},\ \ldots \big)\big] \\[.6em]
&= \big[\big(x_0,\ x_1,\ \ldots,\ x_N,\ \frac{x^{N+1}}{x^{N+1}},\ \frac{x^{N+2}}{x^{N+2}},\ \ldots\big)\big] \\[1em]
&= \big[\big(x_0,\ x_1,\ \ldots,\ x_N,\ 1,\ 1,\ \ldots\big)\big]
\end{align}$$

Note that there is no chance of encountering a zero in any of the denominators, since we explicitly constructed our representative for $y$ to avoid this possibility. That is why all of its leading terms are irrelevant and can in fact be anything at all, but we chose $1$s.

We see that $y_n \cdot x_n = 1$ for every $n>N$. It follows that $(y_n \cdot x_n)$ converges to $1$, and thus $y\cdot x = 1$. Thus, $y$ is a multiplicative inverse for $x$.

What is truly interesting and nontrivial is the verification that the real numbers as we've constructed them are complete. That is, we need to show that every Cauchy sequence of real numbers converges. This will indicate that the real numbers are truly gap-free, which is the entire purpose of this excercise after all. We need a bit more machinery first, and so the rest of this post will be dedicated to this effort.

Let's try to see why we need more machinery. It comes down to Cauchy sequences of real numbers being rather fearsome objects to work with. After all, real numbers are equivalence classes of rational Cauchy sequences. We are now talking about Cauchy sequences of real numbers, which are technically Cauchy sequences of equivalence classes of rational Cauchy sequences. That can be a lot to take in at first, so maybe sit with it for a minute before moving on.

Such a real Cauchy sequence might look something like this:

$$\big([(x^0_n)],\ [(x^1_n)],\ [(x^2_n)],\ \ldots \big),$$

where the superscripts are upper indices and definitely not exponentiation.

The first thing we need is the following definition:

Definition. And ordered field $\F$ is an Archimedean field (or has the Archimedean property) if for every $\epsilon\in\F$ with $\epsilon>0$, there exists a natural number $N$ for which $\frac{1}{N}<\epsilon$.

I will state without proof that $\R$ is an Archimedean field, since it inherits this property from $\Q$. You will thank me later for not proving this, since the remaining proofs in this post are not exactly short.

Theorem. The field of real numbers $\R$ is an Archimedean field.

Next, we will need the following result, which gives us an alternative way of identifying Cauchy sequences in an Archimedean field.

Theorem. Every increasing sequence which is bounded above in an Archimedean field $\F$ is a Cauchy sequence.

Proof. Let $(x_n)$ denote such a sequence. If it is eventually constant — that is, if there exists a natural number $N$ for which $x_n=x_m$ whenever $n,m>N$ — then it is trivially a Cauchy sequence. We suppose then that $(x_n)$ is not eventually constant, and proceed by contradiction.

If $(x_n)$ is not a Cauchy sequence, then there exists $\epsilon>0$ such that for any $N\in\N$, there exist $n,m>N$ with $\abs{x_n-x_m}\ge\epsilon$. Since $(x_n)$ is not eventually constant, it follows that for every $n\in\N$, there exists $n^*\in\N$ with $n^*>n$ and $x_{n^*}-x_n\ge\epsilon$. We construct a subsequence as follows:

$$\begin{align}
x_{n_0} &= x_0 \\[.5em]
x_{n_1} &= x_{n_0^*} \\
&\hphantom{||}\vdots \\
x_{n_i} &= x_{n_{i-1}^*} \\
&\hphantom{||}\vdots
\end{align}$$

Then certainly $x_{n_i}-x_{n_{i-1}}$ for every $i\in\N$. Since $(x_n)$ is bounded above, there exists $B\in\F$ with $x_n<B$ for all $n\in\N$. Define

$$k=\left\lceil\frac{B-x_0}{\epsilon}\right\rceil.$$

Then

$$\begin{align}
x_{n_k} - x_0 &= x_{n_k} - x_{n_0} \\[1em]
&= (x_{n_k} - x_{n_{k-1}}) + (x_{n_{k-1}} - x_{n_{k-2}}) + \cdots + (x_{n_1} - x_{n_0}) \\[.5em]
&= \sum_{i=1}^k (x_{n_i} - x_{n_{i-1}}) \\
&\ge \sum_{i=1}^k \epsilon \\[.5em]
&= k\cdot\epsilon \\[.5em]
&= \left\lceil\frac{B-x_0}{\epsilon}\right\rceil \cdot \epsilon \\[.5em]
&\ge \frac{B-x_0}{\epsilon} \cdot \epsilon \\[.5em]
&= B-x_0.
\end{align}$$

Adding $x_0$ to both sides, we see that $x_{n_k}\ge B$, but this is a contradiction since $B$ is an upper bound for $(x_n)$. It follows that $(x_n)$ must be a Cauchy sequence, completing the proof.

There is a symmetrical result if a sequence is decreasing and bounded below, and the proof is entirely symmetrical as well.

We just need one more intermediate result before we can prove the completeness of $\R$. This one's not too difficult. Notice that in the below proof, I am making no distinction between rational numbers in $\Q$ and their corresponding real numbers in $\hat{\Q}$, referring to both as rational numbers.

Theorem. Let $x$ be any real number, and suppose $\epsilon$ is a rational number with $\epsilon>0$. Then there exists a rational number $p$ for which $\abs{x-p}<\epsilon$.

Proof. Since $x$ is a real number, there exists some Cauchy sequence $(x_n)$ for which $x=[(x_n)]$. Since $(x_n)$ is a Cauchy sequence, there exists a natural number $N$ for which $\abs{x_n-x_m}<\epsilon$ whenever $n,m>N$. Choose $k>N$, and consider the constant Cauchy sequence $(x_k)_{n=0}^\infty = (x_k,\ x_k,\ x_k,\ \ldots)$. We define the rational number $p=[(x_k)_{n=0}^\infty]$.

Notice that

$$\begin{align}
x-p &= [(x_n-x_k)_{n=0}^\infty], \\[.5em]
p-x &= [(x_k-x_n)_{n=0}^\infty].
\end{align}$$

Since $k>N$, it follows that $x_n-x_k<\epsilon$ and $x_k-x_n<\epsilon$ for any $n>N$. Thus, $x-p<\epsilon$ and $p-x<\epsilon$ by definition, and so the result follows.

Intuitively, what we have just shown is that any real number has a rational number as close to it as we'd like. That is, a real number can be approximated to arbitrary precision by rational numbers. This is not terribly surprising, since we defined $\R$ with exactly this in mind. Interestingly, the above result is equivalent to the fact that the topological closure of $\Q$, viewed as a subspace of $\R$, is $\R$ itself. We thus say that $\Q$ is dense in $\R$.

Now for the main event. Let's show that $\R$ is complete.

Theorem. The set $\R$ of real numbers is complete.

Proof. Suppose $(a_k)_{k=0}^\infty$ is a Cauchy sequence of real numbers. Then for each natural number $k$, it follows that $a_k=[(a_m^k)_{m=0}^\infty)]$, where $(a_m^k)_{m=0}^\infty$ is a rational Cauchy sequence.

By the Archimedean property, there exists a natural number $N_k>N_{k-1}$ for which $\abs{a_n^k-a_m^k}<\frac{1}{k}$ whenever $n,m>N_k$. Thus $(N_k)_{k=0}^\infty$ is a strictly increasing sequence of natural numbers.

We define a new sequence by

$$(b_n)_{n=0}^\infty = (a_{N_k}^k)_{k=0}^\infty,$$

and argue first that it is a rational Cauchy sequence.

Choose any rational number $\epsilon>0$. Since $(a_k)_{k=0}^\infty$ is a Cauchy sequence, there exists a natural number $M_1$ for which $\abs{a_n-a_m}<\frac{\epsilon}{2}$ whenever $n,m>M_1$. This in turn implies that there exists a natural number $M_2$ for which $\abs{a_i^n-a_i^m}<\frac{\epsilon}{2}$ whenever $i>M_2$. Let $M=\max\set{M_1, M_2}$. Then for any natural numbers $n, m$ with $n>m>M$, it follows from the triangle inequality that

$$\begin{align}
\abs{b_n-b_m} &= \abs{a_{N_n}^n - a_{N_m}^m} \\[.5em]
&= \abs{a_{N_n}^n - a_{N_n}^m + a_{N_n}^m - a_{N_m}^m} \\[.5em]
&\le \abs{a_{N_n}^n - a_{N_n}^m} + \abs{a_{N_n}^m - a_{N_m}^m}.
\end{align}$$

Notice that $N_n>n>M\ge M_2$ and that $n,m>M>M_1$. It follows that $\abs{a_{N_n}^n - a_{N_n}^m}<\frac{\epsilon}{2}$. Since $(N_k)_{k=0}^\infty$ is strictly increasing, certainly $N_n>N_m$, and so

$$\begin{align}
\abs{a_{N_n}^m - a_{N_m}^m} &< \frac{1}{m} \\[.5em]
&< \frac{1}{M} \\[.5em]
&< \frac{\epsilon}{2}.
\end{align}$$

This means that

$$\begin{align}
\abs{b_n-b_m} &\le \abs{a_{N_n}^n - a_{N_n}^m} + \abs{a_{N_n}^m - a_{N_m}^m} \\[.5em]
&< \frac{\epsilon}{2} + \frac{\epsilon}{2} \\[.5em]
&= \epsilon
\end{align}$$

for all $n>m>M$, so $(b_n)_{n=0}^\infty$ is a rational Cauchy sequence as claimed.

Now we are free to define the real number

$$b=[(b_n)_{n=0}^\infty].$$

We claim that our original real Cauchy sequence $(a_k)_{k=0}^\infty$ converges to $b$. Consider the sequence $(a_k-b)_{k=0}^\infty$, and observe that for any natural number $k$,

$$\abs{a_k-b} = [(\abs{a_i^k - a_{N_k}^k})_{i=0}^\infty].$$

Furthermore, for any natural number $i\ge N_k$ we have that

$$\begin{align}
\abs{a_i^k - a_{N_k}^k} &< \frac{1}{k} \\[.5em]
&= \frac{2}{k} - \frac{1}{k}.
\end{align}$$

Therefore,

$$\begin{align}
\abs{a_k-b} &= [(\abs{a_i^k - a_{N_k}^k})_{i=0}^\infty] \\[.5em]
&< \frac{2}{k}.
\end{align}$$

It follows that $(\abs{a_k-b})_{k=0}^\infty$ converges to $0$, or equivalently, $(a_k)_{k=0}^\infty$ converges to $b$, as desired. We have shown that every real Cauchy sequence converges to a real number, and thus $\R$ is complete.

Voila! This means that our construction of the real numbers is complete in the sense that every Cauchy sequence converges. So we've accomplished exactly what we set out to, and our real numbers satisfy all the properties we wanted while filling in the gaps in the rational numbers!

You may have noticed that the result I proved earlier (about every increasing rational sequence which is bounded above being a Cauchy sequence) was mysteriously nowhere to be found in the above proof. That's because I saved the best for last.

Theorem. The set $\R$ of real numbers has the least upper bound property.

Proof. Suppose $X\subset\R$ is nonempty and bounded above. Then there exists some real number $x_0\in X$ and an upper bound $y_0$ for $X$. Define two new sequences as follows:

$$x_{n+1} =
\begin{cases}
\frac{x_n+y_n}{2} & \text{if } \frac{x_n+y_n}{2} \text{ is not an upper bound for } X, \\[.5em]
x_n & \text{otherwise},
\end{cases}$$

$$y_{n+1} =
\begin{cases}
\frac{x_n+y_n}{2} & \text{if } \frac{x_n+y_n}{2} \text{ is an upper bound for } X, \\[.5em]
y_n & \text{otherwise}.
\end{cases}$$

sequences

Notice that this construction guarantees that $y_n>x_n$ for every natural number $n$, since each $y_n$ is an upper bound for $X$. It follows that $(x_n)$ is bounded above and that $(y_n)$ is bounded below. Furthermore, $x_{n+1}>x_n$ for every $n\in\N$, so $(x_n)$ is increasing. Similarly, $y_{n+1}<y_n$ for every $n\in\N$ and so $(y_n)$ is decreasing. It follows that both $(x_n)$ and $(y_n)$ are Cauchy sequences.

Choose any natural number $n$. Then by the density of $\Q$ in $\R$, there exists a rational number $p_n$ for which $\abs{y_n-p_n}<\frac{1}{n}$. We consider now the sequence $(p_n)$ and argue that it is a Cauchy sequence.

Choose any $\epsilon>0$ and, using the Archimedean property, choose a natural number $N_1$ for which $\frac{1}{N_1}<\frac{\epsilon}{3}$. Since $(y_n)$ is a Cauchy sequence, there exists a natural number $N_2$ for which $\abs{y_n-y_m}<\frac{\epsilon}{3}$ whenever $n,m>N_2$. Define $N=\max\set{N_1, N_2}$. Then for any $n,m>N$,

$$\begin{align}
\abs{p_n-p_m} &= \abs{(p_n-y_n)+(y_n-y_m)+(y_m-p_m)} \\[.5em]
&\le \abs{p_n-y_n} + \abs{y_n-y_m} + \abs{y_m-p_m} \\[.5em]
&< \frac{\epsilon}{3} + \frac{\epsilon}{3} + \frac{\epsilon}{3} \\[.5em]
&= \epsilon.
\end{align}$$

It follows that $(p_n)$ is a Cauchy sequence. We consider the real number $p=[(p_n)]$ and claim that $(a_n)$ converges to $p$. But we are still quite far from showing this. We will argue first that $(y_n)$ converges to $p$.

For any natural number $n$, define the real number

$$\overline{p_n} = [(p_n,\ p_n,\ p_n,\ \ldots)].$$

Since $(p_n)$ is a Cauchy sequence, it follows that

$$\lim_{n\to\infty}(\overline{p_n}-p) = 0.$$

Furthermore, $y_n-\overline{p_n}<\frac{1}{n}$ by construction, and so

$$\lim_{n\to\infty}(y_n-\overline{p_n}) = 0.$$

Thus,

$$\begin{align}
\lim_{n\to\infty}(y_n-p) &= \lim_{n\to\infty}(y_n-\overline{p_n}+\overline{p_n}-p) \\[.5em]
&= \lim_{n\to\infty}(y_n-\overline{p_n}) + \lim_{n\to\infty}(\overline{p_n}-p) \\[.5em]
&= 0 + 0 \\[.5em]
&= 0,
\end{align}$$

and so $(y_n)$ converges to $p$.

Next, we show that $(x_n)$ also converges to $p$. For any natural number $n$, by definition we have that either $y_{n+1}=\frac{x_n+y_n}{2}$ and $x_{n+1}=x_n$ or $y_{n+1}=y_n$ and $x_{n+1}=\frac{x_n+y_n}{2}$. In the first case,

$$\begin{align}
y_{n+1}-x_{n+1} &= \frac{x_n+y_n}{2} - x_n \\[.5em]
&= \frac{y_n-x_n}{2}.
\end{align}$$

In the second case,

$$\begin{align}
y_{n+1}-x_{n+1} &= y_n - \frac{x_n+y_n}{2} \\[.5em]
&= \frac{y_n-x_n}{2},
\end{align}$$

so $y_{n+1}-x_{n+1} = \frac{y_n-x_n}{2}$ in any case. Thus,

$$\begin{align}
y_1-x_1 &= \frac{y_0-x_0}{2} \\[.5em]
y_2-x_2 &= \frac{y_1-x_1}{2} = \frac{y_0-x_0}{2^2} \\
&\hphantom{||}\vdots \\
y_n-x_n &= \frac{y_0-x_0}{2^n}.
\end{align}$$

Certainly $y_0>x_0$ since $x_0\in X$ and $y_0$ is an upper bound for $X$, and so $y_0-x_0>0$. Notice also that $\frac{1}{2^n}<\frac{1}{n}$ for every natural number $n$. Choose any $\epsilon>0$. Then from the Archimedean property, there exists a natural number $N$ for which $\frac{y_0-x_0}{2^n}<\epsilon$ whenever $n>N$. Thus,

$$\begin{align}
y_n-x_n &< \frac{y_0-x_0}{2^n} \\[.5em]
&< \epsilon,
\end{align}$$

and so $\lim_{n\to\infty}(y_n-x_n)=0$. But we have already seen that $(y_n)$ converges to $p$, and so it follows that $(x_n)$ converges to $p$ as well. We claim that $p$ is a least upper bound for $X$.

We will show first that $p$ is an upper bound, proceeding by contradiction. Suppose $p$ is not an upper bound. Then there exists $z\in X$ for which $p<z$. Let $\epsilon = z-p$. Then certainly $\epsilon>0$, and since $(y_n)$ converges to $p$ and is non-increasing, there exists a natural number $n$ for which $y_n-p<\epsilon$. That is,

$$\begin{align}
y_n &< p + \epsilon \\[.5em]
&= p + (z - p) \\[.5em]
&= z.
\end{align}$$

But since $y_n$ is by definition an upper bound for $X$, and $z\in X$, this is a contradiction. It follows that $p$ is an upper bound for $X$.

It remains to show that $p$ is a least upper bound for $X$. Recall that, by definition, $x_n$ is not an upper bound for any $n\in\N$. That is, for each natural number $n$, there exists $z_n\in X$ for which $x_n\le z_n$. We have seen already that $(x_n)$ converges to $p$, and since it is a non-decreasing sequence, it follows that for any $\epsilon>0$ there exists a natural number $N$ for which $x_n>p-\epsilon$ whenever $n>N$. This in turn implies that

$$\begin{align}
z_n &\ge x_n \\[.5em]
&> p - \epsilon
\end{align}$$

whenever $n>N$. We have shown that for each $\epsilon>0$, there exists $z\in X$ with $z>p-\epsilon$. Thus, $p$ is the least upper bound for $X$, completing the proof.

So our construction of the real numbers as equivalence classes of Cauchy sequences, which didn't even take the matter of the least upper bound property into account, just so happens to satisfy the least upper bound property. This indicates that maybe completeness and the least upper bound property might be related somehow. In fact, I shall soon show that, for ordered fields, they are equivalent!