TITLE: Completion of rational numbers via Cauchy sequences
QUESTION [75 upvotes]: Can anyone recommend a good self-contained reference for completion of rationals to get reals using Cauchy sequences?

REPLY [18 votes]: These are the handout articles, given to me by our Professor, when i took Real Analysis class. I hope you find it useful. (TeXing it up was tough work. Phew!!)
Often i have omitted the proof, since i felt that one can do it with little bit of thinking. But if you find that you need a proof, of theorem or a lemma, please inform, i shall be happy to edit it.
Definition 1. Let $\mathbb{Q}$ be the set of all rational numbers. A sequence $(x_{n}), x \in \mathbb{Q}$ is said to be Cauchy if for every $\epsilon \in \mathbb{Q}$, there exists a positive integer $n_{0}$ such that $|x_{n}-x_{m}|<\epsilon$ for all $n,m \geq n_{0}$.
Definition 2. A sequence $(x_{n})$ in $\mathbb{Q}$ is said to be convergent in $\mathbb{Q}$, to a rational number $a$, if for every $\epsilon^{+} \in \mathbb{Q}$, there exists a $n_{0} \in \mathbb{N}$, such that $|x_{n}-a| < \epsilon$ for all $n \geq n_{0}$. We denote this by $\lim{x_{n}}=a$.
Notations: Let $\mathcal{C}$ be the set of all Cauchy sequences in $\mathbb{Q}$ and let $\mathcal{N}$ be the set of all $(x_{n}) \in \mathcal{C}$ such that $\lim{x_{n}}=0$. Elements of $\mathcal{N}$ are called null sequences. We define addition and multiplication of two Cauchy sequences $(x_{n})$ and $(y_{n})$ in $\mathcal{C}$ as follows: $(x_{n}) + (y_{n})= (x_{n}+y_{n})$ and $(x_{n}) \cdot (y_{n}) = (x_{n}y_{n})$.
Lemma 1. $\mathcal{C}$, is a commutative ring under the addition and multiplication defined above.
Definition 3. If $R$ is a ring then a non empty subset $I \subseteq R$ is said to be an ideal of $R$, if for all $x,y \in I$ and $r \in R$, $x+y \in I$ and $rx \in I$.
Lemma 2. $\mathcal{N}$ is an ideal of $\mathcal{C}$.
Definition 4. We define a relation $\sim$ on $\mathcal{C}$ as follows: For $(x_{n}), (y_{n}) \in \mathcal{C}$, we say that $(x_{n}) \sim (y_{n})$ iff $(x_{n})-(y_{n})= (x_{n}-y_{n}) \in \mathcal{N}$. This $\sim$ is an equivalence relation. We define the equivalence class $\mathcal{C}/\mathcal{N}= \{(x_{n}) + \mathcal{N} \ | \ (x_{n}) \in \mathcal{C}\}$ as the set of real numbers denoted by $\mathbb{R}$. 
We now make $\mathcal{C}/\mathcal{N}$ into a ring. This is a very common result in algebra if $R$ is a ring and $I$ is an ideal of $R$, then $R/I$ can be made into a ring. We define addition and multiplication in $\mathcal{C}/\mathcal{N}$ as follows:

For $(x_{n}) + \mathcal{N}, (y_{n}) +\mathcal{N} \in \mathcal{C}/\mathcal{N}$
$(x_{n})+\mathcal{N} + (y_{n})+\mathcal{N} = (x_{n}+y_{n})+\mathcal{N}$, and $(x_{n}+\mathcal{N})\cdot ((y_{n})+\mathcal{N}) = (x_{n}y_{n})+\mathcal{N}$.

Lemma 3. Let $R$ be a commutative ring and $I$ be an ideal in $R$. Let $R/I$ the quotient of $R$, w.r.t the equivalence relation $\sim$ on $R$ as: $x \sim y$ iff $x-y \in I$. If $x \sim x_{1}$ and $y \sim y_{1}$, then $x+y+I=x_{1}+y_{1}+I$ and $xy+I=x_{1}y_{1}+I$.
Lemma 4. Let $(x_{n}) \in \mathcal{C}/\mathcal{N}$. There exists $\epsilon>0$ and $n_{0} \in \mathbb{N}$, such that $|x_{n}|>\epsilon$, for all $n \geq n_{0}$. In fact, there exists $\epsilon >0$ and $n_{0} \in \mathbb{N}$ such that only one of the following is true:

Either $x_{n} \geq \epsilon$, for all $n \geq n_{0}$, or
$x_{n} \leq - \epsilon$, for all $n \geq n_{0}$.

