Chapter status: 🚧 draft 🚧
Basic Arithmetic
In this chapter, we cover a number of fundamental notions and results about arithmetic over integers, such as divisibility, greatest common divisors, and unique factorization. Most of them will be generalized in the chapter about rings. We will return to the axiomatic definition of integers in a later chapter (to wit, the set of integers is, up to isomorphism, the unique non-trivial, ordered, unitary commutative ring whose positive elements are well-ordered).
Contents
- Basic Definitions
- Divisibility
- Euclidean Division
- Greatest Common Divisor
- Computing GCDs and Bézout Relations
- GCDs and Ideals
- Prime Numbers
Basic Definitions
In all the following, we adopt the following notation and conventions:
- we let denote the set of non-negative integers (also called natural numbers):
- we let denote the set of positive integers:
- we let denote the set of integers:
We will not explicitly formulate here all standard properties of addition, multiplication, and of the order relation and defer a more formal treatment to the chapter about rings.
We only state two salient properties of the integers: the cancellation law (a consequence of being a so-called integral domain) and the well-ordering principle (or well-ordering axiom), which is one of the axioms governing integers.
The absolute value of an integer denoted is defined as
Proposition 3.1 (cancellation law for integers). Let be integers such that Then implies
Proposition 3.2 (well-ordering axiom). Let be a non-empty subset of Then contains a smallest element, i.e., there exists such that for any
It is immediate that the smallest element is necessarily unique.
Proposition 3.3. Let be a non-empty subset of Then it has a unique smallest element.
Proof
Assume that has two smallest elements and Then (since is a smallest element) and (since is a smallest element). Hence,
It is also the case that a finite non-empty subset of (or has a largest element.
Proposition 3.4. Let be a finite non-empty subset of Then contains a unique largest element, i.e., there exists a unique such that for any
Divisibility
Let We say that divides or that is a divisor of or that is a multiple of denoted if there exists such that
Let us list a number of basic properties of divisibility.
Proposition 3.5. For every
Proof
Assume that Then for some This implies that hence All other implications can be proven in a similar way.
Proposition 3.6. The only integers dividing are and
Proof
Let be a positive divisor of By [??], On the other hand, since there exists such that Clearly, must be positive and cannot be Hence, by [??], Multiplying both sides by we obtain Hence, we have both and which implies that
In a general ring with a multiplicative identity divisors of are called units. The previous proposition states that units of are and See Rings, Units.
Proposition 3.7. For every with
Proof
If then for some This implies that and hence
Conversely, assume that Then for some Since by the cancellation law for integers, and hence
Proof
If then clearly and
Conversely, assume that and Then and for some integers If then and the conclusion holds. Assume now that either or is not zero. Let us consider the case (the case is similar). Multiplying by we get hence Since by the cancellation law for integers, this implies that i.e., divides By Proposition 3.6, this implies hence
In a general commutative ring, two elements and such that and are called associates. The previous proposition shows that associates in are opposites. See Rings, Divisibility.
Divisibility defines an order relation over
- it is reflexive since
- it is anti-symmetric since by Proposition 3.8, if and then but for this implies
- it is transitive by Proposition 3.9.
Unlike which is total, this order relation is only partial since there are integers and such that neither nor hold. These two order relations are "consistent" if the sense of the following proposition.
Proposition 3.10. For every
Proof
Let such that Then for some We cannot have as this would imply Moreover, as would imply Hence, which implies
Euclidean Division
Proposition 3.11 (Euclid's division lemma). Let be integers with Then there exists unique integers and such that and Moreover, if and only if
Proof
Let us show existence first. Consider the set defined as This set is non-empty: if then whereas if then By the well-ordering axiom, has a minimal element Since there exists such that Moreover, by definition of Assume that Then contradicting the minimality of Hence, with as claimed.
Let us now show uniqueness. Assume that with and Then meaning is a multiple of But note that This implies that since the only multiple of in is Hence, which by the cancellation law for integers implies that
Finally, let us show that if and only if If then and hence Conversely, if then for some But then uniqueness of and implies that and
The four integers and each have a name:
- is called the dividend,
- is called the divisor,
- is called the quotient,
- is called the remainder.
Greatest Common Divisor
Let be integers such that and are not both zero. A common divisor of and is an integer such that divides both and A greatest common divisor (GCD) of and is a common divisor of and such that and any other common divisor of and divides
Note that this is different from the definition one usually encounters in high school, which is as follows. Consider the set of all common divisors of and This set is non-empty since It is also finite since any common divisor of and satisfies if and if and and are not both zero. Then the GCD of and is defined as the largest element of which by Proposition 3.4 exists and is unique.
The reason we prefer to former definition is that it is closer to the definition of a GCD in a commutative ring (the only difference is that condition is dropped since in general, there might be no order relation over an arbitrary ring). Working with this definition, it is not immediately clear though that a greatest common divisor always exists and is unique (in fact, there exists commutative rings where two elements might not have a GCD), nor that it is equal to the GCD according to the later definition. The following proposition proves this, and more.
This set has the following interesting property: if then every multiple of also belongs to
Consider for example and We can quickly establish (using any of the two definitions above) that the greatest common divisor of and is
Proposition 3.12 (Bézout's lemma). Let be integers such that and are not both zero. Then there exists a unique greatest common divisor of and Moreover, is the smallest non-negative integer which can be written as a linear combination of and In particular, there exists integers such that
Proof
Let us show uniqueness first. Assume that and have two GCDs and Then and and hence by Proposition 3.8, one has Since a GCD must be positive, it follows that
Let us show existence by proving that the smallest non-negative integer which can be written as a linear combination of and in indeed their GCD. consider the set of all non-negative linear combinations of and namely This set is non-empty. Indeed, assume that (the case is similar). Then either or is in By the well-ordering axiom, has a minimal element We claim that is the GCD of and
First, we clearly have Second, let us show that is a common divisor of and For this, we will show the following stronger statement: every element in is divisible by Since and this will imply in particular that divides both of them. Let be any element in Since let us also write By Euclid's division lemma, there exists and with such that Then Hence, But since and is the minimal element of one must have Hence, i.e., divides
It remains to show that every common divisor of and divides
The greatest common divisor of and is denoted (or sometimes but this notation is confusing and will not be used here). By convention, although the set of common divisors of and is is defined as (we will see why this makes sense when relating GCDs and ideals).
Expressing the GCD as a linear combination of and i.e., writing with explicit values is often called a Bézout relation.
In a general commutative ring, greatest common divisors are defined as above, except condition is dropped (indeed, in a general ring, an order relation might not exist). Under this more general definition, two integers and have two greatest common divisors and The fact that is ordered allows to single out the positive one as the greatest common divisor of and
Two integers are said coprime or relatively prime if which is equivalent to and having only and as common divisors.
Proposition 3.13. Let Then and are coprime if and only if there exists such that
Proof
If and are coprime, then existence of such that is established by Proposition 3.12. Conversely, assume that there exists such that
Computing GCDs and Bézout Relations
The GCD can be computed using Euclid's algorithm. It relies on the following lemma.
Proposition 3.14. Let such that and are not both zero. Then, for any
GCDs and Ideals
In this section, we give another interpretation of GCDs in terms of ideals of As pretty much any notion we encounter in this chapter, ideals can be defined for any ring.
A subset of the integers is called an ideal of if it satisfies the following properties:
Proposition 3.15. Let Then