For the purposes of the following definitions and lemmas, (including negatives):
Divisibility
(when ) if such that . We say divides. If cannot divide then we write .
If then is a proper divisor of . It is best understood that for (pretty much) all of these cases. Further:
is always FALSE (undefined when )
is always TRUE (for all )
One interesting thing is that the notation is sometimes used to indicate .
Properties of Divisibility
implies
and implies
and implies for all
and implies
when implies
If then iff
Proof
(1): If then where . Let be arbitrary. Then multiply both sides to get . Let . Then so by definition then as required.
(2): If and then where and . Substitute the first into second equation to get . Since is an integer then by definition then .
(3): If we prove that implies then we are done (just use (1) after that). Let , so then and . Add both together to get . Clearly is an integer so then .
Using this, then implies that and for any . Therefore, using our lemma then and we are done.
(4): If then and . Substitute the left into the right to get that . Dividing by gives that . The only two cases are that or . If then and in the other case so in either case we have as expected.
(5): If and then where . Since and we require that . We can therefore use induction over :
If then satisfied .
Suppose the case has it that . If we consider then:
In all cases we have as expected.
(6): Suppose . iff where iff iff iff .
☐
Notice that this extends for all linear combinations of integers too:
Property 2 can be extended similarly:
Using these properties:
so with that implies that . Multiplication can only add factors.
and so then . A 'divisibility chain' can only really add factors the farther you go.
Comes from the fact that factors distribute on addition. If and then because we can take the same factor from both and 'divide' them out.
If and then and are integers, so clearly they have to equal .
If then when then so clearly as a result (when )
Comes from just multiplying fractions on the top and bottom by the same factor.
Division Algorithm
Given any integers with then such that:
where . In the case then satisfies the strong inequalities .
Proof
Consider the arithmetic progression:
In this sequence, select the smallest non-negative member and denote it by . Thus by definition satisfies the inequalities of the theorem. But also being in the sequence is of the form and thus is defined in terms of .
To show uniqueness, suppose are other integers that satisfy the algorithm. First we prove . Suppose not, so then we can say that (WLOG) so then . See that (by plugging in , so then . This contradicts Properties of Divisibility, since then (using property 3) we have and which is impossible by the inequalities we imposed. Thus and consequently by plugging into the DA equation.
For the consideration when , just restate the theorem to use instead, and we get similar results.
☐
Why call it an algorithm?
Even though the theorem above shows an algorithm to find , something like a computer would do the arithmetic by hand to find both. Really, the theorem helps show the existence of and their uniqueness, rather than a 'good' algorithm for it.
A good way to get these number is just to divide normally, then get the quotient and find :
Greatest Common Divisor (GCD)
is a common divisor of and in case and .
There are only a finite number of divisors of any non-zero integer, so there is only a finite number of common divisors of except in the case . If at least one of and is not , the greatest among their common divisors is called the greatest common divisor of and and is denoted either or . Similarly, we denote the greatest common divisor of the integers not all zero by .
We note that for all .
Linear combination of GCD
If then such that
Proof
Consider the linear combinations , where range over all the integers. Clearly then:
Clearly is in the set with . Now, choose such that is the least positive integer in this set (we can do this by the well-ordering principle). Thus .
Next we prove . Doing the first shows the second by analogy. Proving , by contradiction assume that . Using our Division Algorithm then such that where (notice the stricter inequality here). Therefore then we have . Notice the form of the equation, it allows us to put . But this contradicts the fact that is the least positive integer in the set (since would be the least positive integer instead). By contradiction then . Similarly, .
Since is the greatest common divisor of we may write and and:
Thus clearly then and so by part 5 of Property 5 then . Now is impossible since is the greatest common divisor, so clearly .
☐
Using Linear combination of GCD
For instance, if we have it that then has the solution and :
Notice the proof itself doesn't really show how to find these values. We'll see that later in Euclid's Algorithm.
Properties of the GCD
The GCD can be characterized as:
is the least positive value of where range over all
It is the positive common divisor of and that is divisible by every common divisor.
Proof
(1): Use our linear combination argument, this is the smallest by the argument for the proof (we used the smallest element).
(2): If is any common divisor of and then by Property 3 of the properties of divisibility. Property 4 further restricts only one set of integers with this property.
☐
Clearly if any divisor of the form then is not necessarily (ie: the converse isn't necessarily true).
Generalization of Linear Combinations of GCD
Given integers , not all zero, with greatest common divisor , such that:
Furthermore is the least positive value of the linear form where all range over . Also is the positive common divisor of that is divisible by every common divisor.
(1): Use extension of GCD w/ by replacing the following: , , and :
Gives the result we have above.
☐
Multiplicative Property of Coprimality
If then .
Namely, if are coprime and are coprime, then is coprime with .
Proof
Suppose . Using the Linear GCD properties then such that:
Rearranging:
Notice that (starting from some new equation, using the fact that and ):
Choose and . Then:
Therefore, then using Property 3 implies that any common divisor of and is a divisor of 1. Therefore, then .
☐
Example
If we have and and then we fill all GCD requirements. Furthermore, notice that:
This makes sense. We're essentially saying that if the primes of and don't match up, then combining the primes into doesn't change the fact that they don't share prime factors with still.
Relative Primes
We say are relatively prime when . are all relatively prime when . We say they are relatively prime in pairs in case for all when .
GCD Equivalences
For any , the following are equivalent:
Proof
Clearly (1) (2) by reordering our integers appropriately. Similarly, we can go from (1) (3) by just realizing that when we have .
Start at (1) and we'll go to (4). Say . We know there such that:
Then:
By just rearranging terms. It follows that the GCD of and is a divisor of , namely . If we can prove that then we are done and have shown and since both are positive then (see Property 5).
Since and then from Property 3. We know also from GCD Property 2 that every common divisor of and is a divisor of their GCD, namely it's a divisor of . Hence .
☐
Example
It's pretty easy to see the first 3 as being equivalent, but what about (4)? Say so then . Then:
Is pretty clear. That's because we could take a factor of 60 from the inside (see Mult. Property) to get:
Where the GCD portion of course becomes 1 since the part will make sure that the which is will never have that remainder be 0.
GCD to Divisibility Argument
If and then .
Proof
Using Extension with via:
Since we suppose that and obviously . Then because of Property 2 in conjunction with the equation above ( is a divisor of both and and since then as a result via the property)
☐
Solving Linear Diophantine Equations
Given two integers , how can the GCD be found? This is hard especially for large , and canning the range of $bx_{0} + cy_{0}s would take forever (literally).
But we can use GCD Equivalences to help us find the GCD, as well as our values of (for solutions to our linear equations).
Consider . If we divide into we get and remainder . Thus:
In particular;
Now using our GCD Equivalences, we know:
By using and in the 4th equivalence in the list (and the first second of course). Thus:
We've made our integers smaller! The procedure can be repeated again where now :
Next :
Thus . With this result we can write the result as a linear equation:
So for the solution to in this case, then with and .
Note
The values of are not unique. In fact in this case and are all valid solutions ().
Let's generalize the process:
Euclidean Algorithm
Given integers we make a repeated application of the division algorithm:
The is , the last non-zero remainder in the division process. Values of where are obtained by writing each as a linear combination of and and working your way up.
Proof
The chain of equations is obtained by dividing into , into , into , ..., into . The process stops when the new remainder is 0. Thus in our application of 1 - Divisibility#^344c2e we have written the inequalities for the remainder without an equality sign:
And we stop at the point where we'd use instead, so then clearly:
We'll use this to prove that is the GCD of . By 1 - Divisibility#^acc042, we observe that:
Continuing by mathematical induction we get that:
For showing as a linear combination, we argue by induction that each is a linear combination of . Clearly is such a linear combination, and so is , ... so each is a linear combination of and . By the inductive hypothesis we may suppose that these latter two numbers are linear combinations of so it follows that is.
☐
An example of using the algorithm is:
2
Question
Find then find integers that satisfy:
Proof
For finding :
So . Solving where :
Therefore comparing the two:
☐
Least-common Multiple
The integers (all different from zero) have a common multiple if for (note that LCM's always exist, ex: ). The least of the positive common multiples is called the least common multiple and is denoted:
LCM Equivalances
If is any common multiple of then . This is the same as saying that if denotes then comprise all the common multiples of
Proof
Let be any common multiple and divide by . Via 1 - Divisibility^78dbe0, there is a quotient and a remainder such that where . We must prove that . Assume . For each we know that and so then . Thus is a positive common multiple of contrary to the fact that is the least of all the positive common multiples.
☐
Properties of the LCM
If then and .
Proof
(1): Let and . Then is a multiple of and so then . Also, is a multiple of both and so is a multiple of and . Thus so then .
(2): We'll prove just for positive integers . Consider the special case where . Now is a multiple of , say . Then and . Thus by 1 - Divisibility#^f558ea, then . Hence and . But being positive common multiple of and cannot be less than the least common multiple, so .
In the general case when we have via internal divisors. Applying the result of the previous paragraph gives:
Multiplying by via 1 - Divisibility#^7ef913, in combination with (1) gives us that:
as desired.
☐