The Quadratic Sieve
The Quadratic Sieve
June 1, 2017
Abstract
A brief summary.
1 Introduction
x2 y 2 (mod N ). (2.1)
Suppose we could find a set of distinct integers a1 , . . . , ak such that Q(a1 ) Q(ak )
is a square, then for
x = b N c + a1 b N c + ak ,
y 2 =Q(a1 ) Q(ak ),
we would have
x2 y 2 (mod N ),
and we would have found a solution of 2.1. Thus, weve reduced the problem of
factoring N to finding sets a1 , . . . , ak of distinct integers with Q(a1 ) Q(ak ) a
square.
We need an efficient way to determine our ai , and to get a product of the Q(ai )
to be a square. We need to factor each of the Q(ai ) to check if the exponents of
the prime factors of the product are even. To do so, we will search for integers a
such that the primes in the factorization of Q(a) are small, and then impose that
the sum of the exponents of every prime is even.
Focusing on the first item, we consider a bound B and only concentrate on the
values that factor completely with the primes smaller than that bound. In other
words, the values which are B-smooth. To make Q(a) small, we need to select
a close to 0, so we set a bound M and only consider values of a over the sieving
interval [M, M ]. We will discuss later how to take the bounds B and M . Heuristics
suggest we choose B = L(n)1/2 .
Now, let a be in the sieving interval, then if some prime p divides Q(a),
2
b N c + a N (mod p).
So the primes in our factor base must be primes such that the Legendre symbol
N
= 1.
p
The sieving procedure works with the prime factors and prime powers of the
elements we want to sieve, so if pk is a prime factor of Q(a), then p is also a prime
factor of Q(a+p). Indeed, since Q is a polynomial with integer coeficients, if a b
(mod pk ), then Q(a) Q(b) (mod pk ). To find the set of as where pk is a divisor
of Q(a), we need only to solve the quadratic congruence
because then the exponents of the primes in Q(a1 ) Q(ak ) will be even and it will
be a square.
There are several ways to obtain a solution of that congruence, for example we
can put all the vectors v(ai ) on the columns of a matrix M , and then solve
To assure that this conguence has any solution, we need to find at least many ai as
there are primes in the factor base. So if K is the number of primes in the factor
base, with K + 1 values of a in the sieving procedure we can find the set of ai s and
we are done.
2 THE QUADRATIC SIEVE 4
As we have seen, this leads immediately to a solution of the congruence 2.1 and
a chance of factoring N .
How large should we choose the bound B? I fwe choose B small, we have the
advantatge that we do not need many B-smooth residues to find s subset product
that is a square. But the problem is that if B is too small, we may not find any
B-smooth numbers. So B should be latge enough that the B-smooth numbers are
arrivind with sufficient frequency. It turns out that this optimum value for the size
of the factor base is
log N log log N
B = (L(N )) , where L(N ) = e .
The optimum size of the factor base turns out to be the cube of this bound.
Some notes about the running time of the algorithm. With this optimum bound,
the sieving time should be roughly three times the matrix reduction time. So this
step runs in less than O(B 3 ) time. Put this all together and we have an asymptotic
running time for the QS of
O(L(N )1+o(1) ).
We have explained the Quadratic Sieve algorithm. Lets put all the ideas together
and write down the algorithm.
1. Initialize:
B = be log N log log N c
Check that N is not a multiple of some prime p B.
Find the primes p B such that ( Np ) = 1.
2. Sieve:
List log2 |Q(a)| for a = b N c + 1 to a = b N c.
Sieve the sequence for p in the factor base.
Write the pairs (a, Q(a)) in a set S for all Q(a) B-smooth.
3. Linear algebra:
Prime factorization of Q(a) for (a, Q(a)) S.
Matrix M of exponents of the factorization reduced mod 2.
Solution of M x 0 (mod 2) and take the ai s. t xi = 1.
2 THE QUADRATIC SIEVE 5
4. End
X = (a1 + b N c) (ak + b N c) (mod N ).
p
Y = Q(a1 ) Q(ak ) (mod N ).
d = gcd X Y, N .
Return d.
We can find the algoritm implemented in Mathematica at the end of this work.
Some comments about the algoritm:
(1) At the begining of the section we saw that the probability that if (x, y) is a
solution of the congruence 2.1 then the probability that gcd(x y, N ) is a
nontrivial factor of N is 1/2. So in the step 4 of the algorithm we can get d = 1
or d = N with probability 1/2. In this case, we compute another X and Y
from computing another solution of the linear system M x 0 (mod 2) in step
3. We said before that to have a solution of this system is sufficient that the
number of elements in the set S is at least the number of primes in the factor
base plus 1. But now, if we want the system to have more than one solution,
we have to find more B-smoorth numbers to put in the set S. For example, if
K is the number of primes in the factor base, if we sieve until there are K + 11
B-smooth numbers, then there will be at least 10 solutions of the system and
so 10 different pairs (X, Y ) in step 4. The probability that all of them give a
trivial factor is smaller than 1 over 1000.
(2) What happens if the imput is a prime number? The algorithm works correctly
but in step 4 we allways will get d = N . So if we do the 10 possible solutions
weve mentioned before and all of them are trivial factors of N we can conclude
that N is prime.
There is a improvement to the quadratic sieve that uses plynomails instead of Q(x)
in the algoritm. The idea of the Multiple Polynomial QUadratic Sieve ig to use
several polynomials Q so that the sixe of Q8a) can be kept as small as possible.
The idea is due to Peter Montgomery.
The quadratic polynomials are all of the form Q(x) = Ax2 +2Bx+C with A > 0,
B 2 AC > 0 and such that N |B 2 AC. This gives a congruence symilar to the
one before since
Suppose that our sieving interval is [M, M ]. We wish to optimize M and the
value of Q(x) over this interval, so it is therefore natural to center the interval at
the minimum of the function Q, i.e. to sieve in the interval
I = [B/A M, B/A + M ].
To minimize the absolute value of Q(x) observe that we have for x I, Q(B/A)
Q(x) Q(B/A + M ), therefore we ask that Q(B/A) Q(B/A + M ), which
is equivalent to
p
2(B 2 AC)
A2 M 2 2(B 2 AC) = A .
M
B 2 AC p
max|Q(x)| M N/2.
A
Observe that the values Q(x) are of the same order of magnitude than the size
of the values of our initial polynomial, but we now add the freedom to switch
polynomials as soon as the size become too large.
To summarize, we first choose an appropiate sieving length M. Then we choose
A close to 2N /M such that A is prime and ( N A
) = 1. Then we find the solution
2 2
of B N (mod A) and finally we set C = (B N )/A.
A heuristic analysis shows that using multiple polynomials speeds us the quadratic
sieve method by roughly a factor 1/2 log N log log N
There is actually another algorithm that may come into play and again majorize
the special quadratic sieve. This is the number field sieve, something we shall
discuss in the next section.
congruences here will not be modulo N , they will be with pairs , () where lies
in a particular algebraic number ring.
We choose a number field K = Q() for some algebraic integer , let f (X) Z[X]
be the minimal monic polynomial of , and let d be the degree of K. Assume that
we know an integer m such that f (m) 0 (mod N ). Then we can define a ring
homomorphism from Z[] to Z/N Z, by setting
() = m (mod N ).
That is, we have found a pair of squares that are congruent mod N and we may
attempt to factor N by computing gcd(x y, N ).
The above ideas consititute the strategy of NFS. We now discuss the basic setup
that introduces the number ring and the homomorphism . Suppose we are trying
to factor the number N , which is odd, composidte, and not a power. Choose the
degree d of our polynomial. (We will later give a heuristic argument on how to
choose d so as to minimize the running time to factor N .) Let m = bN 1/d c, and
write N in base m so that
N = md + cd1 md1 + + c0 ,
where each cj [0, m 1]. So we choose the polynomial f (x) to be the base-m
expansion of N ,
f (x) = xd + cd1 xd1 + . . . c0 .
Then observe that f (m) 0 (mod N ). Let be an algebraic number that is a root
of f . Our number ring will be Z[]. This is computationally thought of as the set of
3 THE NUMBER FIELD SIEVE 8
ordered d-tuples (a0 , a1 , . . . , ad1 ) of integers where the ai s are the corrficients of an
element of Z[] in the base {1, , . . . , d1 }. This polynomial may not be irreducible.
Alctually, this is an exellent situation in which to find ourselves, since if we have
the nontrivial factorization f (x) = g(x)h(x) in Z[x], then the integer factorization
N = g(m)h(m) is also nontrivial and then one has a factorization of N . If it is
irreducible, we may continue with NFS and search for pairs a, b Z such that
Y
(a + b) = 2 , for some Z[],
Y
(a + bm) = x2 , for some x Z.
This scenario will be promising only if we can find integers a and b such that they
get the conditions above. If the ring is a unique factorization domain, and if we
know a basis for the units, then we could create exponent vectors for he algebraic
integers a + b for all the small prime ideals of ZK and repeat the method we did
in the QS. This is, sieve for smooth integers of the form a + bm and a + b, and find
a set of them such that when multiplied together become a square of integers (for
the a + bm) and a square of elements in Z[] (for the a + b).
This is the basic distinction between the general number field sieve and the
special one (for the second one we know the units, class number, generators of
small prime ideals, etc...).
We will start by the simplest case of NFS.
In this subsection we will assume that the class number of the number field is 1,
and then we will go inte the details concerning the different parts of the algorithm.
We will discuss how the factor base is constructed, how the sieving is performed,
and how to find the square roots of an element in Z[].
Recall that the class number of a number field is the order of the ideal Cl(ZK ).
So if the class number of K is 1, then its ring of integers is a principal ideal domain.
In this section we will assume that K has class number 1 and we know its prime
ideals, say pi . Since ZK has class number equal to 1, we can put pi = gi ZK . Before
we begin to see how to find the pairs (a, b) lets give a rigorous definition of what
is to be B-smoth in ZK . Let ZK , write
Y
ZK = pi vi ,
i
where we assume that for all i, vi > 0. We will say that is B-smooth if NK|Q ()
is B-smooth, or in other words....
3 THE NUMBER FIELD SIEVE 9
Consider G the set of generators for the prime ideals p above a prime p B,
and U the set of generators of the group of units of K. Then we can write as
Y Y
= uu g g .
uU gG
3.2.1 Sieve
The factor base is to consist of three parts, the first part is all the prime numbers up
to B. The second and the third part of the factor base is to consist of the generators
for the prime ideals above B, G, and a set of generators for the group of units, U .
The pairs (a, b) we are looking need to satisfy this three conditions to be smooth.
1. gcd(a, b) = 1.
2. |a + bm| is B-smooth.
3. a + b is B-smooth.
By sieving on small primes, eliminate pairs (a, b) divisible by a small prime. Then
sieve for the elements |a + bm| to be B-smooth using essentially the same sieving
procedure as the one that we have described for the quadratic sieve. To sieve for
a + b to be smooth, we need to study when a prime p divides the N (a + b).
Definition 3.1. If p is a prime ideal above p, we call inertial degree, and we denote
by fp , the dimension of the Fp -vector space ZK /p, that is
Lemma 3.2. If a and b are coprime integers, then any prime ideal p which divides
a + b, either divides the index d = [ZK : Z[]] or is of degree 1.
3 THE NUMBER FIELD SIEVE 10
Prime ideals of degree 1 dividing a prime number p and not dividing the index
correspond to linear factors of f (x) modulo p, i.e. roots of f (x) in Fp . This follows
from the next theorem.
Lemma 3.3. Let p, f and Z[] as above, if f (c) 0 (mod p) then I = (p, c) is
a first degree prime ideal.
: Z[]/I Z/pZ
7 c
z 7 z (mod p).
x0 = a0 + a1 c + a2 c2 + . . . an cn Z[]/I
x = x x0 + x0 = k1 p + k2 (c )
Theorem 3.4. Let K, f and d be as above. For any prime p not dividing d one
can obain the prime decomoposition of pZK as follows. Let
g
Y
f (x) = fi (x)ei (mod p)
i=1
3 THE NUMBER FIELD SIEVE 11
where pi = (p, fi ()) and the residual index di is equal to the degree of fi .
(p, cp + y, 2 , . . . , d1 )
where cp and y are integers with y | p and the i are polynomials of degree exactly
i in . It is clear that a + b p if and only if y | b and a bcp /y (mod p).
Observe that p | b is impossible since as before it would imply p | a hence a and b
would not be coprime. If follows that y = 1, hence p if and only if a bcp
(mod p) and then p | a + bcp . Furthermore, cp p implies clearly that f (cp ) 0
(mod p). The condition is therefore exactly the same as in the case p - d.
Finally, in the sieving procedure we will compute once and for all the roots cp of
the polynomial f (x) modulo each prime p B and sieve for the elements a + cp b if
p | a + cp b for every root cp .
The second step of this algorithm, as in the quadratic sieve, is to find the factoriza-
tion of every element weve obtained in the sieve. For the factorization of a + bm in
Z we do as always, but the factorization of a + b in ZK is obtained as follows. For
all the primes p | d, there can be more than one prime ideal such that correspond
to the same cp , this is because the norm does not distinguish between the different
ideals as they have the same norm p. The easiest way to get around this is to not
use that primes. (There is also an algorithm that can compute the p-adic valuations
in this case but is not necessarly.) So we focus on the primes such that p - d. For
theese primes there is only one prime ideal p above p that corresponds to a given
3 THE NUMBER FIELD SIEVE 12
A method that can be used to find them is for example Gaussian elimination,
byt there are different algorithms that are more effective. For the current record
factorization by the special number field sieve 21 039 + 1, the block Wiedemann
algorithm (Posar bibliografia de D.H. Wiedemann. Solving sparse linear equations
over finite fields. IEEE Transactions on Information Theroy, issue 1, (32):54-62,
2986.) was used to find the right combination.
When all the right combinations dureing the sieving and linear algebra step has been
overcome, one is left wuth a set S satisfying that there exist x Z and ZK
such that Y
x2 = a + bm Z,
(a,b)S
Y
2 = a + b ZK .
(a,b)S
With the homomorphism from Z[] to Z/N Z as before, we have the congruence
Y Y
x2 a + bm (a + b) ( 2 ) ()2 (mod N ).
(a,b)S (a,b)S
Q
The square root of (a,b)S a + bm can be computed as in the quadratic sieve.
For the square root of the product of the elements in the number field we represent
each element a + b S by its factors in G and U . Then sum all the exponents
and take the half of it, as Y 1 Y 1
= u 2 eu g 2 eg .
uU gG
3.2.4 Complexity
In the same way as for the quadratic sieve there has not yet come a rigirius proof of
the actual running time of the special number field sieve. The heuristic asymptotic
complefity for the running time of NFS is
p
O(exp C 3 log N log log N .
And the optimal choice for d such that minimizes the runnng time is
13
(3 + O(1)) log N
d= .
2 log log N
3.2.5 Example
Given a large composite integer N = re s, where r and s are small, start by finding
a monic polynomial f such that we can find m Z, f (m) 0 (mod N ). With the
special form of N , this polynomial can be constructed in the following way, decide
the degree d and let k be k = | de |. Then put t = srkde and
f (x) = xd t, m = rk .
: Z[i] Z/N Z
i 7 510
We choose the factor bases with limit B = 40 and for the ideals we chose the
first degree prime ideals with norm less than B 0 = 55. We found generators for all
the first degree prime ideals, looking for the cp such that f (cp ) 0 (mod p). The
primes that are not in the table are the ones that the polynomial f doesnt factorize
in a lineal factor modulo p and so they dont give any first degree prime ideal. The
3 THE NUMBER FIELD SIEVE 14
generators of the ideals are represented in the table with the corresponding pair
(p, cp ).
(p, c) Generator
(2,1) (1+i)
(5,2) (1+2i)
(13,5) (3+2i)
(17,4) (1+4i)
(29,12) (5+2i)
(37,6) (1+6i)
(41,9) (5+4i)
(53,23) (7+2i)
We sieved with the values 200 a 200 and 1 b 54. First sieve to get
a + bm be B-smooth and second sieve to get the ideals a + bi be B 0 -smooth. To
be sure that with the elements we can find there a product that gives a square, we
need 12 from the factor base, 8 more from the ideals, and 2 more from the units. So
we need 23 pairs (a, b). After doing Gaussian elimination on the exponent vectors,
the following set S of pairs are a square when multiplied together
(a, b) a+bm Factors N(a+bi) Factors Ideal factorization
2
(34, 19) 9724 2 11 13 17 1517 37 41 (1)(i)(1 + 6i)(5 + 4i)
3 2
(70, 1) 440 2 5 11 4901 13 29 (i)(3 + 2i)2 (5 + 2i)
(4, 1) 506 2 11 23 17 17 (i)(1 + 4i)
2
(2, 5) 2548 2 72 13 29 29 (i)(5 + 2i)
3
(3, 1) 513 3 19 10 25 (1)(i)(1 + i)(1 + 2i)(34, 19)
(5, 7) 3565 5 23 31 74 2 37 (1 + i)(1 + 6i)(34, 19)
(3, 2) 1023 3 11 31 13 13 (3 + 2i)
(59, 2) 961 312 3485 5 17 41 (1 + 2i)(1 + 4i)(5 + 4i)(34, 19)
(102, 23) 11628 22 32 17 19 10933 13 292 (i)(3 + 2i)(5 + 2i)2
This gives us the following squares in Z and Z[i].
Y
a + bm = (25 33 5 7 112 13 17 19 23 312 )2 = 3395973209428802 ,
(a,b)S
Y
a+bi = (i3 (1)(1+i)(1+2i)(3+2i)2 (1+4i)(5+2i)2 (1+6i)(5+4i))2 = (156017+110961i)2 .
(a,b)S
whose components are the vi . And we consider the components j of the vector
M 1 V , that is
Q
Hence = u j aj j where u is a unit, and we can proceed as in the algorithm
above.
3 THE NUMBER FIELD SIEVE 16
The general NFS is in practive the same algorithm as the sepacial number field
sieve, by when using a general N ther are several problems that arise through the
steps of the algoritm. The first problem is that we cant assume anymore that K is
a simple field. Hence is out of the question to compte explicit generators for prime
ideals of small norm, a system of fundamental units, etc.
So we proceed as befors, but instead of keeping relations beween elements we
keep relations between the prime ideals themselves.
A usual in our factor base we take the prime ideals of degree 1 whoose norm
is less than or equal to B and the prime ideals of norm less than or equal to B
which divide the index of the extension K|Q. If the index is difficult to compute,
we can use instead the prime ideals above ptimes p B such that p2 divides the
discriminant of the polynomial f .
Using the same argument than in the SNFS, we can find pairs (a, b) such that the
integers a + bm and N (a + b) are B-smooth and conclude that then the algebraic
integer a + b is also B-smooth. The problem begins when we try to find a square
element in this set of B-smooth algebraic integers. This is because the condition
that the norm of a+b being a square in Z is not sufficient to make a+b a square in
ZK . For example, if we were in Z[i] and consider the elements (2 + i) and (1 + 2i),
then
(2 + i)(1 + 2i) = i(2 + i)2 is not a square in Z[i],
but N ((2 + i)(1 + 2i)) = (4 + 1)(1 + 4) = 25 is a square in Z. The problem
comes from the fact that the ring Z[] may not be the full ring ZK of integers in
P
Q(). Thus, even if (a,b)S v(a + b) (mod 2) is the zero vector, we may not have
Q
(a,b)S (a + b)ZK being the square of an ideal in ZK . Even if it is the square of
an ideal I in ZK , it may be that ZK is not a principal ideal domain, so I may not
be principal. Fortunately, this difficulty can easily be overcome by sing a trick due
to L. Adleman (seeref Adleman).
Let us say that a non-zero algebraic number y K is singular if yZK is the square
of a fractional ideal. Let S be the multipicative group of singular numbers. If U (K)
is the group of units of K 1 , it is easy to check that we have an exact sequence
This exact sequence can be considered as an exact sequence of vector spaces over
F2 = Z/2Z. Let (r1 , r2 ) be the signature of K, i.e. r1 is the number of embeddings
of K whose image lie in R and 2r2 is the number of complex embeddings, so that
r1 + 2r2 = d. Then, using Dirichlets Theorem that says that U (K) is a finitely
generated abelian group of rank r1 + r2 1, and the parity of the number of roots
of unity in K, it is clear that
1 G[2] G G G/G2 1.
where the map from G to G is squaring, shows that |G[2]| = |G/G2 | hence
where the 2-rank rk2 (G) of G is by definition equal to dimF2 G/G2 . Puting all this
together, we obtain
Hence, if we obtain more than e = r1 + r2 + rk2 (Cl(K)) singular umbers which are
algebraic integers, a suitable multiplicationve ocombination with corfficients = or 1
will give an element of ZK cupK 2 , i.e. a square of ZK .
Since in practice is not possible to compute the number rk2 (Cl(K)), we will
wait until we obtaina square with a suitable combination, and is we do not obtain
a square, this simply means that our guess is not large enough.
To find a combination of algebraic integers that give a square we choose a number
r of prime ideals p which do not belong to our factor base. A reasonable choice is
r = 3e, where e is r1 + r2 + rk2 (Cl(K)) and can be replaced by a suitable bound.
For example, we can choose for p ideals of degree 1 above primes which are larger
than B,i.e. p = (p, cp ). Then the idea is to compute a generalized Legendre
a+b
symbol p
defined as
(N (p)1)/2 x
x (mod p).
p
Each relationc will be stored as a vector over Z/2Z with |E| + |P | + r components,
where E is the set of prime ideals in our factor base. As soon as we have more
relations than components, by Gaussian elimination over Z/2Z we can find an
algebraic number x which is a singular integer and which is a quadratic residue
modulo our r extra primes. It follows that the element x is quite likely a square.
4 EXERCISES 18
One of the most difficult problems of the general number field sieve, which is not
yet solved, is the problem of finding an algorihm to compute a square root y of x.
We still have the exponent vectors for our numbers a + b that give the square
number x. But unless we are working in a unique factorization domain it is no so
easy to use them. A bruteforce method is to multiply out the huge product and
somehow take its square root.
An algorithm that solve this problem is the following
Unfortunately, in our case, simply computing the polyomial A(X) is already not
easy, and factrinf A(X 2 ) will be even more difficult although it will be a polynomial
of degree 10 for example and with coefficients having several hundred thousands
digits.
Q
A new idea that H.W.Lenstra has suggested is look for y of the form y = (a +
b), with (a, b) coprime and a + b smooth, but not necessarily a + bm. This has
the advantatge that many more pairs (a, b) are avaliable, and also leads to a linear
system over Z/2Z.
4 Exercises
Exercice 4.1. Show that the problem of computing a square root modulo an ar-
bitrary integer N is probabilistically polynomial time equivalent to the problem of
factoring N in the following sense. If we have an algoritm for one of the problems,
then we can solve the other in probabilistic polynomial time.
Conversely, pick a random x mod N and compute the square root of x2 mod N .
Then,
x2 y 2 mod N, (4.1)
and we saw at the introduction of the factorization methods that if x and y satisfy
4.1, then the probability of gcd(x y, N ) being nontrivial is 1/2. So the procedure
is simply iterate this argument until we get a nontrivial factor of N , and then repeat
the algorithm again.
Exercice 4.2. In the multiple polynomial version of the quardatic sieve factoring
algorithm, we have AQ(x) y 2 (mod N ) for some N , and no Q(x) itself. Then
why do we take into account in the explanation the maximum of |Q(x)| and not of
|AQ(x)|?
Exercice 4.4. Prove that, as claimed in the text, if S is the group of singular
numbers, the following sequence is exact:
where Cl(K)[2] is the subgroup of elements of Cl(K) whose square is equal to the
identity.
4 EXERCISES 20
uZK = ZK = (1)2 .
: U (K) S/K 2
and observe that ker = U (K)2 because U (K) K 2 = U (K)2 . So the first part
of the exact sequence is done. Now consider the map
: S/K 2 Cl(K)[2]
y 7 I
where I is the fractional ideal such that since y is singular, yZK = I 2 . It is clear
that for any singular algebraic number y, the ideal I is on Cl(K)[2]. This is becaise
the square of I is the principal ideal generatid by y, and then the class of it in
Cl(K) is the identity. To see that the map is well defined we consider y1 and y2 S
such that y1 y2 (mod K 2 ), then y1 = y2 z for some z K 2 . The image of y1
and y2 for the map are the principal ideals y1 ZK and y1 ZK respectively. Since
they are fractional ideals, we can multiply by an invertible element in K and the
ideal remains intact. So,
y1 ZK = zy2 ZK = y2 ZK .
Then the fractional ideal I such that I 2 = y1 ZK must be the same as the frac. ideal
J such that J 2 = y2 ZK .
To see that the map is exhaustive consider an ideal I in Cl(K)[2], then the
square of it is the identity and so there exists som y K such that I 2 = yZK . So
the image of y for the map is the ideal I.
The last part of the exact sequence is to prove that the kernel of the map is
the image of the map .
First, let u U (K), is clear that
uZK = ZK = (1)2
and (1) is a principal ideal. So the image of u for the map is in ker . Otherwise,
let y such that y is not a square in K. Then, if (y) is the identity, the ideal
I such that yZK = I 2 is a principal ideal. So there exists some z K such that
I = zZK . Note that z has to be in the unit group of K because if z / U (K) then
we would have
yZK = z 2 ZK = y = z 2 = y K 2 .
So z U (K) and the ideal yZK is the total ideal, so 1/y ZK and y is a unit of
K.
4 EXERCISES 21
(a) Show that either A(X 2 ) is irreducible in Z[X], or ther exists an irreducible
monic polynomial S Z[X] such that A(X 2 ) = S(X)S(X).
(a) Suppose A(X 2 ) is not irreducible in Z[X], so there exists some polynomial
S(X) Z[X] of degree r < 2d such that S(X) divides A(X 2 ). Then, all the
roots a1 , . . . , ar of the polynomial S(X) are also roots of A(X 2 ). Hence, the
oposite of theese roots are also roots of A(X 2 ) because
A(a2i ) = 0 = A((ai )2 ) = 0.
Note that the ai s cant be zero because if so, A(0) = 0 and A(X) wouldnt
be irreducible. If we consider the polynomial with roots a1 , . . . , ar , that is
S(X), then it also divides our polynomial A(X 2 ). So the product S(X)S(X)
divides A(X 2 ). Note that
S(X)S(X) Z[X 2 ]
So weve found a polynomial S( X)S( X) Z[X] such that is a factor of
A(X). Since A(X) is irreducible, the factor has to be trivial and
A(X) = S( X)S( X) = A(X 2 ) = S(X)S(X).
(b) ff
Exercice 4.6. For any finite abelian group G and n 1 show that