Number theory is most easily described as the study of the natural numbers.
Some open problems in number theory include the twin prime conjecture, whether there exists an infinite number of prime pairs such that their difference is 2, or Goldbach's conjecture, whether every number can be written as the sum of two primes.
The division operator over Z yields the following properties,
∀a=0,a∣a (reflexive),
If a∣b and b∣a, then a=±b (symmetric),
If a∣b and b∣c, then a∣c (transitive),
If a∣b and a∣c, then a∣b+c.
Let n∈Z∖{0} and let p be prime, then ∃e,pe∣n∧pa+1∤n.
Order
If p,e,n∈Z+, then ∃a,pe>n.
We say that e is the order of n at p and write ordpn=a.
Roughly, e is the number of times that p divides n.
For n=0, we set ordp0=∞.
ordpn=0⟺p∤n.
Every nonzero integer can be written as a product of primes.
Sps. there exists an integer N such that it is the smallest positive integer that cannot be expressed as the product of primes.
It follows that N cannot be prime itself, so there must exist 1<m,n<N such that N=mn.
Notice that because m,n∈Z+ and strictly smaller than N,m,n must each be a product of primes.
Contradiction. If m,n are products of primes, then N=mn must be as well.
Factorization
We can collect prime terms and we can write n=p1e1p2e2…prer, or
n=(−1)ε(n)p∏pa(p),
where ε(n) yields 0 or 1 depending on the sign of n, and the product is over all positive primes. The exponents a(p) are nonnegative integers, and a(p)=0 for a countably infinite number of primes.
For every nonzero integer n there exists a prime factorization uniquely determined by n,
If a,b∈Z and b>0, there exists q,r∈Z such that a=qb+r with 0≤r<b.
Consider all integers of the form a−xb where x∈Z. Let r=a−qb be the least nonnegative element in this set. We claim that 0≤r<b. If not, r=a−qb≥b and so 0≤a−(q+1)b<r. Then r is not the minimal nonnegative element, contradiction.
Ideals on Z
If a1,a2,…,an∈Z, then define A=(a1,a2,…,an) to be the set of all integers of the form a1x1+a2x2+⋯+anxn with x1,x2,…,xn∈Z.
Notice that the sum and difference of any two elements in A is also in A.
If a∈A and r∈Z, then ra∈A.
Then, A is an ideal of ring Z.
If a,b∈Z, then there exists d∈Z such that (a, b) = (d).
Assume wlog. that a and b are not both zero, so that there are positive elements in (a,b).
(⇒)
Let d be the smallest positive element in (a,b).
Clearly, (d)⊆(a,b).
(⇐)
Sps. that c∈(a,b).
By Lemma 2, there exists integers q and r such that c=qd+r with 0≤r<d.
Since both c,d∈(a,b) it follows that r=c−qd∈(a,b).
And 0≤r<d implies r=0.
Therefore, c=qd∈(d).
Greatest Common Divisor
Sps. a,b,d∈Z, if d∣a and d∣b and every other common divisor of a and b divides d, then we say that d is the greatest common divisor (gcd) of a and b and write (a,b)=d.
If c is another greatest common divisor, distinct from d, then we must have c∣d and d∣c, so c=±d.
If there exists a gcd between two numbers, then it is determined up to sign.
Let a,b∈Z, if (a,b)=(d), then d is the greatest common divisor of a and b.
Since a∈(d) and b∈(d), we see that d∣a and d∣b.
Sps. c is a common divisor. Then c divides every number of the form ax+by, particularly c∣d.
Sps. a,b∈Z such that (a,b)=±1. We say that a and b are coprime (or relatively prime)
Proposition 1
Sps. a∣bc and that (a,b)=1, then a∣c.
Since a,b coprime, there exists integers r and s such that ra+sb=1.
Therefore, rac+sbc=c.
Since a divides the left hand side, we get that a∣c.
Corollary 1
If p prime and p∣bc, then either p∣b or p∣c.
The divisors of p are ±1 and ±p. Then (p,b)∈{1,p} i.e. either p,b coprime or p∣b, in which case we are done. Otherwise, if (p,b)=1, then by proposition 1 we get that p∣c.
Then, if p prime, p∤b and p∤c, then p∤bc.
Corollary 2
Sps. p prime and that a,b∈Z, then ordp(ab)=ordpa+ordpb.
Let α=ordpa and β=ordpb.
Then a=pαc and b=pβd, where p∤c and p∤d. Then ab=pα+βcd and p∤cd by corollary 1. Therefore, ordpab=α+β=ordpa+ordpb.
Every nonconstant polynomial is the product of irreductible polynomials.
It is clear that polynomials with degree 1 are irreductible.
Assuming that all polynomials with degree-bound n are the product of irreductible polynomials, and that degf=n.
If f is irreductible, we are done.
Otherwise, f=gh, where q≤degg,degh<n.
By the induction hypothesis g and h are themselves products of irreductible polynomials.
Therefore, f is also the product of irreductible polynomials as f=gh.
Monic Polynomial
A polynomial f is monic if its leading coefficient is 1.
Every polynomial, save for zero, is a constant times a monic polynomial.
Order in k[x]
Let p be a monic irreductible polynomial.
We define ordpf to be the integer a defined by the property that pa∣f but that pa+1∤f.
Such an integer must exist since the degree of powers of p is monotonically increasing.
Notice that ordpf=0⟺p∤f.
Sps. f∈k[x], then
f=cp∏pa(p),
where the product is over all the monic irreductible polynomials, and c is a constant.
The constant c and the exponents a(p) are uniquely determined by f, and a(p)=ordpf.
Let f,g∈k[x].
If g=0, then there exists h,k∈k[x] such that f=hg+r, where r=0 or r=0 and degr<degg.
If g∣f, then h=f/g and r=0.
Otherwise, let r=f−hg be the polynomial of least degree among all polynomials of the form f−lg with l∈k[x].
If degr≥degg, then let the leading term of r be axd and that of g be bxm.
Then r−ab−lxd−mg=f−(h+ab−ldd−m)g has degree less than r.
Contradiction.
Ideals on k[x]
If f1,f2,…,fn∈k[x], then (f1,f2,…,fn) is the set of all polynomials of the form
f1h1+f2h2+⋯+fnhn, where h1,h2,…,hn∈k[x].
Then, (f1,f2,…,fn) is the ideal generated by f1,f2,…,fn.
Given f,g∈k[x], there exists d∈k[x] such that (f,g)=(d).
Sps. d∈(f,g) and it is an element of least degree.
(⇒)
Clearly, (d)⊆(f,g).
(⇐)
Let c∈(f,g). If d∤c, then there exists polynomials h,r such that c=hd+r with degr<degd.
Since c,d∈(f,g), we get r=c−hd⊆(f,g).
Contradiction, r has degree less than d.
Therefore, d∣c and c∈(d).
Greatest Common Divisor
Sps. f,g∈k[x].
Then d∈k[x] is said to be the greatest common divisor of f and g iff d∣f and d∣g and every other common divisor of f and g divides d.
The greatest common divisor of two polynomials is determined up to multiplication by a constant.
If we require the gcd to be monic, then it is uniquely determined which is what we mean when we say the greatest common divisor.
Let f,g∈k[x]. By Lemma 3, there exists d∈k[x] such that (f,g)=(d). Then, d is a gcd of f and g.
Since f∈(d) and g∈(d), we have d∣f and d∣g. Sps. that h∣f and h∣g.
Then h divides every polynomial of the form fl+gm with l,m∈k[x], particularly h∣d.
Finally, we have the tools to prove theorem 2. If we apply ordq to both sides of
f=cp∏pa(p).
We get
ordqf=ordqc+p∑a(p)ordqp.
Clearly q∤c as c is a constant, so ordqc=0.
Then ordqp=0 if q=p and 1 otherwise.
Finally, we get that ordqf=a(q).
This shows that the exponents are uniquely determined by f and so is c.
§ Unique Factorization in a Principal Ideal Domain
The proof methods for unique factorization in Z and k[x] are very similar.
We can further generalize this notion of unique factorization.
In this section, we will denote an integral domain with R.
R is an Euclidean domain iff there exists a function λ:R∖{0}→N∪{0}, such that if a,b∈R,b=0, there exists c,d∈R with the property a=cb+d and either d=0 or λ(d)<λ(b).
The rings Z and k[x] are examples of Euclidean domains.
For Z we can consider λ to be the absolute value function, in k[x]λ is the function that assigns to every polynomial its degree.
Proposition 3
If R is an Euclidean domain, and I⊆R is an ideal, then there exists a∈R such that I=Ra={ra∣r∈R}.
Consider the nonnegative integers {λ(b)∣b∈I,b=0}.
Since every set of nonnegative integers has a least element there is an a∈I∖{0} such that ∀b∈I∖{0},λ(a)≤λ(b).
We've claimed that I=Ra, clearly Ra⊆I. Sps. that b∈I, then there exists c,d∈R such that b=ca+d, where d=0 or λ(d)<λ(a). Since d=b−ca∈I, the inequality λ(d)<λ(a) cannot be satisfied; so d=0 and b=ca∈Ra. Therefore, I⊆Ra.
For elements a1,a2,…,an∈R, we define (a1,a2,…,an)=Ra1+Ra2+⋯+Ran={∑i=1nriai∣ri∈R}. Then, (a1,a2,…,an) is an ideal.
If an ideal I is equal to (a1,a2,…,an) for some elements ai∈I, we say that I is finitely generated. If I=(a) for some a∈I, we say that I is a principal ideal.
Principal Ideal Domain
If every ideal of R is principal, then we say that R is a principal ideal domain (PID).
Every Euclidean domain is a PID, but not every PID is an Euclidean domain, i.e. PID ⊃ Euclidean domain.
However finding counterexamples to PID = Euclidean domain is somewhat hard.
In practice, it is useful to show that a given ring is an Euclidean domain, which gives us the added bonus of showing that it is a PID.
If a,b∈R,b=0, then we say that b divides a if ∃c∈R,a=bc and write b∣a.
In terms of ideals, a∣b⟺(b)⊆(a).
Associate
a,b∈R are associates if a=bu for some unit u.
A unit is defined as u∈R such that (u)=R.
And in terms of ideals, a and b are associates iff (a)=(b).
Irreducibility
An element p∈R is irreductible if a∣p implies that a is either a unit or an associate of p.
Prime
A nonunit p∈R∖{0} is said to be prime if p∣ab implies that p∣a or p∣b.
In terms of ideals, p prime iff ab∈(p)⟹a∈(p)∨b∈(p).
We now make distinct the notion of irreductible and prime elements.
These notions do not generally coincide, unlike in Z and k[x] and later we will show that they coincide in a PID.
a and b are coprime iff their common divisors are units.
Corollary 1
If R is a PID and a,b∈R are coprime, then (a,b)=R.
Corollary 2
If R is a PID, and p∈R is irreductible, then p prime.
Sps. that p∣ab and that p∤a.
Since p∤a it follows that they only share units as common divisors.
By corollary 1 (a,p)=R, so (ab,pb)=(b).
Since ab∈(p) and pb∈(p) we have (b)⊆(p).
Therefore p∣b and in a PID, prime elements ⟺ irreductible elements.
In a PID we will use prime and irreductible interchangeably.
Let (a1)⊆(a2)⊆(a3)⊆… be an ascending chain of ideals.
Then there exists k∈N such that (ak)=(ak+l) for l=0,1,2,….
That is, the chain breaks in finitely many steps.
Let I=⋃i=1∞(ai), obviously I is an ideal so I=(a) for some a∈R.
But a∈⋃i=1∞(ai) implies that a∈(ak) for some k.
This shows that I=(a)⊆(ak).
It then follows that I=(ak)=(ak+l)=…
Proposition 5
Every nonzero nonunit of R is a product of irreductibles.
Let a∈R∖{0}, where a is a nonunit, then we want to prove the following cases.
a is divisible by irreductibles
In the case that a itself is irreductible, we are done.
Otherwise, a=a1b1 where a1,b1 are nonunits.
If a1 irreductible, done.
Otherwise a1=a2b2 where a2,b2 are nonunits.
If a2 irreductible, done.
Otherwise, continue as before.
Notice that (a)⊂(a1)⊂(a2)⊂… and by lemma 5 we have that this is a finite chain, so there must exist some k such that ak is irreductible.
a is the product of irreductibles
If a is irreductible, done.
Otherwise let p1 be some irreductible such that p1∣a.
Then a=p1c1.
If c1 is a unit, done.
Otherwise, continue as before.
Again, notice that (a)⊂(c1)⊂(c2)⊂…, which is a finite chain by lemma 5.
There must exist some k for which a=p1p2…pkck, where ck a unit and pkck is irreductible.
We use the following lemma to construct the ord function akin to those for Z and k[x].
Let p be prime and a=0. Then there exists n∈Z such that pn∣a but pn+1∤a.
Sps. that there does not exist an n satisfying the lemma, then for each integer m>0 there would be an element bm such that a=pmbm.
Then pbm+1=bm so that (b1)⊂(b2)⊂(b3)⊂ which would be an infinite chain which contradicts lemma 5.
Then the integer n defined in lemma 6 is uniquely determined by p and a, and we set n=ordpa.
Let α=ordpa and β=ordpb.
Then a=pαc and b=pβd with p∤c and p∤d.
Thus ab=pα+βcd.
Since p prime, p∤cd.
Therefore ordpab=α+β=ordpa+ordpb
Let S⊂R be a set of primes with the properties
∀p∈R∃s∈R, such that p and s are associates.
∄a,b∈S such that a and b are associates.
To generate the set S we can choose a representative prime from each class of associate primes.
In Z we can construct the set S by choosing all positive primes.
In k[x] we chose S to be the set of monic irreductible polynomials.
There does not exist a general way to construct S for an arbitrary PID.
Let R be a PID and S a set of primes with the aforementioned properties.
Then if a∈R∖{0}, then we can write
a=up∏pe(p),(†)
where u is a unit and the product is over all p∈S.
The unit u and the exponents e(p) are uniquely determined by a.
In fact, e(p)=ordpq.
The existence of such a decomposition follows from proposition 5.
To show the uniqueness, let q∈S and apply ordq to both sides of eq. (†).
Using lemma 7, we get
ordqa=ordqu+p∑e(p)ordqp.
By definition of ordq we get that ordqu=0 and that ordqp=0 if q=p and 1 otherwise.
So ordqa=e(q). Since exponents e(q) are uniquely determined, so is the unit u.
Let i=−1 and consider Z[i]⊂C defined by {a+bi∣a,b∈Z}.
Clearly, Z[i] is closed under addition and attraction.
Also, if a+bi,c+di∈Z[i], then (a+bi)(c+di)=ac+adi+bci+bdi2=(ac−bd)+(ad+bc)i∈Z[i]. So Z[i] is closed under multiplication and is a ring.
Since Z[i]⊂C, it is an integral domain as well.
Proposition 6
Z[i] is an Euclidean domain.
For a+bi∈Q[i] define λ(a+bi)=a2+b2.
Let α=a+bi and γ=c+di and sps. γ=0.α/γ=r+si, where r,s∈Q.
Choose integers m,n∈Z such that ∣r−m∣≤21 and ∣s−n∣≤21.
Set δ=m+ni.
Then δ∈Z[i] and λ((α/γ)−δ)≤21λ(y)<λ(γ).
The numbers ±1 and ±i are the roots of x4=1 over the complex numbers.
Consider x3=1, since x3−1=(x−1)(x2+x+1), the roots are 1,(−1±−3)/2.
Let ω=(−1+−3)/2, then ω2=(−1−−3)/2 and that 1+ω+ω2=0.
Eisenstein Integers
Consider Z[ω]={a+bω∣a,b∈Z}.
Clearly, Z[ω] is closed under addition and subtraction.
Also, (a+bω)(c+dω)=ac+(ad+bc)ω+bdω2=(ac−bd)+(ad+bc−bd)ω. Thusly, Z[ω] is a ring.
Again, Z[ω]⊂C so it is an integral domain.
Additionally, Z[ω] is closed under complex conjugation.
Since −3=3⋅i=−3⋅i=−−3 we get that ω=ω2.
So if α=a+bω∈Z[ω], then α=a+bω=a+bω2=(a−b)−bω∈Z[w].
Proposition 7
Z[ω] is an Euclidean domain.
For α=a+bω∈Z[ω] define λ(α)=a2−ab+b2.
Then, we can see that λ(α)=aa.
Now, let α,β∈Z[ω] and sps. that β=0.
Then α/β=αβ/ββ=r+sω,
where r,s∈Q.
We used the fact that ββ=λ(β) is a positive integer and that αβ∈Z[ω] since α,β∈Z[ω].
Next we find m and n such that ∣r−m∣≤21 and ∣s−n∣≤21.
Then let γ=m+nω.λ((α/β)−γ)=(r−m)2(r−m)(s−n)+(s−n)2≤41+41+41<1.
Let ρ=α−γβ.
Then either ρ=0 or λ(p)=λ(β((α/β)−γ))=λ(β)λ((α/β)−γ)<λ(β).
Then, Z[i] and Z[ω] are PIDs as well, which means the theorem of unique factorization is true.
Exercise 1: Let a and b be nonzero integers. We can find nonzero integers q and r such that a=qb+r, where 0≤r<b. Prove that (a,b)=(b,r).
Solution:
Clearly a∣qb+r.
Let d be the gcd of a and b.
Because d∣a, we get d∣qb+r, so d∣qb and d∣r.
As a result, any common divisor of a and b is also a divisor of r.
Because r<b, there can be no common divisor between b and r greater than those of a and b.
Therefore, (a,b)=(b,r).
Exercise 2:
(this is a continuation to ex. 1)
If r=0, we can find q1 and r1 such that b=q1r+r1 with 0≤r1<r.
Show that (a,b)=(r,r1).
This process can be repeated.
Show that it must end in finitely many steps.
Show that the last nonzero remainder must equal (a,b).
Exercise 4:
Let d=(a,b) show that the Euclidean algorithm can be used to find m and n such that am+bn=d.
Solution: The process is outlined under the Bézout Coefficients section from my cryptography notes.
Exercise 5 skipped.
Exercise 6:
Let a,b,c∈Z.
Show that the equation ax+by=c has integer solutions iff (a,b)∣c.
Solution:
Let d=(a,c).
(⇒) We can see that d divides the left hand side which means that d must divide c.
(⇐) Sps. d∣c so c=dc′ for some c′∈Z.
Then we can write au+bv=d for some m,n∈Z.
Then by multiplying the expression by c′ we get auc′+bvc′=dc′=c.
Finally let x=uc′ and y=vc′ be integer solutions to ax+by=c.
Exercise 7:
Let d=(a,b) and a=da′ and b=db′.
Show (a′,b′)=1.
Solution:
Let d′=(a′,b′), so d′∣a′ and d′∣b′.
Then dd′∣a and dd′∣b.
If d′=1 then dd′ is a common divisor of a and b that is larger than d.
Exercise 8:
Let x0 and y0 be a solution to ax+by=c.
Show that all solutions have the form x=x0+t(b/d),y=y0−t(a/d) where d=(a,b) and t∈Z.