How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Divisibility, Greatest Common Divisors and Bézout's Identity
1 · Prerequisites
2 · Summary
Objective. This page opens the number theory track, and it is built entirely on as the library constructed it: the ordered commutative ring of The integers form a commutative ring and The integers form a totally ordered ring, with the embedding of The naturals embed in the integers and the division algorithm Division with remainder in : for and there are unique with and . What is developed here is the divisibility relation and everything that follows from Bézout's identity: greatest common divisors, the Euclidean algorithm and its extended form, coprime integers, least common multiples, and the identification of the subgroups of with the sets of multiples. Primes, Euclid's lemma and unique factorisation are not proved here; they belong to a later page, and no argument below assumes them.
Absolute value on , minted here. The library's other absolute value, Absolute value in an ordered field, is stated for an ordered field, and is not one, so it does not apply. The absolute value of an integer therefore defines for an integer directly, by the case split the total order of makes legitimate, and Absolute value in : ; exactly when ; ; ; ; and exactly when proves the six facts recorded here for later use: positivity, vanishing exactly at , invariance under negation, multiplicativity, the bound , and the characterisation of by . The Remarks of The absolute value of an integer record that this agrees with Absolute value in an ordered field along the embedding of in , and nothing on this page depends on that observation. The absolute value is load-bearing rather than convenient: Division with remainder in : for and there are unique with and is stated for a positive divisor, so every use of it below first replaces a divisor by .
Divisibility, which the library already had. Division with remainder in : for and there are unique with and introduces the relation " divides " inside its own Statement, for use on its own page, and its Remarks leave the systematic theory to a later page, which "must record that its general divisibility in a ring restricts on to the relation defined here, rather than introduce a second notion silently". This is that page: Divisibility in : when for some integer states the same relation, quotes the source, and adds the three boundary values that a page over a ring containing has to state — for every including , only for , and and always. It is a dictionary item, not new vocabulary. Division with remainder for any nonzero divisor: for and there are unique with and then discharges the other promise made in those Remarks, extending division with remainder to every nonzero divisor with , which is possible here precisely because the absolute value has just arrived.
The arithmetic of the relation. Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and proves that divisibility is reflexive, transitive and linear, the linearity clause being the step used by almost every later proof. If and then and ; hence the set of divisors of a nonzero integer is bounded above by supplies the one place where divisibility constrains size — with forces — and it is what makes the set of divisors of a nonzero integer bounded above. is a commutative monoid whose group of units is ; equivalently holds exactly for and identifies the units: is a commutative monoid whose group of units is , obtained from the published The invertible elements of a monoid form a group under the restricted operation. Associates in : integers each of which divides the other and For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is then show that divisibility cannot distinguish from and nothing more: mutual divisibility, differing by a unit and having equal absolute value are the same condition, and the classes are the pairs .
A greatest element, which well-ordering does not give. The definition of needs a greatest element of a set of integers bounded above, whereas The well-ordering principle gives a least element of a set of naturals. A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element bridges the two, by reflecting the set through an upper bound into ; it is general infrastructure, homed here because this is the first page that needs it.
Greatest common divisors, and the convention at . Common divisor, and the greatest common divisor , with the convention defines as the greatest common divisor, discharging in the definition itself the obligation that one exists: the common divisors are nonempty because divides everything and bounded above by If and then and ; hence the set of divisors of a nonzero integer is bounded above by , so A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element applies. At there is no greatest element at all, and the value is fixed by the convention , argued where it is made rather than in a footnote: is greatest in the divisibility ordering, and it is the only value under which holds at . The companion page carries the witness that makes the convention necessary rather than decorative. is symmetric and unchanged by signs: ; moreover , , , and unless then records symmetry, invariance under signs, and the values at , and , each checked at .
Bézout's identity and its corollary. Bézout's identity: for integers not both zero, is the least positive element of ; in particular has an integer solution proves that for not both zero the least positive element of is , by well-ordering and the division algorithm; the last step, that every common divisor is below the gcd and not merely divides it, is where If and then and ; hence the set of divisors of a nonzero integer is bounded above by is needed. Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well converts the definition into the form later pages should cite: exactly when , is a common divisor, and every common divisor divides — a characterisation that, unlike the maximum, holds at too.
The algorithm. If then and have exactly the same common divisors, so is the whole content of the Euclidean algorithm: makes and have literally the same common divisors, with no inequality on assumed. The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is turns that into a terminating procedure, defining the remainder descent by The recursion theorem rather than by an informal "iterate", proving termination from the clause of the division algorithm, and identifying the last nonzero remainder as the gcd. The extended Euclidean algorithm: the same descent produces integers with , so Bézout coefficients are computed and not merely shown to exist runs the same recursion carrying two coefficient pairs alongside the remainders, so that Bézout coefficients are computed rather than merely shown to exist.
Coprimality. Coprime integers: is , with its three boundary pairs stated; and are coprime if and only if for some integers ; and in that case the only common divisors of and are and gives the usable form, solvability of ; and If and then ; and if , and then is the lemma that carries the weight, that and force . It is proved here, from Bézout and with no primality whatever, because primality is only a way of guaranteeing the coprimality it actually uses. for all integers , the identity holding at and at as well and If is nonzero then and are coprime complete the arithmetic: at every triple, and , are coprime when is nonzero.
Least common multiples. Common multiple, and the least common multiple , taken to be when or defines as the least positive common multiple when both arguments are nonzero, and as otherwise — where is not a free choice but the only common multiple there is. Every common multiple of and is a multiple of , and proves the two facts that matter: every common multiple is a multiple of the lcm, and . The absolute value is not decorative, and the companion page refutes the version without it.
The seam with the group theory. Every subgroup of is for exactly one natural number classifies the subgroups of : each is for exactly one natural . The published example on the examples companion of Binary Operations, Monoids, Groups and Subgroups gives that classification for some such , but examples pages are leaves in this library's reading order, so nothing here may rest on it — which is why that companion is deliberately absent from the Prerequisites above, while the spine page it accompanies is present. The classification is therefore re-proved here on a spine where later pages can cite it, and re-proved in the stronger form the uses need: its Remarks set out exactly how the two statements differ. and ; equivalently, in the subgroup generated by is and is then the item that joins the two halves of the page: and . Both inclusions come from Bézout and divisibility alone; the classification is used for exactly one thing, the uniqueness of the nonnegative generator, which is what lets these be read as identifications of subgroups rather than coincidences between sets.
What is deliberately absent. No primes, no Euclid's lemma for a prime divisor, no unique factorisation: those rest on this page and are developed after it. No greatest common divisor of a list longer than a pair, since nothing here needs one. No bound on the number of divisions the Euclidean algorithm performs — the companion page computes the count for one family and proves no worst-case theorem. Twenty-six items make up this page: six definitions, twelve lemmas, four theorems and four corollaries, ten of them marked as landmarks in the flowchart above.
3 · Logical flowchart
4 · Definitions, theorems and proofs
The absolute value of an integer
Definition
Let (The integers as equivalence classes of pairs of naturals). The absolute value of is
where is the order of Order on the integers and is the additive inverse supplied by The integers form a commutative ring for the operations of Arithmetic on the integers.
Why the two clauses define a function. The order on is total and antisymmetric (The integers form a totally ordered ring), so for each exactly one of and holds: totality gives at least one of and , and if both hold then by antisymmetry, in which case and fails, since means together with . The two clauses therefore never both apply and never both fail, and is a single element of because additive inverses are unique in a commutative ring: if and then .
At the boundary, by the first clause, and the second clause also gives whenever : for that is the definition, and for both readings give .
Remarks
-
This is not a second notion of absolute value. The library's other absolute value, Absolute value in an ordered field, is stated for an ordered field. The structure the construction of supplies is that of a totally ordered commutative ring (The integers form a commutative ring, The integers form a totally ordered ring), and multiplicative inverses are no part of it, so Absolute value in an ordered field does not apply here and the definition above is a new object rather than a redefinition of an existing one. (That is genuinely not a field, rather than merely not presented as one, is is a commutative monoid whose group of units is ; equivalently holds exactly for and below: its only invertible elements are and .) A general form for an ordered ring would cover both cases at once, but the definition of an ordered ring comes much later in the reading order than this page, so it is not available to reach for.
-
The two agree along the embedding of in . Write for the injective, order-preserving and arithmetic-preserving map of The integers embed in the rationals. Then is the absolute value of in the sense of Absolute value in an ordered field, the check being the same case split: preserves the order and reflects it (if but not , then by totality, so , whence and by injectivity), so exactly when , and because preserves addition. Nothing on this page rests on this observation; it is recorded so that a reader meeting twice knows the two notations are consistent, and every result below is proved for from the integer definition alone.
-
Why an absolute value is load-bearing here and not a convenience. The published division algorithm Division with remainder in : for and there are unique with and is stated for a positive divisor, so every use of it below must first replace a divisor by a positive integer, and is what that replacement produces.
Absolute value in : ; exactly when ; ; ; ; and exactly when
Statement
Let and let be as in The absolute value of an integer. Then
- ;
- if and only if ;
- ;
- ;
- ;
- if and only if .
Facts & Assumptions
Given: Integers , and the absolute value of The absolute value of an integer.
is a commutative ring: addition and multiplication are associative and commutative, , , multiplication distributes over addition, and every has an additive inverse ; we write for . Its standard consequences are used freely: , , , and (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive, is compatible with addition ( implies ), and positives are closed under multiplication ( and imply ); means together with (The integers form a totally ordered ring, Order on the integers).
when , and when ; the second clause covers as well, since (The absolute value of an integer).
Proof
For every : if and only if , and if and only if . Adding to gives , and adding to gives back ; the second equivalence is the same computation with and interchanged, using .
If and then . If or then ; otherwise and , so because positives are closed under multiplication.
By totality, at least one of and holds, and correspondingly or ; this is the case split used throughout, and it is exhaustive.
Case : .
Case : , and by step 1.1, so .
If then by the first clause. Conversely, if then in the case we get , and in the case we get , whence . This is claim 2.
Claim 3. If then by step 1.1, so . If then by step 1.1, so .
Claim 4, case and : by step 1.2, so .
Claim 4, case and : by step 1.1, so by step 1.2, hence by step 1.1 again; therefore .
Claim 4, case and : the same computation with the factors interchanged, using commutativity of multiplication, gives .
Claim 4, case and : and by step 1.1, so by step 1.2, hence .
Claim 5. If then , so ; and by step 1.1, so by transitivity. If then and by step 1.1, so by transitivity; and .
Claim 6, from right to left: suppose . If then . If then , and adding to gives , that is .
Claim 1 holds: in both cases.
The four sign combinations of step 2.4 to step 2.7 exhaust the possibilities by totality, so claim 4 holds for all .
Claim 6, from left to right: suppose . Then by step 2.8 and transitivity. Adding to gives , and by step 2.8, so by transitivity.
Every one of the six claims is now established, claim 6 by its two halves.
Remarks
-
Claim 6 is stated with on both sides deliberately, and the strict form follows from it: holds exactly when . From left to right, and by claim 5. From right to left, gives by claim 6, and is impossible, since is or and both and are excluded by the two strict inequalities.
-
The list does not include the triangle inequality, which is not used anywhere on this page. What the proofs below actually reach for is claim 1, claim 2, claim 4 and the bound of claim 5; claim 3 is used once, in the identification of the associate classes, and claim 6 is recorded for completeness rather than because something later needs it.
Divisibility in : when for some integer
Definition
Let (The integers as equivalence classes of pairs of naturals). We say divides , and write , when
the product being that of Arithmetic on the integers. We write when this fails. In this situation is called a divisor, or a factor, of , and is called a multiple of .
This is the relation the library already has, not a second one. The published Division with remainder in : for and there are unique with and introduces it in its own Statement, in these words: "We say divides , written , when for some ." Since multiplication on is commutative (The integers form a commutative ring), and are the same condition, so the definition above is that relation verbatim and the two usages agree everywhere. The theorem defined it for use on its own page and left the systematic theory to a later page; this is that page, and this item records the agreement rather than introducing a rival notion.
The remainder test. For the same Statement records that holds exactly when the remainder in , , is .
Boundary values. Each is one line from the ring axioms, and each is used below, so all three are recorded here rather than assumed:
- for every integer , including , since ;
- only for , since forces ;
- and for every , since and .
Remarks
-
The remainder test for a negative divisor is Division with remainder for any nonzero divisor: for and there are unique with and , proved next: for every , holds exactly when the remainder in , , is .
-
says a quotient exists; it says nothing on its own about the size or the sign of . Signs are irrelevant to it — , and all hold — and that is Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and . The one place where divisibility does constrain size is If and then and ; hence the set of divisors of a nonzero integer is bounded above by , and it needs the hypothesis : without it holds for arbitrarily large .
-
Notation. The bar in is a relation symbol read from left to right: the divisor is on the left. The reversed reading is a common slip, and the two directions are genuinely different, since holds while (by If and then and ; hence the set of divisors of a nonzero integer is bounded above by , with would force ).
Division with remainder for any nonzero divisor: for and there are unique with and
Statement
Let with . Then there is exactly one pair of integers with
the absolute value being that of The absolute value of an integer. Moreover (Divisibility in : when for some integer ) holds exactly when .
Facts & Assumptions
Given: Integers and with .
For and there is exactly one pair of integers with and (Division with remainder in : for and there are unique with and ).
is a commutative ring: addition and multiplication are associative and commutative, , , multiplication distributes over addition, and every has an additive inverse , with and (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive; means together with (The integers form a totally ordered ring, Order on the integers).
when and when (The absolute value of an integer); , and exactly when (Absolute value in : ; exactly when ; ; ; ; and exactly when ).
means for some (Divisibility in : when for some integer ).
Proof
: indeed , and because .
Case : put . Then , so , and .
Case : put . Then , so , and .
Since , totality gives or , hence or ; so in either case there is an integer with and .
By [L1] applied to and the positive integer , there is exactly one pair of integers with and .
Existence. Put . Then , so with .
Uniqueness. Suppose with for . Since , this reads , two representations of the form required by [L1] for the divisor ; hence and . Multiplying the first equation by and using gives .
The remainder test. If then , so . Conversely, if , say , then and by step 1.1, so this is a representation of the required form and uniqueness forces .
Existence is step 3.1, uniqueness is step 3.2, and the remainder test is step 4.1, which is the full statement.
Remarks
-
What this discharges. Division with remainder in : for and there are unique with and is stated for a positive divisor, and its own Remarks record that "the version for , with , follows once absolute values are in hand". Absolute values on arrive on this page (The absolute value of an integer), so the promise is discharged here.
-
The remainder is still taken nonnegative, and that is a choice. With and the statement above gives , so and , whereas truncating the quotient toward zero would give and , which the constraint excludes. The clause is the one every use below makes, and no other convention is introduced anywhere on this page.
Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and
Statement
Let and let be divisibility (Divisibility in : when for some integer ). Then
- reflexivity: ;
- transitivity: and imply ;
- linearity: and imply ; in particular and ;
- implies ;
- implies and .
Consequently the four statements , , and are equivalent.
Facts & Assumptions
Given: Integers .
means for some ; exhibits (Divisibility in : when for some integer ).
is a commutative ring: addition and multiplication are associative and commutative, , , multiplication distributes over addition, and every has an additive inverse , with , and ; we write for (The integers form a commutative ring, Arithmetic on the integers).
Proof
Reflexivity: , so .
Transitivity: suppose and . Then by associativity, so .
Linearity: suppose and . Then by associativity, commutativity and distributivity, so .
Clause 4: suppose . Then , so .
Clause 5: suppose . Then , so ; and , so .
The two special cases in clause 3: taking gives , and taking , gives .
The four equivalent forms: clause 5 gives and ; applying each to in place of , or to in place of , and using , gives the reverse implications, so all four statements are equivalent.
Clauses 1 to 5 and the two consequences are established.
Remarks
-
Linearity is the workhorse of the whole page. Every later argument that a common divisor of and divides some combination of them — Bézout's identity, the Euclidean step, the coprimality criterion — is clause 3 applied once.
-
Divisibility ignores signs, and that is why can be normalised. Clause 5 says the divisors of and of are the same set, so holds exactly when , whichever of the two values takes (The absolute value of an integer). That is the observation behind in is symmetric and unchanged by signs: ; moreover , , , and unless .
If and then and ; hence the set of divisors of a nonzero integer is bounded above by
Statement
Let with (Divisibility in : when for some integer ) and . Then and
Consequently, for the set of divisors of is bounded above by : every divisor of satisfies .
Facts & Assumptions
Given: Integers and with for some and ; and the embedding , , of The naturals embed in the integers.
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse ; we write for (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication; means together with (The integers form a totally ordered ring, Order on the integers).
is injective, preserves addition, multiplication and order, and its image is exactly the set of nonnegative integers; and (The naturals embed in the integers, The integers as equivalence classes of pairs of naturals).
On : if and only if (Discreteness: is the immediate successor); (The natural numbers (von Neumann)); and for every , since (Order on the natural numbers).
; exactly when ; ; and (Absolute value in : ; exactly when ; ; ; ; and exactly when , The absolute value of an integer).
means for some (Divisibility in : when for some integer ).
Proof
Write . If then , and if then ; both contradict , so and .
If and then : if or then , and otherwise and , so because positives are closed under multiplication.
Discreteness of : if then . Indeed , so for some ; because ; hence in , so , and applying , which preserves the order, gives .
, and because and , the latter since .
Hence , so by compatibility of the order with addition.
Since and , the product is nonnegative, and it equals by distributivity; adding gives .
Finally, every divisor of satisfies and , hence by transitivity: is an upper bound for the set of divisors of .
Remarks
-
There is no excluded case at . The hypothesis is , and the conclusion derives rather than assuming it: forces (Divisibility in : when for some integer ), so a zero divisor simply cannot occur under this hypothesis. The statement is therefore not vacuous anywhere, and it is not silently excluding a case.
-
The hypothesis cannot be dropped. Every integer divides , so the divisors of are all of and are bounded neither above nor below. This is exactly why the greatest common divisor of has to be fixed by a convention rather than by a maximum (Common divisor, and the greatest common divisor , with the convention ).
is a commutative monoid whose group of units is ; equivalently holds exactly for and
Statement
, with the multiplication of Arithmetic on the integers, is a commutative monoid (Semigroup and monoid). Its group of units (Left inverse, right inverse, and invertible element of a monoid, The invertible elements of a monoid form a group under the restricted operation) is
and these are two distinct elements. Equivalently, for the condition (Divisibility in : when for some integer ) holds exactly when or .
Facts & Assumptions
Given: with the operations of Arithmetic on the integers, and the embedding , , of The naturals embed in the integers.
is a commutative ring: multiplication is a function and is associative and commutative, , and every has an additive inverse , with and (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive, and positives are closed under multiplication; means together with (The integers form a totally ordered ring, Order on the integers).
A binary operation on a set is a function ; a monoid is a set with an associative binary operation and a two-sided identity, and it is commutative when the operation is (Binary operation on a set; associativity, commutativity, and a subset closed under the operation, Left identity, right identity, and two-sided identity for a binary operation, Semigroup and monoid).
In a monoid , is a unit when it has a two-sided inverse, and denotes the set of units; is a group under the restricted operation (Left inverse, right inverse, and invertible element of a monoid, The invertible elements of a monoid form a group under the restricted operation, Group and abelian group).
means for some (Divisibility in : when for some integer ).
when and when (The absolute value of an integer); and exactly when (Absolute value in : ; exactly when ; ; ; ; and exactly when ).
is injective, preserves addition, multiplication and order, and its image is exactly the set of nonnegative integers; and (The naturals embed in the integers, The integers as equivalence classes of pairs of naturals).
On : if and only if (Discreteness: is the immediate successor); , and , so and (The natural numbers (von Neumann)); and for every (Order on the natural numbers).
Proof
Multiplication on is a function , hence a binary operation, and it is associative and commutative; is a two-sided identity, since and, by commutativity, . So is a commutative monoid.
For , being a unit of this monoid means for some , the two equations and being the same by commutativity; and for some is precisely . So .
Both and lie in : and .
, since lies in the image of , which is the set of nonnegative integers; hence . Also , since is injective and in .
Discreteness of : if then . Indeed , so for some ; because ; hence in , so , and applying , which preserves the order, gives .
: otherwise , whereas and because is injective and in .
Let . Since , [L6] gives and .
Also and , so , whence ; with step 2.1 and antisymmetry this gives .
From : if then , and if then , so . By totality one of the two holds, so or .
Combining, , a two-element set, and by [L4] it is a group under multiplication, with identity and with each of its elements its own inverse.
Remarks
-
Why this is proved here and not cited. The published example is an abelian group, is a commutative monoid that is not a group, and its group of units is records the same fact, , but it lives on an examples page, and pages of that kind are leaves in the library's reading order: nothing later may depend on them. The statement is therefore re-established here, on a spine, so that later pages have a citable home for it. The two agree; neither rests on the other.
-
The proof is an application of the divisor bound, not a computation. What makes the whole answer is that forces (If and then and ; hence the set of divisors of a nonzero integer is bounded above by ) while forces (discreteness), and antisymmetry closes the gap. Nothing about the decimal shape of an integer is used.
Associates in : integers each of which divides the other
Definition
Integers and are associates, written , when each divides the other (Divisibility in : when for some integer ):
As a binary relation in the sense of Equivalence relation, equivalence class, and the quotient set this is the subset
of , and abbreviates .
Nothing is claimed here beyond the definition. That is an equivalence relation — reflexive, symmetric and transitive — is a statement about that has to be proved, and it is proved next, in For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is , together with the identification of the class of as . Until then the symbol is notation for membership of and carries no further content; in particular the language of equivalence classes is not used above.
Remarks
-
Why the notion is worth naming. Divisibility does not distinguish an integer from its negative (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ), so it is a preorder rather than an order: and while . Associates are exactly the pairs that divisibility cannot tell apart, and naming them is what lets the greatest common divisor be pinned down by a sign convention rather than left ambiguous up to that failure.
-
The classes have at most two elements, which is special to and comes from its group of units being ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ). The class of is alone.
For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is
Statement
Let . The following are equivalent:
- and , that is, (Associates in : integers each of which divides the other);
- for some unit ( is a commutative monoid whose group of units is ; equivalently holds exactly for and );
- (The absolute value of an integer).
Moreover is an equivalence relation on (Equivalence relation, equivalence class, and the quotient set ), and the class of is
which is when and has exactly two elements otherwise.
Facts & Assumptions
Given: Integers and , and the relation of Associates in : integers each of which divides the other.
is a commutative ring, with , , and (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive, is compatible with addition ( implies ), and positives are closed under multiplication ( and imply ) (The integers form a totally ordered ring, Order on the integers).
means for some ; only for (Divisibility in : when for some integer ).
Divisibility is reflexive and transitive, and implies and (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
: an integer is a unit exactly when or , and ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
when and when (The absolute value of an integer); , exactly when , and (Absolute value in : ; exactly when ; ; ; ; and exactly when ).
A relation is an equivalence relation when it is reflexive, symmetric and transitive, and then the class of is (Equivalence relation, equivalence class, and the quotient set ).
The classes of an equivalence relation are nonempty, cover the set, and are pairwise equal or disjoint (The equivalence classes of an equivalence relation are nonempty, cover , and are pairwise equal or disjoint; conversely every such cover arises from exactly one equivalence relation).
Proof
Every integer satisfies or : by totality either , when , or , when and so .
, , and . Indeed would give , contradicting in [L6]. By totality either or ; in the second case adding gives , and (else ), so , hence , which with contradicts antisymmetry. So , and since ; then , while gives by compatibility with addition, so .
Claim 1 implies claim 3. Suppose and . If then forces , so . If , then with gives and , and with gives ; antisymmetry gives .
is reflexive, since ; symmetric, since its defining condition is unchanged when and are interchanged; and transitive, since , give and , give . So it is an equivalence relation.
Claim 3 implies claim 1. Suppose . By step 1.1, is or , that is or ; and, again by step 1.1, is or . Hence or . If then and by reflexivity. If then by [L4]; and gives , so , again by [L4].
Claim 2 implies claim 3. If with a unit then or , so by step 1.2, and .
Claim 3 implies claim 2. By step 2.1, gives or , and and are units.
The three claims are equivalent: claim 3 implies claim 1 by step 2.1 and claim 1 implies claim 3 by step 1.3, while claim 3 implies claim 2 by step 3.1 and claim 2 implies claim 3 by step 2.2.
The class of is : the middle equality is the equivalence of claims 1 and 3, and the last holds because by [L7], while conversely gives or by step 2.1. At this set is , since ; and for it has exactly two elements, since by totality either , when adding gives , or , when adding gives ; in both cases .
By [L9] the classes are nonempty, cover , and any two are equal or disjoint; together with steps 4.1, 1.4 and 5.1 this is the full statement.
Remarks
-
This is the "up to sign" of elementary number theory made precise. Every statement below that fixes a sign — , , the nonnegative generator of a subgroup of — is choosing one representative from a class , and claim 3 is what says the choice is between exactly two candidates.
-
The equivalence of claims 1 and 2 is the general ring-theoretic statement, and it is the reason associates are defined by mutual divisibility rather than by "differ by a sign": mutual divisibility is the formulation that survives when the unit group is larger than .
A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element
Statement
Let be nonempty. Call an upper bound for when for every , and a lower bound when for every ; call a greatest element of when and for every , and a least element when and for every .
If has an upper bound, it has a greatest element. If has a lower bound, it has a least element. In each case the element is unique.
Facts & Assumptions
Given: A nonempty , and the embedding , , of The naturals embed in the integers.
is a commutative ring: addition is associative and commutative, , and every has an additive inverse , with ; we write for (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive, and is compatible with addition: implies (The integers form a totally ordered ring, Order on the integers).
is injective, preserves addition, multiplication and order, and its image is exactly the set of nonnegative integers, so every is for a unique (The naturals embed in the integers, The natural numbers (von Neumann)).
Every nonempty subset of has a least element (The well-ordering principle, Order on the natural numbers).
Proof
Suppose is an upper bound for . For every we have , and adding gives ; so is nonnegative and therefore equals for a unique .
Now suppose instead that is a lower bound for , and put , a nonempty subset of . For , adding to gives , so is an upper bound for .
Put . It is nonempty: choosing and the of step 1.1 with , we get , so .
By well-ordering let be the least element of , and put , so that .
Let . By step 1.1 there is with , and then , so and hence .
Applying , which preserves the order, gives ; adding to this inequality gives .
So and for every : is a greatest element of . If were another one, then and , so by antisymmetry.
By the first part has a greatest element, which has the form with ; then for every we have , and adding gives . So is a least element of , and it is unique by antisymmetry as in step 6.1.
Remarks
-
Why this has to be proved rather than quoted. The well-ordering principle (The well-ordering principle) gives a least element of a nonempty set of naturals. What the greatest common divisor needs is a greatest element of a set of integers bounded above, and neither the direction nor the ambient set matches. The bridge is the reflection , which turns "large elements of below " into "small naturals".
-
Both hypotheses are needed. itself is nonempty and has no greatest element, and is bounded above by every integer and has no greatest element because it has no element at all. The first of these is exactly what makes the common divisors of have no greatest element (The common divisors of are all of and have no greatest element in the order of , so cannot be defined as a maximum and is fixed by convention ↗).
Common divisor, and the greatest common divisor , with the convention
Definition
Let . An integer is a common divisor of and when and (Divisibility in : when for some integer ). Write
for the set of common divisors.
Case : the greatest element exists. is nonempty, since and for every and (Divisibility in : when for some integer ). It is bounded above: at least one of and is nonzero, say (if instead , argue with throughout), and every divides , so by If and then and ; hence the set of divisors of a nonzero integer is bounded above by . A nonempty set of integers bounded above has a unique greatest element (A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element), and we define
Since and is greatest, ; in particular .
Case : a convention, fixed here. Every integer divides (Divisibility in : when for some integer ), so , which has no greatest element at all: the clause above defines nothing, and leaving undefined would put a hole in every identity below. We therefore set
With both cases together, is defined for every pair of integers, and always.
Why , and not some other value. The convention is not arbitrary, and the reasons are recorded here rather than deferred:
- It is the greatest common divisor in the divisibility ordering. is a common divisor of and , and every common divisor of and divides . So is greatest at in the sense "divisible by every common divisor", which is the sense that Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well shows holds at every pair, included, whereas "greatest in the order of " fails there.
- It is the only value under which the scaling identity extends to this boundary. Requiring to hold at every triple leaves no freedom here. At with any it would read , whose right-hand side does not involve at all; and at with it reads , again giving . The value is therefore chosen here, and for all integers , the identity holding at and at as well then proves the identity for every triple with this convention in force; its own case reads the value off this definition rather than establishing it.
- It is consistent with the product formula — (Every common multiple of and is a multiple of , and ) reads at , using from Common multiple, and the least common multiple , taken to be when or . This one is a check, not a second forcing argument: with the left side vanishes whatever value is given, so the product formula is silent at and only the scaling identity above pins the value down.
Remarks
-
The gap the convention fills is real. The failure is exhibited on the companion page by The common divisors of are all of and have no greatest element in the order of , so cannot be defined as a maximum and is fixed by convention ↗: the common divisors of really are all of , and really have no greatest element, so a value has to be supplied rather than computed.
-
The definition is by a maximum, and the theory replaces it by a divisibility characterisation. Reading as "largest common divisor" is what makes the case awkward, and it is also not the property later pages use. Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well proves the replacement: exactly when , is a common divisor, and every common divisor divides . That statement is uniform across all pairs.
-
Sign. is never negative, by construction. Since is a common divisor whenever is (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ), the set is symmetric about , and taking the greatest element is exactly the choice of the nonnegative representative from each pair of associates (For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is ).
-
Two arguments, not a list. is defined here on pairs only. Nothing on this page needs a greatest common divisor of a longer list, and none is defined.
is symmetric and unchanged by signs: ; moreover , , , and unless
Statement
For all , with as in Common divisor, and the greatest common divisor , with the convention :
- ;
- ;
- , and in particular ;
- ;
- ;
- unless , in which case .
Facts & Assumptions
Given: Integers and , and the set of common divisors (Common divisor, and the greatest common divisor , with the convention ).
For , is the unique greatest element of and satisfies ; and by convention (Common divisor, and the greatest common divisor , with the convention ).
means for some ; every satisfies ; only for ; and , for every (Divisibility in : when for some integer ).
exactly when or , and ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
when and when (The absolute value of an integer); and exactly when (Absolute value in : ; exactly when ; ; ; ; and exactly when ).
is a commutative ring with , and ; its order is total, antisymmetric, transitive and compatible with addition, and positives are closed under multiplication (The integers form a commutative ring, Arithmetic on the integers, The integers form a totally ordered ring, Order on the integers).
Proof
and . If then , contradicting . By totality or ; in the second case adding gives , and , so and hence , contradicting by antisymmetry. So , and adding gives .
for every : by totality , when , or , when and so .
For every and : if and only if , because is or and the two conditions , are equivalent.
Claim 1. The condition defining is unchanged when and are interchanged, so ; and exactly when . Hence the two greatest elements coincide in the first case, and both values are in the second.
Claim 5. , and exactly when , so .
Claim 6 is [L1] restated: for the value is because is a common divisor and is greatest, and at the value is by convention.
Claim 2. By step 1.3, ; and exactly when , so exactly when . Hence the values agree in both cases.
Claim 3. , since every divides . If this is and by the convention. If , then by step 1.2, and every satisfies by [L4], so is the greatest element of and .
Claim 4. Every satisfies , hence or ; and since and . Also because . Since by step 1.1, the greatest element of is , so .
Claim 3's second half and claim 5 now read off: , and .
Claims 1 to 6 are established.
Remarks
-
Claim 2 is what lets every later argument assume the arguments are nonnegative, and claim 1 lets it assume they are in either order. Both are used without comment below.
-
Every clause is checked at the boundary. Claim 3 covers , where it returns the convention rather than contradicting it; claim 4 holds at , giving ; and claim 5 holds at , giving . There is no pair at which a clause above is silent.
Bézout's identity: for integers not both zero, is the least positive element of ; in particular has an integer solution
Statement
Let , not both , and put
Then contains a positive element, and its least positive element is (Common divisor, and the greatest common divisor , with the convention ). In particular there are integers with
so the equation is solvable in .
Facts & Assumptions
Given: Integers and , not both ; the set ; and the embedding , , of The naturals embed in the integers.
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse , with and ; we write for (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication; means together with (The integers form a totally ordered ring, Order on the integers).
is injective, preserves addition, multiplication and order, and its image is exactly the nonnegative integers (The naturals embed in the integers, The natural numbers (von Neumann)).
Every nonempty subset of has a least element (The well-ordering principle, Order on the natural numbers).
For and there are integers with and (Division with remainder in : for and there are unique with and ).
For , is the unique greatest element of the set of common divisors of and (Common divisor, and the greatest common divisor , with the convention ).
means for some (Divisibility in : when for some integer ).
Proof
If and then , and if moreover and then : for or the product is , and otherwise and , so because positives are closed under multiplication.
If and then : adding to gives , so by transitivity, and would give and hence by antisymmetry, contrary to .
for every , with when . By totality either , and step 1.1 applies directly, or , in which case by compatibility with addition and by step 1.1; the strict form follows since gives .
contains a positive element: , and one of is nonzero, so one of , is positive and the other is nonnegative, whence the sum is positive by step 1.2.
Let be the set of positive elements of and put . Every satisfies , hence for some with ; so is nonempty by step 3.1.
By well-ordering let be the least element of and put , so and ; fix with .
is the least element of : given , write with as in step 4.1; then , and applying , which preserves the order, gives .
. By [L5] with divisor write with . Then , so . If were positive it would lie in , so by step 6.1, which with contradicts antisymmetry. Hence is not positive; with this forces , so and .
, by the same argument with in place of : dividing by gives with , and , so as before.
So is a common divisor of and . Moreover every common divisor of and divides by [L7].
Since we have and , so every common divisor satisfies by [L8].
Therefore is the greatest element of , and greatest elements are unique, so by [L6]; the hypothesis that and are not both is what makes that clause of the definition apply.
Hence is the least positive element of by step 6.1, and by step 5.1: the equation is solvable.
Remarks
-
Where the work is. Two places, and both are easy to hand-wave. The first is that contains a positive element at all, which is what the hypothesis "not both zero" buys and which is proved through rather than by taking (that would need a case split on which of , is nonzero). The second is the last inequality: that every common divisor is below needs If and then and ; hence the set of divisors of a nonzero integer is bounded above by , not just , because divisibility is not the order of .
-
The hypothesis cannot be dropped. At the set is , which has no positive element, so "the least positive element of " names nothing; that is precisely the pair at which is fixed by convention (Common divisor, and the greatest common divisor , with the convention ).
-
This is an existence statement. The coefficients come from a least element supplied by well-ordering, so nothing here computes them. The extended Euclidean algorithm: the same descent produces integers with , so Bézout coefficients are computed and not merely shown to exist does compute them.
Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well
Statement
Let . Every common divisor of and divides (Common divisor, and the greatest common divisor , with the convention , Divisibility in : when for some integer ).
Consequently, for the following are equivalent:
- ;
- , , , and every common divisor of and divides .
This characterisation holds for every pair , the pair included, where it returns the value fixed by convention.
Facts & Assumptions
Given: Integers and , and (Common divisor, and the greatest common divisor , with the convention ).
For , is the greatest element of the set of common divisors, so in particular , and ; at , by convention. In both cases (Common divisor, and the greatest common divisor , with the convention ).
Every integer divides (Divisibility in : when for some integer ).
Proof
Suppose and let be a common divisor of and . By [L2] fix with ; then by [L4].
Suppose instead . Then , and every integer, in particular every common divisor , divides .
itself is a common divisor of and : for this is , and for it is . And in both cases.
In both cases every common divisor of and divides ; since the two cases are exhaustive, this is the first assertion.
Claim 1 implies claim 2: if then , and by step 1.3, and every common divisor divides by step 2.1.
Claim 2 implies claim 1: suppose , , , and every common divisor of and divides . Then is a common divisor, so by step 2.1; and is a common divisor by step 1.3, so by hypothesis. Hence by [L5], and since and this reads .
The two claims are therefore equivalent, for every pair including , where step 1.2 and step 1.3 were proved directly from the convention rather than from a maximum.
Remarks
-
This is the statement later pages should cite. "Greatest in the order of " is how was defined, but it is not a property that survives at and it is not what any later argument uses. "Nonnegative, a common divisor, and divisible by every common divisor" is uniform, and it is the definition that generalises beyond .
-
Both halves of claim 2 are needed. Dropping leaves determined only up to sign, since also divides and and is divided by every common divisor (For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is ). Dropping "every common divisor divides " leaves every nonnegative common divisor a candidate.
If then and have exactly the same common divisors, so
Statement
Let satisfy
Then an integer is a common divisor of and if and only if it is a common divisor of and (Divisibility in : when for some integer ); the two sets of common divisors are equal. Consequently
(Common divisor, and the greatest common divisor , with the convention ).
No inequality on is assumed: the identity alone is what is used, so the lemma applies to any decomposition of , not only to the one produced by division with remainder.
Facts & Assumptions
Given: Integers with , and the sets and of common divisors (Common divisor, and the greatest common divisor , with the convention ).
is a commutative ring: , , and every has an additive inverse; we write for , and gives (The integers form a commutative ring, Arithmetic on the integers).
For , is the greatest element of , and by convention (Common divisor, and the greatest common divisor , with the convention ).
Proof
Suppose and . Then by [L2], so is a common divisor of and : .
Suppose and . Then by [L2], so is a common divisor of and : .
The pairs vanish together: if and then , and if and then . So exactly when .
By steps 1.1 and 1.2 the two sets of common divisors are equal, .
If then also by step 1.3, and both greatest common divisors are the greatest element of the one set , hence equal. If then and both values are . In either case .
Remarks
-
This is the whole content of the Euclidean algorithm; everything else in The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is is bookkeeping about termination. Each division replaces a pair by a strictly smaller one without changing the set of common divisors, so the invariant is not merely the value but the set itself.
-
The absence of a constraint on matters. Applying the lemma with and no inequality is exactly what identifies with for consecutive Fibonacci numbers, where is given by the recursion and not by a division.
The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is
Statement
Let and . Define by
where in the first clause is the unique quotient of by given by Division with remainder in : for and there are unique with and , so that is the remainder and .
Let be the unique function with and supplied by the recursion theorem (The recursion theorem). Write ; the sequence is the remainder descent from .
Then:
- for every , and whenever ;
- for every (Common divisor, and the greatest common divisor , with the convention );
- there is a least with , and ; writing , the value is the last nonzero remainder, and ;
- .
So the descent terminates, and the last nonzero remainder is .
Facts & Assumptions
Given: , , the map and the sequence described above, and the embedding , , of The naturals embed in the integers.
is a commutative ring; its order is total, antisymmetric and transitive, and is compatible with addition; means together with (The integers form a commutative ring, Arithmetic on the integers, The integers form a totally ordered ring, Order on the integers, The integers as equivalence classes of pairs of naturals).
For and there is exactly one pair of integers with and (Division with remainder in : for and there are unique with and ).
For a set , an and a function there is exactly one with and (The recursion theorem).
Induction on : a property holding at and inherited by successors holds everywhere (The principle of mathematical induction).
Every nonempty subset of has a least element (The well-ordering principle, Order on the natural numbers, The natural numbers (von Neumann)).
is injective, preserves addition, multiplication and order, and its image is exactly the nonnegative integers (The naturals embed in the integers).
On : exactly one of , , holds (Trichotomy of the order on ); if and only if (Discreteness: is the immediate successor); and every is a successor (Every nonzero natural number is a successor).
Proof
is a well-defined function. For the pair with and is unique by [L2], so and depend only on ; for the value is ; and the two clauses are exhaustive and exclusive by totality. Hence [L3] applies with , and , giving the sequence .
Base case of the induction, at : , so ; and because .
Induction hypothesis: fix and assume and .
Inductive step. If , then by [L2] write with ; by definition , so and , while by [L8]. If instead , then , so and both properties are inherited unchanged. Since , these two cases are exhaustive.
By induction, and for every ; and step 2.1 also shows whenever . This is claim 1 and claim 2.
Let . Every is nonnegative, hence lies in the image of , so is nonempty; let be its least element and fix with .
. Otherwise , so by step 3.1; writing with , we get , and hence , since otherwise by trichotomy and so , contradicting antisymmetry. That contradicts the minimality of .
So is nonempty; let be its least element. , since . Hence for some , and because .
: indeed by step 3.1, and because and is the least index with vanishing .
Since , the definition gives , so and ; and by the choice of .
Therefore , the last equality because . So the descent terminates at index and the last nonzero remainder equals , which is claims 3 and 4.
Remarks
-
Termination is not an extra appeal to well-ordering about . It is the clause of Division with remainder in : for and there are unique with and , which makes the second coordinates a strictly decreasing sequence of nonnegative integers; well-ordering is then applied to their preimages in , where it is available.
-
The theorem is stated for only, matching Division with remainder in : for and there are unique with and . For one may run the descent from instead: by is symmetric and unchanged by signs: ; moreover , , , and unless , so nothing is lost. That reduction is recorded here rather than built into the statement, so that the recursion above uses the published division algorithm exactly as stated.
-
No claim is made about how many divisions the descent takes. The count depends on the pair; the companion page works out one family where it is exactly known (Consecutive Fibonacci numbers are coprime, and for every the Euclidean algorithm on takes exactly divisions, with quotient in the first of them and quotient in the last ↗), and no worst-case bound over all inputs is proved anywhere here.
The extended Euclidean algorithm: the same descent produces integers with , so Bézout coefficients are computed and not merely shown to exist
Statement
Let and , and let and be the remainder descent and its terminating index from The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is . Define by
where in the first clause is the unique quotient of by given by Division with remainder in : for and there are unique with and . Let
be the function supplied by the recursion theorem (The recursion theorem), and write . Then for every
In particular, at the terminating index ,
so the descent that computes computes a pair of Bézout coefficients alongside it.
Facts & Assumptions
Given: , , the descent and terminating index of The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is , and the map and sequence described above.
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse; we write for (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
For and there is exactly one pair of integers with and (Division with remainder in : for and there are unique with and ).
For a set , an and there is exactly one with and (The recursion theorem, The natural numbers (von Neumann)).
Induction on (The principle of mathematical induction).
The descent satisfies ; for every ; with the quotient of by when , and when ; is the least index with ; and (The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is , Common divisor, and the greatest common divisor , with the convention ).
The order on is total and antisymmetric; means together with (The integers form a totally ordered ring, Order on the integers).
Proof
is a well-defined function: for the quotient of by is unique by [L2], so the first clause depends only on the argument; the second clause is the identity; and the two conditions and are exhaustive and exclusive by totality. So [L3] applies with and produces .
Base case, : ; and , .
Induction hypothesis: fix and assume , and .
Inductive step, case . Then , so both recursions take their first clause with the same divisor and the same dividend, hence with the same quotient by [L2]. Therefore .
Inductive step, case . Then , so and , while ; all three equalities are inherited unchanged. Since , the two cases are exhaustive.
Back in the case of step 2.1, the coefficients transport: , since ; and by distributivity.
By induction the three equalities hold for every .
At the terminating index this reads , so is a pair of Bézout coefficients for and , obtained from the descent itself.
Remarks
-
What "computed" means here. The coefficients are produced by a recursion over whose every step is an application of the division algorithm and four ring operations; nothing in the argument appeals to the existence of a least element of a set. That is the difference from Bézout's identity: for integers not both zero, is the least positive element of ; in particular has an integer solution, where the coefficients come from a well-ordering argument and the proof gives no way to find them.
-
The Bézout pair produced is not the only one. The companion page records the full family of solutions and a second pair for the same equation (Bézout coefficients are not unique: and , and for nonzero every solution has the form ↗).
-
Only the first four coordinates of are needed for the conclusion; the last two are carried because the recursion for reads off the previous values of , which is what makes the whole thing a single application of the recursion theorem instead of a mutual recursion.
Coprime integers:
Definition
Integers and are coprime, or relatively prime, when
(Common divisor, and the greatest common divisor , with the convention ). The relation is symmetric, since ( is symmetric and unchanged by signs: ; moreover , , , and unless ), and unchanged by signs, since .
Boundary values. contains and contains and , so the three degenerate pairs are recorded explicitly, each read off is symmetric and unchanged by signs: ; moreover , , , and unless :
- and are coprime for every integer , since ; in particular and are coprime.
- and are coprime exactly when or . Indeed , so coprimality says , and by Absolute value in : ; exactly when ; ; ; ; and exactly when together with the case split of The absolute value of an integer this holds exactly for and , the two units of ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
- and are not coprime, since by the convention of Common divisor, and the greatest common divisor , with the convention , and : if were then , contradicting the two units being distinct ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
Remarks
-
Coprime is a statement about the pair, not about either integer. Neither nor need be prime, and primality is not defined anywhere on this page: and are coprime and neither is prime. What coprimality says is that the only common divisors are the units and ( and are coprime if and only if for some integers ; and in that case the only common divisors of and are and ).
-
Why it is worth a name before primes appear. The lemma that carries the weight in elementary number theory — if and is coprime to then (If and then ; and if , and then ) — needs coprimality and no primality at all. Primes enter later, and their key property is a special case of that lemma rather than an independent fact.
and are coprime if and only if for some integers ; and in that case the only common divisors of and are and
Statement
Let . Then and are coprime (Coprime integers: ) if and only if
When this holds, the set of common divisors of and is exactly .
Facts & Assumptions
Given: Integers and .
and are coprime when (Coprime integers: , Common divisor, and the greatest common divisor , with the convention ).
exactly when , , , and every common divisor of and divides (Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well).
If and then for all ; and for every (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , Divisibility in : when for some integer ).
exactly when or , and ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
is a commutative ring, with , , and (The integers form a commutative ring, Arithmetic on the integers); its order is total, antisymmetric and transitive and is compatible with addition, and positives are closed under multiplication (The integers form a totally ordered ring, Order on the integers).
by convention (Common divisor, and the greatest common divisor , with the convention ).
Proof
and . If then , contradicting in [L5]. By totality either or ; in the second case adding gives , and since otherwise , so and hence , which with contradicts antisymmetry.
Conversely, suppose for some . Every common divisor of and divides by [L4], hence or by [L5].
Suppose and are coprime, so . Then , since ; so [L2] supplies with .
The integer then satisfies all four conditions of [L3]: by step 1.1, and by [L4], and every common divisor of and divides by step 1.2. Hence , that is, and are coprime.
So coprimality and the solvability of are equivalent, by step 2.1 and step 2.2.
When they hold, step 1.2 shows every common divisor is or ; conversely and are common divisors of any pair, since , , and . So the set of common divisors is exactly , and it has two elements since .
Remarks
-
The criterion is the practical form of coprimality. Verifying from the definition means examining all common divisors; exhibiting one pair with settles it in a line, and the extended Euclidean algorithm produces such a pair (The extended Euclidean algorithm: the same descent produces integers with , so Bézout coefficients are computed and not merely shown to exist).
-
The analogous statement with replaced by a general is false, and the correct version is that is solvable exactly when ; that is worked out on the companion page ( has an integer solution exactly when : is solvable and is not ↗).
If and then ; and if , and then
Statement
Let .
- If and , then .
- If , and , then .
Facts & Assumptions
Given: Integers .
and are coprime exactly when , and this holds exactly when for some (Coprime integers: , and are coprime if and only if for some integers ; and in that case the only common divisors of and are and , Common divisor, and the greatest common divisor , with the convention ).
Divisibility is reflexive and transitive; if and then for all ; and implies (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
means for some (Divisibility in : when for some integer ).
is a commutative ring: addition and multiplication are associative and commutative, , and multiplication distributes over addition (The integers form a commutative ring, Arithmetic on the integers).
Proof
Claim 1. Assume and , and fix with .
Claim 2. Assume , and . Write with .
Multiplying by gives , using associativity, commutativity and distributivity.
Now , hence by [L3]; and , hence by [L3]. Applying linearity to these two with coefficients and gives .
Then , and by [L2], so claim 1 applied with , , in place of , , gives .
Write ; then , so .
Remarks
-
No primality is used. Claim 1 is exactly the statement usually met as Euclid's lemma with prime; what the proof needs is coprimality of with , and primality of enters only later, as a way of guaranteeing that coprimality. This is why the lemma is homed here rather than with the primes.
-
Coprimality is essential in both claims. Without it, while divides neither factor ( while and : dividing a product does not force dividing a factor, and the coprimality hypothesis is what fails ↗); and , but .
for all integers , the identity holding at and at as well
Statement
For all ,
(Common divisor, and the greatest common divisor , with the convention , The absolute value of an integer). The identity is asserted for every triple, including and , where both sides are .
Facts & Assumptions
Given: Integers , and , .
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse, with (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive, and positives are closed under multiplication; means together with (The integers form a totally ordered ring, Order on the integers).
always, with when and by convention; is a common divisor of and (Common divisor, and the greatest common divisor , with the convention ).
Every common divisor of and divides (Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well).
If and then for all ; and implies and (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
If and then (If and then and ; hence the set of divisors of a nonzero integer is bounded above by ); means for some (Divisibility in : when for some integer ).
; exactly when ; when ; and is or (The absolute value of an integer, Absolute value in : ; exactly when ; ; ; ; and exactly when ).
A product of two nonzero integers is nonzero (The integers have no zero divisors; multiplicative cancellation).
Proof
If and then : for or the product is , and otherwise and , so .
Case : then , so the left side is ; and , so the right side is .
Case : then , so the left side is ; and , so the right side is .
Case and . Then , and one of is nonzero, say ; so by [L9] and hence and . Also , and by [L9].
In the case of step 1.4, is a common divisor of and . Indeed , say ; then , and is or by [L8], so or , and in either case . The same argument with gives .
Conversely, by [L5] fix with ; multiplying by gives . Since and , [L6] gives ; and is or , because is or , so as well.
Hence by [L4].
Both and are nonzero by step 1.4, and both are nonnegative, by [L3] and by step 1.1 and [L8]. From and , [L7] gives , that is ; from and , [L7] gives .
By antisymmetry in the case of step 1.4.
The three cases of steps 1.2, 1.3 and 1.4 exhaust the possibilities, since either , or , or neither; so for all .
Remarks
-
The boundary cases are the point, not an aside. The convention is the only value under which this identity extends to : it would read for every , and taking gives . That is a constraint on the choice, not a derivation from this lemma — steps 1.2 and 1.3 above read the boundary value off the convention rather than proving it. The choice is made where the convention is fixed (Common divisor, and the greatest common divisor , with the convention ) and instantiated on the companion page ( at the boundary: , , and the convention is exactly what makes true at ↗).
-
Why and not . is nonnegative by construction, so the right side must be too; with and the product is negative and could not be a greatest common divisor.
If is nonzero then and are coprime
Statement
Let and put (Common divisor, and the greatest common divisor , with the convention ), and suppose , equivalently . Since and , there are unique integers, written and , with
uniqueness holding because and has cancellation (The integers have no zero divisors; multiplicative cancellation). Then
that is, and are coprime (Coprime integers: ).
Facts & Assumptions
Given: Integers with , and .
when , , and is a common divisor of and (Common divisor, and the greatest common divisor , with the convention ).
means for some (Divisibility in : when for some integer ).
is a commutative ring with (The integers form a commutative ring, Arithmetic on the integers); its order is total, antisymmetric and transitive (The integers form a totally ordered ring, Order on the integers).
and are coprime exactly when (Coprime integers: ).
Proof
Since we have , so and , whence .
is a common divisor of and , so there are integers and with and ; each is unique, since with gives by cancellation. Write and .
By [L2] applied with , and : .
Also , so with , and cancellation gives : the integers and are coprime.
Remarks
-
The hypothesis is not a restriction in disguise. It fails only at , where and are not defined at all, since division by determines nothing.
-
This is the standard "reduce a fraction to lowest terms" statement, proved without any fractions: is defined as the unique integer solving , and lives in throughout.
Common multiple, and the least common multiple , taken to be when or
Definition
Let . An integer is a common multiple of and when and (Divisibility in : when for some integer ).
Case and : a least positive common multiple exists. The integer is a positive common multiple. It is a common multiple because gives and hence , the last step because is or (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , The absolute value of an integer), and symmetrically for ; and it is positive because (The integers have no zero divisors; multiplicative cancellation), so and (Absolute value in : ; exactly when ; ; ; ; and exactly when ). Every positive common multiple is nonnegative, hence of the form for a unique , where is the embedding of The naturals embed in the integers; so the set
is a nonempty subset of and has a least element (The well-ordering principle). Since preserves the order, is then the least positive common multiple of and , and we define
the least positive common multiple. It is unique, greatest and least elements being unique by antisymmetry (The integers form a totally ordered ring, Order on the integers).
Case or : the only common multiple is . Say . Then reads , which holds exactly for (Divisibility in : when for some integer ); and is indeed a common multiple, since every integer divides . So there is no positive common multiple at all, and we set
This is not a free choice dressed as one: is the only common multiple of the pair, so any other value would name an integer that is not a common multiple.
With both cases together is defined for every pair, and always.
Remarks
-
The two boundary values agree, but they have different standing. is a genuine convention, adopted in Common divisor, and the greatest common divisor , with the convention because no greatest common divisor exists there; at a vanishing argument is not a convention at all, since is the only common multiple available. With the two together, holds at every pair without exception (Every common multiple of and is a multiple of , and ). At that identity reads , which is true for every .
-
"Least" is least in the order of , among the positive common multiples. The stronger statement, that divides every common multiple and not merely that it is smallest, is a theorem and is proved as the first half of Every common multiple of and is a multiple of , and . It is that divisibility form, not the minimality, that later pages use.
-
Two arguments only. As with , no least common multiple of a longer list is defined on this page, because nothing here needs one.
Every common multiple of and is a multiple of , and
Statement
Let , and write (Common divisor, and the greatest common divisor , with the convention ) and (Common multiple, and the least common multiple , taken to be when or ). Then:
- every common multiple of and is a multiple of , that is, whenever and ;
- .
Both hold for every pair, including the pairs with or , where the two sides of clause 2 are .
Facts & Assumptions
Given: Integers and , and .
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse, with (The integers form a commutative ring, Arithmetic on the integers).
The order on is total, antisymmetric and transitive; means together with (The integers form a totally ordered ring, Order on the integers).
For both nonzero, is the least positive common multiple of and ; if or then the only common multiple is and (Common multiple, and the least common multiple , taken to be when or ).
when , , and is a common divisor of and (Common divisor, and the greatest common divisor , with the convention ).
If then and for unique integers , , and (If is nonzero then and are coprime).
If and then (If and then ; and if , and then ).
Divisibility is reflexive and transitive; implies , and ; and means for some (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , Divisibility in : when for some integer ).
; exactly when ; when ; ; and is or (The absolute value of an integer, Absolute value in : ; exactly when ; ; ; ; and exactly when ).
A product of two nonzero integers is nonzero, and with gives (The integers have no zero divisors; multiplicative cancellation).
Proof
Case or . Then and the only common multiple of and is , so clause 1 reads , which holds. And , so : clause 2 holds.
Case and . Then , so ; in particular and , so . Fix with , and .
In the case of step 1.2 put . Both and are nonzero, since and ; hence , so and , and .
is a common multiple of and . Indeed and , so and ; and equals or , since is or . So and .
: and with , so and the product of two positives is positive.
Every common multiple of and is a multiple of . Write . From , that is , we get for some , and cancelling gives , so . Since , [L7] gives , say ; then , so and hence , because is or .
. By steps 3.1 and 3.2, is a positive common multiple. If is any positive common multiple, then by step 3.3 and , so by [L9], that is since both are positive. So is the least positive common multiple, which is .
Clause 1 in this case now follows from step 3.3, since .
Clause 2 in this case: , using and multiplicativity of the absolute value throughout.
The two cases of steps 1.1 and 1.2 are exhaustive, so clauses 1 and 2 hold for every pair .
Remarks
-
Clause 1 is the clause later pages use. "Least positive common multiple" is how was defined, but the useful property is that it divides every common multiple, which is what identifies with in and ; equivalently, in the subgroup generated by is and .
-
The absolute value in clause 2 is not decorative. The unsigned form is false, and refutes it: the companion page records this as FALSE: For all integers and , ↗.
-
Where coprimality enters. The only substantial step is step 3.3, which proves that every common multiple is a multiple of ; what it uses is that and are coprime (If is nonzero then and are coprime) together with the coprime divisibility lemma (If and then ; and if , and then ). Without those the argument gives only that is a common multiple, not the least one.
Every subgroup of is for exactly one natural number
Statement
Write for the embedding of The naturals embed in the integers, and for put
Then is an abelian group (Group and abelian group), is the cyclic subgroup generated by (The subgroup generated by a subset, the cyclic subgroup , and cyclic groups) for every , and:
every subgroup (Subgroup) equals for exactly one natural number . When that natural number is ; otherwise it is the natural number whose image is the least positive element of .
In particular every subgroup of is cyclic.
Facts & Assumptions
Given: The set with the operations of Arithmetic on the integers, and (The naturals embed in the integers).
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse , with and ; we write for (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication; means together with (The integers form a totally ordered ring, Order on the integers).
is injective, preserves addition, multiplication and order, and its image is exactly the nonnegative integers; , (The naturals embed in the integers).
On : if and only if (Discreteness: is the immediate successor); (The natural numbers (von Neumann)); for every (Order on the natural numbers); and every nonempty subset has a least element (The well-ordering principle).
A group is a monoid in which every element is invertible; a subgroup is a subset containing the identity and closed under the operation and under inverses, and is itself a group under the restricted operation (Group and abelian group, Subgroup, One-step subgroup test: a nonempty is a subgroup iff for all ; the identity and the inverses of are then those of ).
For in a group, is the smallest subgroup containing , and (The subgroup generated by a subset, the cyclic subgroup , and cyclic groups, , and every cyclic group is abelian).
Powers are defined by and for , this being the unique function on with those two properties, and when and (Powers : natural exponents in a monoid and integer exponents in a group, with , The recursion theorem).
For and there are with and (Division with remainder in : for and there are unique with and ).
Proof
is an abelian group: addition is an associative and commutative binary operation, is a two-sided identity, and every has the two-sided inverse .
In this group the power is the ring product . For with , the function satisfies and , which are exactly the two defining equations of written additively; by the uniqueness in [L7] the two functions agree. For , writing , we get .
Discreteness: if in then . Indeed , so with , hence and in ; applying gives .
Existence, main case. Suppose and pick with . Then as well, and by totality one of , is positive; so the set of positive elements of is nonempty.
Hence for every ; in particular is a subgroup.
Every element of is nonnegative, hence of the form ; so is a nonempty subset of . Let be its least element and put .
For , is the least positive element of . Indeed and ; and if then , since gives and gives , hence and so . Then by step 1.3, so and , that is .
Existence, trivial case. If then , since for every .
is the least element of : for write with ; then , and applying , which preserves the order, gives .
, since and is the smallest subgroup containing .
Uniqueness. Suppose with . If then , so forces and hence by injectivity. Otherwise , so and likewise ; by step 2.3 both and are the least positive element of , hence equal, and by injectivity.
. Let . Since , [L8] gives with . Now by step 2.1 and step 3.3, so because is closed under inverses and under addition. If were positive it would lie in and satisfy , contradicting step 3.2 together with antisymmetry; so and .
Combining, with , which with step 3.1 proves existence for every subgroup.
Every subgroup of is therefore for exactly one , and in particular is cyclic.
Remarks
- Why this is proved here rather than cited. The published example is a subgroup of for every , and every subgroup of has this form gives the same classification, but it lives on an examples page, and examples pages are leaves in the library's reading order: no later page may depend on an item homed there. The classification is therefore re-established on a spine, so that this page and later ones have a citable home for it. Neither is used in proving the other.
The two are not quite the same statement, and the difference is the whole reason this one is worded as it is. The example asserts that every subgroup is for some , and adds that may be taken to be or the least positive element of ; it does not assert that no other names the same subgroup. The statement above asserts exactly one, which is strictly stronger. The extra content is small — if with then each of divides the other, so — but it is what the uses below actually need, and it is proved here rather than assumed to come with the example.
-
What it is used for below. Exactly one thing: the uniqueness of the nonnegative generator, which is what lets be read as an identification of subgroups rather than as an accident about two sets ( and ; equivalently, in the subgroup generated by is and ).
-
The generator is a natural number, hence a set. above always means ; the natural number is not itself an element of , and the embedding is written out wherever the distinction could matter.
and ; equivalently, in the subgroup generated by is and
Statement
Let , and put
Then and are subgroups of (Subgroup), and
(Common divisor, and the greatest common divisor , with the convention , Common multiple, and the least common multiple , taken to be when or ). Equivalently, in the group ,
(The subgroup generated by a subset, the cyclic subgroup , and cyclic groups). Since and , and every subgroup of has exactly one nonnegative generator (Every subgroup of is for exactly one natural number ), these are identifications of subgroups by their canonical generator, not merely equalities of two sets that happen to coincide.
Facts & Assumptions
Given: Integers and ; and .
is a commutative ring: addition and multiplication are associative and commutative, , , , multiplication distributes over addition, and every has an additive inverse; we write for (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
is an abelian group; is a subgroup for every ; and every subgroup equals for exactly one (Every subgroup of is for exactly one natural number , Group and abelian group).
A subgroup contains the identity and is closed under the operation and under inverses; a nonempty with for all is a subgroup of (Subgroup, One-step subgroup test: a nonempty is a subgroup iff for all ; the identity and the inverses of are then those of ).
is the smallest subgroup containing : it contains and is contained in every subgroup containing (The subgroup generated by a subset, the cyclic subgroup , and cyclic groups).
An intersection of subgroups is a subgroup (The intersection of a nonempty family of subgroups of is a subgroup of ).
means for some ; equivalently (Divisibility in : when for some integer ).
and is a common divisor of and ; (Common divisor, and the greatest common divisor , with the convention ).
and is a common multiple of and (Common multiple, and the least common multiple , taken to be when or ).
Every common multiple of and is a multiple of (Every common multiple of and is a multiple of , and ).
The image of is exactly the set of nonnegative integers, so every is for a unique (The naturals embed in the integers).
Proof
is a subgroup of : it contains , so is nonempty, and for and in the difference is by distributivity, so the one-step test applies.
. Since is a common divisor, write and ; then for all .
. If this is [L8]. If then . The two cases are exhaustive.
is a subgroup by [L2] and [L5], and by [L6] it is exactly the set of common multiples of and : says , and says .
. It contains and , so by [L4]. Conversely any subgroup containing and contains and by [L2] and [L4], hence contains for all by closure under the operation; taking gives .
Hence , because is a subgroup containing and is the smallest such. With step 1.2, .
: is a common multiple by [L9], so lies in the subgroup , and is the smallest subgroup containing .
: every common multiple satisfies by [L10], that is . With step 2.3, .
Both identities are proved, and in group-theoretic form they read by step 2.1 and step 2.2, and by step 3.1 and [L2].
Finally and , so each is for a natural by [L11], and by [L2] a subgroup of has exactly one such generator; hence and are the canonical generators of the two subgroups, and the identities identify the subgroups and not merely the underlying sets.
Remarks
-
This is the seam between the arithmetic and the group theory of this page, and it is the concrete shadow of the statement that is a principal ideal domain. Read from left to right, it says that the set of integer combinations of and is exactly the set of multiples of their greatest common divisor — which is Bézout's identity and the divisibility characterisation of packed into one equation between subgroups.
-
The classification is used for one thing only. Both inclusions above come from Bézout and divisibility; Every subgroup of is for exactly one natural number is invoked in step 5.1, for the uniqueness of the nonnegative generator, and nowhere else.
-
Boundary pairs. At the theorem reads and , using and ; at and it reads and . Both are true as stated, and neither needed a separate clause.
5 · Examples, counterexamples and false statements
None yet.
Sources
Standard references
Recommended treatments; not extraction sources.
- Absolute value (Wikipedia)
- Divisor (Wikipedia)
- Euclidean division (Wikipedia)
- Unit (ring theory) (Wikipedia)
- Divisibility (ring theory) (Wikipedia)
- Well-ordering principle (Wikipedia)
- Sets of integers bounded above have a largest element (Millersville University number theory notes)
- Greatest common divisor (Wikipedia)
- Bézout's identity (Wikipedia)
- Euclidean algorithm (Wikipedia)
- Extended Euclidean algorithm (Wikipedia)
- Coprime integers (Wikipedia)
- Euclid's lemma (Wikipedia)
- Least common multiple (Wikipedia)
- Cyclic group (Wikipedia)