Theorem. $\mathbb{R} = \mathcal{C}/\mathcal{N}$ is a field.
Proof. It is easy to show that $\mathbb{R}$ is a commutative ring witht he zero element $\mathcal{N}$ and the identity element $1+\mathcal{N}$. We need to check that if $x+\mathcal{N} \in \mathcal{C}/\mathcal{N}$ and $x \notin \mathcal{N}$, then it is invertible. That is, there exists $y+\mathcal{N}$ such that $(x+\mathcal{N})\cdot(y+\mathcal{N}=1+\mathcal{N}$. 
Let $x+\mathcal{N} \in \mathcal{C}/\mathcal{N}$ and $x \notin \mathcal{N}$. By Lemma 4 there exists $\epsilon >0$, and $N \in \mathbb{N}$ such that $x_{n}>\epsilon$ for all $n \geq N$. Define $y=(y_{1},y_{2},\cdots,y_{N},0,...)$ such that $x_{i}+y_{i} \neq 0$, for $1 \leq i \leq N$. Note that $x+\mathcal{N}=(x+y)+\mathcal{N}$. Define $$(x+y)^{-1}=\biggl( \frac{1}{x_{1}+y_{1}},\cdots,\frac{1}{x_{N}+y_{N}},\cdots\biggr)$$ We claim that $(x+y)^{-1} \in\mathcal{C}$. Let $\delta \in\mathbb{Q}^{+}$ be given. For all $m,n \geq N$, $$\biggl|\frac{1}{x_{n}}-\frac{1}{x_{m}}\biggr|=\frac{|x_{m}-x_{n}|}{|x_{n}\cdot |x_{m}|}<\frac{|x_{n}-x_{m}|}{\epsilon^{2}}$$
Since $(x_{n})\in\mathcal{C}$, for the above $\delta$ there exists $n_{1} \in \mathbb{N}$, such that $|x_{m}-x_{n}| < \delta \epsilon^{2}$, for all $n,m \geq n_{1}$. Choose $n_{0}=\max (N,n_{1})$, and conclude the result. 
Definition 5. An ideal $I$ of a ring $R$ is said to be a maximal ideal if $J$ is an ideal containing $I$ properly, then $J=R$.
Remark 1. In fact we have proved that $\mathcal{N}$ is a maximal ideal of $\mathcal{C}$.
Definition 6. A cauchy sequence $(x_{n}) \in \mathbb{Q}$ is said to be positive if there exists $\epsilon \in \mathbb{Q}^{+}$, and $N \in \mathbb{N}$ such that $x_{n} > \epsilon$, for all $n \geq N$.
Definition 7. A real number $\alpha \in \mathbb{R}$ is said to be positive, if $(x_{n}) \in \alpha$, then $(x_{n})$ is a positive sequence in $\mathbb{Q}$.
Theorem. If $(x_{n})$ is a positive sequence in $\mathcal{C}$, and $(z_{n}) \in \mathcal{N}$, then $(x_{n}+z_{n})$ is a positive sequence in $\mathcal{C}$. If $(x_{n})$ and $(y_{n})$ are positive sequences in $\mathcal{C}$, then $(x_{n}+y_{n})$ and $(x_{n}y_{n})$ are positive sequences in $\mathcal{C}$
We denote the set of all positive sequences in $\mathcal{C}/\mathcal{N}$ by $\mathbb{R}^{+}$.
Definition 8. Let $\mathbb{F}$ be a field. By an order on $\mathbb{F}$, we mean a subset $\mathbb{F}^{+}$ of $\mathbb{F}$, with the following properties:

Any $x \in \mathbb{F}$, lies in exactly one of the sets $\mathbb{F}^{+},\{0\},$ and $\mathbb{F}^{-}=-\mathbb{F}^{+}$.
For any $x,y \in \mathbb{F}^{+}$ their sum $x+y$ and the product $xy$ again lie in $\mathbb{F}^{+}$.

Theorem. $\mathbb{R}$ is an ordered field with an order $\mathbb{R}^{+}$.
Definition 9. Let $\overline{x},\overline{y} \in \mathbb{R}$. We say that $\overline{x}>\overline{y}$ if $\overline{x}-\overline{y} \in \mathbb{R}^{+}$.
Theorem. $\mathbb{R}$ has the Archimedean property, that is, if $\overline{x} \in \mathbb{R}^{+}$ and $\overline{y}\in\mathbb{R}$, then there exists $n \in \mathbb{N}$ such that $n\overline{x}>\overline{y}$.
Corollary. $\mathbb{N}$ is not bounded in $\mathbb{R}$.
Theorem. $\mathbb{R}=\mathcal{C}/\mathcal{N}$, has the l.u.b property, that is if $S$ is a non empty subset of $\mathbb{R}$, which is bounded above, then there exists a real number which is the least upper bound for $S$.
Proof. Let $S \subseteq \mathbb{R}$, be non empty and bounded above. Let $M \in \mathbb{R}$, be such that $x \leq M$ for all $x \in S$. Without loss of generality we can assume that $M \in \mathbb{Z}$. Fix $x \in S$. We claim that there exists $m \in \mathbb{Z}$, such that $m \leq x$.
For otherwise, $m>x$, for all $m \in \mathbb{Z}$, which implies that $-m<-x$, for all $m \in \mathbb{Z}$. This implies that $\mathbb{N}$ is bounded, which is a contradiction. Hence, $m \leq x \leq M$ for some $m, M \in \mathbb{Z}$. Since $S$ is bounded above by $M$, if at all the l.u.b exists, it has to lie in $[m,M]$. For each $n \in \mathbb{N}$, consider the set $$B_{n} = \Bigl\{ \frac{c}{2^{n}} \ | \ m \leq \frac{c}{2^{n}} \leq M, \ c \in \mathbb{Z}\Bigr\}$$ Note that, since $M= \frac{M.2^{n}}{2^{n}}$, $M \in B_{n}$. Hence $B_{n}$ is not empty.Also, if $\frac{c}{2^{m}}$, then $\frac{2c}{2^{n+1}} \in B_{n+1}$. Hence $B_{n} \subseteq B_{n+1}$ for all $n \in \mathbb{N}$. Since there are only finitely many integers between $m2^{n}$ and $M2^{n}$, $B_{n}$ is finite. Hence there are only finitely many upper bounds for $S$ in $B_{n}$. Let $a_{n}$ be the smallest such upper bound for $S$ in $B_{n}$, Since for $n \geq m$, $B_{m} \subseteq B_{n}$, it follows that $a_{m} \in B_{n}$ and hence $a_{n} \leq a_{m}$ for all $n \geq m$. 
Now we claim that for each $n \in \mathbb{N}$, $a_{n} - \frac{1}{2^{n}}$ is not an upper bound for $S$. If $m \leq a_{n} - \frac{1}{2^{n}}$, then we are through, since $a_{n}$ is the least upper bound for $S$ in $B_{n}$, $a_{n}-\frac{1}{2^{n}}<a_{n}$ cannot be an upper bound. 
Suppose  $m > a_{n}-\frac{1}{2^{n}}$. Since $m \leq x$, for $x \in S$, $a_{n}-\frac{1}{2^{n}}< m\leq x$. Hence $a_{n}-\frac{1}{2^{n}}$ cannote be an upper bound for $S$. Since $a_{m}-\frac{1}{2^{m}} \leq x \leq a_{n}$, it follows that $a_{m}-a_{n}<\frac{1}{2^{m}}$. Hence $(a_{n})$ is cauchy sequence. Define $\alpha = (a_{n}) + \mathcal{N}$. First of all we claim that $a_{n}-\frac{1}{2^{n}} < \alpha < a_{n}$, where $a_{n}=(a_{n},a_{n},a_{n}, \cdots)$ and $a_{n}-\frac{1}{2^{n}} = (a_{n}-\frac{1}{2^{n}},a_{n}-\frac{1}{2^{n}},\cdots)$. Since $a_{k}$ is a decreasing sequence $a_{n} \geq a_{k}$ for all $k \geq n$. Hence $a_{n} - a_{k} >0,$ for all $k \geq n$. This shows that $(a_{n}- \alpha$ is a positive sequence in $\mathcal{C}$ and hence $\alpha < a_{n}$. Next $\alpha-\Bigl(a_{n}-\frac{1}{2^{n}}\Bigr)=(a_{1}-a_{n}+\frac{1}{2^{n}},\cdots)$ . Since $a_{k}-\frac{1}{2^{k}}$ is not an upper bound for $S$, $a_{k}>(a_{n}-\frac{1}{2^{n}})$ for all $k$, $a_{k}-(a_{n}-\frac{1}{2^{n}})>0$, for all $k$. Hence $\alpha-(a_{n}-\frac{1}{2^{n}}$ is a positive sequence and hence $\alpha > a_{n}-\frac{1}{2^{n}}$
Finally we claim that $\alpha$ is the least upper bound for S. First of all we have to show that $\alpha$ is an upper bound for S. Suppose not. Then there exists $x \in S$, such that $x > \alpha$, hence $x - \alpha >0$. Using the Archimedean property there exists $N\in\mathbb{N}$ such that $N(x-\alpha)>1$. Hence $x-\alpha>\frac{1}{N}>\frac{1}{2^{N}}$. Thus we se that $x>\alpha+\frac{1}{2^{N}}>a_{N}-\frac{1}{2^{N}}+\frac{1}{2^{N}}=a_{N}$. This is a contradiction, since $a_{N}$ is the least upper bound for $S$ in $B_{n}$.
Next, to show that $\alpha$ is the least upper bound. Suppose not. Then there exists $b \in \mathbb{R}$, such that $b$ is an upper bound for $S$ and $b < \alpha$. By the archimedean property there exists $N \in \mathbb{N}$, such that $N(\alpha - b)>1$. Hence $\alpha -b > \frac{1}{N}>\frac{1}{2^{N}}$. This implies that $\alpha -b>\frac{1}{2^{N}}$ and hence $\alpha -\frac{1}{2^{N}}>b$, or $b < \alpha-\frac{1}{2^{N}}< a_{N}-\frac{1}{2^{N}}$ as $\alpha < a_{n}$, for all $n$.But $a_{N}-\frac{1}{2^{N}}$ is not an upper bound for $S$. Hence anything less than this cannot be an upper bound for $S$. In particular, $b$ is not a upper bound for $S$, which is a contradiction. Hence $\alpha$ is the least upper bound for $S$.