# Integer Coprime to all Factors is Coprime to Whole

## Theorem

Let $a, b \in \Z$.

Let $\ds b = \prod_{j \mathop = 1}^r b_j$

Let $a$ be coprime to each of $b_1, \ldots, b_r$.

Then $a$ is coprime to $b$.

In the words of Euclid:

If two numbers be prime to any number, their product also will be prime to the same.

## Proof 1

$\forall j \in \set {1, 2, \ldots, r}: a x_j + b_j y_j = 1$

for some $x_j, y_j \in \Z$.

Thus:

$\ds \prod_{j \mathop = 1}^r b_j y_j = \prod_{j \mathop = 1}^r \paren {1 - a x_j}$

But $\ds \prod_{j \mathop = 1}^r \paren {1 - a x_j}$ is of the form $1 - a z$.

Thus:

 $\ds \prod_{j \mathop = 1}^r b_j \prod_{j \mathop = 1}^r y_j$ $=$ $\ds 1 - a z$ $\ds \leadsto \ \$ $\ds a z + b y$ $=$ $\ds 1$ where $\ds y = \prod_{j \mathop = 1}^r y_j$

and so, by Integer Combination of Coprime Integers, $a$ and $b$ are coprime.

$\blacksquare$

## Proof 2

This proof follows the structure of Euclid's proof, if not its detail.

Let $a, b, c \in \Z$ such that $c$ is coprime to each of $a$ and $b$.

Let $d = a b$.

Aiming for a contradiction, suppose $c$ and $d$ are not coprime.

Then:

$\exists e \in \Z_{>1}: e \divides c, e \divides d$

We have that $c \perp a$ and $e \divides c$

$e \perp a$

As $e \divides d$ it follows by definition of divisibility that:

$\exists f \in \Z: e f = d$

We also have that:

$a b = d$

So:

$a b = e f$
$e : a = b : f$

or in more contemporary language:

$\dfrac a e = \dfrac b f$

But $a \perp e$.

From Proposition $21$ of Book $\text{VII}$: Coprime Numbers form Fraction in Lowest Terms, $\dfrac a e$ is in canonical form.

$e \divides b$

$e \divides c$
So $e$ is a divisor of both $b$ and $c$.
But this is a contradiction of the assertion that $c$ and $b$ are coprime.
$\blacksquare$