Euclid's lemma

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 p is a composite number, its consequent may be either true or false.

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.

[4][5][6][7][8] The generalization of the lemma to integers appeared in Jean Prestet's textbook Nouveaux Elémens de Mathématiques in 1681.

[9] 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.

In modern mathematics, a common proof involves Bézout's identity, which was unknown at Euclid's time.

Without loss of generality, one can suppose that n, q, a, and b are positive, since the divisibility relation is independent of the signs of the involved integers.

The original proof is difficult to understand as is, so we quote the commentary from Euclid (1956, pp.