Bézout's Identity/Proof 4

Proof
Let $a, b \in \Z$ such that $a$ and $b$ are not both zero.

Let $J$ be the set of all integer combinations of $a$ and $b$:


 * $J = \set {x: x = m a + n b: m, n \in \Z}$

First we show that $J$ is an ideal of $\Z$

Let $\alpha = m_1 a + n_1 b$ and $\beta = m_2 a + n_2 b$, and let $c \in \Z$

Then $\alpha,\beta \in J$ and :

Thus $J$ is an integral ideal.

We have that:

$a$ and $b$ are not both zero, thus:
 * $J \ne \set 0$

By the something {theorem about ideals}:


 * $\exists x_0 > 0 : J = x_0 \Z$


 * $a \in J \land \set {J = x_0 \Z} \implies x_0 \divides a$


 * $b \in J \land \set {J = x_0 \Z} \implies x_0 \divides b$


 * $x_0 \divides a \land x_0 \divides b \implies x_0 \in \map D {a, b}$

Furthermore:


 * $x_0 \in J \implies \exists r, s \in \Z : x_0 = r a + s b$

Let $x_1 \in \map D {a, b}$.

Then:

Thus:
 * $x_0 = \max \set {\map D {a, b} } = \gcd \set {a, b} = r a + s b$