This section discusses a direct construction of the real numbers from the integers (constructing the rationals at the same time) via the idea of an almost linear map from $\mathbb{Z}$ to $\mathbb{Z}$.

This approach is a particularly elegant and short one, and has the rather pretty feature that addition in $\mathbb{R}$ corresponds to componentwise addition of integers, whereas multiplication in $\mathbb{R}$ corresponds to composition of maps. However the approach is more sophisticated and requires quite a lot of axiom-checking at the end. It also requires some work with the notion of finiteness and with equivalence relations.

This web page is still under construction. The final version will contain some (but not all) of the proofs omitted here at present.

Definition.

A function $f:\mathbb{Z}\to \mathbb{Z}$ is said to be almost linear or almost a homomorphism if

has finitely many elements.

Note that the set here would be $\left\{0\right\}$ if $f$ was a homomorphism of $\mathbb{Z}$ respecting the addition stucture, i.e., if for all $n,m\in \mathbb{Z}$ we have $f(n+m)=f\left(n\right)+f\left(m\right)$. For such $f$ the set $\{f(n+m)-f\left(n\right)-f\left(m\right):n,m\in \mathbb{Z}\}$ is $\left\{0\right\}$ so has just one element, in particular has finitely many elements.

Definition.

Two functions $f:\mathbb{Z}\to \mathbb{Z}$ and $g:\mathbb{Z}\to \mathbb{Z}$ are almost equal if

has finitely many elements. If $f,g$ are almost equal then we write $f\sim g$.

Proposition.

The relation $\sim $ of being almost equal is an equivalence relation on almost linear maps $f:\mathbb{Z}\to \mathbb{Z}$.

**Proof.**

Clearly $\{f\left(n\right)-f\left(n\right):n\in \mathbb{Z}\}=\left\{0\right\}$ so the reflexive axiom holds. If $f\sim g$ then $\{g\left(n\right)-g\left(n\right):n\in \mathbb{Z}\}=\{-\left(f\right(n)-g(n\left)\right):n\in \mathbb{Z}\}$ so is finite, being the image under taking $-$ of the finite set showing that $f\sim g$. Therefore $g\sim f$ and $\sim $ is symmetric.

Finally, if $f\sim g$ and $g\sim h$ then both $S=\{f\left(n\right)-g\left(n\right):n\in \mathbb{Z}\}$ and $T=\{g\left(n\right)-h\left(n\right):n\in \mathbb{Z}\}$ are finite, hence $\{f\left(n\right)-h\left(n\right):n\in \mathbb{Z}\}\subseteq \{s+t:s\in S\wedge t\in T\}$ is also finite. Hence transitivity.

Definition.

We write $\left[f\right]$ for the equivalence class of $f$.

If we pretend for a moment that $x$ is a real number that we know about, we may define a function $f\left(n\right)=\left[xn\right]$, where the square brackets denote integer-part. This is almost linear as $\left[xn\right]+\left[xm\right]>x(n+m)-2$ and so $f(n+m)-f\left(n\right)-f\left(m\right)\in \left\{0,1\right\}$.

Definition.

We define $\mathbb{R}$ to be the set of $\sim $-equivalence classes of almost linear maps $f:\mathbb{Z}\to \mathbb{Z}$.

Definition.

We define $\left[f\right]+\left[g\right]=\left[h\right]$ where $h\left(n\right)$ is the function $f\left(n\right)+g\left(n\right)$.

Proposition.

This function $+$ is well-defined.

Definition.

We define $\left[f\right]\xb7\left[g\right]=\left[h\right]$ where $h\left(n\right)$ is the function $f\left(g\right(n\left)\right)$.

Proposition.

This function $\xb7$ is well-defined.

Definition.

For $\left[f\right],\left[g\right]\in \mathbb{R}$ we define $\left[f\right]\u2a7d\left[g\right]$ if there is $N\in \mathbb{N}$ such that for all $n\u2a7eN$, $f\left(n\right)-g\left(n\right)\u2a7e0$.

Proposition.

The relation $\u2a7d$ is well-defined and linearly orders $\mathbb{R}$.

Theorem.

The set $\mathbb{R}$ with $+,\xb7,\u2a7d$ is an ordered field. It also satisfies the Archimedean property and is a complete ordered field in the sense that every bounded monotonic sequence has a limit.

**Proof.**

Another long exercise (sigh).