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 = \left\{{x: x = m a + n b: m, n \in \Z}\right\}$

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 ideal of $\Z$

$a = 1 a + 0b \land b = 0 a + 1 b \implies a, b \in J$

$a$ and $b$ are not both zero, thus $J \neq \{0\}$

By the something{theorem about ideals}:


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

$a \in J \land \{J = x_0 \Z\} \implies x_0 \vert a$

$b \in J \land \{J = x_0 \Z\} \implies x_0 \vert b$

$x_0 \vert a \land x_0 \vert b \implies x_0 \in D(a,b)$

Furthermore

$x_0 \in J \implies \exists r,s \in \Z : x_0 = ra + sb$

Let $x_1 \in D(a,b)$

Then:

Thus $x_0 = max(D(a,b)) = gcd(a,b) = ra + sb$