Our next task is to define the set of rational numbers from the integers using equivalence classes of pairs of integers. The idea is clear: we think of a pair of integers $(p,q)$ as the fraction $p/q$ and use an equivalence relation to identify fractions that should have the same values.

Definition.

Let ${\mathbb{Z}}^{+}$ denote the set of positive integers, i.e., ${\mathbb{Z}}^{+}=\{n\in \mathbb{Z}:n>0\}$. Let $\sim $ be the following relation defined on $\mathbb{Z}\times {\mathbb{Z}}^{+}$: we define $({x}_{1},{y}_{1})\sim ({x}_{2},{y}_{2})$ to mean ${x}_{1}\xb7{y}_{2}={x}_{2}\xb7{y}_{1}$.

Proposition.

$\sim $ is an equivalence relation on $\mathbb{Z}\times {\mathbb{Z}}^{+}$.

**Proof.**

Exercise.

Definition.

We write $p/q$ for the equivalence class of $(p,q)\in \mathbb{Z}\times {\mathbb{Z}}^{+}$. The set $\mathbb{Q}$ is the set $\mathbb{Z}\times {\mathbb{Z}}^{+}/\sim $ of equivalence classes.

Proposition.

The function $i$ defined by $i\left(n\right)=n/1$ is a one-to-one function mapping $\mathbb{Z}$ into $\mathbb{Z}$.

**Proof.**

Let $n,m\in \mathbb{N}$ with $i\left(n\right)=i\left(m\right)$. Then $n/1=m/1$ hence $(n,1)\sim (m,1)$ hence $n\xb71=m\xb71$ hence $n=m$.

Definition.

We identify each $n\in \mathbb{N}$ with its image $i\left(n\right)$ under the map $i$. In particular, $0$ is the element $0/1\in \mathbb{Q}$, and $1$ is $1/1\in \mathbb{Q}$.

Definition.

We define addition, multiplication and order relations on $\mathbb{Q}$ by

- ${p}_{1}/{q}_{1}+{p}_{2}/{q}_{2}=({p}_{1}{q}_{2}+{p}_{2}{q}_{1})/{q}_{1}{q}_{2}$
- ${p}_{1}/{q}_{1}\xb7{p}_{2}/{q}_{2}={p}_{1}{p}_{2}/{q}_{1}{q}_{2}$
- ${p}_{1}/{q}_{1}<{p}_{2}/{q}_{2}\leftrightarrow {p}_{1}{q}_{2}<{p}_{2}{q}_{1}$

Proposition.

The operations $+,\xb7$ and relation $\u2a7d$ on $\mathbb{Q}$ are well-defined, i.e., the definitions above do not depend on the particular choice of representatives $({p}_{1},{q}_{1}),({p}_{2},{q}_{2})$.

**Proof.**

Exercise.

Proposition.

The embedding $i:\mathbb{Z}\to \mathbb{Q}$ is a homomorphism respecting $+,\xb7$ and $\u2a7d$:

- $i(n+m)=i\left(n\right)+i\left(m\right)$;
- $i(n\xb7m)=i\left(n\right)\xb7i\left(m\right)$; and
- $n<m\leftrightarrow i\left(n\right)\u2a7di\left(m\right)$;

for all $n,m\in \mathbb{Z}$.

**Proof.**

Exercise.

The key axioms for the rationals have already been given. They form an Archimedean ordered field, in fact a minimal Archimedean ordered field in the sense that no proper subset is also an Archimedean ordered field.

Theorem.

The rationals with $+,\xb7,<$ as defined here satisfy the axioms of an Archemedean ordered field.

**Proof.**

A rather long exercise.