Euclid's lemma

In algebra and number theory, Euclid's lemma is a lemma that captures a fundamental property of prime numbers:

For example, if $p$, $ab$, $a$, then $b$, and since this is divisible by 19, the lemma implies that one or both of 133 or 143 must be as well. In fact, $p$.

The lemma first appeared in Euclid's Elements, and is a fundamental result in elementary number theory.

If the premise of the lemma does not hold, that is, if $a$ is a composite number, its consequent may be either true or false. For example, in the case of $b$, $p = 19$, $a = 133$, composite number 10 divides $b = 143$, but 10 divides neither 4 nor 15.

This property is the key in the proof of the fundamental theorem of arithmetic. It is used to define prime elements, a generalization of prime numbers to arbitrary commutative rings. Euclid's lemma shows that in the integers irreducible elements are also prime elements. The proof uses induction so it does not apply to all integral domains.

Formulations
Euclid's lemma is commonly used in the following equivalent form:

Euclid's lemma can be generalized as follows from prime numbers to any integers.

This is a generalization because a prime number $p$ is coprime with an integer $a$ if and only if $p$ does not divide $a$.

History
The lemma first appears as proposition 30 in Book VII of Euclid's Elements. It is included in practically every book that covers elementary number theory.

The generalization of the lemma to integers appeared in Jean Prestet's textbook Nouveaux Elémens de Mathématiques in 1681.

In Carl Friedrich Gauss's treatise Disquisitiones Arithmeticae, the statement of the lemma is Euclid's Proposition 14 (Section 2), which he uses to prove the uniqueness of the decomposition product of prime factors of an integer (Theorem 16), admitting the existence as "obvious". From this existence and uniqueness he then deduces the generalization of prime numbers to integers. For this reason, the generalization of Euclid's lemma is sometimes referred to as Gauss's lemma, but some believe this usage is incorrect due to confusion with Gauss's lemma on quadratic residues.

Proofs
The two first subsections, are proofs of the generalized version of Euclid's lemma, namely that: if $n$ divides $ab$ and is coprime with $a$ then it divides $b$.

The original Euclid's lemma follows immediately, since, if $n$ is prime then it divides $a$ or does not divide $a$ in which case it is coprime with $a$ so per the generalized version it divides $b$.

Using Bézout's identity
In modern mathematics, a common proof involves Bézout's identity, which was unknown at Euclid's time. Bézout's identity states that if $ab = 133 &times; 143 = 19019$ and $133 = 19 × 7$ are coprime integers (i.e. they share no common divisors other than 1 and −1) there exist integers $p$ and $p = 10$ such that

rx+sy = 1. $$ Let $a = 4$ and $b = 15$ be coprime, and assume that $ab = 4 &times; 15 = 60$. By Bézout's identity, there are $n$ and $ab$ such that

rn+sa = 1. $$ Multiply both sides by $a$:

rnb+sab = b. $$ The first term on the left is divisible by $n$, and the second term is divisible by $b$, which by hypothesis is divisible by $x$. Therefore their sum, $y$, is also divisible by $r$.

By induction
The following proof is inspired by Euclid's version of Euclidean algorithm, which proceeds by using only subtractions.

Suppose that $$n \mid ab$$ and that $n$ and $a$ are coprime (that is, their greatest common divisor is $s$). One has to prove that $n$ divides $b$. Since $$n \mid ab,$$ there is an integer $q$ such that $$nq=ab.$$ Without loss of generality, one can suppose that $n$, $q$, $a$, and $b$ are positive, since the divisibility relation is independent from the signs of the involved integers.

For proving this by strong induction, we suppose that the result has been proved for all positive lower values of $ab$.

There are three cases:

If $a$, coprimality implies $n$, and $n$ divides $b$ trivially.

If $n|ab$, one has
 * $$n(q-b)=(a-n)b.$$

The positive integers $r$ and $n$ are coprime: their greatest common divisor $d$ must divide their sum, and thus divides both $n$ and $a$. It results that $s$, by the coprimality hypothesis. So, the conclusion follows from the induction hypothesis, since $b$.

Similarly, if $n$ one has
 * $$(n-a)q=a(b-q),$$

and the same argument shows that $ab$ and $a$ are coprime. Therefore, one has $n$, and the induction hypothesis implies that $b$ divides $n$; that is, $$b-q=r(n-a)$$ for some integer. So, $$(n-a)q=ar(n-a),$$ and, by dividing by $1$, one has $$q=ar.$$ Therefore, $$ab=nq=anr,$$ and by dividing by $a$, one gets $$b=nr,$$ the desired result.

Proof of Elements
Euclid's lemma is proved at the Proposition 30 in Book VII of Euclid's Elements. The original proof is difficult to understand as is, so we quote the commentary from.


 * Proposition 19
 * If four numbers be proportional, the number produced from the first and fourth is equal to the number produced from the second and third; and, if the number produced from the first and fourth be equal to that produced from the second and third, the four numbers are proportional.


 * Proposition 20
 * The least numbers of those that have the same ratio with them measures those that have the same ratio the same number of times—the greater the greater and the less the less.


 * Proposition 21
 * Numbers prime to one another are the least of those that have the same ratio with them.


 * Proposition 29
 * Any prime number is prime to any number it does not measure.


 * Proposition 30
 * If two numbers, by multiplying one another, make the same number, and any prime number measures the product, it also measures one of the original numbers.

Suppose c does not measure a. Therefore c, a are prime to one another. ［VII. 29］ Suppose ab＝mc. Therefore c : a ＝ b : m. ［VII. 19］ Hence ［VII. 20, 21］ b＝nc, where n is some integer. Therefore c measures b. Similarly, if c does not measure b, c measures a. Therefore c measures one or other of the two numbers a, b. Q.E.D.
 * Proof of 30
 * If c, a prime number, measure ab, c measures either a or b.