Annals of Mathematics,141 (1995),443-552
Pierre de Fermat Andrew John Wiles
Modular elliptic curves
and
Fermat’s Last Theorem
By Andrew John Wiles*
ForNada,Claire,KateandOlivia
Cubumauteminduoscubos,autquadratoquadratuminduosquadra-
toquadratos,et generaliter nullam in in?nitum ultra quadratum
potestatum in duos ejusdem nominis fas est dividere,cujes rei
demonstrationem mirabilem sane detexi,Hanc marginis exiguitas
noncaperet.
-PierredeFermat ~ 1637
Abstract,When Andrew John Wiles was 10 years old,he read Eric Temple Bell’s The
Last Problem and was so impressed byit that he decided that he would be the?rst person
to prove Fermat’s Last Theorem,This theorem states that there are no nonzero integers
a,b,c,n with n>2 such that a
n
+ b
n
= c
n
,This object of this paper is to prove that
all semistable elliptic curves over the set of rational numbers are modular,Fermat’s Last
Theorem follows as a corollarybyvirtue of work byFrey,Serre and Ribet.
Introduction
An elliptic curve over Q is said to be modular if it has a?nite covering by
a modular curve of the form X
0
(N),Any such elliptic curve has the property
that its Hasse-Weil zeta function has an analytic continuation and satis?es a
functional equation of the standard type,If an elliptic curve over Q with a
given j-invariant is modular then it is easy to see that all elliptic curves with
the same j-invariant are modular (in which case we say that the j-invariant
is modular),A well-known conjecture which grew out of the work of Shimura
and Taniyama in the 1950’s and 1960’s asserts that every elliptic curve over Q
is modular,However,it only became widely known through its publication in a
paper of Weil in 1967 [We] (as an exercise for the interested reader!),in which,
moreover,Weil gave conceptual evidence for the conjecture,Although it had
been numerically veri?ed in many cases,prior to the results described in this
paper it had only been known that?nitely many j-invariants were modular.
In 1985 Frey made the remarkable observation that this conjecture should
imply Fermat’s Last Theorem,The precise mechanism relating the two was
formulated by Serre as the ε-conjecture and this was then proved by Ribet in
the summer of 1986,Ribet’s result only requires one to prove the conjecture
for semistable elliptic curves in order to deduce Fermat’s Last Theorem.
*The work on this paper was supported byan NSF grant.
444 ANDREW JOHN WILES
Our approach to the study of elliptic curves is via their associated Galois
representations,Suppose that ρ
p
is the representation of Gal(
ˉ
Q/Q)onthe
p-division points of an elliptic curve over Q,and suppose for the moment that
ρ
3
is irreducible,The choice of 3 is critical because a crucial theorem of Lang-
lands and Tunnell shows that if ρ
3
is irreducible then it is also modular,We
then proceed by showing that under the hypothesis that ρ
3
is semistable at 3,
together with some milder restrictions on the rami?cation of ρ
3
at the other
primes,every suitable lifting of ρ
3
is modular,To do this we link the problem,
via some novel arguments from commutative algebra,to a class number prob-
lem of a well-known type,This we then solve with the help of the paper [TW].
This su?ces to prove the modularity of E as it is known that E is modular if
and only if the associated 3-adic representation is modular.
The key development in the proof is a new and surprising link between two
strong but distinct traditions in number theory,the relationship between Galois
representations and modular forms on the one hand and the interpretation of
special values of L-functions on the other,The former tradition is of course
more recent,Following the original results of Eichler and Shimura in the
1950’s and 1960’s the other main theorems were proved by Deligne,Serre and
Langlands in the period up to 1980,This included the construction of Galois
representations associated to modular forms,the re?nements of Langlands and
Deligne (later completed by Carayol),and the crucial application by Langlands
of base change methods to give converse results in weight one,However with
the exception of the rather special weight one case,including the extension by
Tunnell of Langlands’ original theorem,there was no progress in the direction
of associating modular forms to Galois representations,From the mid 1980’s
the main impetus to the?eld was given by the conjectures of Serre which
elaborated on the ε-conjecture alluded to before,Besides the work of Ribet and
others on this problem we draw on some of the more specialized developments
of the 1980’s,notably those of Hida and Mazur.
The second tradition goes back to the famous analytic class number for-
mula of Dirichlet,but owes its modern revival to the conjecture of Birch and
Swinnerton-Dyer,In practice however,it is the ideas of Iwasawa in this?eld on
which we attempt to draw,and which to a large extent we have to replace,The
principles of Galois cohomology,and in particular the fundamental theorems
of Poitou and Tate,also play an important role here.
The restriction that ρ
3
be irreducible at 3 is bypassed by means of an
intriguing argument with families of elliptic curves which share a common
ρ
5
,Using this,we complete the proof that all semistable elliptic curves are
modular,In particular,this?nally yields a proof of Fermat’s Last Theorem,In
addition,this method seems well suited to establishing that all elliptic curves
over Q are modular and to generalization to other totally real number?elds.
Now we present our methods and results in more detail.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 445
Let f be an eigenform associated to the congruence subgroup Γ
1
(N)of
SL
2
(Z) of weight k ≥ 2 and character χ,Thus if T
n
is the Hecke operator
associated to an integer n there is an algebraic integer c(n,f) such that T
n
f =
c(n,f)f for each n,We let K
f
be the number?eld generated over Q by the
{c(n,f)} together with the values of χ and let O
f
be its ring of integers.
For any prime λ of O
f
let O
f,λ
be the completion of O
f
at λ,The following
theorem is due to Eichler and Shimura (for k = 2) and Deligne (for k>2).
The analogous result when k = 1 is a celebrated theorem of Serre and Deligne
but is more naturally stated in terms of complex representations,The image
in that case is?nite and a converse is known in many cases.
Theorem 0.1,For each prime p ∈ Z and each prime λ|p of O
f
there
isacontinuousrepresentation
ρ
f,λ
,Gal(
ˉ
Q/Q)?→ GL
2
(O
f,λ
)
whichisunrami?edoutsidetheprimesdividingNpandsuchthatforallprimes
qnotbarNp,
trace ρ
f,λ
(Frob q)=c(q,f),det ρ
f,λ
(Frob q)=χ(q)q
k?1
.
We will be concerned with trying to prove results in the opposite direction,
that is to say,with establishing criteria under which a λ-adic representation
arises in this way from a modular form,We have not found any advantage
in assuming that the representation is part of a compatible system of λ-adic
representations except that the proof may be easier for some λ than for others.
Assume
ρ
0
,Gal(
ˉ
Q/Q)?→ GL
2
(
ˉ
F
p
)
is a continuous representation with values in the algebraic closure of a?nite
eld of characteristic p and that det ρ
0
is odd,We say that ρ
0
is modular
if ρ
0
and ρ
f,λ
mod λ are isomorphic over
ˉ
F
p
for some f and λ and some
embedding of O
f
/λ in
ˉ
F
p
,Serre has conjectured that every irreducible ρ
0
of
odd determinant is modular,Very little is known about this conjecture except
when the image of ρ
0
in PGL
2
(
ˉ
F
p
) is dihedral,A
4
or S
4
,In the dihedral case
it is true and due (essentially) to Hecke,and in the A
4
and S
4
cases it is again
true and due primarily to Langlands,with one important case due to Tunnell
(see Theorem 5.1 for a statement),More precisely these theorems actually
associate a form of weight one to the corresponding complex representation
but the versions we need are straightforward deductions from the complex
case,Even in the reducible case not much is known about the problem in
the form we have described it,and in that case it should be observed that
one must also choose the lattice carefully as only the semisimpli?cation of
ρ
f,λ
= ρ
f,λ
mod λ is independent of the choice of lattice in K
2
f,λ
.
446 ANDREW JOHN WILES
If O is the ring of integers of a local?eld (containing Q
p
) we will say that
ρ,Gal(
ˉ
Q/Q)?→ GL
2
(O) is a lifting of ρ
0
if,for a speci?ed embedding of the
residue?eld of O in
ˉ
F
p
,ˉρ and ρ
0
are isomorphic over
ˉ
F
p
,Our point of view
will be to assume that ρ
0
is modular and then to attempt to give conditions
under which a representation ρ lifting ρ
0
comes from a modular form in the
sense that ρ similarequal ρ
f,λ
over K
f,λ
for some f,λ,We will restrict our attention to
two cases:
(I) ρ
0
is ordinary (at p) by which we mean that there is a one-dimensional
subspace of
ˉ
F
2
p
,stable under a decomposition group at p and such that
the action on the quotient space is unrami?ed and distinct from the
action on the subspace.
(II) ρ
0
is?at (at p),meaning that as a representation of a decomposition
group at p,ρ
0
is equivalent to one that arises from a?nite?at group
scheme over Z
p
,and detρ
0
restricted to an inertia group at p is the
cyclotomic character.
We say similarly that ρ is ordinary (at p),if viewed as a representation to
ˉ
Q
2
p
,
there is a one-dimensional subspace of
ˉ
Q
2
p
stable under a decomposition group
at p and such that the action on the quotient space is unrami?ed.
Let ε,Gal(
ˉ
Q/Q)?→ Z
×
p
denote the cyclotomic character,Conjectural
converses to Theorem 0.1 have been part of the folklore for many years but
have hitherto lacked any evidence,The critical idea that one might dispense
with compatible systems was already observed by Drin?eld in the function?eld
case [Dr],The idea that one only needs to make a geometric condition on the
restriction to the decomposition group at p was?rst suggested by Fontaine and
Mazur,The following version is a natural extension of Serre’s conjecture which
is convenient for stating our results and is,in a slightly modi?ed form,the one
proposed by Fontaine and Mazur,(In the form stated this incorporates Serre’s
conjecture,We could instead have made the hypothesis that ρ
0
is modular.)
Conjecture,Suppose that ρ,Gal(
ˉ
Q/Q)?→ GL
2
(O) is an irreducible
lifting of ρ
0
and that ρ is unrami?ed outside of a?nite set of primes,There
aretwocases:
(i) Assumethat ρ
0
isordinary,Thenif ρ isordinaryand detρ = ε
k?1
χ for
some integer k ≥ 2 and some χ of?nite order,ρ comes from a modular
form.
(ii) Assume that ρ
0
is?at and that p is odd,Then if ρ restricted to a de-
composition group at p is equivalent to a representation on a p-divisible
group,again ρ comesfromamodularform.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 447
In case (ii) it is not hard to see that if the form exists it has to be of
weight 2; in (i) of course it would have weight k,One can of course enlarge
this conjecture in several ways,by weakening the conditions in (i) and (ii),by
considering other number?elds of Q and by considering groups other
than GL
2
.
We prove two results concerning this conjecture,The?rst includes the
hypothesis that ρ
0
is modular,Here and for the rest of this paper we will
assume that p is an odd prime.
Theorem 0.2,Suppose that ρ
0
is irreducible and satis?es either (I) or
(II) above,Supposealsothat ρ
0
ismodularandthat
(i) ρ
0
isabsolutelyirreduciblewhenrestrictedto Q
parenleftbigg
radicalBig
(?1)
p?1
2
p
parenrightbigg
.
(ii) If q ≡?1modp is rami?ed in ρ
0
then either ρ
0
|
D
q
is reducible over
the algebraic closure where D
q
is a decomposition group at q or ρ
0
|
I
q
is
absolutelyirreduciblewhere I
q
isaninertiagroupat q.
Thenanyrepresentation ρ asintheconjecturedoesindeedcomefromamod-
ularform.
The only condition which really seems essential to our method is the re-
quirement that ρ
0
be modular.
The most interesting case at the moment is when p = 3 and ρ
0
can be de-
ned overF
3
,Then since PGL
2
(F
3
) similarequal S
4
every such representation is modular
by the theorem of Langlands and Tunnell mentioned above,In particular,ev-
ery representation into GL
2
(Z
3
) whose reduction satis?es the given conditions
is modular,We deduce:
Theorem 0.3,Suppose that E is an elliptic curve de?ned over Q and
that ρ
0
is the Galois action on the 3-division points,Suppose that E has the
followingproperties:
(i) E hasgoodormultiplicativereductionat 3.
(ii) ρ
0
isabsolutelyirreduciblewhenrestrictedto Q
parenleftbig√
3
parenrightbig
.
(iii)Forany q ≡?1mod3either ρ
0
|
D
q
isreducibleoverthealgebraicclosure
or ρ
0
|I
q
isabsolutelyirreducible.
Then E shouldbemodular.
We should point out that while the properties of the zeta function follow
directly from Theorem 0.2 the stronger version that E is covered by X
0
(N)
448 ANDREW JOHN WILES
requires also the isogeny theorem proved by Faltings (and earlier by Serre when
E has nonintegral j-invariant,a case which includes the semistable curves).
We note that if E is modular then so is any twist of E,so we could relax
condition (i) somewhat.
The important class of semistable curves,i.e.,those with square-free con-
ductor,satis?es (i) and (iii) but not necessarily (ii),If (ii) fails then in fact ρ
0
is reducible,Rather surprisingly,Theorem 0.2 can often be applied in this case
also by showing that the representation on the 5-division points also occurs for
another elliptic curve which Theorem 0.3 has already proved modular,Thus
Theorem 0.2 is applied this time with p = 5,This argument,which is explained
in Chapter 5,is the only part of the paper which really uses deformations of
the elliptic curve rather than deformations of the Galois representation,The
argument works more generally than the semistable case but in this setting
we obtain the following theorem:
Theorem 0.4,Supposethat E isasemistableellipticcurvede?nedover
Q,Then E ismodular.
More general families of elliptic curves which are modular are given in Chap-
ter 5.
In 1986,stimulated by an ingenious idea of Frey [Fr],Serre conjectured
and Ribet proved (in [Ri1]) a property of the Galois representation associated
to modular forms which enabled Ribet to show that Theorem 0.4 implies ‘Fer-
mat’s Last Theorem’,Frey’s suggestion,in the notation of the following theo-
rem,was to show that the (hypothetical) elliptic curve y
2
= x(x+u
p
)(x?v
p
)
could not be modular,Such elliptic curves had already been studied in [He]
but without the connection with modular forms,Serre made precise the idea
of Frey by proposing a conjecture on modular forms which meant that the rep-
resentation on the p-division points of this particular elliptic curve,if modular,
would be associated to a form of conductor 2,This,by a simple inspection,
could not exist,Serre’s conjecture was then proved by Ribet in the summer
of 1986,However,one still needed to know that the curve in question would
have to be modular,and this is accomplished by Theorem 0.4,We have then
(?nally!):
Theorem 0.5,Supposethat u
p
+v
p
+w
p
=0with u,v,w ∈Qand p ≥ 3,
thenuvw =0,(Equivalently-therearenononzerointegersa,b,c,nwithn>2
suchthat a
n
+ b
n
= c
n
.)
The second result we prove about the conjecture does not require the
assumption that ρ
0
be modular (since it is already known in this case).
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 449
Theorem 0.6,Supposethat ρ
0
isirreducibleandsatis?esthehypothesis
oftheconjecture,including (I) above,Supposefurtherthat
(i) ρ
0
= Ind
Q
L
κ
0
for a character κ
0
of an imaginary quadratic extension L
of Q whichisunrami?edat p.
(ii) detρ
0
|
I
p
= ω.
Thenarepresentation ρ asintheconjecturedoesindeedcomefromamodular
form.
This theorem can also be used to prove that certain families of elliptic
curves are modular,In this summary we have only described the principal
theorems associated to Galois representations and elliptic curves,Our results
concerning generalized class groups are described in Theorem 3.3.
The following is an account of the origins of this work and of the more
specialized developments of the 1980’s that a?ected it,I began working on
these problems in the late summer of 1986 immediately on learning of Ribet’s
result,For several years I had been working on the Iwasawa conjecture for
totally real?elds and some applications of it,In the process,I had been using
and developing results on lscript-adic representations associated to Hilbert modular
forms,It was therefore natural for me to consider the problem of modularity
from the point of view of lscript-adic representations,I began with the assumption
that the reduction of a given ordinary lscript-adic representation was reducible and
tried to prove under this hypothesis that the representation itself would have
to be modular,I hoped rather naively that in this situation I could apply the
techniques of Iwasawa theory,Even more optimistically I hoped that the case
lscript = 2 would be tractable as this would su?ce for the study of the curves used
by Frey,From now on and in the main text,we write p for lscript because of the
connections with Iwasawa theory.
After several months studying the 2-adic representation,I made the?rst
real breakthrough in realizing that I could use the 3-adic representation instead:
the Langlands-Tunnell theorem meant that ρ
3
,the mod 3 representation of any
given elliptic curve over Q,would necessarily be modular,This enabled me
to try inductively to prove that the GL
2
(Z/3
n
Z) representation would be
modular for each n,At this time I considered only the ordinary case,This led
quickly to the study of H
i
(Gal(F

/Q),W
f
) for i = 1 and 2,where F

is the
splitting?eld of the m-adic torsion on the Jacobian of a suitable modular curve,
m being the maximal ideal of a Hecke ring associated to ρ
3
and W
f
the module
associated to a modular form f described in Chapter 1,More speci?cally,I
needed to compare this cohomology with the cohomology of Gal(Q
Σ
/Q) acting
on the same module.
I tried to apply some ideas from Iwasawa theory to this problem,In my
solution to the Iwasawa conjecture for totally real?elds [Wi4],I had introduced
450 ANDREW JOHN WILES
a new technique in order to deal with the trivial zeroes,It involved replacing
the standard Iwasawa theory method of considering the?elds in the cyclotomic
Z
p
-extension by a similar analysis based on a choice of in?nitely many distinct
primes q
i
≡ 1modp
n
i
with n
i
→∞as i →∞,Some aspects of this method
suggested that an alternative to the standard technique of Iwasawa theory,
which seemed problematic in the study of W
f
,might be to make a comparison
between the cohomology groups as Σ varies but with the?eld Q?xed,The
new principle said roughly that the unrami?ed cohomology classes are trapped
by the tamely rami?ed ones,After reading the paper [Gre1],I realized that the
duality theorems in Galois cohomology of Poitou and Tate would be useful for
this,The crucial extract from this latter theory is in Section 2 of Chapter 1.
In order to put ideas into practice I developed in a naive form the
techniques of the?rst two sections of Chapter 2,This drew in particular on
a detailed study of all the congruences between f and other modular forms
of di?ering levels,a theory that had been initiated by Hida and Ribet,The
outcome was that I could estimate the?rst cohomology group well under two
assumptions,?rst that a certain subgroup of the second cohomology group
vanished and second that the form f was chosen at the minimal level for m.
These assumptions were much too restrictive to be really e?ective but at least
they pointed in the right direction,Some of these arguments are to be found
in the second section of Chapter 1 and some form the?rst weak approximation
to the argument in Chapter 3,At that time,however,I used auxiliary primes
q ≡?1modp when varying Σ as the geometric techniques I worked with did
not apply in general for primes q ≡ 1modp,(This was for much the same
reason that the reduction of level argument in [Ri1] is much more di?cult
when q ≡ 1modp.) In all this work I used the more general assumption that
ρ
p
was modular rather than the assumption that p =?3.
In the late 1980’s,I translated these ideas into ring-theoretic language,A
few years previously Hida had constructed some explicit one-parameter fam-
ilies of Galois representations,In an attempt to understand this,Mazur had
been developing the language of deformations of Galois representations,More-
over,Mazur realized that the universal deformation rings he found should be
given by Hecke ings,at least in certain special cases,This critical conjecture
re?ned the expectation that all ordinary liftings of modular representations
should be modular,In making the translation to this ring-theoretic language
I realized that the vanishing assumption on the subgroup of H
2
which I had
needed should be replaced by the stronger condition that the Hecke rings were
complete intersections,This?tted well with their being deformation rings
where one could estimate the number of generators and relations and so made
the original assumption more plausible.
To be of use,the deformation theory required some development,Apart
from some special examples examined by Boston and Mazur there had been
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 451
little work on it,I checked that one could make the appropriate adjustments to
the theory in order to describe deformation theories at the minimal level,In the
fall of 1989,I set Ramakrishna,then a student of mine at Princeton,the task
of proving the existence of a deformation theory associated to representations
arising from?nite?at group schemes over Z
p
,This was needed in order to
remove the restriction to the ordinary case,These developments are described
in the?rst section of Chapter 1 although the work of Ramakrishna was not
completed until the fall of 1991,For a long time the ring-theoretic version
of the problem,although more natural,did not look any simpler,The usual
methods of Iwasawa theory when translated into the ring-theoretic language
seemed to require unknown principles of base change,One needed to know the
exact relations between the Hecke rings for di?erent?elds in the cyclotomic
Z
p
-extension of Q,and not just the relations up to torsion.
The turning point in this and indeed in the whole proof came in the
spring of 1991,In searching for a clue from commutative algebra I had been
particularly struck some years earlier by a paper of Kunz[Ku2],I had already
needed to verify that the Hecke rings were Gorenstein in order to compute the
congruences developed in Chapter 2,This property had?rst been proved by
Mazur in the case of prime level and his argument had already been extended
by other authors as the need arose,Kunz’s paper suggested the use of an
invariant (the η-invariant of the appendix) which I saw could be used to test
for isomorphisms between Gorenstein rings,A di?erent invariant (the p/p
2
-
invariant of the appendix) I had already observed could be used to test for
isomorphisms between complete intersections,It was only on reading Section 6
of [Ti2] that I learned that it followed from Tate’s account of Grothendieck
duality theory for complete intersections that these two invariants were equal
for such rings,Not long afterwards I realized that,unlike though it seemed at
rst,the equality of these invariants was actually a criterion for a Gorenstein
ring to be a complete intersection,These arguments are given in the appendix.
The impact of this result on the main problem was enormous,Firstly,the
relationship between the Hecke rings and the deformation rings could be tested
just using these two invariants,In particular I could provide the inductive ar-
gument of section 3 of Chapter 2 to show that if all liftings with restricted
rami?cation are modular then all liftings are modular,This I had been trying
to do for a long time but without success until the breakthrough in commuta-
tive algebra,Secondly,by means of a calculation of Hida summarized in [Hi2]
the main problem could be transformed into a problem about class numbers
of a type well-known in Iwasawa theory,In particular,I could check this in
the ordinary CM case using the recent theorems of Rubin and Kolyvagin,This
is the content of Chapter 4,Thirdly,it meant that for the?rst time it could
be veri?ed that in?nitely many j-invariants were modular,Finally,it meant
that I could focus on the minimal level where the estimates given by me earlier
452 ANDREW JOHN WILES
Galois cohomology calculations looked more promising,Here I was also using
the work of Ribet and others on Serre’s conjecture (the same work of Ribet
that had linked Fermat’s Last Theorem to modular forms in the?rst place) to
know that there was a minimal level.
The class number problem was of a type well-known in Iwasawa theory
and in the ordinary case had already been conjectured by Coates and Schmidt.
However,the traditional methods of Iwasawa theory did not seem quite suf-
cient in this case and,as explained earlier,when translated into the ring-
theoretic language seemed to require unknown principles of base change,So
instead I developed further the idea of using auxiliary primes to replace the
change of?eld that is used in Iwasawa theory,The Galois cohomology esti-
mates described in Chapter 3 were now much stronger,although at that time
I was still using primes q ≡?1modp for the argument,The main di?culty
was that although I knew how the η-invariant changed as one passed to an
auxiliary level from the results of Chapter 2,I did not know how to estimate
the change in the p/p
2
-invariant precisely,However,the method did give the
right bound for the generalised class group,or Selmer group as it often called
in this context,under the additional assumption that the minimal Hecke ring
was a complete intersection.
I had earlier realized that ideally what I needed in this method of auxiliary
primes was a replacement for the power series ring construction one obtains in
the more natural approach based on Iwasawa theory,In this more usual setting,
the projective limit of the Hecke rings for the varying?elds in a cyclotomic
tower would be expected to be a power series ring,at least if one assumed
the vanishing of the μ-invariant,However,in the setting with auxiliary primes
where one would change the level but not the?eld,the natural limiting process
did not appear to be helpful,with the exception of the closely related and very
important construction of Hida [Hi1],This method of Hida often gave one step
towards a power series ring in the ordinary case,There were also tenuous hints
of a patching argument in Iwasawa theory ([Scho],[Wi4,§10]),but I searched
without success for the key.
Then,in August,1991,I learned of a new construction of Flach [Fl] and
quickly became convinced that an extension of his method was more plausi-
ble,Flach’s approach seemed to be the?rst step towards the construction of
an Euler system,an approach which would give the precise upper bound for
the size of the Selmer group if it could be completed,By the fall of 1992,I
believed I had achieved this and begun then to consider the remaining case
where the mod 3 representation was assumed reducible,For several months I
tried simply to repeat the methods using deformation rings and Hecke rings.
Then unexpectedly in May 1993,on reading of a construction of twisted forms
of modular curves in a paper of Mazur [Ma3],I made a crucial and surprising
breakthrough,I found the argument using families of elliptic curves with a
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 453
common ρ
5
which is given in Chapter 5,Believing now that the proof was
complete,I sketched the whole theory in three lectures in Cambridge,England
on June 21-23,However,it became clear to me in the fall of 1993 that the con-
struction of the Euler system used to extend Flach’s method was incomplete
and possibly?awed.
Chapter 3 follows the original approach I had taken to the problem of
bounding the Selmer group but had abandoned on learning of Flach’s paper.
Darmon encouraged me in February,1994,to explain the reduction to the com-
plete intersection property,as it gave a quick way to exhibit in?nite families
of modular j-invariants,In presenting it in a lecture at Princeton,I made,
almost unconsciously,critical switch to the special primes used in Chapter 3
as auxiliary primes,I had only observed the existence and importance of these
primes in the fall of 1992 while trying to extend Flach’s work,Previously,I had
only used primes q ≡?1modp as auxiliary primes,In hindsight this change
was crucial because of a development due to de Shalit,As explained before,I
had realized earlier that Hida’s theory often provided one step towards a power
series ring at least in the ordinary case,At the Cambridge conference de Shalit
had explained to me that for primes q ≡ 1modp he had obtained a version of
Hida’s results,But excerpt for explaining the complete intersection argument
in the lecture at Princeton,I still did not give any thought to my initial ap-
proach,which I had put aside since the summer of 1991,since I continued to
believe that the Euler system approach was the correct one.
Meanwhile in January,1994,R,Taylor had joined me in the attempt to
repair the Euler system argument,Then in the spring of 1994,frustrated in
the e?orts to repair the Euler system argument,I begun to work with Taylor
on an attempt to devise a new argument using p =2,The attempt to use p =2
reached an impasse at the end of August,As Taylor was still not convinced that
the Euler system argument was irreparable,I decided in September to take one
last look at my attempt to generalise Flach,if only to formulate more precisely
the obstruction,In doing this I came suddenly to a marvelous revelation,I
saw in a?ash on September 19th,1994,that de Shalit’s theory,if generalised,
could be used together with duality to glue the Hecke rings at suitable auxiliary
levels into a power series ring,I had unexpectedly found the missing key to my
old abandoned approach,It was the old idea of picking q
i
’s with q
i
≡ 1mod p
n
i
and n
i
→∞as i →∞that I used to achieve the limiting process,The switch
to the special primes of Chapter 3 had made all this possible.
After I communicated the argument to Taylor,we spent the next few days
making sure of the details,the full argument,together with the deduction of
the complete intersection property,is given in [TW].
In conclusion the key breakthrough in the proof had been the realization
in the spring of 1991 that the two invariants introduced in the appendix could
be used to relate the deformation rings and the Hecke rings,In e?ect the η-
454 ANDREW JOHN WILES
invariant could be used to count Galois representations,The last step after the
June,1993,announcement,though elusive,was but the conclusion of a long
process whose purpose was to replace,in the ring-theoretic setting,the methods
based on Iwasawa theory by methods based on the use of auxiliary primes.
One improvement that I have not included but which might be used to
simplify some of Chapter 2 is the observation of Lenstra that the criterion for
Gorenstein rings to be complete intersections can be extended to more general
rings which are?nite and free as Z
p
-modules,Faltings has pointed out an
improvement,also not included,which simpli?es the argument in Chapter 3
and [TW],This is however explained in the appendix to [TW].
It is a pleasure to thank those who read carefully a?rst draft of some of this
paper after the Cambridge conference and particularly N,Katzwho patiently
answered many questions in the course of my work on Euler systems,and
together with Illusie read critically the Euler system argument,Their questions
led to my discovery of the problem with it,Katzalso listened critically to my
rst attempts to correct it in the fall of 1993,I am grateful also to Taylor for
his assistance in analyzing in depth the Euler system argument,I am indebted
to F,Diamond for his generous assistance in the preparation of the?nal version
of this paper,In addition to his many valuable suggestions,several others also
made helpful comments and suggestions especially Conrad,de Shalit,Faltings,
Ribet,Rubin,Skinner and Taylor.I am most grateful to H,Darmon for his
encouragement to reconsider my old argument,Although I paid no heed to his
advice at the time,it surely left its mark.
Table of Contents
Chapter 1 1,Deformations of Galois representations
2,Some computations of cohomology groups
3,Some results on subgroups of GL
2
(k)
Chapter 2 1,The Gorenstein property
2,Congruences between Hecke rings
3,The main conjectures
Chapter 3 Estimates for the Selmer group
Chapter 4 1,The ordinary CM case
2,Calculation of η
Chapter 5 Application to elliptic curves
Appendix
References
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 455
Chapter 1
This chapter is devoted to the study of certain Galois representations.
In the?rst section we introduce and study Mazur’s deformation theory and
discuss various re?nements of it,These re?nements will be needed later to
make precise the correspondence between the universal deformation rings and
the Hecke rings in Chapter 2,The main results needed are Proposition 1.2
which is used to interpret various generalized cotangent spaces as Selmer groups
and (1.7) which later will be used to study them,At the end of the section we
relate these Selmer groups to ones used in the Bloch-Kato conjecture,but this
connection is not needed for the proofs of our main results.
In the second section we extract from the results of Poitou and Tate on
Galois cohomology certain general relations between Selmer groups as Σ varies,
as well as between Selmer groups and their duals,The most important obser-
vation of the third section is Lemma 1.10(i) which guarantees the existence of
the special primes used in Chapter 3 and [TW].
1,Deformations of Galois representations
Let p be an odd prime,Let Σ be a?nite set of primes including p and
let Q
Σ
be the maximal extension of Q unrami?ed outside this set and ∞.
Throughout we?x an embedding of Q,and so also of Q
Σ
,inC,We will also
x a choice of decomposition group D
q
for all primes q in Z,Suppose that k
is a?nite?eld characteristic p and that
(1.1) ρ
0
,Gal(Q
Σ
/Q) → GL
2
(k)
is an irreducible representation,In contrast to the introduction we will assume
in the rest of the paper that ρ
0
comes with its?eld of de?nition k,Suppose
further that detρ
0
is odd,In particular this implies that the smallest?eld of
de?nition for ρ
0
is given by the?eld k
0
generated by the traces but we will not
assume that k = k
0
,It also implies that ρ
0
is absolutely irreducible,We con-
sider the deformation [ρ]toGL
2
(A)ofρ
0
in the sense of Mazur [Ma1],Thus
if W(k) is the ring of Witt vectors of k,A is to be a complete Noeterian local
W(k)-algebra with residue?eld k and maximal ideal m,and a deformation [ρ]
is just a strict equivalence class of homomorphisms ρ,Gal(Q
Σ
/Q) → GL
2
(A)
such that ρ mod m = ρ
0
,two such homomorphisms being called strictly equiv-
alent if one can be brought to the other by conjugation by an element of
ker,GL
2
(A) → GL
2
(k),We often simply write ρ instead of [ρ] for the
equivalent class.
456 ANDREW JOHN WILES
We will restrict our choice of ρ
0
further by assuming that either:
(i) ρ
0
is ordinary; viz.,the restriction of ρ
0
to the decomposition group D
p
has (for a suitable choice of basis) the form
(1.2) ρ
0
|
D
p

parenleftbigg
χ
1
0 χ
2
parenrightbigg
where χ
1
and χ
2
are homomorphisms from D
p
to k
with χ
2
unrami?ed.
Moreover we require that χ
1
negationslash= χ
2
,We do allow here that ρ
0
|
D
p
be
semisimple,(If χ
1
and χ
2
are both unrami?ed and ρ
0
|
D
p
is semisimple
then we?x our choices of χ
1
and χ
2
once and for all.)
(ii) ρ
0
is?at at p but not ordinary (cf,[Se1] where the terminology?nite is
used); viz.,ρ
0
|
D
p
is the representation associated to a?nite?at group
scheme overZ
p
but is not ordinary in the sense of (i),(In general when we
refer to the?at case we will mean that ρ
0
is assumed not to be ordinary
unless we specify otherwise.) We will assume also that detρ
0
|
I
p
= ω
where I
p
is an inertia group at p and ω is the Teichm¨uller character
giving the action on p
th
roots of unity.
In case (ii) it follows from results of Raynaud that ρ
0
|
D
p
is absolutely
irreducible and one can describe ρ
0
|
I
p
explicitly,For extending a Jordan-H¨older
series for the representation space (as an I
p
-module) to one for?nite?at group
schemes (cf,[Ray 1]) we observe?rst that the trivial character does not occur on
a subquotient,as otherwise (using the classi?cation of Oort-Tate or Raynaud)
the group scheme would be ordinary,So we?nd by Raynaud’s results,that
ρ
0
|
I
p
k
ˉ
k similarequal ψ
1
⊕ ψ
2
where ψ
1
and ψ
2
are the two fundamental characters of
degree 2 (cf,Corollary 3.4.4 of [Ray1]),Since ψ
1
and ψ
2
do not extend to
characters of Gal(
ˉ
Q
p
/Q
p
),ρ
0
|
D
p
must be absolutely irreducible.
We sometimes wish to make one of the following restrictions on the
deformations we allow:
(i) (a)Selmerdeformations,In this case we assume that ρ
0
is ordinary,with no-
tion as above,and that the deformation has a representative
ρ,Gal(Q
Σ
/Q) → GL
2
(A) with the property that (for a suitable choice
of basis)
ρ|
D
p

parenleftbigg
χ
1
0?χ
2
parenrightbigg
with?χ
2
unrami?ed,?χ ≡ χ
2
mod m,and detρ|
I
p
= εω
1
χ
1
χ
2
where
ε is the cyclotomic character,ε,Gal(Q
Σ
/Q) → Z
p
,giving the action
on all p-power roots of unity,ω is of order prime to p satisfying ω ≡ ε
mod p,and χ
1
and χ
2
are the characters of (i) viewed as taking values in
k
arrowhookleft→ A
.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 457
(i) (b) Ordinarydeformations,The same as in (i)(a) but with no condition on
the determinant.
(i) (c) Strictdeformations,This is a variant on (i) (a) which we only use when
ρ
0
|
D
p
is not semisimple and not?at (i.e,not associated to a?nite?at
group scheme),We also assume that χ
1
χ
1
2
= ω in this case,Then a
strict deformation is as in (i)(a) except that we assume in addition that
(?χ
1
/?χ
2
)|
D
p
= ε.
(ii)Flat(at p)deformations,We assume that each deformation ρ to GL
2
(A)
has the property that for any quotient A/a of?nite order ρ|
D
p
mod a
is the Galois representation associated to the
ˉ
Q
p
-points of a?nite?at
group scheme over Z
p
.
In each of these four cases,as well as in the unrestricted case (in which we
imposenolocalrestrictionatp)onecanverifythatMazur’suseofSchlessinger’s
criteria [Sch] proves the existence of a universal deformation
ρ,Gal(Q
Σ
/Q) → GL
2
(R).
In the ordinary and restricted case this was proved by Mazur and in the
at case by Ramakrishna [Ram],The other cases require minor modi?cations
of Mazur’s argument,We denote the universal ring R
Σ
in the unrestricted
case and R
se
Σ
,R
ord
Σ
,R
str
Σ
,R
f
Σ
in the other four cases,We often omit the Σ if the
context makes it clear.
There are certain generalizations to all of the above which we will also
need,The?rst is that instead of considering W(k)-algebras A we may consider
O-algebras for O the ring of integers of any local?eld with residue?eld k.If
we need to record which O we are using we will write R
Σ,O
etc,It is easy to
see that the natural local map of local O-algebras
R
Σ,O
→ R
Σ
W(k)
O
is an isomorphism because for functorial reasons the map has a natural section
which induces an isomorphism on Zariski tangent spaces at closed points,and
one can then use Nakayama’s lemma,Note,however,hat if we change the
residue?eld via i,arrowhookleft→ k
prime
then we have a new deformation problem associated
to the representation ρ
prime
0
= i? ρ
0
,There is again a natural map of W(k
prime
)-
algebras
R(ρ
prime
0
) → R?
W(k)
W(k
prime
)
which is an isomorphism on Zariski tangent spaces,One can check that this
is again an isomorphism by considering the subring R
1
of R(ρ
prime
0
) de?ned as the
subring of all elements whose reduction modulo the maximal ideal lies in k.
Since R(ρ
prime
0
) is a?nite R
1
-module,R
1
is also a complete local Noetherian ring
458 ANDREW JOHN WILES
with residue?eld k,The universal representation associated to ρ
prime
0
is de?ned
over R
1
and the universal property of R then de?nes a map R → R
1
,So we
obtain a section to the map R(ρ
prime
0
) → R?
W(k)
W(k
prime
) and the map is therefore
an isomorphism,(I am grateful to Faltings for this observation.) We will also
need to extend the consideration of O-algebras tp the restricted cases,In each
case we can require A to be an O-algebra and again it is easy to see that
R
·
Σ,O
similarequal R
·
Σ
W(k)
O in each case.
The second generalization concerns primes q negationslash= p which are rami?ed in ρ
0
.
We distinguish three special cases (types (A) and (C) need not be disjoint):
(A) ρ
0
|
D
q
=(
χ
1
χ
2
) for a suitable choice of basis,with χ
1
and χ
2
unrami?ed,
χ
1
χ
1
2
= ω and the?xed space of I
q
of dimension 1,
(B) ρ
0
|
I
q
=(
χ
q
0
0
1
),χ
q
negationslash=1,for a suitable choice of basis,
(C) H
1
(Q
q
,W
λ
) = 0 where W
λ
is as de?ned in (1.6).
Then in each case we can de?ne a suitable deformation theory by imposing
additional restrictions on those we have already considered,namely:
(A) ρ|
D
q
=(
ψ
1
ψ
2
) for a suitable choice of basis of A
2
with ψ
1
and ψ
2
un-
rami?ed and ψ
1
ψ
1
2
= ε;
(B) ρ|
I
q
=(
χ
q
0
0
1
) for a suitable choice of basis (χ
q
of order prime to p,so the
same character as above);
(C) detρ|
I
q
= detρ
0
|
I
q
,i.e.,of order prime to p.
Thus if M is a set of primes in Σ distinct from p and each satisfying one of
(A),(B) or (C) for ρ
0
,we will impose the corresponding restriction at each
prime in M.
Thus to each set of data D = {·,Σ,O,M} where · is Se,str,ord,?at or
unrestricted,we can associate a deformation theory to ρ
0
provided
(1.3) ρ
0
,Gal(Q
Σ
/Q) → GL
2
(k)
is itself of type D and O is the ring of integers of a totally rami?ed extension
of W(k);ρ
0
is ordinary if · is Se or ord,strict if · is strict and?at if · is?
(meaning?at); ρ
0
is of type M,i.e.,of type (A),(B) or (C) at each rami?ed
primes q negationslash= p,q ∈M,We allow di?erent types at di?erent q’s,We will refer
to these as the standard deformation theories and write R
D
for the universal
ring associated to D and ρ
D
for the universal deformation (or even ρ if D is
clear from the context).
We note here that if D = (ord,Σ,O,M) and D
prime
=(Se,Σ,O,M) then
there is a simple relation between R
D
and R
D
prime,Indeed there is a natural map
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 459
R
D
→ R
D
prime by the universal property of R
D
,and its kernel is a principal ideal
generated by T = ε
1
(γ)detρ
D
(γ)?1 where γ ∈ Gal(Q
Σ
/Q) is any element
whose restriction to Gal(Q

/Q) is a generator (where Q

is the Z
p
-extension
of Q) and whose restriction to Gal(Q(ζ
N
p
)/Q) is trivial for any N prime to p
with ζ
N
∈Q
Σ

N
being a primitive N
th
root of 1:
(1.4) R
D
/T similarequal R
prime
D
.
It turns out that under the hypothesis that ρ
0
is strict,i.e,that ρ
0
|
D
p
is not associated to a?nite?at group scheme,the deformation problems in
(i)(a) and (i)(c) are the same; i.e.,every Selmer deformation is already a strict
deformation,This was observed by Diamond,the argument is local,so the
decomposition group D
p
could be replaced by Gal(
ˉ
Q
p
/Q).
Proposition 1.1 (Diamond),Suppose that π,D
p
→ GL
2
(A) is a con-
tinuousrepresentationwhere A isanArtinianlocalringwithresidue?eld k,a
nite?eldofcharacteristic p,Suppose π ≈ (
χ
1
ε
0
χ
2
) with χ
1
and χ
2
unrami?ed
and χ
1
negationslash= χ
2
,Then the residual representation ˉπ is associated to a?nite?at
groupschemeover Z
p
.
Proof (taken from [Dia,Prop,6.1]),We may replace π by π? χ
1
2
and
we let? = χ
1
χ
1
2
,Then π

= (
ε
0
t
1
) determines a cocycle t,D
p
→ M(1) where
M is a free A-module of rank one on which D
p
acts via?,Let u denote the
cohomology class in H
1
(D
p
,M(1)) de?ned by t,and let u
0
denote its image
in H
1
(D
p
,M
0
(1)) where M
0
= M/mM,Let G =ker? and let F be the?xed
eld of G (so F is a?nite unrami?ed extension of Q
p
),Choose n so that p
n
A
=0,Since H
2
(G,μ
p
r → H
2
(G,μ
p
s) is injective for r ≤ s,we see that the
natural map of A[D
p
/G]-modules H
1
(G,μ
p
n?
Z
p
M) → H
1
(G,M(1)) is an
isomorphism,By Kummer theory,we have H
1
(G,M(1))

= F
×
/(F
×
)
p
n
Z
p
M
as D
p
-modules,Now consider the commutative diagram
H
1
(G,M(1))
D
p

→((F
×
/(F
×
)
p
n
Z
p
M)
D
p
→ M
D
p
arrowbt
arrowbt
arrowbt
,
H
1
(G,M
0
(1))

→ (F
×
/(F
×
)
p
)?
F
p
M
0
→ M
0
where the right-hand horizontal maps are induced by v
p
,F
×
→ Z,If? negationslash=1,
then M
D
p
mM,so that the element resu
0
of H
1
(G,M
0
(1)) is in the image
of (O
×
F
/(O
×
F
)
p
)?
F
p
M
0
,But this means that ˉπ is,peu rami?′e” in the sense of
[Se] and therefore ˉπ comes from a?nite?at group scheme,(See [E1,(8.20].)
Remark,Diamond also observes that essentially the same proof shows
that if π,Gal(
ˉ
Q
q
/Q
q
) → GL
2
(A),where A is a complete local Noetherian
460 ANDREW JOHN WILES
ring with residue?eld k,has the form π|
I
q

= (
1
0
1
) with ˉπ rami?ed then π is
of type (A).
Globally,Proposition 1.1 says that if ρ
0
is strict and if D =(Se,Σ,O,M)
and D
prime
= (str,Σ,O,M) then the natural map R
D
→ R
D
prime is an isomorphism.
In each case the tangent space of R
D
may be computed as in [Ma1],Let
λ be a uniformizer for O and let U
λ
similarequal k
2
be the representation space for ρ
0
.
(The motivation for the subscript λ will become apparent later.) Let V
λ
be the
representation space of Gal(Q
Σ
/Q)onAdρ
0
= Hom
k
(U
λ
,U
λ
) similarequal M
2
(k),Then
there is an isomorphism of k-vector spaces (cf,the proof of Prop,1.2 below)
(1.5) Hom
k
(m
D
/(m
2
D
,λ),k) similarequal H
1
D
(Q
Σ
/Q,V
λ
)
where H
1
D
(Q
Σ
/Q,V
λ
) is a subspace of H
1
(Q
Σ
/Q,V
λ
) which we now describe
and m
D
is the maximal ideal of R
C
alD,It consists of the cohomology classes
which satisfy certain local restrictions at p and at the primes in M,We call
m
D
/(m
2
D
,λ) the reduced cotangent space of R
D
.
We begin with p,First we may write (since p negationslash= 2),as k[Gal(Q
Σ
/Q)]-
modules,
V
λ
= W
λ
⊕k,where W
λ
= {f ∈ Hom
k
(U
λ
,U
λ
),tracef =0}(1.6)
similarequal (Sym
2
det
1

0
and k is the one-dimensional subspace of scalar multiplications,Then if ρ
0
is ordinary the action of D
p
on U
λ
induces a?ltration of U
λ
and also on W
λ
and V
λ
,Suppose we write these 0? U
0
λ
U
λ
,0? W
0
λ
W
1
λ
W
λ
and
0? V
0
λ
V
1
λ
V
λ
,Thus U
0
λ
is de?ned by the requirement that D
p
act on it
via the character χ
1
(cf,(1.2)) and on U
λ
/U
0
λ
via χ
2
.ForW
λ
the?ltrations
are de?ned by
W
1
λ
= {f ∈ W
λ
,f(U
0
λ
)? U
0
λ
},
W
0
λ
= {f ∈ W
1
λ
,f =0onU
0
λ
},
and the?ltrations for V
λ
are obtained by replacing W by V,We note that
these?ltrations are often characterized by the action of D
p
,Thus the action
of D
p
on W
0
λ
is via χ
1

2;onW
1
λ
/W
0
λ
it is trivial and on Q
λ
/W
1
λ
it is via
χ
2

1
,These determine the?ltration if either χ
1

2
is not quadratic or ρ
0
|
D
p
is not semisimple,We de?ne the k-vector spaces
V
ord
λ
= {f ∈ V
1
λ
,f = 0 in Hom(U
λ
/U
0
λ
,U
λ
/U
0
λ
)},
H
1
Se
(Q
p
,V
λ
)=ker{H
1
(Q
p
,V
λ
) → H
1
(Q
unr
p
,V
λ
/W
0
λ
)},
H
1
ord
(Q
p
,V
λ
)=ker{H
1
(Q
p
,V
λ
) → H
1
(Q
unr
p
,V
λ
/V
ord
λ
)},
H
1
str
(Q
p
,V
λ
)=ker{H
1
(Q
p
,V
λ
) → H
1
(Q
p
,W
λ
/W
0
λ
)⊕H
1
(Q
unr
p
,k)}.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 461
In the Selmer case we make an analogous de?nition for H
1
Se
(Q
p
,W
λ
)by
replacing V
λ
by W
λ
,and similarly in the strict case,In the?at case we use
the fact that there is a natural isomorphism of k-vector spaces
H
1
(Q
p
,V
λ
) → Ext
1
k[D
p
]
(U
λ
,U
λ
)
where the extensions are computed in the category of k-vector spaces with local
Galois action,Then H
1
f
(Q
p
,V
λ
) is de?ned as the k-subspace of H
1
(Q
p
,V
λ
)
which is the inverse image of Ext
1
(G,G),the group of extensions in the cate-
gory of?nite?at commutative group schemes over Z
p
killed by p,G being the
(unique)?nite?at group scheme over Z
p
associated to U
λ
,By [Ray1] all such
extensions in the inverse image even correspond to k-vector space schemes,For
more details and calculations see [Ram].
For q di?erent from p and q ∈Mwe have three cases (A),(B),(C),In
case (A) there is a?ltration by D
q
entirely analogous to the one for p.We
write this 0? W
0,q
λ
W
1,q
λ
W
λ
and we set
H
1
D
q
(Q
q
,V
λ
)=
ker,H
1
(Q
q
,V
λ
→ H
1
(Q
q
,W
λ
/W
0,q
λ
)⊕H
1
(Q
unr
q
,k) in case (A)
ker,H
1
(Q
q
,V
λ
)
→ H
1
(Q
unr
q
,V
λ
) in case (B) or (C).
Again we make an analogous de?nition for H
1
D
q
(Q
q
,W
λ
) by replacing V
λ
by W
λ
and deleting the last term in case (A),We now de?ne the k-vector
space H
1
D
(Q
Σ
/Q,V
λ
)as
H
1
D
(Q
Σ
/Q,V
λ
)={α ∈ H
1
(Q
Σ
/Q,V
λ
),α
q
∈ H
1
D
q
(Q
q
,V
λ
) for all q ∈M,
α
q
∈ H
1
(Q
p
,V
λ
)}
where? is Se,str,ord,? or unrestricted according to the type of D,A similar
de?nition applies to H
1
D
(Q
Σ
/Q,W
λ
)if· is Selmer or strict.
Now and for the rest of the section we are going to assume that ρ
0
arises
from the reduction of the λ-adic representation associated to an eigenform.
More precisely we assume that there is a normalized eigenform f of weight 2
and level N,divisible only by the primes in Σ,and that there ia a prime λ
of O
f
such that ρ
0
= ρ
f,λ
mod λ,Here O
f
is the ring of integers of the?eld
generated by the Fourier coe?cients of f so the?elds of de?nition of the two
representations need not be the same,However we assume that k?O
f,λ

and we?x such an embedding so the comparison can be made over k,It will
be convenient moreover to assume that if we are considering ρ
0
as being of
type D then D is de?ned using O-algebras where O?O
f,λ
is an unrami?ed
extension whose residue?eld is k,(Although this condition is unnecessary,it
is convenient to use λ as the uniformizer for O.) Finally we assume that ρ
f,λ
462 ANDREW JOHN WILES
itself is of type D,Again this is a slight abuse of terminology as we are really
considering the extension of scalars ρ
f,λ
O
f,λ
O and not ρ
f,λ
itself,but we will
do this without further mention if the context makes it clear,(The analysis of
this section actually applies to any characteristic zero lifting of ρ
0
but in all
our applications we will be in the more restrictive context we have described
here.)
With these hypotheses there is a unique local homomorphism R
D
→O
of O-algebras which takes the universal deformation to (the class of) ρ
f,λ
,Let
p
D
= ker,R
D
→O,Let K be the?eld of fractions of O and let U
f
=(K/O)
2
with the Galois action taken from ρ
f,λ
,Similarly,let V
f
=Adρ
f,λ
O
K/Osimilarequal
(K/O)
4
with the adjoint representation so that
V
f
similarequal W
f
⊕K/O
where W
f
has Galois action via Sym
2
ρ
f,λ
detρ
1
f,λ
and the action on the
second factor is trivial,Then if ρ
0
is ordinary the?ltration of U
f
under the
Adρ action of D
p
induces one on W
f
which we write 0? W
0
f
W
1
f
W
f
.
Often to simplify the notation we will drop the index f from W
1
f
,V
f
etc,There
is also a?ltration on W
λ
n = {kerλ
n
,W
f
→ W
f
} given by W
i
λ
n
= W
λ
n
∩W
i
(compatible with our previous description for n = 1),Likewise we write V
λ
n
for {kerλ
n
,V
f
→ V
f
}.
We now explain how to extend the de?nition of H
1
D
to give meaning to
H
1
D
(Q
Σ
/Q,V
λ
n) and H
1
D
(Q
Σ
/Q,V) and these are O/λ
n
and O-modules,re-
spectively,In the case where ρ
0
is ordinary the de?nitions are the same with
V
λ
n or V replacing V
λ
and O/λ
n
or K/O replacing k,One checks easily that
as O-modules
(1.7) H
1
D
(Q
Σ
/Q,V
λ
n) similarequal H
1
D
(Q
Σ
/Q,V)
λ
n,
where as usual the subscript λ
n
denotes the kernel of multiplication by λ
n
.
This just uses the divisibility of H
0
(Q
Σ
/Q,V) and H
0
(Q
p
,W/W
0
) in the
strict case,In the Selmer case one checks that for m>nthe kernel of
H
1
(Q
unr
p
,V
λ
n/W
0
λ
n) → H
1
(Q
unr
p
,V
λ
m/W
0
λ
m)
has only the zero element?xed under Gal(Q
unr
p
/Q
p
) and the ord case is similar.
Checking conditions at q ∈Mis dome with similar arguments,In the Selmer
and strict cases we make analogous de?nitions with W
λ
n in place of V
λ
n and
W in place of V and the analogue of (1.7) still holds.
We now consider the case where ρ
0
is?at (but not ordinary),We claim
rst that there is a natural map of O-modules
(1.8) H
1
(Q
p
,V
λ
n
) → Ext
1
O[D
p
]
(U
λ
m,U
λ
n)
for each m ≥ n where the extensions are of O-modules with local Galois
action,To describe this suppose that α ∈ H
1
(Q
p
,V
λ
n),Then we can asso-
ciate to α a representation ρ
α
,Gal(
ˉ
Q
p
/Q
p
) → GL
2
(O
n
[ε]) (where O
n
[ε]=
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 463
O[ε]/(λ
n
ε,ε
2
)) which is anO-algebra deformation of ρ
0
(see the proof of Propo-
sition 1.1 below),Let E = O
n
[ε]
2
where the Galois action is via ρ
α
,Then there
is an exact sequence
0?→ εE/λ
m
→ E/λ
m
→ (E/ε)/λ
m
→ 0
|wreathproduct |wreathproduct
U
λ
n U
λ
m
and hence an extension class in Ext
1
(U
λ
m,U
λ
n),One checks now that (1.8)
is a map of O-modules,We de?ne H
1
f
(Q
p
,V
λ
n) to be the inverse image of
Ext
1
(U
λ
n,U
λ
n
) under (1.8),i.e.,those extensions which are already extensions
in the category of?nite?at group schemes Z
p
,Observe that Ext
1
(U
λ
n,U
λ
n)∩
Ext
1
O[D
p
]
(U
λ
n,U
λ
n)isanO-module,so H
1
f
(Q
p
,V
λ
n) is seen to be an O-sub-
module of H
1
(Q
p
,V
λ
n
),We observe that our de?nition is equivalent to requir-
ing that the classes in H
1
f
(Q
p
,V
λ
n) map under (1.8) to Ext
1
(U
λ
m,U
λ
n) for all
m ≥ n,For if e
m
is the extension class in Ext
1
(U
λ
m,U
λ
n) then e
m
arrowhookleft→ e
n
⊕U
λ
m
as Galois-modules and we can apply results of [Ray1] to see that e
m
comes
from a?nite?at group scheme over Z
p
if e
n
does.
In the?at (non-ordinary) case ρ
0
|
I
p
is determined by Raynaud’s results as
mentioned at the beginning of the chapter,It follows in particular that,since
ρ
0
|
D
p
is absolutely irreducible,V (Q
p
= H
0
(Q
p
,V) is divisible in this case
(in fact V (Q
p
) similarequal KT/O),This H
1
(Q
p
,V
λ
n) similarequal H
1
(Q
p
,V)
λ
n and hence we can
de?ne
H
1
f
(Q
p
,V)=

uniondisplay
n=1
H
1
f
(Q
p
,V
λ
n),
and we claim that H
1
f
(Q
p
,V)
λ
n similarequal H
1
f
(Q
p
,V
λ
n),To see this we have to compare
representations for m ≥ n,
ρ
n,m
,Gal(
ˉ
Q
p
/Q
p
)?→ GL
2
(O
n
[ε]/λ
m
)
vextenddouble
vextenddouble
vextenddouble
arrowbt?m,n
ρ
m,m
,Gal(
ˉ
Q
p
/Q
p
)?→ GL
2
(O
m
[ε]/λ
m
)
where ρ
n,m
and ρ
m,m
are obtained from α
n
∈ H
1
(Q
p
,VX
λ
n) and im(α
n
) ∈
H
1
(Q
p
,V
λ
m) and?
m,n
,a+bε → a+λ
m?n
bε,By [Ram,Prop 1.1 and Lemma
2.1] if ρ
n,m
comes from a?nite?at group scheme then so does ρ
m,m
,Conversely
m,n
is injective and so ρ
n,m
comes from a?nite?at group scheme if ρ
m,m
does;
cf,[Ray1],The de?nitions of H
1
D
(Q
Σ
/Q,V
λ
n) and H
1
D
(Q
Σ
/Q,V) now extend
to the?at case and we note that (1.7) is also valid in the?at case.
Still in the?at (non-ordinary) case we can again use the determination
of ρ
0
|
I
p
to see that H
1
(Q
p
,V) is divisible,For it is enough to check that
H
2
(Q
p
,V
λ
) = 0 and this follows by duality from the fact that H
0
(Q
p
,V
λ
)=0
464 ANDREW JOHN WILES
where V
λ
= Hom(V
λ

p
) and μ
p
is the group of p
th
roots of unity,(Again
this follows from the explicit form of ρ
0
|
D
p
.) Much subtler is the fact that
H
1
f
(Q
p
,V) is divisible,This result is essentially due to Ramakrishna,For,
using a local version of Proposition 1.1 below we have that
Hom
O
(p
R
/p
2
R
,K/O) similarequal H
1
f
(Q
p
,V)
where R is the universal local?at deformation ring for ρ
0
|
D
p
and O-algebras.
(This exists by Theorem 1.1 of [Ram] because ρ
0
|
D
p
is absolutely irreducible.)
Since R similarequal R
W(k)
O where R
is the corresponding ring for W(k)-algebras
the main theorem of [Ram,Th,4.2] shows that R is a power series ring and
the divisibility of H
1
f
(Q
p
,V) then follows,We refer to [Ram] for more details
about R
.
Next we need an analogue of (1.5) for V,Again this is a variant of standard
results in deformation theory and is given (at least for D = (ord,Σ,W(k),φ)
with some restriction on χ
1

2
in i(a)) in [MT,Prop 25].
Proposition 1.2,Suppose that ρ
f,λ
is a deformation of ρ
0
of type
D =(·,Σ,O,M) with O anunrami?edextensionof O
f,λ
,Thenas O-modules
Hom
O
(p
D
/p
2
D
,K/O) similarequal H
1
D
(Q
Σ
/Q,V).
Remark,The isomorphism is functorial in an obvious way if one changes
D to a larger D
prime
.
Proof,We will just describe the Selmer case with M = φ as the other
cases use similar arguments,Suppose that α is a cocycle which represents a
cohomology class in H
1
Se
(Q
Σ
/Q,V
λ
n),LetO
n
[ε] denote the ringO[ε]/(λ
n
ε,ε
2
).
We can associate to α a representation
ρ
α
,Gal(Q
Σ
/Q) → GL
2
(O
n
[ε])
as follows,set ρ
α
(g)=α(g)ρ
f,λ
(g) where ρ
f,λ
(g),aprioriin GL
2
(O),is viewed
in GL
2
(O
n
[ε]) via the natural mapping O→O
n
[ε],Here a basis for O
2
is chosen so that the representation ρ
f,λ
on the decomposition group D
p
Gal(Q
Σ
/Q) has the upper triangular form of (i)(a),and then α(g) ∈ V
λ
n is
viewed in GL
2
(O
n
[ε]) by identifying
V
λ
n
similarequal
braceleftbiggparenleftbigg
1+yε xε
zε 1?tε
parenrightbiggbracerightbigg
= {ker,GL
2
(O
n
[ε]) → GL
2
(O)}.
Then
W
0
λ
n =
braceleftbiggparenleftbigg
1 xε
1
parenrightbiggbracerightbigg
,
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 465
W
1
λ
n =
braceleftbiggparenleftbigg
1+yε xε
1?yε
parenrightbiggbracerightbigg
,
W
λ
n =
braceleftbiggparenleftbigg
1+yε xε
zε 1?yε
parenrightbiggbracerightbigg
,
and
V
1
λ
n =
braceleftbiggparenleftbigg
1+yε xε
1?tε
parenrightbiggbracerightbigg
.
One checks readily that ρ
α
is a continuous homomorphism and that the defor-
mation [ρ
α
] is unchanged if we add a coboundary to α.
We need to check that [ρ
α
] is a Selmer deformation,Let H =
Gal(
ˉ
Q
p
/Q
unr
p
) and G = Gal(Q
unr
p
/Q
p
),Consider the exact sequence of O[G]-
modules
0 → (V
1
λ
n/W
0
λ
n)
H
→ (V
λ
n/W
0
λ
n)
H
→ X → 0
where X is a submodule of (V
λ
n/V
1
λ
n
)
H
,Since the action of
p
on V
λ
n/V
1
λ
n
is
via a character which is nontrivial mod λ (it equals χ
2
χ
1
1
mod λ and χ
1
negationslash≡ χ
2
),
we see that X
G
= 0 and H
1
(G,X)=0,Then we have an exact diagram of
O-modules
0
arrowbt
H
1
(G,(V
1
λ
n
/W
0
λ
n
)
H
) similarequal H
1
(G,(V
λ
n/W
0
λ
n
)
H
)
arrowbt
H
1
(Q
p
,V
λ
n/W
0
λ
n
)
arrowbt
H
1
(Q
unr
p
,V
λ
n/W
0
λ
n
)
G
.
By hypothesis the image of α is zero in H
1
(Q
unr
p
,V
λ
n/W
0
λ
n
)
G
,Hence it
is in the image of H
1
(G,(V
1
λ
n
/W
0
λ
n
)
H
),Thus we can assume that it is rep-
resented in H
1
(Q
p
,V
λ
n/W
0
λ
n
) by a cocycle,which maps G to V
1
λ
n
/W
0
λ
n; i.e.,
f(D
p
)? V
1
λ
n
/W
0
λ
n
,f(I
p
)=0,The di?erence between f and the image of α is
a coboundary {σ mapsto→ σˉμ?ˉμ} for some u ∈ V
λ
n,By subtracting the coboundary
{σ mapsto→ σu? u} from α globally we get a new α such that α = f as cocycles
mapping G to V
1
λ
n
/W
0
λ
n
,Thus α(D
p
)? V
1
λ
n
,α(I
p
)? W
0
λ
n
and it is now easy
to check that [ρ
α
] is a Selmer deformation of ρ
0
.
Since [ρ
α
] is a Selmer deformation there is a unique map of local O-
algebras?
α
,R
D
→O
n
[ε] inducing it,(If M negationslash= φ we must check the
466 ANDREW JOHN WILES
other conditions also.) Since ρ
α
≡ ρ
f,λ
mod ε we see that restricting?
α
to p
D
gives a homomorphism of O-modules,
α
,p
D
→ ε.O/λ
n
such that?
α
(p
2
D
)=0,Thus we have de?ned a map?,α →?
α
,
,H
1
Se
(Q
Σ
/Q,V
λ
n) → Hom
O
(p
D
/p
2
D
,O/λ
n
).
It is straightforward to check that this is a map of O-modules,To check the
injectivity of? suppose that?
α
(p
D
)=0,Then?
α
factors through R
D
/p
D
similarequalO
and being an O-algebra homomorphism this determines?
α
,Thus [ρ
f,λ
]=[ρ
α
].
If A
1
ρ
α
A = ρ
f,λ
then A mod ε is seen to be central by Schur’s lemma and so
may be taken to be I,A simple calculation now shows that α is a coboundary.
To see that? is surjective choose
Ψ ∈ Hom
O
(p
D
/p
2
D
,O/λ
n
).
Then ρ
Ψ
,Gal(Q
Σ
/Q) → GL
2
(R
D
/(p
2
D
,kerΨ)) is induced by a representative
of the universal deformation (chosen to equal ρ
f,λ
when reduced mod p
D
) and
we de?ne a map α
Ψ
,Gal(Q
Σ
/Q) → V
λ
n by
α
Ψ
(g)=ρ
Ψ
(g)ρ
f,λ
(g)
1

1+p
D
/(p
2
D
,kerΨ) p
D
/(p
2
D
,kerΨ)
p
D
/(p
2
D
,kerΨ) 1 + p
D
/(p
2
D
,kerΨ)
V
λ
n
where ρ
f,λ
(g) is viewed in GL
2
(R
D
/(p
2
D
,kerΨ)) via the structural map O→
R
D
(R
D
being an O-algebra and the structural map being local because of
the existence of a section),The right-hand inclusion comes from
p
D
/(p
2
D
,kerΨ)
Ψ
arrowhookleft→O/λ
n

→ (O/λ
n
)·ε
1 mapsto→ ε.
Then α
Ψ
is really seen to be a continuous cocycle whose cohomology class
lies in H
1
Se
(Q
Σ
/Q,V
λ
n),Finally?(α
Ψ
)=Ψ,Moreover,the constructions are
compatible with change of n,i.e.,for V
λ
n arrowhookleft→V
λ
n+1 and λ:O/λ
n
arrowhookleft→O/λ
n+1
,square
We now relate the local cohomology groups we have de?ned to the theory
of Fontaine and in particular to the groups of Bloch-Kato [BK],We will dis-
tinguish these by writing H
1
F
for the cohomology groups of Bloch-Kato,None
of the results described in the rest of this section are used in the rest of the
paper,They serve only to relate the Selmer groups we have de?ned (and later
compute) to the more standard versions,Using the lattice associated to ρ
f,λ
we
obtain also a lattice T similarequalO
4
with Galois action via Ad ρ
f,λ
,Let V = T?
Z
p
Q
p
be associated vector space and identify V with V/T,Let pr,V→V be
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 467
the natural projection and de?ne cohomology modules by
H
1
F
(Q
p
,V)=ker:H
1
(Q
p
,V) → H
1
(Q
p
,V?
Q
p
B
crys
),
H
1
F
(Q
p
,V)=pr
parenleftBig
H
1
F
(Q
p
,V)
parenrightBig
H
1
(Q
p
,V),
H
1
F
(Q
p
,V
λ
n)=(j
n
)
1
parenleftBig
H
1
F
(Q
p
,V)
parenrightBig
H
1
(Q
p
,V
λ
n),
where j
n
,V
λ
n → V is the natural map and the two groups in the de?nition
of H
1
F
(Q
p
,V) are de?ned using continuous cochains,Similar de?nitions apply
to V
= Hom
Q
p
(V,Q
p
(1)) and indeed to any?nite-dimensional continuous
p-adic representation space,The reader is cautioned that the de?nition of
H
1
F
(Q
p
,V
λ
n) is dependent on the lattice T (or equivalently on V ),Under
certainly conditions Bloch and Kato show,using the theory of Fontaine and
Lafaille,that this is independent of the lattice (see [BK,Lemmas 4.4 and
4.5]),In any case we will consider in what follows a?xed lattice associated to
ρ = ρ
f,λ
,Ad ρ,etc,Henceforth we will only use the notation H
1
F
(Q
p
,?) when
the underlying vector space is crystalline.
Proposition 1.3,(i) If ρ
0
is?at but ordinary and ρ
f,λ
is associated
toa p-divisiblegroupthenforall n
H
1
f
(Q
p
,V
λ
n)=H
1
F
(Q
p
,V
λ
n).
(ii)Ifρ
f,λ
isordinary,detρ
f,λ
vextendsingle
vextendsingle
vextendsingle
I
p
= εandρ
f,λ
isassociatedtoap-divisible
group,thenforall n,
H
1
F
(Q
p
,V
λ
n)? H
1
Se
(Q
p
,V
λ
n.
Proof,Beginning with (i),we de?ne H
1
f
(Q
p
,V)={α ∈ H
1
(Q
p
,V):
κ(α/λ
n
) ∈ H
1
f
(Q
p
,V) for all n} where κ,H
1
(Q
p
,V) → H
1
(Q
p
,V),Then
we see that in case (i),H
1
f
(Q
p
,V) is divisible,So it is enough to how that
H
1
F
(Q
p
,V)=H
1
f
(Q
p
,V).
We have to compare two constructions associated to a nonzero element α of
H
1
(Q
p
,V),The?rst is to associate an extension
(1.9) 0 →V→E
δ
→K → 0
of K-vector spaces with commuting continuous Galois action,If we?x an e
with δ(e) = 1 the action on e is de?ned by σe = e +?α(σ) with?α a cocycle
representing α,The second construction begins with the image of the subspace
〈α〉 in H
1
(Q
p
,V),By the analogue of Proposition 1.2 in the local case,there
is an O-module isomorphism
H
1
(Q
p
,V) similarequal Hom
O
(p
R
/p
2
R
,K/O)
468 ANDREW JOHN WILES
where R is the universal deformation ring of ρ
0
viewed as a representation
of Gal(
ˉ
Q
p
/Q)onO-algebras and p
R
is the ideal of R corresponding to p
D
(i.e.,its inverse image in R),Since α negationslash=0,associated to 〈α〉 is a quotient
p
R
/(p
2
R
,a)ofp
R
/p
2
R
which is a free O-module of rank one,We then obtain a
homomorphism
ρ
α
,Gal(
ˉ
Q
p
/Q
p
) → GL
2
parenleftBig
R/(p
2
R
,a)
parenrightBig
induced from the universal deformation (we pick a representation in the uni-
versal class),This is associated to an O-module of rank 4 which tensored with
K gives a K-vector space E
prime
similarequal (K)
4
which is an extension
(1.10) 0 →U→E
prime
→U→0
where UsimilarequalK
2
has the Galis representation ρ
f,λ
(viewed locally).
In the?rst construction α ∈ H
1
F
(Q
p
,V) if and only if the extension (1.9) is
crystalline,as the extension given in (1.9) is a sum of copies of the more usual
extension where Q
p
replaces K in (1.9),On the other hand 〈α〉?H
1
f
(Q
p
,V)if
and only if the second construction can be made through R
,or equivalently if
and only if E
prime
is the representation associated to a p-divisible group,Apriori,
the representation associated to ρ
α
only has the property that on all?nite
quotients it comes from a?nite?at group scheme,However a theorem of
Raynaud [Ray1] says that then ρ
α
comes from a p-divisible group,For more
details on R
,the universal?at deformation ring of the local representation
ρ
0
,see [Ram].) Now the extension E
prime
comes from a p-divisible group if and
only if it is crystalline; cf,[Fo,§6],So we have to show that (1.9) is crystalline
if and only if (1.10) is crystalline.
One obtains (1.10) from (1.9) as follows,We view V as Hom
K
(U,U) and
let
X = ker,{Hom
K
(U,U)?U→U}
where the map is the natural one f?w mapsto→ f(w),(All tensor products in this
proof will be as K-vector spaces.) Then as K[D
p
]-modules
E
prime
similarequal (E?U)/X.
To check this,one calculates explicitly with the de?nition of the action on E
(given above on e) and on E
prime
(given in the proof of Proposition 1.1),It follows
from standard properties of crystalline representations that if E is crystalline,
so is E?Uand also E
prime
,Conversely,we can recover E from E
prime
as follows.
Consider E
prime
U similarequal(E?U?U)/(X?U),Then there is a natural map
,E? (det) → E
prime
Uinduced by the direct sum decomposition U?Usimilarequal
(det) ⊕ Sym
2
U,Here det denotes a 1-dimensional vector space over K with
Galois action via detρ
f,λ
,Now we claim that? is injective on V?(det),For
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 469
if f ∈Vthen?(f)=f?(w
1
w
2
w
2
w
1
) where w
1
,w
2
are a basis for U
for which w
1
∧w
2
= 1 in det similarequal K,So if?(f) ∈ X?Uthen
f(w
1
)?w
2
f(w
2
)?w
1
=0inU?U.
But this is false unless f(w
1
)=f(w
2
) = 0 whence f =0,So? is injective
on V?det and if? itself were not injective then E would split contradicting
α negationslash=0,So? is injective and we have exhibited E?(det) as a subrepresentation
of E
prime
Uwhich is crystalline,We deduce that E is crystalline if E
prime
is,This
completes the proof of (i).
To prove (ii) we check?rst that H
1
Se
(Q
p
,V
λ
n)=j
1
n
parenleftBig
H
1
Se
(Q
p
,V)
parenrightBig
(this
was already used in (1.7)),We next have to show that H
1
F
(Q
p
,V)? H
1
Se
(Q
p
,V)
where the latter is de?ned by
H
1
Se
(Q
p
,V)=ker:H
1
(Q
p
,V) → H
1
(Q
unr
p
,V/V
0
)
with V
0
the subspace of V on which I
p
acts via ε,But this follows from the
computations in Corollary 3.8.4 of [BK],Finally we observe that
pr
parenleftBig
H
1
Se
(Q
p
,V)
parenrightbig
H
1
Se
(Q
p
,V)
although the inclusion may be strict,and
pr
parenleftBig
H
1
F
(Q
p
,V)
parenrightBig
= H
1
F
(Q
p
,V)
by de?nition,This completes the proof,square
These groups have the property that for s ≥ r,
(1.11) H
1
(Q
p
,V
r
λ
)∩j
1
r,s
parenleftBig
H
1
F
(Q
p
,V
λ
s)
parenrightBig
= H
1
F
(Q
p
,V
λ
r)
where j
r,s
,V
λ
r → V
λ
s is the natural injection,The same holds for V
λ
r
and
V
λ
s
in place of V
λ
r and V
λ
s where V
λ
r
is de?ned by
V
λ
r = Hom(V
λ
r,μ
p
r)
and similarly for V
λ
s
,Both results are immediate from the de?nition (and
indeed were part of the motivation for the de?nition).
We also give a?nite level version of a result of Bloch-Kato which is easily
deduced from the vector space version,As before let T?Vbe a Galois stable
lattice so that T similarequalO
4
,De?ne
H
1
F
(Q
p
,T)=i
1
parenleftBig
H
1
F
(Q
p
,V)
parenrightBig
under the natural inclusion i,Tarrowhookleft→V,and likewise for the dual lattice T
=
Hom
Z
p
(V,(Q
p
/Z
p
)(1)) in V
,(Here V
= Hom(V,Q
p
(1)); throughout this
paper we use M
to denote a dual of M with a Cartier twist.) Also write
470 ANDREW JOHN WILES
pr
n
,T → T/λ
n
for the natural projection map,and for the mapping it
induces on cohomology.
Proposition 1.4,If ρ
f,λ
is associated to a p-divisible group (the ordi-
narycaseisallowed) then
(i) pr
n
parenleftBig
H
1
F
(Q
p
,T)
parenrightBig
= H
1
F
(Q
p
,T/λ
n
) andsimilarlyfor T
,T

n
.
(ii) H
1
F
(Q
p
,V
λ
n) is the orthogonal complement of H
1
F
(Q
p
,V
λ
n
) under Tate
localdualitybetweenH
1
(Q
p
,V
λ
n)andH
1
(Q
p
,V
λ
n
)andsimilarlyforW
λ
n
and W
λ
n
replacing V
λ
n and V
λ
n
.
More generally these results hold for any crystalline representation V
prime
in
placeof V and λ
prime
auniformizerin K
prime
where K
prime
isany?niteextensionof Q
p
with K
prime
End
Gal(Q
p
/Q
p
)
V
prime
.
Proof,We?rst observe that pr
n
(H
1
F
(Q
p
,T))? H
1
F
(Q
p
,T/λ
n
),Now
from the construction we may identify T/λ
n
with V
λ
n,A result of Bloch-
Kato ([BK,Prop,3.8]) says that H
1
F
(Q
p
,V) and H
1
F
(Q
p
,V
) are orthogonal
complements under Tate local duality,It follows formally that H
1
F
(Q
p
,V
λ
n
)
and pr
n
(H
1
F
(Q
p
,T)) are orthogonal complements,so to prove the proposition
it is enough to show that
(1.12) #H
1
F
(Q
p
,V
λ
n)#H
1
F
(Q
p
,V
λ
n)=#H
1
(Q
p
,V
λ
n).
Now if r = dim
K
H
1
F
(Q
p
,V) and s = dim
K
H
1
F
(Q
p
,V
) then
(1.13) r + s = dim
K
H
0
(Q
p
,V) + dim
K
H
0
(Q
p
,V
) + dim
K
V.
From the de?nition,
(1.14) #H
1
F
(Q
p
,V
λ
n)=#(O/λ
n
)
r
·#ker{H
1
(Q
p
,V
λ
n) → H
1
(Q
p
,V)}.
The second factor is equal to #{V (Q
p
)/λ
n
V (Q
p
)},When we write V (Q
p
)
div
for the maximal divisible subgroup of V (Q
p
) this is the same as
#(V (Q
p
)/V (Q
p
)
div
)/λ
n
=#(V (Q
p
)/V (Q
p
)
div
)
λ
n
=#V (Q
p
)
λ
n/#(V (Q
p
)
div
)
λ
n.
Combining this with (1.14) gives
#H
1
F
(Q
p
,V
λ
n)=#(O/λ
n
)
r
(1.15)
·#H
0
(Q
p
,V
λ
n)/#(O/λ
n
)
dim
K
H
0
(Q
p
,V)
.
This,together with an analogous formula for #H
1
F
(Q
p
,V
λ
n
) and (1.13),gives
#H
1
F
(Q
p
,V
λ
n
)#H
1
F
(Q
p
,V
λ
n
)=#(O/λ
n
)
4
· #H
0
(Q
p
,V
λ
n)#H
0
(Q
p
,V
λ
n
).
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 471
As #H
0
(Q
p
,V
λ
n
)=#H
2
(Q
p
,V
λ
n) the assertion of (1.12) now follows from
the formula for the Euler characteristic of V
λ
n.
The proof for W
λ
n,or indeed more generally for any crystalline represen-
tation,is the same,square
We also give a characterization of the orthogonal complements of
H
1
Se
(Q
p
,W
λ
n) and H
1
Se
(Q
p
,V
λ
n),under Tate’s local duality,We write these
duals as H
1
Se
(Q
p
,W
λ
n
) and H
1
Se
(Q
p
,V
λ
n
) respectively,Let
w
,H
1
(Q
p
,W
λ
n) → (Q
p
,W
λ
n/(W
λ
n)
0
)
be the natural map where (W
λ
n
)
i
is the orthogonal complement of W
1?i
λ
n
in
W
λ
n
,and let X
n,i
be de?ned as the image under the composite map
X
n,i
=im:Z
×
p
/(Z
×
p
)
p
n
O/λ
n
→ H
1
(Q
p

p
n?O/λ
n
)
→ H
1
(Q
p
,W
λ
n/(W
λ
n)
0
)
where in the middle term μ
p
n?O/λ
n
is to be identi?ed with (W
λ
n
)
1
/(W
λ
n
)
0
.
Similarly if we replace W
λ
n
by V
λ
n
we let Y
n,i
be the image of Z
×
p
/(Z
×
p
)
p
n
(O/λ
n
)
2
in H
1
(Q
p
,V
λ
n
/(W
λ
n
)
0
),and we replace?
w
by the analogous map?
v
.
Proposition 1.5.
H
1
Se
(Q
p
,W
λ
n)=?
1
w
(X
n,i
),
H
1
Se
(Q
p
,V
λ
n)=?
1
v
(Y
n,i
).
Proof,This can be checked by dualizing the sequence
0 → H
1
Str
(Q
p
,W
λ
n) → H
1
Se
(Q
p
,W
λ
n)
→ ker,{H
1
(Q
p
,W
λ
n/(W
λ
n)
0
) → H
1
(Q
unr
p
,W
λ
n/(W
λ
n)
0
},
where H
1
str
(Q
p
,W
λ
n)=ker:H
1
(Q
p
,W
λ
n) → H
1
(Q
p
,W
λ
n/(W
λ
n)
0
),The?rst
term is orthogonal to ker,H
1
(Q
p
,W
λ
n
) → H
1
(Q
p
,W
λ
n
/(W
λ
n
)
1
),By the
naturality of the cup product pairing with respect to quotients and subgroups
the claim then reduces to the well known fact that under the cup product
pairing
H
1
(Q
p

p
n)×H
1
(Q
p
,Z/p
n
) →Z/p
n
the orthogonal complement of the unrami?ed homomorphisms is the image
of the units Z
×
p
/(Z
×
p
)
p
n
→ H
1
(Q
p

p
n),The proof for V
λ
n is essentially the
same,square
472 ANDREW JOHN WILES
2,Some computations of cohomologygroups
We now make some comparisons of orders of cohomology groups using
the theorems of Poitou and Tate,We retain the notation and conventions of
Section 1 though it will be convenient to state the?rst two propositions in a
more general context,Suppose that
L =
productdisplay
L
q
productdisplay
p∈Σ
H
1
(Q
q
,X)
is a subgroup,where X is a?nite module for Gal(Q
Σ
/Q)ofp-power order.
We de?ne L
to be the orthogonal complement of L under the perfect pairing
(local Tate duality)
productdisplay
q∈Σ
H
1
(Q
q
,X)×
productdisplay
q∈Σ
H
1
(Q
q
,X
) →Q
p
/Z
p
where X
= Hom(X,μ
p
∞),Let
λ
X
,H
1
(Q
Σ
/Q,X) →
productdisplay
q∈Σ
H
1
(Q
q
,X)
be the localization map and similarly λ
X
for X
,Then we set
H
1
L
(Q
Σ
/Q,X)=λ
1
X
(L),H
1
L
(Q
Σ
/Q,X
)=λ
1
X
(L
).
The following result was suggested by a result of Greenberg (cf,[Gre1]) and
is a simple consequence of the theorems of Poitou and Tate,Recall that p is
always assumed odd and that p ∈ Σ.
Proposition 1.6.
#H
1
L
(Q
Σ
/Q,X)/#H
1
L
(Q
Σ
/Q,X
)=h

productdisplay
q∈Σ
h
q
where
braceleftbigg
h
q
=#H
0
(Q
q
,X
)/[H
1
(Q
q
,X):L
q
]
h

=#H
0
(R,X
)#H
0
(Q,X)/#H
0
(Q,X
).
Proof.AdaptingtheexactsequenceproofofPoitouandTate(cf.[Mi2,Th.4.20])
we get a seven term exact sequence
0?→ H
1
L
(Q
Σ
/Q,X)?→ H
1
(Q
Σ
/Q,X)?→
producttext
q∈Σ
H
1
(Q
q
,X)/L
q
arrowbt
producttext
q∈Σ
H
2
(Q
q
,X) ←? H
2
(Q
Σ
/Q,X) ←? H
1
L
(Q
Σ
/Q,X
)

|
→ H
0
(Q
Σ
/Q,X
)

→ 0,
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 473
where M

= Hom(M,Q
p
/Z
p
),Now using local duality and global Euler char-
acteristics (cf,[Mi2,Cor,2.3 and Th,5.1]) we easily obtain the formula in the
proposition,We repeat that in the above proposition X can be arbitrary of
p-power order,square
We wish to apply the proposition to investigate H
1
D
,Let D =(·,Σ,O,M)
be a standard deformation theory as in Section 1 and de?ne a corresponding
group L
n
= L
D,n
by setting
L
n,q
=
H
1
(Q
q
,V
λ
n) for q negationslash= p and q negationslash∈M
H
1
D
q
(Q
q
,V
λ
n) for q negationslash= p and q ∈M
H.
1
(Q
p
,V
λ
n) for q = p.
Then H
1
D
(Q
Σ
/Q,V
λ
n)=H
1
L
n
(Q
Σ
/Q,V
λ
n) and we also de?ne
H
1
D
(Q
Σ
/Q,V
λ
n)=H
1
L
n
(Q
Σ
/Q,V
λ
n).
We will adopt the convention implicit in the above that if we consider Σ
prime
Σ
then H
1
D
(Q
Σ
prime/Q,V
λ
n) places no local restriction on the cohomology classes at
primes q ∈ Σ
prime
Σ,Thus in H
1
D
(Q
Σ
prime/Q,V
λ
n
) we will require (by duality) that
the cohomology class be locally trivial at q ∈ Σ
prime
Σ.
We need now some estimates for the local cohomology groups,First we
consider an arbitrary?nite Gal(Q
Σ
/Q)-module X:
Proposition 1.7,If q negationslash∈ Σ,and X is an arbitrary?nite Gal(Q
Σ
/Q)-
moduleof p-powerorder,
#H
1
L
prime(Q
Σ∪q
/Q,X)/#H
1
L
(Q
Σ
/Q,X) ≤ #H
0
(Q
q
,X
)
where L
prime
lscript
= L
lscript
for lscript ∈ Σ and L
prime
q
= H
prime
(Q
q
,X).
Proof,Consider the short exact sequence of in?ation-restriction:
0→H
1
L
(Q
Σ
/Q,X)→H
1
L
prime
(Q
Σ∪q
/Q,X)→Hom(Gal(Q
Σ∪q
/Q
Σ
),X)
Gal(Q
Σ
/Q)
arrowbt
arrowbt

H
1
(Q
unr
q
,X)
Gal(Q
unr
q
/Q
q
)

→H
1
(Q
unr
q
,X)
Gal(Q
unr
q
/Q
q
)
The proposition follows when we note that
#H
0
(Q
q
,X
)=#H
1
(Q
unr
q
,X)
Gal(Q
unr
q
/Q
q
)
,square
Now we return to the study of V
λ
n and W
λ
n.
Proposition 1.8,If q ∈M(q negationslash= p) and X = V
λ
n then h
q
=1.
474 ANDREW JOHN WILES
Proof,This is a straightforward calculation,For example if q is of type
(A) then we have
L
n,q
=ker{H
1
(Q
q
,V
λ
n) → H
1
(Q
q
,W
λ
n/W
0
λ
n)⊕H
1
(Q
unr
q
,O/λ
n
)}.
Using the long exact sequence of cohomology associated to
0 → W
0
λ
n → W
λ
n → W
λ
n/W
0
λ
n → 0
one obtains a formula for the order of L
n,q
in terms of #H
1
(Q
q
,W
λ
n),
#H
i
(Q
q
,W
λ
n/W
0
λ
n
) etc,Using local Euler characteristics these are easily re-
duced to ones involving H
0
(Q
q
,W
λ
n
) etc,and the result follows easily,square
The calculation of h
p
is more delicate,We content ourselves with an
inequality in some cases.
Proposition 1.9,(i) If X = V
λ
n then
h
p
h

=#(O/λ)
3n
#H
0
(Q
p
,V
λ
n)/#H
0
(Q,V
λ
n)
intheunrestrictedcase.
(ii) If X = V
λ
n then
h
p
h

≤ #(O/λ)
n
#H
0
(Q
p
,(V
ord
λ
n )
)/#H
0
(Q,W
λ
n)
intheordinarycase.
(iii) If X = V
λ
n or W
λ
n then h
p
h

≤ #H
0
(Q
p
,(W
0
λ
n
)
)/#H
0
(Q,W
λ
n
)
intheSelmercase.
(iv) If X = V
λ
n or W
λ
n then h
p
h

=1inthestrictcase.
(v) If X = V
λ
n then h
p
h

=1inthe?atcase.
(vi) If X = V
λ
n or W
λ
n then h
p
h

=1/#H
0
(Q,V
λ
n
) if L
n,p
=
H
1
F
(Q
p
,X) and ρ
f,λ
arisesfromanordinary p-divisiblegroup.
Proof,Case (i) is trivial,Consider then case (ii) with X = V
λ
n
.
We have
a long exact sequence of cohomology associated to the exact sequence:
(1.16) 0 → W
0
λ
n → V
λ
n → V
λ
n/W
0
λ
n → 0.
In particular this gives the map u in the diagram
H
1
(Q
p
,V
λ
n)
u
|
arrowbt
downslope
downslopeδ
downslope
downslope
arrowsoutheast
1→Z =H
1
(Q
unr
p
/Q
p
,(V
λ
n/W
0
λ
n
)
H
)→H
1
(Q
p
,V
λ
n/W
0
λ
n
)→H
1
(Q
unr
p
,V
λ
n/W
0
λ
n
)
G
→1
where G = Gal(Q
unr
p
/Q
p
),H = Gal(
ˉ
Q
p
/Q
unr
p
) and δ is de?ned to make the
triangle commute,Then writing h
i
(M) for #H
1
(Q
p
,M) we have that #Z =
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 475
h
0
(V
λ
n/W
0
λ
n
) and #im δ ≥ (#im u)/(#Z),A simple calculation using the
long exact sequence associated to (1.16) gives
(1.17) #im u =
h
1
(V
λ
n/W
0
λ
n
)h
2
(V
λ
n)
h
2
(W
0
λ
n
)h
2
(V
λ
n/W
0
λ
n
)
.
Hence
[H
1
(Q
p
,V
λ
n):L
n,p
] = #imδ ≥ #(O/λ)
3n
h
0
(V
λ
n)/h
0
(W
0
λ
n)
.
The inequality in (iii) follows for X = V
λ
n and the case X = W
λ
n is similar.
Case (ii) is similar,In case (iv) we just need #im u which is given by (1.17)
with W
λ
n replacing V
λ
n,In case (v) we have already observed in Section 1 that
Raynaud’s results imply that #H
0
(Q
p
,V
λ
n
) = 1 in the?at case,Moreover
#H
1
f
(Q
p
,V
λ
n) can be computed to be #(O/λ)
2n
from
H
1
f
(Q
p
,V
λ
n) similarequal H
1
f
(Q
p
,V)
λ
n similarequal Hom
O
(p
R
/p
2
R
,K/O)
λ
n
where R is the universal local?at deformation ring of ρ
0
for O-algebras,Using
the relation R similarequal R
W(k)
O where R
is the corresponding ring for W(k)-
algebras,and the main theorem of [Ram] (Theorem 4.2) which computes R
,
we can deduce the result.
We now prove (vi),From the de?nitions
#H
1
F
(Q
p
,V
λ
n)=
braceleftbigg
(#O/λ
n
)
r
#H
0
(Q
p
,W
λ
n)ifρ
f,λ
|
D
p
does not split
(#O/λ
n
)
r
if ρ
f,λ
|
D
p
splits
where r = dim
K
H
1
F
(Q
p
,V),This we can compute using the calculations in
[BK,Cor,3.8.4],We?nd that r = 2 in the non-split case and r = 3 in the
split case and (vi) follows easily,square
3,Some results on subgroups of GL
2
(k)
We now give two group-theoretic results which will not be used until
Chapter 3,Although these could be phrased in purely group-theoretic terms
it will be more convenient to continue to work in the setting of Section 1,i.e.,
with ρ
0
as in (1.1) so that im ρ
0
is a subgroup of GL
2
(k) and det ρ
0
is assumed
odd.
Lemma 1.10,If im ρ
0
hasorderdivisibleby p then:
(i)Itcontainsanelement γ
0
oforder m ≥ 3 with (m,p)=1and γ
0
trivial
onanyabelianquotientof im ρ
0
.
(ii) It contains an element ρ
0
(σ) with any prescribed image in the Sylow
2-subgroupof (im ρ
0
)/(im ρ
0
)
prime
andwiththeratiooftheeigenvaluesnotequal
to ω(σ),(Here (im ρ
0
)
prime
denotesthederivedsubgroupof (im ρ
0
).)
476 ANDREW JOHN WILES
The same results hold if the image of the projective representation?ρ
0
as-
sociatedto ρ
0
isisomorphicto A
4
,S
4
or A
5
.
Proof,(i) Let G =imρ
0
and let Z denote the center of G,Then we
have a surjection G
prime
→ (G/Z)
prime
where the
prime
denotes the derived group,By
Dickson’s classi?cation of the subgroups of GL
2
(k) containing an element of
order p,(G/Z) is isomorphic to PGL
2
(k
prime
) or PSL
2
(k
prime
) for some?nite?eld k
prime
of
characteristic p or possibly to A
5
when p = 3,cf,[Di,§260],In each case we can
nd,and then lift to G
prime
,an element of order m with (m,p)=1andm ≥ 3,
except possibly in the case p = 3 and PSL
2
(F
3
) similarequal A
4
or PGL
2
(F
3
) similarequal S
4
.
However in these cases (G/Z)
prime
has order divisible by 4 so the 2-Sylow subgroup
of G
prime
has order greater than 2,Since it has at most one element of exact order
2 (the eigenvalues would both be?1 since it is in the kernel of the determinant
and hence the element would be?I) it must also have an element of order 4.
The argument in the A
4
,S
4
and A
5
cases is similar.
(ii) Since ρ
0
is assumed absolutely irreducible,G =imρ
0
has no?xed line.
We claim that the same then holds for the derived group G
prime
For otherwise
since G
prime
triangleleftGwe could obtain a second?xed line by taking 〈gv〉 where 〈v〉 is the
original?xed line and g is a suitable element of G.ThusG
prime
would be contained
in the group of diagonal matrices for a suitable basis and it would be
central in which case G would be abelian or its normalizer in GL
2
(k),and
hence also G,would have order prime to p,Since neither of these possibilities
is allowed,G
prime
has no?xed line.
By Dickson’s classi?cation of the subgroups of GL
2
(k) containing an el-
ement of order p the image of im ρ
0
in PGL
2
(k) is isomorphic to PGL
2
(k
prime
)
or PSL
2
(k
prime
) for some?nite?eld k
prime
of characteristic p or possibly to A
5
when
p =3,The only one of these with a quotient group of order p is PSL
2
(F
3
)
when p = 3,It follows that pnotbar[G,G
prime
] except in this one case which we treat
separately,So assuming now that pnotbar[G,G
prime
] we see that G
prime
contains a non-
trivial unipotent element u,Since G
prime
has no?xed line there must be another
noncommuting unipotent element v in G
prime
,Pick a basis for ρ
0
|
G
prime consisting
of their?xed vectors,Then let τ be an element of Gal(Q
Σ
/Q) for which the
image of ρ
0
(τ)inG/G
prime
is prescribed and let ρ
0
(τ)=(
a
c
b
d
),Then
δ =
parenleftbigg
ab
cd
parenrightbiggparenleftbigg
1 sα
1
parenrightbiggparenleftbigg
1
rβ 1
parenrightbigg
has det (δ) = detρ
0
(τ) and trace δ = sα(raβ + c)+brβ + a + d,Since p ≥ 3
we can choose this trace to avoid any two given values (by varying s) unless
raβ + c = 0 for all r,But raβ + c cannot be zero for all r as otherwise
a = c =0,So we can?nd a δ for which the ratio of the eigenvalues is not
ω(τ),det(δ) being,of course,?xed.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 477
Now suppose that im ρ
0
does not have order divisible by p but that the
associated projective representation tildewiderρ
0
has image isomorphic to S
4
or A
5
,so
necessarily p negationslash=3,Pick an element τ such that the image of ρ
0
(τ)inG/G
prime
is
any prescribed class,Since this?xes both detρ
0
(τ) and ω(τ) we have to show
that we can avoid at most two particular values of the trace for τ,To achieve
this we can adapt our?rst choice of τ by multiplying by any element og G
prime
.So
pick σ ∈ G
prime
as in (i) which we can assume in these two cases has order 3,Pick
a basis for ρ
0
,by expending scalars if necessary,so that σ mapsto→ (
α
α
1
),Then one
checks easily that if ρ
0
(τ)=(
a
c
b
d
) we cannot have the traces of all of τ,στ and
σ
2
τ lying in a set of the form {?t} unless a = d = 0,However we can ensure
that ρ
0
(τ) does not satisfy this by?rst multiplying τ by a suitable element of
G
prime
since G
prime
is not contained in the diagonal matrices (it is not abelian).
In the A
4
case,and in the PSL
2
(F
3
) similarequal A
4
case when p =3,we use a
di?erent argument,In both cases we?nd that the 2-Sylow subgroup of G/G
prime
is generated by an element z in the centre of G,Either a power of z is a suitable
candidate for ρ
0
(σ) or else we must multiply the power of z by an element of
G
prime
,the ratio of whose eigenvalues is not equal to 1,Such an element exists
because in G
prime
the only possible elements without this property are {?I} (such
elements necessary have determinant 1 and order prime to p) and we know
that #G
prime
> 2 as was noted in the proof of part (i),square
Remark,By a well-known result on the?nite subgroups of PGL
2
(F
p
) this
lemma covers all ρ
0
whose images are absolutely irreducible and for which tildewiderρ
0
is not dihedral.
Let K
1
be the splitting?eld of ρ
0
,Then we can view W
λ
and W
λ
as
Gal(K
1

p
)/Q)-modules,We need to analyze their cohomology,Recall that
we are assuming that ρ
0
is absolutely irreducible,Let tildewiderρ
0
be the associated
projective representation to PGL
2
(k).
The following proposition is based on the computations in [CPS].
Proposition 1.11,Supposethat ρ
0
isabsolutelyirreducible,Then
H
1
(K
1

p
)/Q,W
λ
)=0.
Proof,If the image of ρ
0
has order prime to p the lemma is trivial,The
subgroups of GL
2
(k) containing an element of order p which are not contained
in a Borel subgroup have been classi?ed by Dickson [Di,§260] or [Hu,II.8.27].
Their images inside PGL
2
(k
prime
) where k
prime
is the quadratic extension of k are
conjugate to PGL
2
(F)orPSL
2
(F) for some sub?eld F of k
prime
,or they are
isomorphic to one of the exceptional groups A
4
,S
4
,A
5
.
Assume then that the cohomology group H
1
(K
1

p
)/Q,W
λ
) negationslash=0,Then
by considering the in?ation-restriction sequence with respect to the normal
478 ANDREW JOHN WILES
subgroup Gal(K
1

p
)/K
1
) we see that ζ
p
∈ K
1
,Next,since the representation
is (absolutely) irreducible,the center Z of Gal(K
1
/Q) is contained in the
diagonal matrices and so acts trivially on W
λ
,So by considering the in?ation-
restriction sequence with respect to Z we see that Z acts trivially on ζ
p
(and
on W
λ
),So Gal(Q(ζ
p
)/Q) is a quotient of Gal(K
1
/Q)/Z,This rules out all
cases when p negationslash=3,and when p = 3 we only have to consider the case where the
image of the projective representation is isomporphic as a group to PGL
2
(F)
for some?nite?eld of characteristic 3,(Note that S
4
similarequal PGL
2
(F
3
).)
Extending scalars commutes with formation of duals and H
1
,sowemay
assume without loss of generality F? k.Ifp = 3 and #F>3 then
H
1
(PSL
2
(F),W
λ
) = 0 by results of [CPS],Then if tildewiderρ
0
is the projective
representation associated to ρ
0
suppose that g
1
im tildewiderρ
0
g = PGL
2
(F) and let
H = gPSL
2
(F)g
1
,Then W
λ
similarequal W
λ
over H and
(1.18) H
1
(H,W
λ
)?
F
ˉ
F similarequal H
1
(g
1
Hg,g
1
(W
λ
F
ˉ
F))=0.
We deduce also that H
1
(im ρ
0
,W
λ
)=0.
Finally we consider the case where F = F
3
,I am grateful to Taylor for the
following argument,First we consider the action of PSL
2
(F
3
)onW
λ
explicitly
by considering the conjugation action on matrices{A ∈ M
2
(F
3
),trace A =0}.
One sees that no such matrix is?xed by all the elements of order 2,whence
H
1
(PSL
2
(F
3
),W
λ
) similarequal H
1
(Z/3,(W
λ
)
C
2
×C
2
)=0
where C
2
×C
2
denotes the normal subgroup of order 4 in PSL
2
(F
3
) similarequal A
4
,Next
we verify that there is a unique copy of A
4
in PGL
2
(
ˉ
F
3
) up to conjugation.
For suppose that A,B ∈ GL
2
(
ˉ
F
3
) are such that A
2
= B
2
= I with the images
of A,B representing distinct nontrivial commuting elements of PGL
2
(
ˉ
F
3
),We
can choose A =(
1
0
0
1
) by a suitable choice of basis,i.e.,by a suitable conju-
gation,Then B is diagonal or antidiagonal as it commutes with A up to a
scalar,and as B,A are distinct in PGL
2
(F
3
)wehaveB =(
0
a
a
1
0
) for some
a,By conjugating by a diagonal matrix (which does not change A)wecan
assume that a = 1,The group generated by {A,B} in PGL
2
(F
3
) is its own
centralizer so it has index at most 6 in its normalizer N,Since N/〈A,B〉similarequalS
3
there is a unique subgroup of N in which 〈A,B〉 has index 3 whence the image
of the embedding of A
4
in PGL
2
(
ˉ
F
3
) is indeed unique (up to conjugation),So
arguing as in (1.18) by extending scalars we see that H
1
(im ρ
0
,W
λ
) = 0 when
F = F
3
also,square
The following lemma was pointed out to me by Taylor,It permits most
dihedral cases to be covered by the methods of Chapter 3 and [TW].
Lemma 1.12,Supposethat ρ
0
isabsolutelyirreducibleandthat
(a)?ρ
0
isdihedral (thecasewheretheimageis Z/2×Z/2 isallowed),
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 479
(b) ρ
0
|
L
isabsolutelyirreduciblewhere L = Q
parenleftBig
radicalbig
(?1)
(p?1)/2
p
parenrightBig
.
Then for any positive integer n and any irreducible Galois stable subspace X
of W
λ
ˉ
k thereexistsanelement σ ∈ Gal(
ˉ
Q/Q) suchthat
(i)?ρ
0
(σ) negationslash=1,
(ii) σ?xesQ(ζ
p
n),
(iii) σ hasaneigenvalue 1 on X.
Proof,If?ρ
0
is dihedral then ρ
0
ˉ
k = Ind
G
H
χ for some H of index 2 in G,
where G = Gal(K
1
/Q),(As before,K
1
is the splitting?eld of ρ
0
.) Here H
can be taken as the full inverse image of any of the normal subgroups of index
2 de?ning the dihedral group,Then W
λ
ˉ
k similarequal δ ⊕Ind
G
H
(χ/χ
prime
) where δ is the
quadratic character G → G/H and χ
prime
is the conjugate of χ by any element of
G?H,Note that χ negationslash= χ
prime
since H has nontrivial image in PGL
2
(
ˉ
k).
To?nd a σ such that δ(σ) = 1 and conditions (i) and (ii) hold,observe
that M(ζ
p
n) is abelian where M is the quadratic?eld associated to δ.So
conditions (i) and (ii) can be satis?ed if?ρ
0
is non-abelian,If?ρ
0
is abelian (i.e.,
the image has the form Z/2×Z/2),then we use hypothesis (b),If Ind
G
H
(χ/χ
prime
)
is irreducible over
ˉ
k then W
λ
ˉ
k is a sum of three distinct quadratic characters,
none of which is the quadratic character associated to L,and we can repeat
the argument by changing the choice of H for the other two characters,If
X = Ind
G
H
(χ/χ
prime
)?
ˉ
k is absolutely irreducible then pick any σ ∈ G?H,This
satis?es (i) and can be made to satisfy (ii) if (b) holds,Finally,since σ ∈ G?H
we see that σ has trace zero and σ
2
= 1 in its action on X,Thus it has an
eigenvalue equal to 1,square
Chapter 2
In this chapter we study the Hecke rings,In the?rst section we recall
some of the well-known properties of these rings and especially the Goren-
stein property whose proof is rather technical,depending on a characteristic
p version of the q-expansion principle,In the second section we compute the
relations between the Hecke rings as the level is augmented,The purpose is to
nd the change in the η-invariant as the level increases.
In the third section we state the conjecture relating the deformation rings
of Chapter 1 and the Hecke rings,Finally we end with the critical step of
showing that if the conjecture is true at a minimal level then it is true at
all levels,By the results of the appendix the conjecture is equivalent to the
480 ANDREW JOHN WILES
equality of the η-invariant for the Hecke rings and the p/p
2
-invariant for the
deformation rings,In Chapter 2,Section 2,we compute the change in the
η-invariant and in Chapter 1,Section 1,we estimated the change in the p/p
2
-
invariant.
1,The Gorenstein property
For any positive integer N let X
1
(N)=X
1
(N)
/Q
be the modular curve
over Q corresponding to the group Γ
1
(N) and let J
1
(N) be its Jacobian,Let
T
1
(N) be the ring of endomorphisms of J
1
(N) which is generated over Z by
the standard Hecke operators {T
l
= T
l?
for lnotbarN,U
q
= U
q?
for q|N,〈a〉 = 〈a〉
for (a,N)=1},For precise de?nitions of these see [MW1,Ch,2,§5],In
particular if one identi?es the cotangent space of J
1
(N)(C) with the space of
cusp forms of weight 2 on Γ
1
(N) then the action induced byT
1
(N) is the usual
one on cusp forms,We let? = {〈a〉,(a,N)=1}.
The group (Z/NZ)
acts naturally on X
1
(N) via? and for any sub-
group H? (Z/NZ)
we let X
H
(N)=X
H
(N)
/Q
be the quotient X
1
(N)/H.
Thus for H =(Z/NZ)
we have X
H
(N)=X
0
(N) corresponding to the group
Γ
0
(N),In Section 2 it will sometimes be convenient to assume that H decom-
poses as a product H =
producttext
H
q
in (Z/NZ)
similarequal
producttext
(Z/q
r
Z)
where the product
is over the distinct prime powers dividing N,We let J
H
(N) denote the Ja-
cobian of X
H
(N) and note that the above Hecke operators act naturally on
J
H
(N) also,The ring generated by these Hecke operators is denoted T
H
(N)
and sometimes,if H and N are clear from the context,we addreviate this
to T.
Let p be a prime ≥ 3,Let m be a maximal ideal of T = T
H
(N) with
p ∈ m,Then associated to m there is a continuous odd semisimple Galois
representation ρ
m
,
(2.1) ρ
m
,Gal(Q/Q) → GL
2
(T/m)
unrami?ed outside Np which satis?es
trace ρ
m
(Frob q)=T
q
,detρ
m
(Frob q)=〈q〉q
for each prime q notbar Np,Here Frob q denotes a Frobenius at q in Gal(Q/Q).
The representation ρ
m
is unique up to isomorphism,If pnotbarN (resp,p|N)we
say that m is ordinary if T
p
/∈ m (resp,U
p
/∈ m),This implies (cf.,for example,
theorem 2 of [Wi1]) that for our?xed decomposition group D
p
at p,
ρ
m
vextendsingle
vextendsingle
vextendsingle
D
p

parenleftbigg
χ
1
0 χ
2
parenrightbigg
for a suitable choic of basis,with χ
2
unrami?ed and χ
2
(Frob p)=T
p
mod
m (resp,equal to U
p
),In particular ρ
m
is ordinary in the sense of Chapter 1
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 481
provided χ
1
negationslash= χ
2
,We will say that m is D
p
-distinguished if m is ordinary and
χ
1
negationslash= χ
2
,(In practice χ
1
is usually rami?ed so this imposes no extra condition.)
We caution the reader that if ρ
m
is ordinary in the sense of Chapter 1 then we
can only conclude that m is D
p
-distinguished if pnotbarN.
Let T
m
denote the completion of T at m so that T
m
is a direct factor of
the complete semi-local ringT
p
= T?Z
p
,Let D be the points of the associated
m-divisible group
D = J
H
(N)(Q)
m
similarequal J
H
(N)(Q)
p
∞?
T
p
T
m
.
It is known that
D = Hom
Z
p
(D,Q
p
/Z
p
) is a rank 2 T
m
-module,i.e.,that
D?
Z
p
Q
p
similarequal (T
m
Z
p
Q
p
)
2
,Brie?y it is enough to show that H
1
(X
H
(N),C)is
free of rank 2 over T?C and this reduces to showing that S
2

H
(N),C),
the space of cusp forms of weight 2 on Γ
H
(N),is free of rank 1 over T?C.
One shows then that if {f
1
,...,f
r
} is a complete set of normalized newforms
in S
2

H
(N),C) of levels m
1
,...,m
r
then if we set d
i
= N/m
i
,the form
f =Σf
i
(d
i
z) is a basis vector of S
2

H
(N),C)asaT?C-module.
If m is ordinary then Theorem 2 of [Wi1],itself a straightforward gener-
alization of Proposition 2 and (11) of [MW2],shows that (for our?xed de-
composition group D
p
) there is a?ltration of D by Pontrjagin duals of rank 1
T
m
-modules (in the sense explained above)
(2.2) 0 →D
0
→D→D
E
→ 0
where D
0
is stable under D
p
and the induced action on D
E
is unrami?ed with
Frob p = U
p
on it if p|N and Frob p equal to the unit root of x
2
T
p
x + p〈p〉
=0inT
m
if p notbar N,We can describe D
0
and D
E
as follows,Pick a σ ∈
I
p
which induces a generator of Gal(Q
p

Np
∞)/Q
p

Np
)),Let ε,D
p
→ Z
×
p
be the cyclotomic character,Then D
0
= ker(σ? ε(σ))
div
,the kernel being
taken inside D and ‘div’ meaning the maximal divisible subgroup,Although
in [Wi1] this?ltration is given only for a factor A
f
of J
1
(N) it is easy to
deduce the result for J
H
(N) itself,We note that this?ltration is de?ned
without reference to characteristic p and also that if m is D
p
-distinguished,D
0
(resp,D
E
) can be described as the maximal submodule on which σχ
1
(σ)
is topologically nilpotent for all σ ∈ Gal(Q
p
/Q
p
) (resp,quotient on which
σχ
2
(σ) is topologically nilpotent for all σ ∈ Gal(Q
p
/Q
p
)),where?χ
i
(σ)is
any lifting of χ
i
(σ)toT
m
.
The Weil pairing 〈,〉 on J
H
(N)(Q)
p
M satis?es the relation 〈t
x,y〉 =
〈x,t
y〉 for any Hecke operator t,It is more convenient to use an adapted
pairing de?ned as follows,Let w
ζ
,for ζ a primitive N
th
root of 1,be the
involution of X
1
(N)
/Q(ζ)
de?ned in [MW1,p,235],This induces an involution
of X
H
(N)
/Q(ζ)
also,Then we can de?ne a new pairing [,] by setting (for a
482 ANDREW JOHN WILES
xed choice of ζ)
(2.3) [x,y]=〈x,w
ζ
y〉.
Then [t
x,y]=[x,t
y] for all Hecke operators t,In particular we obtain an
induced pairing on D
p
M.
The following theorem is the crucial result of this section,It was?rst
proved by Mazur in the case of prime level [Ma2],It has since been generalized
in [Ti1],[Ri1] [M Ri],[Gro] and [E1],but the fundamental argument remains
that of [Ma2],For a summary see [E1,§9],However some of the cases we need
are not covered in these accounts and we will present these here.
Theorem 2.1,(i) If pnotbarN and ρ
m
isirreduciblethen
J
H
(N)(Q)[m] similarequal (T/m)
2
.
(ii) If pnotbarN and ρ
m
isirreducibleand m is D
p
-distinguishedthen
J
H
(Np)(Q)[m] similarequal (T/m)
2
.
(Incase (ii) m isamaximalidealof T = T
H
(Np).)
Corollary 1,In case (i),J
H
hatwider
(N)(Q)
m
similarequal T
2
m
and Ta
m
parenleftBig
J
H
(N)(Q)
parenrightBig
similarequal
T
2
m
.
In case (ii),J
H
hatwider
(Np)(Q)
m
similarequal T
2
m
and Ta
m
parenleftBig
J
H
(Np)(Q)
parenrightBig
similarequal T
2
m
(where
T
m
= T
H
(Np)
m
).
Corollary 2,Ineitherofcases (i) or (ii) T
m
isaGorensteinring.
In each case the?rst isomorphisms of Corollary 1 follow from the theorem
together with the rank 2 result alluded to previously,Corrollary 2 and the
second isomorphisms of corollory 1 then follow on applying duality (2.4),(In
the proof and in all applications we will only use the notion of a Gorenstein
Z
p
-algebra as de?ned in the appendix,For?nite?at local Z
p
-algebras the
notions of Gorenstein ring and Gorenstein Z
p
-algebra are the same.) Here
Ta
m
parenleftBig
J
H
(N)(Q)
parenrightBig
=Ta
p
parenleftBig
J
H
(N)(Q)
parenrightBig
T
p
T
m
is the m-adic Tate module of
J
H
(N).
We should also point out that although Corollary 1 gives a representation
from the m-adic Tate module
ρ = ρ
T
m
,Gal(Q/Q) → GL
2
(T
m
)
this can be constructed in a much more elementary way,(See [Ca3] for another
argument.) For,the representation exists with T
m
Q replacing T
m
when we
use the fact that Hom(Q
p
/Z
p
,D)?Q was free of rank 2,A standard argument
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 483
using the Eichler-Shimura relations implies that this representation ρ
prime
with
values in GL
2
(T
m
Q) has the property that
trace ρ
prime
(Frob lscript)=T
lscript
,det ρ
prime
(Frob lscript)=lscript〈lscript〉
for all lscript notbar Np,We can normalize this representation by picking a complex
conjugation c and choosing a basis such that ρ
prime
(c)=
parenleftbig
1
0
0
1
parenrightbig
,and then by picking
a τ for which ρ
prime
(τ)=
parenleftbig
a
τ
c
τ
b
τ
d
τ
parenrightbig
with b
τ
c
τ
negationslash≡ 0(m) and by rescaling the basis so
that b
τ
=1,(Note that the explicit description of the traces shows that if ρ
m
is also normalized so that ρ
m
(c)=
parenleftbig
1
0
0
1
parenrightbig
then b
ρ
c
τ
mod m = b
τ,m
c
τ,m
where
ρ
m
(τ)=
parenleftbig
a
τ,m
c
τ,m
b
τ,m
d
τ,m
parenrightbig
,The existence of a τ such that b
τ
c
τ
negationslash≡ 0(m) comes from
the irreducibility of ρ
m
.) With this normalization one checks that ρ
prime
actually
takes values in the (closed) subring of T
m
generated over Z
p
by the traces.
One can even construct the representation directly from the representations in
Theorem 0.1 using this ring which is reduced,This is the method of Carayol
which requires also the characterization of ρ by the traces and determinants
(Theorem 1 of [Ca3]),One can also often interpret the U
q
operators in terms
of ρ for q|N using the π
q
similarequal π(σ
q
) theorem of Langlands (cf,[Ca1]) and the
U
q
operator in case (ii) using Theorem 2.1.4 of [Wi1].
Proof(oftheorem),The important technique for proving such multiplicity-
one results is due to Mazur and is based on the q-expansion principle in char-
acteristic p,Since the kernel of J
H
(N)(Q) → J
1
(N)(Q) is an abelian group on
which Gal(Q/Q) acts through an abelian extension of Q,the intersection with
kerm is trivial when ρ
m
is irreducible,So it is enough to verify the theorem
for J
1
(N) in part (i) (resp,J
1
(Np) in part (ii)),The method for part (i) was
developed by Mazur in [Ma2,Ch,II,Prop,14.2],It was extended to the case
of Γ
0
(N) in [Ri1,Th,5.2] which summarizes Mazur’s argument,The case of
Γ
1
(N) is similar (cf,[E1,Th,9.2]).
Now consider case (ii),Let?
(p)
= {〈a〉,a ≡ 1(N)},Let us?rst
assume that?
(p)
is nontrivial mod m,i.e.,that δ?1 /∈m for some δ∈?
(p)
,This
case is essentially covered in [Ti1] (and also in [Gro]),We brie?y review the
argument for use later,Let K = Q
p

p
),ζ
p
being a primitive p
th
root of unity,
and let O be the ring of integers of the completion of the maximal unrami?ed
extension of K,Using the fact that?
(p)
is nontrivial mod m together with
Proposition 4,p,269 of [MW1] we?nd that
J
1
(Np)
′et
m/O
(F
p
) similarequal (Pic
0
Σ
′et
1
×Pic
0
Σ
μ
1
)
m
(F
p
)
where the notation is taken from [MW1] loc,cit,Here Σ
′et
1
and Σ
μ
1
are the
two smooth irreducible components of the special?bre of the canonical model
of X
1
(Np)
/O
described in [MW1,Ch,2],(The smoothness in this case was
proved in [DR].) Also J
1
(Np)
′et
m/O
denotes the canonical ′etale quotient of the
m-divisible group over O,This makes sense because J
1
(Np)
m
does extend to
484 ANDREW JOHN WILES
a p-divisible group over O (again by a theorem of Deligne and Rapoport [DR]
and because?
(p)
is nontrivial mod m),It is ordinary as follows from (2.2) when
we use the main theorem of Tate ([Ta]) since D
0
and D
E
clearly correspond
to ordinary p-divisible groups.
Now the q-expansion principle implies that dim
F
p
X[m
prime
] ≤ 1 where
X = {H
0

μ
1
,?
1
)⊕H
0

′et
1
,?
1
)}
and m
prime
is de?ned by embeddingT/m arrowhookleft→F
p
and setting m
prime
= ker,T?F
p
→F
p
under the map t? a mapsto→ at mod m,Also T acts on Pic
0
Σ
μ
1
× Pic
0
Σ
′et
1
,the
abelian variety part of the closed?bre of the Neron model of J
1
(Np)
/O
,and
hence also on its cotangent space X,(For a proof that X[m
prime
] is at most one-
dimensional,which is readily adapted to this case,see Lemma 2.2 below,For
similar versions in slightly simpler contexts see [Wi3,§6] or [Gro,§12],Then
the Cartier map induces an injection 9cf,Prop,6.5 of [Wi3])
δ,{Pic
0
Σ
μ
1
×Pic
0
Σ
′et
1
}[p](F
p
)?
F
p
F
p
arrowhookleft→ X.
The composite δ?w
ζ
can be checked to be Hecke invariant (cf,Prop,6.5 of
[Wi3],In checking the compatibility for U
p
use the formulas of Theorem 5.3
of [Wi3] but note the correction in [MW1,p,188].) It follows that
J
1
(Np)
m/O
(F
p
)[m] similarequalT/m
as a T-module,This shows that if
H is the Pontrjagin dual of
H = J
1
(Np)
m/O
(F
p
) then
H similarequalT
m
since
H/m similarequalT/m.Thus
J
1
(Np)
m/O
(F
p
)[p]

→Hom(T
m
/p,Z/pZ).
Now our assumption that m is D
p
-distinguished enables us to identify
D
0
= J
1
(Np)
0
m/O
(Q
p
),D
E
= J
1
(Np)
′et
m/O
(Q
p
).
For the groups on the right are unrami?ed and those on the left are dual to
groups where inertia acts via a character of?nite order (duality with respect
to Hom(,Q
p
/Z
p
(1))),So
D
0
[p]

→T
m
/p,D
E
[p]

→Hom(T
m
/p,Z/pZ)
asT
m
-modules,the former following from the latter when we use duality under
the pairing [,],In particular as m is D
p
-distinguished,
(2.4) D[p] similarequalT
m
/p⊕Hom(T
m
/p,Z/pZ).
We now use an argument of Tilouine [Ti1],We pick a complex conjugation
τ,This has distinct eigenvalues ±1on]ρ
m
so we may decompose D[p]into
eigenspaces for τ:
D[p]=D[p]
+
⊕D[p]
.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 485
Since T
m
/p and Hom(T
m
/p,Z/pZ) are both indecomposable Hecke-modules,
by the Krull-Schmidt theorem this decomposition has factors which are iso-
morphic to those in (2.4) up to order,So in the decomposition
D[m]=D[m]
+
⊕D[m]
one of the eigenspaces is isomorphic to T
m
and the other to (T
m
/p)[m],But
since ρ
m
is irreducible it is easy to see by considering D[m]⊕Hom(D[m],detρ
m
)
that τ has the same number of eigenvalues equal to +1 as equal to?1inD[m],
whence #(T
m
/p)[m]=#(T/m),This shows that D[m]
+

→D[m]
similarequal T/m as
required.
Now we consider the case where?
(p)
is trivial mod m,This case was
treated (but only for the group Γ
0
(Np) and ρ
m
‘new’ at p—–the crucial re-
striction being the last one) in [M Ri],Let X
1
(N,p)
/Q
be the modular curve
corresponding to Γ
1
(N)∩Γ
0
(p) and let J
1
(N,p) be its Jacobian,Then since
the composite of natural maps J
1
(N,p) → J
1
(Np) → J
1
(N,p) is multiplication
by an integer prime to p and since?
(p)
is trivial mod m we see that
J
1
(N,p)
m
(Q) similarequal J
1
(Np)
m
(Q).
It will be enough then to use J
1
(N,p),and the corresponding ring T and ideal
m.
The curve X
1
(N,p) has a canonical model X
1
(N,p)
/Z
p
which over F
p
consists of two smooth curves Σ
′et
and Σ
μ
intersecting transversally at the
supersingular points (again this is a theorem of Deligne and Rapoport; cf.
[DR,Ch,6,Th,6.9],[KM] or [MW1] for more details),We will use the models
described in [MW1,Ch,II] and in particular the cusp ∞ will lie on Σ
μ
,Let
denote the sheaf of regular di?erentials on X
1
(N,p)
/F
p
(cf,[DR,Ch,1 §2],
[M Ri,§7]),OverF
p
,since X
1
(N,p)
/F
p
has ordinary double point singularities,
the di?erentials may be identi?ed with the meromorphic di?erentials on the
normalization X
1
tildewider
(N,p)
/F
p

′et
∪Σ
μ
which have at most simple poles at the
supersingular points (the intersection points of the two components) and satisfy
res
x
1
+ res
x
2
=0ifx
1
and x
2
are the two points above such a supersingular
point,We need the following lemma:
Lemma 2.2,dim
T/m
H
0
(X
1
(N,p)
/F
p
,?)[m]=1.
Proof,First we remark that the action of the Hecke operator U
p
here is
most conveniently de?ned using an extension from characteristic zero,This is
explained below,We will?rst show that dim
T/m
H
0
(X
1
(N,p)
/F
p
,?)[m] ≤ 1,
this being the essential step,If we embed T/m arrowhookleft→ F
p
and then set
m
prime
= ker,T?F
p
→ F
p
(the map given by t? a mapsto→ at mod m) then it is
enough to show that dim
F
p
H
0
(X
1
(N,p)
/F
p
,?)[m
prime
] ≤ 1,First we will suppose
486 ANDREW JOHN WILES
that there is no nonzero holomorphic di?erential in H
0
(X
1
(N,p)
/F
p
,?)[m
prime
],
i.e.,no di?erential form which pulls back to holomorphic di?erentials on Σ
′et
and Σ
μ
,Then if ω
1
and ω
2
are two di?erentials in H
0
(X
1
(N,p)
/F
p
,?)[m
prime
],
the q-expansion principle shows that μω
1
λω
2
has zero q-expansion at ∞ for
some pair (μ,λ) negationslash=(0,0) in F
2
p
and thus is zero on Σ
μ
.Asμω
1
λω
2
=0on
Σ
μ
it is holomorphic on Σ
′et
,By our hypothesis it would then be zero which
shows that ω
1
and ω
2
are linearly dependent.
This use of the q-expansion principle in characteristic p is crucial and due
to Mazur [Ma2],The point is simply that all the coe?cients in the q-expansion
are determined by elementary formulae from the coe?cient of q provided that
ω is an eigenform for all the Hecke operators,The formulae for the action of
these operators in characteristic p follow from the formulae in characteristic
zero,To see this formally (especially for the U
p
operator) one checks?rst
that H
0
(X
1
(N,p)
/Z
p
,?),where? denotes the sheaf of regular di?erentials on
X
1
(N,p)
/Z
p
,behaves well under the base changes Z
p
→ Z
p
and Z
p
→ Q
p;
cf,[Ma2,§II.3] or [Wi3,Prop,6.1],The action of the Hecke operators on
J
1
(N,p) induces an action on the connected component of the Neron model of
J
1
(N,p)
/Q
p
,so also on its tangent space and cotangent space,By Grothendieck
duality the cotangent space is isomorphic to H
0
(X
1
(N,p)
/Z
p
,?); see (2.5)
below,(For a summary of the duality statements used in this context,see
[Ma2,§II.3],For explicit duality over?elds see [AK,Ch,VIII].) This then
de?nes an action of the Hecke operators on this group,To check that over Q
p
this gives the standard action one uses the commutativity of the diagram after
Proposition 2.2 in [Mi1].
Now assume that there is a nonzero holomorphic di?erential in
H
0
(X
1
(N,p)
/F
p
,?)[m
prime
].
We claim that the space of holomorphic di?erentials then has dimension 1 and
that any such di?erential ω negationslash= 0 is actually nonzero on Σ
μ
,The dimension
claim follows from the second assertion by using the q-expansion principle,To
prove that ω negationslash= 0 on Σ
μ
we use the formula
U
p?
(x,y)=(Fx,y
prime
)
for (x,y) ∈ (Pic
0
Σ
′et
× Pic
0
Σ
μ
)(F
p
),where F denotes the Frobenius endo-
morphism,The value of y
prime
will not be needed,This formula is a variant
on the second part of Theorem 5.3 of [Wi3] where the corresponding re-
sult is proved for X
1
(Np),(A correction to the?rst part of Theorem 5.3
was noted in [MW1,p,188].) One check then that the action of U
p
on
X
0
= H
0

μ
,?
1
)⊕H
0

′et

1
) viewed as a subspace of H
0
(X
1
(N,p)
/F
p
,?)
is the same as the action on X
0
viewed as the cotangent space of Pic
0
Σ
μ
×
Pic
0
Σ
′et
,From this we see that if ω = 0 on Σ
μ
then U
p
ω = 0 on Σ
′et
,But U
p
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 487
acts as a nonzero scalar which gives a contradiction if ω negationslash= 0,We can thus as-
sume that the space of m
prime
-torsion holomorphic di?erentials has dimension 1 and
is generated by ω.Soifω
2
is now any di?erential in H
0
(X
1
(N,p)
/F
p
,?)[m
prime
]
then ω
2
λω has zero q-expansion at ∞ for some choice of λ,Then ω
2
λω =0
on Σ
μ
whence ω
2
λω is holomorphic and so ω
2
= λω,We have now shown
in general that dim(H
0
(X
1
(N,p)
/F
p
,?)[m
prime
]) ≤ 1.
The singularities of X
1
(N,p)
/Z
p
at the supersingular points are formally
isomorphic over
hatwidest
Z
unr
p
to
hatwidest
Z
unr
p
[[X,Y]]/(XY? p
k
) with k =1,2 or 3 [cf,[DR,
Ch,6,Th,6.9]),If we consider a minimal regular resolution M
1
(N,p)
/Z
p
then H
0
(M
1
(N,p)
/F
p
,?) similarequal H
0
(X
1
(N,p)
/F
p
,?) (see the argument in [Ma2,
Prop,3.4]),and a similar isomorphism holds for H
0
(M
1
(N,p)
/Z
p
,?).
As M
1
(N,p)
/Z
p
is regular,a theorem of Raynaud [Ray2] says that the
connected component of the Neron model of J
1
(N,p)
/Q
p
is J
1
(N,p)
0
/Z
p
similarequal
Pic
0
(M
1
(N,p)
/Z
p
),Taking tangent spaces at the origin,we obtain
(2.5) Tan(J
1
(N,p)
0
/Z
p
) similarequal H
1
(M
1
(N,p)
/Z
p
,O
M
1
(N,p)
).
Reducing both sides mod p and applying Grothendieck duality we get an iso-
morphism
(2.6) Tan(J
1
(N,p)
0
/F
p
)

→Hom(H
0
(X
1
(N,p)
/F
p
,?),F
p
).
(To justify the reduction in detail see the arguments in [Ma2,§II,3]),Since
Tan(J
1
(N,p)
0
/Z
p
) is a faithful T?Z
p
-module it follows that
H
0
(X
1
(N,p)
/F
p
,?)[m]
is nonzero,This completes the proof of the lemma,square
To complete the proof of the theorem we choose an abelian subvariety
A of J
1
(N,p) with multiplicative reduction at p,Speci?cally let A be the
connected part of the kernel of J
1
(N,p) → J
1
(N)×J
1
(N) under the natural
map described in Section 2 (see (2.10)),Then we have an exact sequence
0 → A → J
1
(N,p) → B → 0
and J
1
(N,p) has semistable reduction over Q
p
and B has good reduction.
By Proposition 1.3 of [Ma3] the corresponding sequence of connected group
schemes
0 → A[p]
0
/Z
p
→ J
1
(N,p)[p]
0
/Z
p
→ B[p]
0
/Z
p
→ 0
is also exact,and by Corollary 1.1 of the same proposition the corresponding
sequence of tangent spaces of Neron models is exact,Using this we may check
that the natural map
(2.7) Tan(J
1
(N,p)[p]
t
/F
p
)?
T
p
T
m
→ Tan(J
1
(N,p)
/F
p
)?
T
p
T
m
488 ANDREW JOHN WILES
is an isomorphism,where t denotes the maximal multiplicative-type subgroup
scheme (cf,[Ma3,§1]),For it is enough to check such a relation on A and B
separately and on B it is true because the m-divisible group is ordinary,This
follows from (2.2) by the theorem of Tate [Ta] as before.
Now (2.6) together with the lemma shows that
Tan(J
1
(N,p))
/Z
p
T
p
T
m
similarequalT
m
.
We claim that (2.7) together with this implies that as T
m
-modules
V,= J
1
(N,p)[p]
t
(Q
p
)
m
similarequal (T
m
/p).
To see this it is su?cient to exhibit an isomorphism of F
p
-vector spaces
(2.8) Tan(G
/F
p
) similarequal G(Q
p
)?
F
p
F
p
for any multiplicative-type group scheme (?nite and?at) G
/Z
p
which is killed
by p and moreover to give such an isomorphism that respects the action of
endomorphism of G
/Z
p
,To obtain such an isomorphism observe that we have
isomorphisms
Hom
Q
p

p
,G)?
F
p
F
p
similarequal Hom
F
p

p
,G)?
F
p
F
p
(2.9)
similarequal Hom
parenleftBig
Tan(μ
p
/F
p
),Tan(G
/F
p
)
parenrightBig
where Hom
Q
p
denotes homomorphisms of the group schemes viewed over Q
p
and similarly for Hom
F
p
,The second isomorphism can be checked by reducing
to the case G = μ
p
,Now picking a primitive p
th
root of unity we can iden-
tify the left-hand term in (2.9) with G(Q
p
)?
F
p
F
p
,Picking an isomorphism of
Tan(μ
p/F
p
) with F
p
we can identify the last term in (2.9) with Tan(G
/F
p
).
Thus after these choices are made we have an isomorphism in (2.8) which
respects the action of endomorphisms of G.
On the other hand the action of Gal(Q
p
/Q
p
)onV is rami?ed on every
subquotient,so V?D
0
[p],(Note that our assumption that?
(p)
is trivial
mod m implies that the action on D
0
[p] is rami?ed on every subquotient and
on D
E
[p] is unrami?ed on every subquotient.) By again examining A and B
separately we see that in fact V = D
0
[p],For A we note that A[p]/A[p]
t
is
unrami?ed because it is dual to
A[p]
t
where
A is the dual abelian variety,We
can now proceed as we did in the case where?
(p)
was nontrivial mod m,square
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 489
2,Congruences between Hecke rings
Suppose that q is a prime not dividing N,Let Γ
1
(N,q)=Γ
1
(N)∩Γ
0
(q)
and let X
1
(N,q)=X
1
(N,q)
/Q
be the corresponding curve,The two natural
maps X
1
(N,q) → X
1
(N) induced by the maps z → z and z → qz on the
upper half plane permit us to de?ne a map J
1
(N)×J
1
(N) → J
1
(N,q),Using
a theorem of Ihara,Ribet shows that this map is injective (cf,[Ri2,Cor,4.2]).
Thus we can de?ne? by
(2.10) 0 → J
1
(N)×J
1
(N)
→ J
1
(N,q).
Dualizing,we de?ne B by
0 → B
ψ
→ J
1
(N,q)

→ J
1
(N)×J
1
(N) → 0.
Let T
1
(N,q) be the ring of endomorphisms of J
1
(N,q) generated by the
standard Hecke operators {T
l?
for l notbar Nq,U
l?
for l|Nq,〈a〉 = 〈a〉
for
(a,Nq)=1},One can check that U
p
preserves B either by an explicit calcu-
lation or by noting that B is the maximal abelian subvariety of J
1
(N,q) with
multiplicative reduction at q,We set J
2
= J
1
(N)×J
1
(N).
More generally,one can consider J
H
(N) and J
H
(N,q) in place of J
1
(N)
and J
1
(N,q) (where J
H
(N,q) corresponds to X
1
(N,q)/H) and we writeT
H
(N)
and T
H
(N,q) for the associated Hecke rings,In this case the corresponding
map? may have a kernel,However since the kernel of J
H
(N) → J
1
(N)does
not meet kerm for any maximal ideal m whose associated ρ
m
is irreducible,
the above sequence remain exact if we restrict to m
(q)
-divisible groups,m
(q)
being the maximal ideal associated to m of the ring T
(q)
H
(N,q) generated by
the standard Hecke operators but ommitting U
q
,With this minor modi?ca-
tion the proofs of the results below for H negationslash= 1 follow from the cases of full
level,We will use the same notation in the general case,Thus? is the map
J
2
= J
H
(N)
2
→ J
H
(N,q) induced by z → z and z → qz on the two factors,
and B = ker.(B will not be an abelian variety in general.)
The following lemma is a straightforward generalization of a lemma of
Ribet ([Ri2]),Let n
q
be an integer satisfying n
q
≡ q(N) and n
q
≡ 1(q),and
write 〈q〉 = 〈n
q
〉∈T
H
(Nq).
Lemma 2.3 (Ribet),ψ(B) ∩?(J
2
)
m
(q) =?(J
2
)[U
2
q
〈q〉]
m
(q) for irre-
ducible ρ
m
.
Proof,The left-hand side is (im? ∩ ker),so we compute?
1
(im? ∩
ker)=ker().
An explicit calculation shows that
=
bracketleftbigg
q +1 T
q
T
q
q +1
bracketrightbigg
on J
2
490 ANDREW JOHN WILES
where T
q
= T
q
·〈q〉
1
,The matrix action here is on the left,We also?nd that
on J
2
(2.11) U
q
=
bracketleftbigg
0?〈q〉
qT
q
bracketrightbigg
,
whence
(U
2
q
〈q〉) =
bracketleftbigg
〈q〉 0
T
q
〈q〉
bracketrightbigg
(),square
Now suppose that m is a maximal ideal of T
H
(N),p∈ m and ρ
m
is ir-
reducible,We will now give a slightly stronger result than that given in the
lemma in the special case q = p,(The case q negationslash= p we will also strengthen but
we will do this separately.) Assume the that pnotbarN and T
p
negationslash∈ m,Let a
p
be
the unit root of x
2
T
p
x + p〈p〉 =0inT
H
(N)
m
,We?rst de?ne a maximal
ideal m
p
of T
H
(N,p) with the same associated representation as m,To do this
consider the ring
S
1
= T
H
(N)[U
1
]/(U
2
1
T
p
U
1
+ p〈p〉)? End(J
H
(N)
2
)
where U
1
is the endomorphism of J
H
(N)
2
given by the matrix
bracketleftbigg
T
p
〈p〉
p 0
bracketrightbigg
.
It is thus compatible with the action of U
p
on J
H
(N,p) when compared using
.Nowm
1
=(m,U
1
tildewidera
p
) is a maximal ideal of S
1
where tildewidera
p
is any element
of T
H
(N) representing the class ˉa
p
∈ T
H
(N)
m
/m similarequal T
H
(N)/m,Moreover
S
1,m
1
similarequalT
H
(N)
m
and we let m
p
be the inverse image of m
1
in T
H
(N,p) under
the natural map T
H
(N,p) → S
1
,One checks that m
p
id D
p
-distinguished,For
any standard Hecke operator t except U
p
(i.e.,t = T
l
,U
q
prime for q
prime
negationslash= p or 〈a〉) the
image of t is t,The image of U
p
is U
1
.
We need to check that the induced map
α,T
H
(N,p)
m
p
→ S
1,m
1
similarequalT
H
(N)
m
is surjective,The only problem is to show that T
p
is in the image,In the present
context one can prove this using the surjectivity of in (2.12) and using the
fact that the Tate-modules in the range and domain of are free of rank 2 by
Corollary 1 to Theorem 2.1,The result then follows from Nakayama’s lemma as
one deduces easily thatT
H
(N)
m
is a cyclicT
H
(N,p)
m
p
-module,This argument
was suggested by Diamond,A second argument using representations can be
found at the end of Proposition 2.15,We will now give a third and more direct
proof due to Ribet (cf,[Ri4,Prop,2]) but found independently and shown to
us by Diamond.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 491
For the following lemma we letT
M
,for an integer M,denote the subring of
End
parenleftBig
S
2

1
(N))
parenrightBig
generated by the Hecke operators T
n
for positive integers n
relatively prime to M,Here S
2
parenleftBig
Γ
1
(N)
parenrightBig
denotes the vector space of weight 2
cusp forms on Γ
1
(N),Write T for T
1
,It will be enough to show that T
p
is
a redundant operator in T
1
,i.e.,that T
p
= T,The result for T
H
(N)
m
then
follows.
Lemma (Ribet),Suppose that (M,N)=1,If M is odd then T
M
= T.
If M iseventhen T
M
has?niteindexin T equaltoapowerof 2.
As the rings are?nitely generated free Z-modules,it su?ces to prove that
T
M
F
l
→ T?F
l
is surjective unless l and M are both even,The claim
follows from
1,T
M
F
l
→T
M/p
F
l
is surjective if p|M and pnotbarlN.
2,T
l
F
l
→T?F
l
is surjective if lnotbar2N.
Proofof 1,Let A denote the Tate module Ta
l
(J
1
(N)),Then R = T
M/p
Z
l
acts faithfully on A,Let R
prime
=(R?
Z
l
Q
l
) ∩ End
Z
l
A and choose d so that
l
d
R
prime
lR,Consider the Gal(
ˉ
Q/Q)-module B = J
1
(N)[l
d
] × μ
Nl
d.By
ˇ
Cebotarev density,there is a prime q not dividing MNlso that Frobp = Frobq
on B,Using the fact that T
r
= Frobr + 〈r〉r(Frobr)
1
on A for r = p and
r = q,we see that T
p
= T
q
on J
1
(N)[l
d
],It follows that T
p
T
q
is in l
d
End
Z
l
A
and therefore in l
d
R
prime
lR.
Proofof2,Let S be the set of cusp forms in S
2

1
(N)) whose q-expansions
at∞ have coe?cients inZ,Recall that S
2

1
(N)) = S?Cand that S is stable
under the action of T (cf,[Sh1,Ch,3] and [Hi4,§4]),The pairing T?S →Z
de?ned by T? f mapsto→ a
1
(Tf) is easily checked to induce an isomorphism of
T-modules
S

= Hom
Z
(T,Z).
The surjectivity of T
l
/lT
l
→T/lT is equivalent to the injectivity of the dual
map
Hom(T,F
l
) → Hom(T
l
,F
l
).
Now use the isomorphism S/lS

= Hom(T,F
l
) and note that if f is in the
kernel of S → Hom(T
l
,F
l
),then a
n
(f)=a
1
(T
n
f) is divisible by l for all n
prime to l,But then the mod l form de?ned by f is in the kernel of the operator
q
d
dq
,and is therefore trivial if l is odd,(See Corollary 5 of the main theorem
of [Ka].) Therefore f is in lS.
Remark,The argument does not prove that T
Md
= T
d
if (d,N) negationslash=1.
492 ANDREW JOHN WILES
We now return to the assumptions that ρ
m
is irreducible,p notbar N and
T
p
negationslash∈ m,Next we de?ne a principal ideal (?
p
)ofT
H
(N)
m
as follows,Since
T
H
(N,p)
m
p
and T
H
(N)
m
are both Gorenstein rings (by Corollary 2 of Theo-
rem 2.1) we can de?ne an adjoint?α to
α,T
H
(N,p)
m
p
→ S
1,m
1
similarequalT
H
(N)
m
in the manner described in the appendix and we set?
p
=(αα)(1),Then
(?
p
) is independent of the choice of (Hecke-module) pairings on T
H
(N,p)
m
p
and T
H
(N)
m
,It is equal to the ideal generated by any composite map
T
H
(N)
m
β
→ T
H
(N,p)
m
p
α
→ T
H
(N)
m
provided that β is an injective map ofT
H
(N,p)
m
p
-modules withZ
p
torsion-free
cokernel,(The module structure on T
H
(N)
m
is de?ned via α.)
Proposition 2.4,Assume that m is D
p
-distinguished and that ρ
m
is
irreducibleoflevel N with pnotbarN,Then
(?
p
)=
parenleftBig
T
2
p
〈p〉(1 + p)
2
parenrightBig
=(a
2
p
〈p〉).
Proof,Consider the maps on p-adic Tate-modules induced by? and:
Ta
p
parenleftBig
J
H
(N)
2
parenrightBig
→ Ta
p
parenleftBig
J
H
(N,p)
parenrightBig
hatwide?
→ Ta
p
parenleftBig
J
H
(N)
2
parenrightBig
.
These maps commute with the standard Hecke operators with the exception
of T
p
or U
p
(which are not even de?ned on all the terms),We de?ne
S
2
= T
H
(N)[U
2
]/(U
2
2
T
p
U
2
+ p〈p〉)? End
parenleftBig
J
H
(N)
2
parenrightBig
where U
2
is the endomorphism of J
H
(N)
2
de?ned by (
0
p
〈p〉
T
p
),It satis?es
U
2
= U
p
,Again m
2
=(m,U
2
tildewidera
p
) is a maximal ideal of S
2
and we have,
on restricting to the m
1
,m
p
and m
2
-adic Tate-modules:
(2.12)
Ta
m
2
parenleftBig
J
H
(N)
2
parenrightBig
→ Ta
m
p
parenleftBig
J
H
(N,p)
parenrightBig
hatwide?
→ Ta
m
1
parenleftBig
J
H
(N)
2
parenrightBig
↑wreathproduct v
2
↑wreathproduct v
1
Ta
m
parenleftBig
J
H
(N)
parenrightBig
Ta
m
parenleftBig
J
H
(N)
parenrightBig
.
The vertical isomorphisms are de?ned by v
2
,x → (?〈p〉x,a
p
x) and v
1
,x →
(a
p
x,px),(Here a
p
∈ T
H
(N)
m
can be viewed as an element of T
H
(N)
p
similarequal
producttext
T
H
(N)
n
where the product is taken over the maximal ideals containing
p.Sov
1
and v
2
can be viewed as maps to Ta
p
parenleftBig
J
H
(N)
2
parenrightBig
whose images are
respectively Ta
m
1
parenleftBig
J
H
(N)
2
parenrightBig
and Ta
m
2
parenleftBig
J
H
(N)
2
parenrightBig
.)
Now hatwide? is surjective and? is injective with torsion-free cokernel by the re-
sult of Ribet mentioned before,Also Ta
m
parenleftBig
J
H
(N)
parenrightBig
similarequal T
H
(N)
2
m
and
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 493
Ta
m
p
parenleftBig
J
H
(N,p)
parenrightBig
similarequal T
H
(N,p)
2
m
p
by Corollary 1 to Theorem 2.1,So as?,hatwide?
are maps of T
H
(N,p)
m
p
-modules we can use this diagram to compute?
p
as
remarked just prior to the statement of the proposition,(The compatibility of
the U
p
actions requires that,on identifying the completions S
1,m
1
and S
2,m
2
with T
H
(N)
m
,we get U
1
= U
2
which is indeed the case.) We?nd that
v
1
1
hatwidev
2
(z)=a
1
p
(a
2
p
〈p〉)(z).
square
We now apply to J
1
(N,q
2
) (but q negationslash= p) the same analysis that we have just
applied to J
1
(N,q
2
),Here X
1
(A,B) is the curve corresponding to Γ
1
(A)∩Γ
0
(B)
and J
1
(A,B) its Jacobian,First we need the analogue of Ihara’s result,It is
convenient to work in a slightly more general setting,Let us denote the maps
X
1
(Nq
r?1
,q
r
) → X
1
(Nq
r?1
) induced by z → z and z → qz by π
1,r
and π
2,r
respectively,Similarly we denote the maps X
1
(Nq
r
,q
r+1
) → X
1
(Nq
r
) induced
by z → z and z → qz by π
3,r
and π
4,r
respectively,Also let π,X
1
(Nq
r
) →
X
1
(Nq
r?1
,q
r
) denote the natural map induced by z → z.
In the following lemma if m is a maximal ideal of T
1
(Nq
r?1
)orT
1
(Nq
r
)
we use m
(q)
to denote the maximal ideal of T
(q)
1
(Nq
r
,q
r+1
) compatible with
m,the ring T
(q)
1
(Nq
r
,q
r+1
)? T
1
(Nq
r
,q
r+1
) being the subring obtained by
omitting U
q
from the list of generators.
Lemma 2.5,If q negationslash= p is a prime and r ≥ 1 then the sequence of abelian
varieties
0 → J
1
(Nq
r?1
)
ξ
1
→ J
1
(Nq
r
)×J
1
(Nq
r
)
ξ
2
→ J
1
(Nq
r
,q
r+1
)
where ξ
1
=
parenleftBig

1,r
π)
,?(π
2,r
π)
parenrightBig
and ξ
2
=(π
4,r

3,r
) induces a corre-
sponding sequence of p-divisible groups which becomes exact when localized at
any m
(q)
forwhich ρ
m
isirreducible.
Proof,Let Γ
1
(Nq
r
) denote the group
braceleftBig
parenleftbig
(
a
c
b
d
)
parenrightbig
∈ Γ
1
(N):a ≡ d ≡ 1(q
r
),
c ≡ 0(q
r?1
),b≡ 0(q)
bracerightBig
,Let B
1
and B
1
be given by
B
1

1
(Nq
r
)/Γ
1
(Nq
r
)∩Γ(q),B
1

1
(Nq
r
)/Γ
1
(Nq
r
)∩Γ(q)
and let?
q

1
(Nq
r?1
)/Γ
1
(Nq
r
)∩Γ(q),Thus?
q
similarequal SL
2
(Z/q)ifr = 1 and
is of order a power of q if r>1.
The exact sequences of in?ation-restriction give:
H
1

1
(Nq
r
),Q
p
/Z
p
)
λ
1

→ H
1

1
(Nq
r
)∩Γ(q),Q
p
/Z
p
)
B
1
,
together with a similar isomorphism with λ
1
replacing λ
1
and B
1
replacing B
1
.
We also obtain
H
1

1
(Nq
r?1
),Q
p
/Z
p
)

→ H
1

1
(Nq
r
)∩Γ(q),Q
p
/Z
p
)
q
.
494 ANDREW JOHN WILES
The vanishing of H
2
(SL
2
(Z/q),Q
p
/Z
p
) can be checked by restricting to the
Sylow p-subgroup which is cyclic,Note that imλ
1
∩imλ
1
H
1

1
(Nq
r
)∩Γ(q),
Q
p
/Z
p
)
q
since B
1
and B
1
together generate?
q
,Now consider the sequence
0

H
1

1
(Nq
r?1
),Q
p
/Z
p
)(2.13)
res
1
⊕?res
1

H
1

1
(Nq
r
),Q
p
/Z
p
)⊕H
1

1
(Nq
r
),Q
p
/Z
p
)
λ
1
⊕λ
1

H
1

1
(Nq
r
)∩Γ(q),Q
p
/Z
p
).
We claim it is exact,To check this,suppose that λ
1
(x)=?λ
1
(y),Then
λ
1
(x) ∈ H
1

1
(Nq
r
) ∩ Γ(q),Q
p
/Z
p
)
q
,So λ
1
(x) is the restriction of an
x
prime
∈ H
1
parenleftBig
Γ
1
(Nq
r?1
),Q
p
/Z
p
parenrightBig
whence x? res
1
(x
prime
) ∈ kerλ
1
=0,It follows
also that y =?res
1
(x
prime
).
Now conjugation by the matrix (
q
0
0
1
) induces isomorphisms
Γ
1
(Nq
r
) similarequal Γ
1
(Nq
r
),Γ
1
(Nq
r
)∩Γ(q) similarequal Γ
1
(Nq
r
,q
r+1
).
So our sequence (2.13) yields the exact sequence of the lemma,except that we
have to change from group cohomology to the cohomology of the associated
complete curves,If the groups are torsion-free then the di?erence between
these cohomologies is Eisenstein (more precisely T
l
1?l for l ≡ 1modNq
r+1
is nilpotent) so will vanish when we localize at the preimage of m
(q)
in the
abstract Hecke ring generated as a polynomial ring by all the standard Hecke
operators excluding T
q
.IfM ≤ 3 then the group Γ
1
(M) has torsion,For
M =1,2,3 we can restrict to Γ(3),Γ(4),Γ(3),respectively,where the co-
homology is Eisenstein as the corresponding curves have genus zero and the
groups are torsion-free,Thus one only needs to check the action of the Hecke
operators on the kernels of the restriction maps in these three exceptional cases.
This can be done explicitly and again they are Eisenstein,This completes the
proof of the lemma,square
Let us denote the maps X
1
(N,q) → X
1
(N) induced by z → z and z → qz
by π
1
and π
2
respectively,Similarly we denote the maps X
1
(N,q
2
) → X
1
(N,q)
induced by z → z and z → qz by π
3
and π
4
respectively.
From the lemma (with r = 1) and Ihara’s result (2.10) we deduce that
there is a sequence
(2.14) 0 → J
1
(N)×J
1
(N)×J
1
(N)
ξ
→ J
1
(N,q
2
)
where ξ =(π
1
π
3
)
×(π
2
π
3
)
×(π
2
π
4
)
and that the induced map of p-
divisible groups becomes injective after localization at m
(q)
’s which correspond
to irreducible ρ
m
’s,By duality we obtain a sequence
J
1
(N,q
2
)
ξ
→ J
1
(N)
3
→ 0
which is ‘surjective’ on Tate modules in the same sense,More generally we
can prove analogous results for J
H
(N) and J
H
(N,q
2
) although there may be
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 495
a kernel of order divisible by p in J
H
(N) → J
1
(N),However this kernel will
not meet the m
(q)
-divisible group for any maximal ideal m
(q)
whose associated
ρ
m
is irreducible and hence,as in the earlier cases,will not a?ect the results if
after passing to p-divisible groups we localize at such an m
(q)
,We use the same
notation in the general case when H negationslash=1soξ is the map J
H
(N)
3
→ J
H
(N,q
2
).
We suppose now that m is a maximal ideal of T
H
(N) (as always with p ∈
m) associated to an irreducible representation and that q is a prime,pnotbarNp.
We now de?ne a maximal ideal m
q
of T
H
(N,q
2
) with the same associated
representation as m,To do this consider the ring
S
1
= T
H
(N)[U
1
]/U
1
(U
2
1
T
q
U
1
+ q〈q〉)? End
parenleftBig
J
H
(N)
3
parenrightBig
where the action of U
1
on J
H
(N)
3
is given by the matrix
T
q
〈q〉 0
q 00
0 q 0
.
Then U
1
satis?es the compatibility
hatwide
ξ?U
q
= U
1
hatwide
ξ.
One checks this using the actions on cotangent spaces,For we may identify
the cotangent spaces with spaces of cusp forms and with this identi?cation any
Hecke operator t
induces the usual action on cusp forms,There is a maximal
ideal m
1
=(U
1
,m)inS
1
and S
1,m
1
similarequalT
H
(N)
m
,We let m
q
denote the reciprocal
image of m
1
in T
H
(N,q
2
) under the natural map T
H
(N,q
2
) → S
1
.
Next we de?ne a principal ideal (?
prime
q
)ofT
H
(N)
m
using the fact that
T
H
(N,q
2
)
m
q
and T
H
(N)
m
are both Gorenstein rings (cf,Corollary 2 to The-
orem 2.1),Thus we set (?
prime
q
)=(hatwideα?α
prime
) where
α
prime
,T
H
(N,q
2
)
m
q
→ S
1,m
1
similarequalT
H
(N)
m
is the natural map and hatwideα
prime
is the adjoint with respect to selected Hecke-module
pairings on T
H
(N,q
2
)
m
q
and T
H
(N)
m
,Note that α
prime
is surjective,To show
that the T
q
operator is in the image one can use the existence of the associated
2-dimensional representation (cf,§1) in which T
q
= trace(Frob q) and apply
the
ˇ
Cebotarev density theorem.
Proposition 2.6,Suppose that frakm is a maximal ideal of T
H
(N)
associatedtoanirreducible ρ
m
,Supposealsothat qnotbarNp,Then
(?
prime
p
)=(q?1)(T
2
q
〈q〉(1 + q)
2
).
496 ANDREW JOHN WILES
Proof,We prove this in the same manner as we proved Proposition 2.4.
Consider the maps on p-adic Tate-modules induced by ξ and
hatwide
ξ:
(2.15) Ta
p
parenleftBig
J
H
(N)
3
parenrightBig
ξ
→ Ta
p
parenleftBig
J
H
(N,q
2
)
parenrightBig
hatwide
ξ
→ Ta
p
parenleftBig
J
H
(N)
3
parenrightBig
.
These maps commute with the standard Hecke operators with the exception
of T
q
and U
q
(which are not even de?ned on all the terms),We de?ne
S
2
= T
H
(N)[U
2
]/U
2
(U
2
2
T
q
U
2
+ q〈q〉)? End
parenleftBig
J
H
(N)
3
parenrightBig
where U
2
is the endomorphism of J
H
(N)
3
given by the matrix
00 0
q 0?〈q〉
0 qT
q
.
Then U
q
ξ = ξU
2
as one can verify by checking the equality (
hatwide
ξ?ξ)U
2
= U
1
(
hatwide
ξ?ξ)
because
hatwide
ξ? ξ is an isogeny,The formula for
hatwide
ξ? ξ is given below,Again
m
2
=(m,U
2
) is a maximal ideal of S
2
and S
2,m
2
similarequal T
H
(N)
m
,On restricting
(2.15) to the m
2
,m
q
and m
1
-adic Tate modules we get
(2.16)
Ta
m
2
(J
H
(N)
3
)
ξ
→ Ta
m
q
(J
H
(N,q
2
))
hatwide
ξ
→ Ta
m
1
(J
H
(N)
3
)
arrowtp
wreathproductu
2
arrowtp
wreathproductu
1
Ta
m
(J
H
(N)) Ta
m
(J
H
(N)).
The vertical isomorphisms are induced by u
2
,z → (〈q〉z,?T
q
z,qz) and u
1
:
z → (0,0,z),Now a calculation shows that on J
H
(N)
3
ξ?ξ =
q(q +1) T
q
·qT
2
q
〈q〉(1 + q)
T
q
·qq(q +1) T
q
·q
T
2
q
〈q〉
1
(1 + q) T
q
·qq(q +1)
where T
q
= 〈q〉
1
T
q
.
We compute then that
(u
1
1
hatwide
ξ?ξ?u
2
)=?〈q
1
〉(q?1)
parenleftBig
T
2
q
〈q〉(1 + q)
2
parenrightBig
.
Now using the surjectivity of
hatwide
ξ and that ξ has torsion-free cokernel in (2.16)
(by Lemma 2.5) and that Ta
m
parenleftBig
J
H
(N)
parenrightBig
and Ta
m
q
parenleftBig
J
H
(N,q
2
)
parenrightBig
are each free of
rank 2 over the respective Hecke rings (Corollary 1 of Theorem 2.1),we deduce
the result as in Proposition 2.4,square
There is one further (and completely elementary) generalization of this
result,We let π,X
H
(Nq,q
2
) → X
H
(N,q
2
) be the map given by z → z.
Then π
,J
H
(N,q
2
) → J
H
(Nq,q
2
) has kernel a cyclic group and as before
this will vanish when we localize at m
(q)
if m is associated to an irreducible
representation,(As before the superscript q denotes the omission of U
q
from
the list of generators of T
H
(Nq,q
2
) and m
(q)
denotes the maximal ideal of
T
(q)
H
(Nq,q
2
) compatible with m.)
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 497
We thus have a sequence (not necessarily exact)
0 → J
H
(N)
3
κ
→ J
H
(Nq,q
2
) → Z → 0
where κ = π
ξ which induces a corresponding sequence of p-divisible groups
which becomes exact when localized at an m
(q)
corresponding to an irreducible
ρ
m
,Here Z is the quotient abelian variety J
H
(Nq,q
2
)/imκ,As before there is
a natural surjective homomorphism
α,T
H
(Nq,q
2
)
m
q
→ S
1,m
1
similarequalT
H
(N)
m
where m
q
is the inverse image of m
1
in T
H
(Nq,q
2
),(We note that one can
replace T
H
(Nq,q
2
)byT
H
(Nq
2
) in the de?nition of α and Proposition 2.7
below would still hold unchanged.) Since both rings are again Gorenstein we
can de?ne an adjoint hatwideα and a principal ideal
(?
q
)=(α?hatwideα).
Proposition 2.7,Suppose that m is a maximal ideal of T = T
H
(N)
associatedtoanirreduciblerepresentation,Supposethat qnotbarNp,Then
(?
q
)=(q?1)
2
parenleftBig
T
2
q
〈q〉(1 + q)
2
parenrightBig
).
The proof is a trivial generalization of that of Proposition 2.6.
Remark 2.8,We have included the operator U
q
in the de?nition of T
m
q
=
T
H
(Nq,q
2
)
m
q
as in the application of the q-expansion principle it is important
to have all the Hecke operators,However U
q
=0inT
m
q
,To see this we recall
that the absolute values of the eigenvalues c(q,f)ofU
q
on newforms of level
Nq with q notbarN are known (cf,[Li]),They satisfy c(q,f)
2
= 〈q〉 in O
f
(the
ring of integers generated by the Fourier coe?cients of f)iff is on Γ
1
(N,q),
and |c(q,f)| = q
1/2
if f is on Γ
1
(Nq) but not on Γ
1
(N,q),Also when f is
a newform of level dividing N the roots of x
2
c(q,f)x + qχ
f
(q)=0have
absolute value q
1/2
where c(q,f) is the eigenvalue of T
q
and χ
f
(q)of〈q〉,Since
for f on Γ
1
(Nq,q
2
),U
q
f is a form on Γ
1
(Nq) we see that
U
q
(U
2
q
〈q〉)
productdisplay
f∈S
1
(U
q
c(q,f))
productdisplay
f∈S
2
parenleftBig
U
2
q
c(q,f)U
q
+ q〈q〉
parenrightBig
=0
in T
H
(Nq,q
2
)?C where S
1
is the set of newforms on Γ
1
(Nq) which are not
on Γ
1
(n,q) and S
2
is the set of newforms of level dividing N,In particular as
U
q
is in m
q
it must be zero in T
m
q
.
A slightly di?erent situation arises if m is a maximal ideal ofT = T
H
(N,q)
(q negationslash= p) which is not associated to any maximal ideal of level N (in the sense of
having the same associated ρ
m
),In this case we may use the map ξ
3
=(π
4

3
)
to give
(2.17) J
H
(N,q)×J
H
(N,q)
ξ
3
→ J
H
(N,q
2
)
ξ
3
→ J
H
(N,q)×J
H
(N,q).
498 ANDREW JOHN WILES
Then
ξ
3
ξ
3
is given by the matrix
ξ
3
ξ
3
=
bracketleftbigg
qU
q
U
q
q
bracketrightbigg
on J
H
(N,q)
2
,where U
q
= U
q
〈q〉
1
and U
2
q
= 〈q〉on the m-divisible group,The
second of these formulae is standard as mentioned above; cf,for example [Li,
Th,3],since ρ
m
is not associated to any maximal ideal of level N,For the?rst
consider any newform f of level divisible by q and observe that the Petersson
inner product
angbracketleftBig
(U
q
U
q
1)f(rz),f(mz)
angbracketrightBig
is zero for any r,m|(Nq/level f)
by [Li,Th,3],This shows that U
q
U
q
f(rz),a priori a linear combination of
f(m
i
z),is equal to f(rz),So U
q
U
q
= 1 on the space of forms on Γ
H
(N,q)
which are new at q,i.e,the space spanned by forms {f(sz)} where f runs
through newforms with q|level f,In particular U
q
preserves the m-divisible
group and satis?es the same relation on it,again because ρ
m
is not associated
to any maximal ideal of level N.
Remark 2.9,Assume that ρ
m
is of type (A) at q in the terminology of
Chapter 1,§1 (which ensures that ρ
m
does not occur at level N),In this
case T
m
= T
H
(N,q)
m
is already generated by the standard Hecke operators
with the omission of U
q
,To see this,consider the GL
2
(T
m
) representation of
Gal(Q/Q) associated to the m-adic Tate module of J
H
(N,q) (cf,the discussion
following Corollary 2 of Theorem 2.1),Then this representation is already
de?ned over the Z
p
-subalgebra T
tr
m
of T
m
generated by the traces of Frobenius
elements,i.e,by the T
lscript
for lscriptnotbarNqp,In particular 〈q〉∈T
tr
m
,Furthermore,as
T
tr
m
is local and complete,and as U
2
q
= 〈q〉,it is enough to solve X
2
= 〈q〉
in the residue?eld of T
tr
m
,But we can even do this in k
0
(the minimal?eld
of de?nition of ρ
m
) by letting X be the eigenvalue of Frob q on the unique
unrami?ed rank-one free quotient of k
2
0
and invoking the π
q
similarequal π(σ
q
) theorem
of Langlands (cf,[Ca1]),(It is to ensure that the unrami?ed quotient is free
of rank one that we assume ρ
m
to be of type (A).)
We assume now that ρ
m
is of type (A) at q,De?ne S
1
this time by setting
S
1
= T
H
(N,q)[U
1
]/U
1
(U
1
U
q
)? End
parenleftBig
J
H
(N,q)
2
parenrightBig
where U
1
is given by the matrix
(2.18) U
1
=
bracketleftbigg
0 q
0 U
q
bracketrightbigg
on J
H
(N,q)
2
,The map
hatwide
ξ
3
is not necessarily surjective and to remedy this we
introduce m
(q)
= m ∩T
(q)
H
(N,q) where T
(q)
H
(N,q) is the subring of T
H
(N,q)
generated by the standard Hecke operators but omitting U
q
,We also write m
(q)
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 499
for the corresponding maximal ideal of T
(q)
H
(Nq,q
2
),Then on m
(q)
-divisible
groups,
hatwide
ξ
3
and
hatwide
ξ
3
π
are surjective and we get a natural restriction map of
localizationT
H
(Nq,q
2
)
(m
(q)
)
→ S
1(m
(q)
)
,(Note that the image of U
q
under this
map is U
1
and not U
q
.) The ideal m
1
=(m,U
1
) is maximal in S
1
and so also
in S
1,(m
(q)
)
and we let m
q
denote the inverse image of m
1
under this restriction
map,The inverse image of m
q
in T
H
(Nq,q
2
) is also a maximal ideal which we
agin write m
q
,Since the completions T
H
(Nq,q
2
)
m
q
and S
1,m
1
similarequal T
H
(N,q)
m
are both Gorenstein rings (by Corollary 2 of Theorem 2.1) we can de?ne a
principal ideal (?
q
)ofT
H
(N,q)
m
by
(?
q
)=(α?hatwideα)
where α,T
H
(Nq,q
2
)
m
q
dblarrowheadright S
1,m
1
similarequal T(N,q)
m
is the restriction map induced
by the restriction map on m
(q)
-localizations described above.
Proposition 2.10,Suppose that m is a maximal ideal of T
H
(N,q)
associatedtoanirreducible m oftype (A).Then
(?
q
)=(q?1)
2
(q +1).
Proof,The method is a straightforward adaptation of that used for Propo-
sitions 2.4 and 2.6,We let S
2
= T
H
(N,q)[U
2
]/U
2
(U
2
U
q
) be the ring of
endomorphisms of J
H
(N,q)
2
where U
2
is given by the matrix
bracketleftbigg
U
q
q
00
bracketrightbigg
.
This satis?es the compatability ξ
3
U
2
= U
q
ξ
3
,We de?ne m
2
=(m,U
2
)inS
2
and observe that S
2
,m
2
similarequalT
H
(N,q)
m
.
Then we have maps
Ta
m
2
parenleftBig
J
H
(N,q)
2
parenrightBig
π
ξ
3
arrowhookleft→ Ta
m
q
parenleftBig
J
H
(Nq,q
2
)
parenrightBig
ξ
3
π
dblarrowheadright Ta
m
1
parenleftBig
J
H
(N,q)
2
parenrightBig
↑wreathproductv
2
↑wreathproductv
1
Ta
m
parenleftBig
J
H
(N,q)
parenrightBig
Ta
m
parenleftBig
J
H
(N,q)
parenrightBig
.
The maps v
1
and v
2
are given by v
2
,z → (?qz,a
q
z) and v
1
,z → (z,0)
where U
q
= a
q
in T
H
(N,q)
m
,One checks then that v
1
1
(
ξ
3
π
)?(π
ξ
3
)?v
2
is equal to?(q?1)(q
2
1) or?
1
2
(q?1)(q
2
1).
The surjectivity of
hatwide
ξ
3
π
on the completions is equivalent to the statement
that
J
H
(Nq,q
2
)[p]
m
q
→ J
H
(N,q)
2
[p]
m
1
is surjective,We can replace this condition by a similar one with m
(q)
substi-
tuted for m
q
and for m
1
,i.e.,the surjectivity of
J
H
(Nq,q
2
)[p]
m
(q) → J
H
(N,q)
2
[p]
m
(q).
500 ANDREW JOHN WILES
By our hypothesis that ρ
m
be of type (A) at q it is even su?cient to show that
the cokernel of J
H
(Nq,q
2
)[p]?F
p
→ J
H
(N,q)
2
[p]?F
p
has no subquotient as
a Galois-module which is irreducible,two-dimensional and rami?ed at q,This
statement,or rather its dual,follows from Lemma 2.5,The injectivity of π
ξ
3
on the completions and the fact that it has torsion-free cokernel also follows
from Lemma 2.5 and our hypothesis that ρ
m
be of type (A) at q,square
The case that corresponds to type (B) is similar,We assume in the anal-
ysis of type (B) (and also of type (C) below) that H decomposes as ΠH
q
as
described at the beginning of Section 1,We assume that m is a maximal ideal
of T
H
(Nq
r
) where H contains the Sylow p-subgroup S
p
of (Z/q
r
Z)
and that
(2.19) ρ
m
vextendsingle
vextendsingle
vextendsingle
I
q

parenleftbigg
χ
q
1
parenrightbigg
for a suitable choice of basis with χ
q
negationslash= 1 and condχ
q
= q
r
,Here qnotbarNp and
we assume also that ρ
m
is irreducible,We use the sequence
J
H
(Nq
r
)×J
H
(Nq
r
)

prime
)
ξ
2
→J
H
prime(Nq
r
,q
r+1
)
ξ
2
π
prime
→J
H
(Nq
r
)×J
H
(Nq
r
)
de?ned analogously to (2.17) where ξ
2
was as de?ned in Lemma 2.5 and where
H
prime
is de?ned as follows,Using the notation H =ΠH
l
as at the beginning of
Section 1 set H
prime
l
= H
l
for l negationslash= q and H
prime
q
×S
p
= H
q
,Then de?ne H
prime
=ΠH
prime
l
and
let π
prime
,X
H
prime(Nq
r
,q
r+1
) → X
H
(Nq
r
,q
r+1
) be the natural map z → z,Using
Lemma 2.5 we check that ξ
2
is injective on the m
(q)
-divisible group,Again we
set S
1
= T
H
(Nq
r
)[U
1
]/U
1
(U
1
U
q
)? End(J
H
parenleftBig
Nq
r
)
2
parenrightBig
where U
1
is given by
the matrix in (2.18),We de?ne m
1
=(m,U
1
) and let m
q
be the inverse image
of m
1
in T
H
prime(Nq
r
,q
r+1
),The natural map (in which U
q
→ U
1
)
α,T
H
prime(Nq
r
,q
r+1
)
m
q
→ S
1,m
1
similarequalT
H
(Nq
r
)
m
is surjective by the following remark.
Remark2.11,When we assume that ρ
m
is of type (B) then the U
q
operator
is redundant in T
m
= T
H
(Nq
r
)
m
,To see this,?rst assume that T
m
is reduced
and consider the GL
2
(T
m
) representation of Gal(Q/Q) associated to the m-
adic Tate module,Pick a σ
q
∈ I
q
,the inertia group in D
q
in Gal(Q/Q),such
that χ
q

q
) negationslash=1,Then because the eigenvalues of σ
q
are distinct mod m we can
diagonalize the representation with respect to σ
q
,If Frobq is a Frobenius in D
q
,
then in the GL
2
(T
m
) representation the image of Frob q normalizes I
q
and we
can recover U
q
as the entry of the matrix giving the value of Frob q on the unit
eigenvector for σ
q
,This is by the π
q
similarequal π(σ
q
) theorem of Langlands as before
(cf,[Ca1]) applied to each of the representations obtained from maps T
m

O
f,λ
,Since the representation is de?ned over the Z
p
-algebra T
tr
m
generated by
the traces,the same reasoning applied to T
tr
m
shows that U
q
∈T
tr
m
.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 501
If T
m
is not reduced the above argument shows only that there is an
operator v
q
∈ T
tr
m
such that (U
q
v
q
) is nilpotent,Now T
H
(Nq
r
) can be
viewed as a ring of endomorphisms of S
2

H
(Nq
r
)),the space of cusp forms
of weight 2 on Γ
H
(Nq
r
),There is a restriction map T
H
(Nq
r
) →T
H
(Nq
r
)
new
where T
H
(Nq
r
)
new
is the image of T
H
(Nq
r
) in the ring of endomorphisms of
S
2

H
(Nq
r
))/S
2

H
(Nq
r
))
odd
,the old part being de?ned as the sum of two
copies of S
2

H
(Nq
r?1
)) mapped via z → z and z → qz,One sees that on
m-completions T
m
similarequal (T
H
(Nq
r
)
new
)
m
since the conductor of ρ
m
is divisible by
q
r
,It follows that U
q
∈T
m
satis?es an equation of the form P(U
q
) = 0 where
P(x) is a polynomial with coe?cients in W(k
m
) and with distinct roots,By
extending scalars to O (the integers of a local?eld containing W(k
m
)) we can
assume that the roots lie in T similarequalT
m
W(k
m
)
O.
Since (U
q
v
q
) is nilpotent it follows that P(v
q
)
r
= 0 for some r,Then
since v
q
∈T
tr
m
which is reduced,P(v
q
)=0,Now consider the map T → ΠT
(p)
where the product is taken over the localizations of T at the minimal primes
p of T,The map is injective since the associated primes of the kernel are all
maximal,whence the kernel is of?nite cardinality and hence zero,Now in
each T
(p)
,U
q
= α
i
and v
q
= α
j
for roots α
i

j
of P(x) = 0 because the roots
are distinct,Since U
q
v
q
∈ p for each p it follows that α
i
= α
j
for each p
whence U
q
= v
q
in each T
(p)
,Hence U
q
= v
q
in T also and this?nally shows
that U
q
∈T
tr
m
in general.
We can therefore de?ne a principal ideal
(?
q
)=(α?hatwideα)
using,as previously,that the ringsT
H
prime(Nq
r
,q
r+1
)
m
q
andT
H
(Nq
r
)
m
are Goren-
stein,We compute (?
q
) in a similar manner to the type (A) case,but using
this time that U
q
U
q
= q on the space of forms on Γ
H
(Nq
r
) which are new at
q,i.e.,the space spanned by forms {f(sz)} where f runs through newforms
with q
r
|levelf,To see this let f be any newform of level divisible by q
r
and
observe that the Petersson inner product
angbracketleftBig
(U
q
U
q
q)f(rz),f(mz)
angbracketrightBig
= 0 for
any m|(Nq
r
/level f) by [Li,Th,3(ii)],This shows that (U
q
U
q
q)f(rz),
a priori a linear combination of {f(m
i
z)},is zero,We obtain the following
result.
Proposition 2.12,Suppose that m is a maximal ideal of T
H
(Nq
r
)
associatedtoanirreducible ρ
m
oftype (B) at q,i.e.,satisfying (2.19) including
thehypothesisthat H cantains S
p
,(Again qnotbarNp.) Then
(?
q
)=
parenleftBig
(q?1)
2
parenrightBig
.
Finally we have the case where ρ
m
is of type (C) at q,We assume then
that m is a maximal ideal of T
H
(Nq
r
) where H contains the Sylow p-subgroup
502 ANDREW JOHN WILES
S
p
of (Z/q
r
Z)
and that
(2.20) H
1
(Q
q
,W
λ
)=0
where W
λ
is de?ned as in (1.6) but with ρ
m
replacing ρ
0
,i.e.,W
λ
=ad
0
ρ
m
.
This time we let m
q
be the inverse image of m in T
H
prime(Nq
r
) under the
natural restriction map T
H
prime(Nq
r
)?→ T
H
(Nq
r
) with H
prime
de?ned as in the
case of type B,We set
(?
q
)=(αα)
where α,T
H
prime(Nq
r
)
m
q
dblarrowheadrightT
H
(Nq
r
)
m
is the induced map on the completions,
which as before are Gorenstein rings,The proof of the following proposition
is analogous (but simpler) to the proof of Proposition 2.10,(Notice that the
proposition does not require the condition that ρ
m
satisfy (2.20) but this is the
case in which we will use it.)
Proposition 2.13,Suppose that m is a maximal of T
H
(Nq
r
) asso-
ciatedtoanirreducibleρ
m
withH containingtheSylowp-subgroupof(Z/q
r
Z)
.
Then
(?
q
)=(q?1).
Finally,in this section we state Proposition 2.4 in the case q negationslash= p as this
will be used in Chapter 3,Let q be a prime,qnotbarNpand let S
1
denote the ring
(2.21) T
H
(N)[U
1
]/{U
2
1
T
q
U
1
+〈q〉q}?End(J
H
(N)
2
)
where,J
H
(N,q) → J
H
(N)
2
is the map de?ned after (2.10) and U
1
is the
matrix
bracketleftbigg
T
q
〈q〉
q 0
bracketrightbigg
.
Thus,U
q
= U
1
,Also 〈q〉 is de?ned as 〈n
q
〉 where n
q
≡ q(N),n
q
≡ 1(q).
Let m
1
be a maximal ideal of S
1
containing the image of m,where m is a
maximal ideal of T
H
(N) with associated irreducible ρ
m
,We will also assume
that ρ
m
(Frob q) has distinct eigenvalues,(We will only need this case and
it simpli?es the exposition.) Let m
q
denote the corresponding maximal ide-
als of T
H
(N,q) and T
H
(Nq) under the natural restriction maps T
H
(Nq) →
T
H
(N,q) → S
1
,The corresponding maps on completions are
T
H
(Nq)
m
q
β
→ T
H
(N,q)
m
q
(2.22)
α
→ S
1,m
1
similarequalT
H
(N)
m
W(k
m
)
W(k
+
)
where k
+
is the extension of k
m
generated by the eigenvalues of {ρ
m
(Frobq)}.
That k
+
is either equal to k
m
or its quadratic extension,The maps β,α are
surjective,the latter because T
q
is a trace in the 2-dimensional representation
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 503
to GL
2
(T
H
(N)
m
) given after Theorem 2.1 and hence is ‘redundant’ by the
ˇ
Cebotarev density theorem,The completions are Gorenstein by Corollary 2 to
Theorem 2.1 and so we de?ne invariant ideals of S
1,m
1
(2.23) (?) = (αα),(?
prime
)=(α?β)?(
hatwide
α?β).
Let α
q
be the image of U
1
inT
H
(N)
m
W(k
m
)
W(k
+
) under the last isomorphism
in (2.22),The proof of Proposition 2.4 yields
Proposition 2.4
prime
,Suppose that ρ
m
is irreducible where m is a maximal
idealof T
H
(N) andthat ρ
m
(Frobq) hasdistincteigenvalues,Then
(?)=(α
2
q
〈q〉),
(?
prime
)=(α
2
q
〈q〉)(q?1).
Remark,Note that if we suppose also that q ≡ 1(p) then (?) is the unit
ideal and α is an isomorphism in (2.22).
3,The main conjectures
As we suggested in Chapter 1,in order to study the deformation theory
of ρ
0
in detail we need to assume that it is modular,That this should always
be so for detρ
0
odd was conjectured by Serre,Serre also made a conjecture
(the ‘ε’-conjecture) making precise where one could?nd a lifting of ρ
0
once
one assumed it to be modular (cf,[Se]),This has now been proved by the
combined e?orts of a number of authors including Ribet,Mazur,Carayol,
Edixhoven and others,The most di?cult step was to show that if ρ
0
was
unrami?ed at a prime l then one could?nd a lifting in which l did not divide
the level,This was proved (in slightly less generality) by Ribet,For a precise
statement and complete references we refer to Diamond’s paper [Dia] which
removed the last restrictions referred to in Ribet’s survey article [Ri3],The
following is a minor adaptation of the epsilon conjecture to our situation which
can be found in [Dia,Th,6.4],(We wish to use weight 2 only.) Let N(ρ
0
)be
the prime to p part of the conductor of ρ
0
as de?ned for example in [Se].
Theorem 2.14,Suppose that ρ
0
is modular and satis?es (1.1) (so in
particularisirreducible) andisoftype D =(·,Σ,O,M) with · =Se,str or?.
Suppose that at least one of the following conditions holds (i) p>3 or (ii) ρ
0
is not induced from a character of Q(

3),Then there exists a newform f
of weight 2 and a prime λ of O
f
such that ρ
f,λ
is of type D
prime
=(·,Σ,O
prime
,M)
for some O
prime
,and such that (ρ
f,λ
modλ) similarequal ρ
0
over F
p
,Moreover we can
assumethat f hascharacter χ
f
oforderprimeto p andhaslevel N(ρ
0
)p
δ(ρ
0
)
504 ANDREW JOHN WILES
where δ(ρ
0
)=0if ρ
0
|
D
p
is associated to a?nite?at group scheme over Z
p
and detρ
0
vextendsingle
vextendsingle
vextendsingle
I
p
= ω,and δ(ρ
0
)=1otherwise,Furthermore in the Selmer case
we can assume that a
p
(f) ≡ χ
2
(Frob p)modλ in the notation of (1.2) where
a
p
(f) istheeigenvalueof U
p
.
For the rest of this chapter we will assume that ρ
0
is modular and that
if p = 3 then ρ
0
is not induced from a character of Q(

3),Here and in the
rest of the paper we use the term ‘induced’ to signify that the representation
is induced after an extension of scalars to the algebraic closure.
For each D = {·,Σ,O,M} we will now de?ne a Hecke ring T
D
except
where · is unrestricted,Suppose?rst that we are in the?at,Slemer or strict
cases,Recall that when referring to the?at case we assume that ρ
0
is not
ordinary and that detρ
0
|
I
p
= ω,Suppose that Σ = {q
i
} and that N(ρ
0
)=
Πq
s
i
i
with s
i
≥ 0,If U
λ
similarequal k
2
is the representation space of ρ
0
we set n
q
=
dim
k
(U
λ
)
I
q
where I
q
in the inertia group at q,De?ne M
0
and M by
(2.24) M
0
= N(ρ
0
)
productdisplay
n
q
i
=1
q
i
negationslash∈M∪{p}
q
i
·
productdisplay
n
q
i
=2
q
2
i
,M= M
0
p
τ(ρ
0
)
where τ(ρ
0
)=1ifρ
0
is ordinary and τ(ρ
0
) = 0 otherwise,Let H be the
subgroup of (Z/MZ)
generated by the Sylow p-subgroup of (Z/q
i
Z)
for each
q
i
∈Mas well as by all of (Z/q
i
Z)
for each q
i
∈Mof type (A),Let T
prime
H
(M)
denote the ring generated by the standard Hecke operators {T
l
for lnotbarMp,〈a〉
for (a,Mp)=1},Let m
prime
denote the maximal ideal of T
prime
H
(M) associated to the
f and λ given in the theorem and let k
m
prime be the residue?eld T
prime
H
(M)/m,Note
that m
prime
does not depend on the particular choice of pair (f,λ) in theorem 2.14.
Then k
m
prime similarequal k
0
where k
0
is the smallest possible?eld of de?nition for ρ
0
because
k
m
prime is generated by the traces,Henceforth we will identify k
0
with k
m
prime,There
is one exceptional case where ρ
0
is ordinary and ρ
0
|
D
p
is isomorphic to a sum
of two distinct unrami?ed characters (χ
1
and χ
2
in the notation of Chapter 1,
§1),If ρ
0
is not exceptional we de?ne
(2.25(a)) T
D
= T
prime
H
(M)
m
prime?
W(k
0
)
O.
If ρ
0
is exceptional we let T
primeprime
H
(M) denote the ring generated by the operators
{T
l
for l notbar Mp,〈a〉 for (a,Mp)=1,U
p
},We choose m
primeprime
to be a maximal
ideal of T
primeprime
H
(M) lying above m
prime
for which there is an embedding k
m
primeprime arrowhookleft→ k (over
k
0
= k
m
prime) satisfying U
p
→ χ
2
(Frobp),(Note that χ
2
is speci?ed by D.) Then
in the exceptional case k
m
primeprime is either k
0
or its quadratic extension and we de?ne
(2.25(b)) T
D
= T
primeprime
H
(M)
m
primeprime?
W(k
m
primeprime)
O.
The omission of the Hecke operators U
q
for q|M
0
ensures that T
D
is reduced.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 505
We need to relate T
D
to a Hecke ring with no missing operators in order
to apply the results of Section 1.
Proposition 2.15,In the nonexceptional case there is a maximal ideal
m for T
H
(M) with m ∩
prime
H
(M)=m
prime
and k
0
= k
m
,and such that the natural
map T
prime
H
(M)
m
prime →T
H
(M)
m
isanisomorphism,thusgiven
T
D
similarequalT
H
(M)
m
W(k
0
)
O.
Intheexceptionalcasethesamestatementsholdwith m
primeprime
replacing m
prime
,T
primeprime
H
(M)
replacing T
prime
H
(M) and k
m
primeprime replacing k
0
.
Proof,For simplicity we describe the nonexceptional case indicating where
appropriate the slight modi?cations needed in the exceptional case,To con-
struct m we take the eigenform f
0
obtain from the newform f of Theorem 2.14
by removing the Euler factors at all primes q ∈ Σ?{M∪p},If ρ
0
is ordinary
and f has level prime to p we also remove the Euler factor (1?β
p
·p
s
) where
β
p
is the non-unit eigenvalue in O

,(By ‘removing Euler factors’ we mean
take the eigenform whose L-series is that of f with these Euler factors re-
moved.) Then f
0
is an eigenform of weight 2 on Γ
H
(M) (this is ensured by the
choice of f) with O
f,λ
coe?cients,We have a corresponding homomorphism
π
f
0
,T
H
(M) →O
f,λ
and we let m = π
1
f
0
(λ).
Since the Hecke operators we have used to generate T
prime
H
(M) are prime to
the level these is an inclusion with?nite index
T
prime
H
(M) arrowhookleft→
productdisplay
O
g
where g runs over representatives of the Galois conjugacy classes of newforms
associated to Γ
H
(M) and where we note that by multiplicity oneO
g
can also be
described as the ring of integers generated by the eigenvalues of the operators
in T
prime
H
(M) acting on g,If we consider T
H
(M) in place of T
prime
H
(M) we get a
similar map but we have to replace the ring O
g
by the ring
S
g
= O
g
[X
q
1
,...,X
q
r
,X
p
]/{Y
i
,Z
p
}
r
i=1
where {p,p
1
,...,q
r
} are the distinct primes dividing Mp,Here
(2.26) Y
i
=
X
r
i
1
q
i
parenleftBig
X
q
i
α
q
i
(g)
parenrightBigparenleftBig
X
q
i
β
q
i
(g)
parenrightBig
if q
i
notbarlevel(g)
X
r
i
q
i
parenleftBig
X
q
i
a
q
i
(g)
parenrightBig
if q
i
| level(g),
where the Euler factor of g at q
i
(i.e.,of its associated L-series) is
(1?α
q
i
(g)q
s
i
)(1?β
q
i
(g)q
s
i
) in the?rst cases and (1?a
q
i
(g)q
s
i
) in the second
case,and q
r
i
i
||
parenleftBig
M/level(g)
parenrightBig
,(We allow a
q
i
(g) to be zero here.) Similarly Z
p
is
506 ANDREW JOHN WILES
de?ned by
Z
p
=
X
2
p
a
p
(g)X
p
+ pχ
g
(p)ifp|M,pnotbarlevel(g)
X
p
a
p
(g)ipnotbarM
X
p
a
p
(g fp|level(g),
where the Euler factor of g at p is (1? a
p
(g)p
s
+ χ
g
(p)p
1?2s
) in the?rst
two cases and (1?a
p
(g)p
s
) in the third case,We then have a commutative
diagram
(2.27)
T
prime
H
(M)?

producttext
g
O
g

arrowbt

arrowbt
T
H
(M)?

producttext
g
S
g
=
producttext
g
O
g
[X
q
1
,...,X
q
r
,X
p
]/{Y
i
,Z
p
}
r
i=1
where the lower map is given on {U
q
,U
p
or T
p
} by U
q
i
→ X
q
i
,U
p
or
T
p
→ X
p
(according as p|M or p notbar M),To verify the existence of such a
homomorphism one considers the action of T
H
(M) on the space of forms of
weight 2 invariant under Γ
H
(M) and uses that
summationtext
r
j=1
g
j
(m
j
z) is a free gener-
ator as a T
H
(M)?C-module where {g
j
} runs over the set of newforms and
m
j
= M/level(g
j
).
Now we tensor all the rings in (2.27) with Z
p
,Then completing the top
row of (2.27) with respect to m
prime
and the bottom row with respect to m we get
a commutative diagram
(2.28)
T
prime
H
(M)
m
prime?

parenleftBig
producttext
g
O
g
parenrightBig
m
prime
similarequal
producttext
g
m
prime
→μ
O
g,μ
arrowbt
arrowbt
arrowbt
T
H
(M)
m

parenleftBig
producttext
g
S
g
parenrightBig
m
similarequal
producttext
(S
g
)
m
.
Here μ runs through the primes above p in each O
g
for which m
prime
→ μ under
T
H
prime(M) →O
g
,Now (S
g
)
m
is given by
(S
g
Z
p
)
m
similarequal
parenleftBig
(O
g
Z
p
)[X
q
1
,...,X
q
r
,X
p
]/{Y
i
,Z
p
}
r
i=1
parenrightBig
m
(2.29)
similarequal
parenleftBigg
producttext
μ|p
O
g,μ
[X
q
1
,...,X
q
r
,X
p
]/{Y
i
,Z
p
}
r
i=1
parenrightBigg
m
similarequal
parenleftBigg
producttext
μ|p
A
g,μ
parenrightBigg
m
where A
g,μ
denotes the product of the factors of the complete semi-local ring
O
g,μ
[X
q
1
,...,X
q
r
,X
p
]/{Y
i
,Z
p
}
r
i=1
in which X
q
i
is topologically nilpotent for
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 507
q
i
negationslash∈Mand in which X
p
is a unit if we are in the ordinary case (i.e.,when
p|M),This is because U
q
i
∈ m if q
i
negationslash∈Mand U
p
is a unit at m in the ordinary
case.
Now if m
prime
→ μ then in (A
g,μ
)
μ
we claim that Y
i
is given up to a unit by
X
q
i
b
i
for some b
i
∈O
g,μ
with b
i
=0ifq
i
negationslash∈M,Similarly Z
p
is given up to a
unit by X
p
α
p
(g) where α
p
(g) is the unit root of x
2
a
p
(g)x+pχ
g
(p)=0in
O
g,μ
if p notbar level g and p|M and by X
p
a
p
(g)ifp|level g or p notbar M,This
will show that (A
g,μ
)
m
similarequalO
g,μ
when m
prime
→ μ and (A
g,μ
)
m
= 0 otherwise.
For q
i
∈Mand for p,the claim is straightforward,For q
i
negationslash∈M,it amounts
to the following,Let U
g,μ
denote the 2-dimensional K
g,μ
-vector space with
Galois action via ρ
g,μ
and let n
q
i
(g,μ) = dim(U
g,μ
)
I
q
i
,We wish to check that
Y
i
= unit.X
q
i
in (A
g,μ
)
m
and from the de?nition of Y
i
in (2.26) this reduces
to checking that r
i
= n
q
i
(g,μ)bytheπ
q
similarequal π(σ
q
) of theorem (cf,[Ca1]),We use
here that α
q
i
(g),β
q
i
(g) and a
q
i
(g) are p-adic units when they are nonzero since
they are eigenvalues of Frob(q
i
),Now by de?nition the power of q
i
dividing M
is the same as that dividing N(ρ
0
)q
n
q
i
i
(cf,(2.21)),By an observation of Livn′e
(cf,[Liv],[Ca2,§1]),
(2.30) ord
q
i
(levelg) = ord
q
i
parenleftBig
N(ρ
0
)q
n
q
i
n
q
i
(g,μ)
i
parenrightBig
.
As by de?nition q
r
i
i
||(M/levelg) we deduce that r
i
= n
q
i
(g,μ) as reqired.
We have now shown that each A
g,μ
similarequalO
g,μ
(when m
prime
→ μ) and it follows
from (2.28) and (2.29) that we have homomorphisms
T
prime
H
(M)
m
prime?

T
H
(M)
m

productdisplay
g
m
prime
→μ
O
g,μ
where the inclusions are of?nite index,Moreover we have seen that U
q
i
=0
in T
H
(M)
m
for q
i
negationslash∈M,We now consider the primes q
i
∈M,We have
to show that the operators U
q
for q ∈Mare redundant in the sense that
they lie in T
prime
H
(M)
m
prime,i.e.,in the Z
p
-subalgebra of T
H
(M)
m
generated by the
{T
l
,l notbarMp,〈a〉,a ∈ (Z/MZ)
}.Forq ∈Mof type (A),U
q
∈ T
prime
H
(M)
m
prime
as explained in Remark 2.9 are for q ∈Mof type (B),U
q
∈ T
prime
H
(M)
m
prime as
explained in Remark 2.11,For q ∈Mof type (C) but not of type (A),U
q
=0
by the π
q
similarequal π(σ
q
) theorem (cf,[Ca1]),For in this case n
q
= 0 whence also
n
q
(g,μ) = 0 for each pair (g,μ) with m
prime
→ μ,If ρ
0
is strict or Selmer at p then
U
p
can be recovered from the two-dimensional representation ρ (described after
the corollaries to Theorem 2.1) as the eigenvalue of Frobp on the (free,of rank
one) unrami?ed quotient (cf,Theorem 2.1.4 of [Wi4]),As this representation
is de?ned over the Z
p
-subalgebra generated by the traces,it follows that U
p
is contained in this subring,In the exceptional case U
p
is in T
primeprime
H
(M)
m
primeprime by
de?nition.
Finally we have to show that T
p
is also redundant in the sense explained
above when pnotbarM,A proof of this has already been given in Section 2 (Ribet’s
508 ANDREW JOHN WILES
lemma),Here we give an alternative argument using the Galois representa-
tions,We know that T
p
∈ m and it will be enough to show that T
p
∈ (m
2
,p).
Writing k
m
for the residue?eld T
H
(M)
m
/m we reduce to the following situa-
tion,If T
p
negationslash∈ (m
2
,p) then there is a quotient
T
H
(M)
m
/(m
2
,p)dblarrowheadrightk
m
[ε]=T
H
(M)
m
/a
where k
m
[ε] is the ring of dual numbers (so ε
2
= 0) with the property that
T
p
mapsto→ λε with λ negationslash= 0 and such that the image of T
prime
H
(M)
m
prime lies in k
m
,Let G
/Q
denote the four-dimensional k
m
-vector space associated to the representation
ρ
ε
,Gal(Q/Q)?→ GL
2
(k
m
[ε])
induced from the representation in Theorem 2.1,It has the form
G
/Q
similarequal G
0/Q
⊕G
0/Q
where G
0
is the corresponding space associated to ρ
0
by our hypothesis that
the traces lie in k
m
,The semisimplicity of G
/Q
here is obtained from the main
theorem of [BLR],Now G
/Q
p
extends to a?nite?at group scheme G
/Z
p
.
Explicitly it is a quotient of the group scheme J
H
(M)
m
[p]
/Z
p
,Since extensions
to Z
p
are unique (cf,[Ray1]) we know
G
/Z
p
similarequal G
0/Z
p
⊕G
0/Z
p
.
Now by the Eichler-Shimura relation we know that in J
H
(M)
/F
p
T
p
= F +〈p〉F
T
.
Since T
p
∈ m it follows that F +〈p〉F
T
=0onG
0/F
p
and hence the same holds
on G
/F
p
,But T
p
is an endomorphism of G
/Z
p
which is zero on the special
bre,so by [Ray1,Cor,3.3.6],T
p
=0onG
/Z
p
,It follows that T
p
=0ink
m
[ε]
which contradicts our earlier hypothesis,So T
p
∈ (m
2
,p) as required,This
completes the proof of the proposition,square
From the proof of the proposition it is also clear that m is the unique max-
imal ideal of T
H
(M) extending m
prime
and satisfying the conditions that U
q
∈ m
for q ∈ Σ?{M∪p} and U
p
negationslash∈ m if ρ
0
is ordinary,For the rest of this chapter
we will always make this choice of m (given ρ
0
).
Next we de?ne T
D
in the case when D = (ord,Σ,O,M),If n is any
ordinary maximal ideal (i.e,U
p
negationslash∈ n)ofT
H
(Np) with N prime to p then Hida
has constructed a 2-dimensional Noetherian local Hecke ring
T

= eT
H
(Np

)
n
:= lim
←?
eT
H
(Np
r
)
n
r
which is a Λ = Z
p
[[T]]-algebra satisfying T

/T similarequal T
H
(Np)
n
,Here n
r
is the
inverse image of n under the natural restriction map,Also T = lim
←?
〈1+Np〉?1
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 509
and e = lim

r
U
r!
p
,For an irreducible ρ
0
of type D we have de?ned T
D
prime in
(2.25(a)),where D
prime
=(Se,Σ,O,M)by
T
D
prime similarequalT
H
(M
0
p)
m
W(k
m
)
O,
the isomorphism coming from Proposition 2.15,We will de?ne T
D
by
(2.31) T
D
= eT
H
(M
0
p

)
m
W(k
m
)
O.
In particular we see that
(2.32) T
D
/T similarequalT
D
prime,
i.e.,where D
prime
is the same as D but with ‘Selmer’ replacing ‘ord’,Moreover if
q is a height one prime ideal of T
D
containing
parenleftBig
(1+T)
p
n
(1+Np)
p
n
(k?2)
parenrightBig
for any integers n ≥ 0,k ≥ 2,then T
D
/q is associated to an eigenform in a
natural way (generalizing the case n =0,k= 2),For more details about these
rings as well as about Λ-adic modular forms see for example [Wi1] or [Hi1].
For each n ≥ 1 let T
n
= T
H
(M
0
p
n
)
m
n
,Then by the argument given
after the statement ofTheorem 2.1 we can construct a Galois representation ρ
n
unrami?ed outside Mpwith values in GL
2
(T
n
) satisfying traceρ
n
(Frobl)=T
l
,
detρ
n
(Frob l)=l〈l〉 for (l,Mp) = 1,These representations can be patched
together to give a continuous representation
(2.33) ρ = lim
←?
ρ
n
,Gal(Q
Σ
/Q)?→ GL
2
(T
D
)
where Σ is the set of primes dividing Mp,To see this we need to check the
commutativity of the maps
R
Σ
→ T
n
arrowsoutheast↓
T
n?1
where the horizontal maps are induced by ρ
n
and ρ
n?1
and the vertical map is
the natural one,Now the commutativity is valid on elements of R
Σ
,which are
traces or determinants in the universal representation,since trace(Frobl) mapsto→ T
l
under both horizontal maps and similarly for determinants,Here R
Σ
is the
universal deformation ring described in Chapter 1 with respect to ρ
0
viewed
with residue?eld k = k
m
,It su?ces then to show that R
Σ
is generated (topo-
logically) by traces and this reduces to checking that there are no nonconstant
deformations of ρ
0
to k[ε] with traces lying in k (cf,[Ma1,§1.8]),For then if R
tr
Σ
denotes the closed W(k)-subalgebra of R
Σ
generated by the traces we see that
R
tr
Σ
→ (R
Σ
/m
2
) is surjective,m being the maximal ideal of R
Σ
,from which
we easily conclude that R
tr
Σ
= R
Σ
,To see that the condition holds,assume
510 ANDREW JOHN WILES
that a basis is chosen so that ρ
0
(c)=(
1
0
0
1
) for a chosen complex cunjugation
c and ρ
0
(σ)=(
a
σ
c
σ
b
σ
d
σ
) with b
σ
= 1 and c
σ
negationslash= 0 for some σ,(This is possible
because ρ
0
is irreducible.) Then any deformation [p]tok[ε] can be represented
by a representation ρ such that ρ(c) and ρ(σ) have the same properties,It
follows easily that if the traces of ρ lie in k then ρ takes values in k whence
it is equal to ρ
0
,(Alternatively one sees that the universal representation can
be de?ned over R
tr
Σ
by diagonalizing complex conjugation as before,Since the
two maps R
tr
Σ
→ T
n?1
induced by the triangle are the same,so the associ-
ated representations are equivalent,and the universal property then implies
the commutativity of the triangle.)
The representations (2.33) were?rst exhibited by Hida and were the orig-
inal inspiration for Mazur’s deformation theory.
For each D = {·,Σ,O,M} where · is not unrestricted there is then a
canonical surjective map
D
,R
D
→T
D
which induces the representations described after the corollaries to Theorem 2.1
and in (2.33),It is enough to check this when O = W(k
0
) (or W(k
m
primeprime)inthe
exceptional case),Then one just has to check that for every pair (g,μ) which
appears in (2.28) the resulting representation is of type D,For then we claim
that the image of the canonical map R
D

tildewidest
T
D
=ΠO
g,μ
is T
D
where here ~
denotes the normalization,(In the case where · is ord this needs to be checked
instead for T
n
W(k
0
)
O for each n.) For this we just need to see that R
D
is
generated by traces,(In the exceptional case we have to show also that U
p
is
in the image,This holds because it can be identi?ed,using Theorem 2.1.4 of
[Wi1],with the image of u ∈ R
D
where u is the eigenvalue of Frob p on the
unique rank one unrami?ed quotient of R
2
D
with eigenvalue ≡ χ
2
(Frobp) which
is speci?ed in the de?nition of D.) But we saw above that this was true for
R
Σ
,The same then holds for R
D
as R
Σ
→ R
D
is surjective because the map
on reduced cotangent spaces is surjective (cf,(1.5)),To check the condition
on the pairs (g,μ) observe?rst that for q ∈Mwe have imposed the following
conditions on the level and character of such g’s by our choice of M and H:
q of type (A),q|| level g,detρ
g,μ
vextendsingle
vextendsingle
vextendsingle
I
q
=1,
q of type (B),cond χ
q
|| level g,detρ
g,μ
vextendsingle
vextendsingle
vextendsingle
I
q
= χ
q
,
q of type (C),detρ
g,μ
vextendsingle
vextendsingle
vextendsingle
I
q
is the Teichm¨uller lifting of detρ
0
vextendsingle
vextendsingle
vextendsingle
I
q
.
In the?rst two cases the desired form of ρ
q,μ
vextendsingle
vextendsingle
vextendsingle
D
q
then follows from the
π
q
similarequal π(σ
q
) theorem of Langlands (cf,[Ca1]),The third case is already of
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 511
type (C),For q = p one can use Theorem 2.1.4 of [Wi1] in the ordinary case,
the?at case being well-known.
The following conjecture generalized a fundamantal conjecture of Mazur
and Tilouine for D = (ord,Σ,W(k
0
),φ); cf,[MT].
Conjecture 2.16,?
D
isanisomorphism.
Equivalently this conjecture says that the representation described after
the corollaries to Theorem 2.1 (or in (2.33) in the ordinary case) is the universal
one for a suitable choice of H,N and m,We remind the reader that throughout
this section we are assuming that if p = 3 then ρ
0
is not induced from a
character of Q(

3).
Remark,The case of most interest to us is when p = 3 and ρ
0
is a
representation with values in GL
2
(F
3
),In this case it is a theorem of Tunnell,
extending results of Langlands,that ρ
0
is always modular,For GL
2
(F
3
)isa
double cover of S
4
and can be embedded in GL
2
(Z[

2]) whence in GL
2
(C);
cf,[Se] and [Tu],The conjecture will be proved with a mild restriction on ρ
0
at the end of Chapter 3.
Remark,Our original restriction to the types (A),(B),(C) for ρ
0
was
motivated by the wish that the deformation type (a) be of minimal conduc-
tor among its twists,(b) retain property (a) under unrami?ed base changes.
Without this kind of stability it can happen that after a base change ofQ to an
extension unrami?ed at Σ,ρ
0
ψ has smaller ‘conductor’ for some character
ψ,The typical example of this is where ρ
0
vextendsingle
vextendsingle
vextendsingle
D
q
= Ind
Q
q
K
(χ) with q ≡?1(p) and
χ is a rami?ed character over K,the unrami?ed quadratic extension of Q
q
.
What makes this di?cult for us is that there are then nontrivial rami?ed local
deformations (Ind
Q
p
K
χξ for ξ a rami?ed character of order p of K) which we
cannot detect by a change of level.
For the purposes of Chapter 3 it is convenient to digress now in order to
introduce a slight varient of the deformation rings we have been considering
so far,Suppose that D =(·,Σ,O,M) is a standard deformation problem
(associated to ρ
0
) with · = Se,str or? and suppose that H,M
0
,M and m
are de?ned as in (2.24) and Proposition 2.15,We choose a?nite set of primes
Q = {q
1
,...,q
r
} with q
i
notbarMp,Furthermore we assume that each q
i
≡ 1(p)
and that the eigenvalues {α
i

i
} of ρ
0
(Frob q
i
) are distinct for each q
i
∈ Q.
This last condition ensures that ρ
0
does not occur as the residual representation
of the λ-adic representation associated to any newform on Γ
H
(M,q
1
...q
r
)
where any q
i
divides the level of the form,This can be seen directly by looking
at (Frobq
i
) in such a representation or by using Proposition 2.4’ at the end of
Section 2,It will be convenient to assume that the residue?eld of O contains
α
i

i
for each q
i
.
512 ANDREW JOHN WILES
Pick α
i
for each i,We let D
Q
be the deformation problem associated to
representations ρ of Gal(Q
Σ∪Q
/Q) which are of type D and which in addition
satisfy the property that at each q
i
∈ Q
(2.34) ρ
vextendsingle
vextendsingle
vextendsingle
D
q
i

parenleftbigg
χ
1,q
i
χ
2,q
i
parenrightbigg
with χ
2,q
i
unrami?ed and χ
2,q
i
(Frobq
i
) ≡ α
i
mod m for a suitable choice of
basis,One checks as in Chapter 1 that associated to D
Q
there is a universal
deformation ring R
Q
,(These new contions are really variants on type (B).)
We will only need a corresponding Hecke ring in a very special case and it
is convenient in this case to de?ne it using all the Hecke operators,Let us now
set N = N(ρ
0
)p
δ(ρ
0
)
where δ(ρ
0
) in as de?ned in Theorem 2.14,Let m
0
denote
a maximal ideal of T
H
(N) given by Theorem 2.14 with the property that
ρ
m
0
similarequal ρ
0
over F
p
relative to a suitable embedding of k
m
0
→ k over k
0
,(In the
exceptional case we also impose the same condition on m
0
about the reduction
of U
p
as in the de?nition of T
D
in the exceptional case before (2.25)(b).) Thus
ρ
m
0
similarequal ρ
f,λ
mod λ over the residue?eld of O
f,λ
for some choice of f and λ
with f of level N,By dropping one of the Euler factors at each q
i
as in the
proof of Proposition 2.15,we obtain a form and hence a maximal ideal m
Q
of
T
H
(Nq
1
...q
r
) with the property that ρ
m
Q
similarequal ρ
0
over F
p
relative to a suitable
embedding k
m
Q
→ k over k
m
0
,The?eld k
m
Q
is the extension of k
0
(or k
m
primeprime in
the exceptional case) generated by the α
i

i
,We set
(2.35) T
Q
= T
H
(Nq
1
...q
r
)
m
Q
W(k
m
Q
)
O.
It is easy to see directly (or by the arguments of Proposition 2.15) that
T
Q
is reduced and that there is an inclusion with?nite index
(2.36) Q
Q
arrowhookleft→
T
Q
=
productdisplay
O
g,μ
where the product is taken over representatives of the Galois conjugacy classes
of eigenforms g of level Nq
1
...q
r
with m
Q
→ μ,Now de?ne D
Q
using the
choices α
i
for which U
q
i
→ α
i
under the chosen embedding k
m
Q
→ k,Then
each of the 2-dimensional representations associated to each factor O
g,μ
is of
type D
Q
,We can check this for each q ∈ Q using either the π
q
similarequal π(σ
q
)
theorem (cf,[Ca1]) as in the case of type (B) or using the Eichler-Shimura
relation if q does not divide the level of the newform associated to g,So we get
a homomorphism of O-algebras R
Q

T
Q
and hence also an O-algebra map
(2.37)?
Q
,R
Q
→T
Q
as R
Q
is generated by traces,This is not an isomorphism in general as we
have used N in place of M,However it is surjective by the arguments of
Proposition 2.15,Indeed,for q|N(ρ
0
)p,we check that U
q
is in the image of
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 513
Q
using the arguments in the second half of the proof of Proposition 2.15.
For q ∈ Q we use the fact that U
q
is the image of the value of χ
2,q
(Frobq)
in the universal representation;cf,(2.34),For q|M,but not of the previous
types,T
q
is a trace in ρ
T
Q
and we can apply the
ˇ
Cebotarev density theorem
to show that it is in the image of?
Q
.
Finally,if there is a section π,T
Q
→O,then set p
Q
=kerπ and let ρ
p
de-
note the 2-dimensional representation to GL
2
(O) obtained from ρ
T
Q
mod p
Q
.
Let V =Adρ
p
O
K/O where K is the?eld of fractions of O,We pick a basis
for ρ
p
satisfying (2.34) and then let
(2.38)
V
(q
i
)
=
braceleftbiggparenleftbigg
a 0
00
parenrightbiggbracerightbigg
Adρ
m
O
K/O =
braceleftbiggparenleftbigg
ab
cd
parenrightbigg
,a,b,c,d ∈O
bracerightbigg
O
K/O
and let V
(q
i
)
= V/V
(q
i
)
,Then as in Proposition 1.2 we have an isomorphism
(2.39) Hom
O
(p
R
Q
/p
2
R
Q
,K/O) similarequal H
1
D
Q
(Q
Σ∪Q
/Q,V)
where p
R
Q
= ker(π
Q
) and the second term is de?ned by
(2.40) H
1
D
Q
(Q
Σ∪Q
/Q,V)=ker:H
1
D
(Q
Σ∪Q
/Q,V) →
r
productdisplay
i=1
H
1
(Q
unr
q
i
,V
(q
i
)
).
We return now to our discussion of Conjecture 2.16,We will call a de-
formation theory D minimal if Σ = M∪{p} and · is Selmer,strict or?at.
This notion will be critical in Chapter 3,(A slightly stronger notion of mini-
mality is described in Chapter 3 where the Selmer condition is replaced,when
possible,by the condition that the representations arise from?nite?at group
schemes - see the remark after the proof of Theorem 3.1.) Unfortunately even
up to twist,not every ρ
0
has an associated minimal D even when ρ
0
is?at or
ordinary at p as explained in the remarks after Conjecture 2.16,However this
could be achieved if one replaced Q by a suitable?nite extension depending
on ρ
0
.
Suppose now that f is a (normalized) newform,λ is a prime of O
f
above p
and ρf,λ a deformation of ρ
0
of type D where D =(·,Σ,O
f,λ
,M) with · = Se,
str or?,(Strictly speaking we may be changing ρ
0
as we wish to choose its
eld of de?nition to be k = O
f,λ
/λ.) Suppose further that level(f)|M where
M is de?ned by (2.24).
Now let us set O = O
f,λ
for the rest of this section,There is a homomor-
phism
(2.41) π = π
D,f
,T
D
→O
514 ANDREW JOHN WILES
whose kernel is the prime ideal p
T,f
associated to f and λ,Similary there is
a homomorphism
R
D
→O
whose kernel is the prime ideal p
R,f
associated to f and λ and which factors
through π
f
,Pick perfect pairings of O-modules,the second one T
D
-bilinear,
(2.42) O×O→O,〈,〉,T
D
×T
D
→O.
In each case we use the term perfect pairing to signify that the pairs of induced
maps O→Hom
O
(O,O) and T
D
→ Hom
O
(T
D
,O) are isomorphisms,In
addition the second one is required to beT
D
-linear,The existence of the second
pairing is equivalent to the Gorenstein property,Corollary 2 of Theorem 2.1,
as we explain below,Explicitly if h is a generator of the free T
D
-module
Hom
O
(T
D
,O)weset〈t
1
,t
2
〉 = h(t
1
t
2
).
AprioriT
H
(M)
m
(occurring in the description ofT
D
in Proposition 2.15)
is only Gorenstein as a Z
p
-algebra but it follows immediately that it is also a
Gorenstein W(k
m
)-algebra,(The notion of Gorenstein O-algebra is explained
in the appendix.) Indeed the map
Hom
W(k
m
)
parenleftBig
T
H
(M)
m
,W(k
m
)
parenrightBig
→ Hom
Z
p
parenleftBig
T
H
(M)
,
Z
p
parenrightBig
given by? mapsto→ trace is easily seen to be an isomorphism,as the reduction
mod p is injective and the ranks are equal,ThusT
D
is a Gorenstein O-algebra.
Now let?π,O→T
D
be the adjoint of π with respect to these pairings.
Then de?ne a principal ideal (η)ofT
D
by
(η)=(η
D,f
)=(?π(1)).
This is well-de?ned independently of the pairings and moreover one sees that
T
D
/η is torsion-free (see the appendix),From its description (η) is invariant
under extensions of O to O
prime
in an obvious way,Since T
D
is reduced π(η) negationslash=0.
One can also verify that
(2.43) π(η)=〈η,η〉
up to a unit in O.
We will say that D
1
Dif we obtain D
1
by relaxing certain of the
hypotheses on D,i.e.,if D =(·,Σ,O,M) and D
1
=(·,Σ
1
,O
1
,M
1
) we allow
that Σ
1
Σ,any O
1
,M?M
1
(but of the same type) and if · is Se or str
in D it can be Se,str,ord or unrestricted in D
1
,if· is?inD
1
it can be?
or unrestricted in D
1
,We use the term restricted to signify that · is Se,str,
or ord,The following theorem reduces conjecture 2.16 to a ‘class number’
criterion,For an interpretation of the right-hand side of the inequality in
the theorem as the order of a cohomology group,see Propostion 1.2,For an
interpretation of the left-hand side in terms of the value of an inner product,
see Proposition 4.4.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 515
Theorem 2.17,Assume,as above,that ρ
f,λ
is a deformation of ρ
0
of
type D =(·,Σ,O = O
f,λ
,M) with · =Se,str or?,Supposethat
#O/π(η
D,f
) ≥ #p
R,f
/p
2
R,f
.
Then
(i)?
D
1
,R
D
1
similarequalT
D
1
isanisomorphismforall (restricted) D
1
D.
(ii) T
D
1
is a complete intersection (over O
1
if · is Se,str or?) for all re-
stricted D
1
D.
Proof,Let us write T for T
D
,p
T
for p
T,f
,p
R
for p
R,f
and η for η
η,f
.
Then we always have
(2.44) #O/η ≤ #p
T
/p
2
T
.
(Here and in what follows we sometimes write η for π(η) if the context makes
this reasonable.) This is proved as follows,T/η acts faithfully on p
T
,Hence
the Fitting ideal of p
T
as a T/η-module is zero,The same is then true of
p
T
/p
2
T
as an O/η =(T/η)/p
T
-module,So the Fitting ideal of p
T
/p
2
T
as an
O-module is contained in (η) and the conclusion is then easy,So together with
the hypothesis of the theorem we get inequality (and hence equalities)
#O/π(η) ≥ #p
R
/p
2
R
≥ #p
T
/p
2
T
≥ #O/π(η).
By Proposition 2 of the appendix T is a complete intersection over O,Part (ii)
of the theorem then follows for D,Part (i) follows for D from Proposition 1 of
the appendox.
We now prove inductively that we can deduce the same inequality
(2.45) #O
1

D
1
,f
≥ #p
R
1
,f
/p
2
R
1
,f
for D
1
Dand R
1
= R
D
1
,The above argument will then prove the theorem
for D
1
,We explain this?rst in the case D
1
= D
q
where D
q
di?ers from D only
in replacing Σ by Σ∪{q},Let us write T
q
for T
D
q
,p
R,q
for p
R,f
with R = R
D
q
and η
q
for η
D
q
,f
,We recall that U
q
=0inT
q
.
We choose isomorphisms
(2.46) Tsimilarequal Hom
O
(T,O),T
q
similarequal Hom
O
(T
q
,O)
coming from the fact that each of the rings is a Gorenstein O-algebra,If
α
q
,T
q
→T is the natural map we may consider the element?
q
= α
q
α
q
∈T
where the adjoint is with respect to the above isomorphisms,Then it is clear
that
(2.47)
parenleftBig
α
q

q
)
parenrightBig
=(η?
q
)
as principal ideals of T,In particular π(η
q
)=π(η?
q
)inO.
Now it follows from Proposition 2.7 that the principal ideal (?
q
) is given by
(2.48) (?
q
)=
parenleftBig
(q?1)
2
(T
2
q
〈q〉(1 + q)
2
)
parenrightBig
.
516 ANDREW JOHN WILES
In the statement of Proposition 2.7 we used Z
p
-pairings
Tsimilarequal Hom
Z
p
(T,Z
p
),T
q
similarequal Hom
Z
p
(T
q
,Z
p
)
to de?ne (?
q
)=(α
q
α
q
),However,using the description of the pairings
as W(k
m
)-algebras derived from these Z
p
-pairings in the paragraph following
(2.42) we see that the ideal (?
q
) is unchanged when we use W(k
m
)-algebra
pairings,and hence also when we extend scalars to O as in (2.42).
On the other hand
#p
R,q
/p
2
R,q
≤ #p
R
/p
2
R
·#
braceleftBig
O/(q?1)
2
parenleftBig
T
2
q
〈q〉(1 + q)
2
parenrightBigbracerightBig
by Propositions 1.2 and 1.7,Combining this with (2.47) and (2.48) gives (2.45).
If Mnegationslash= φ we use a similar argument to pass from D to D
q
where this time
D
q
signi?es that D is unchanged except for dropping q from M,In each of
types (A),(B),and (C) one checks from Propositions 1.2 and 1.8 that
#p
R,q
/p
2
R,q
≤ #p
R
/p
2
R
·#H
0
(Q
q
,V
).
This is in agreement with Propositions 2.10,2.12 and 2.13 which give the
corresponding change in η by the method described above.
To change from an O-algebra to an O
1
-algebra is straightforward (the
complete intersection property can be checked using [Ku1,Cor,2.8 on p,209]),
and to change from Se to ord we use (1.4) and (2.32),The change from str
to ord reduces to this since by Proposition 1.1 strict deformations and Selmer
deformations are the same,Note that for the ord case if R is a local Noetherian
ring and f ∈ R is not a unit and not a zero divisor,then R is a complete
intersection if and only if R/f is (cf,[BH,Th,2.3.4]),This completes the
proof of the theorem,square
Remark 2.18,If we suppose in the Selmer case that f has level N with
pnotbarN we can also consider the ring T
H
(M
0
)
m
0
(with M
0
as in (2.24) and m
0
de?ned in the same way as for T
H
(M)),This time set
T
0
= T
H
(M
0
)
m
0
W(k
m
0
)
O,T= T
H
(M)
m
W(k
m
)
O.
De?ne η
0
,η,p
0
and p with respect to these rings,and let (?
p
)=α
p
α
p
where
α
p
,T → T
0
and the adjoint is taken with respect to O-pairings on T and T
0
.
We then have by Proposition 2.4
(2.49) (η
p
)=(η ·?
p
)=
parenleftBig
η ·
parenleftBig
T
2
p
〈p〉(1 + p)
2
parenrightBigparenrightBig
=
parenleftBig
η ·(a
2
p
〈p〉)
parenrightBig
as principal ideals of T,where a
p
is the unit root of x
2
T
p
x + p〈p〉 =0.
Remark,For some earlier work on how deformation rings change with Σ
see [Bo].
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 517
Chapter 3
In this chapter we prove the main results about Conjecture 2.16,We
begin by showing that bound for the Selmer group to which it was reduced
in Theorem 2.17 can be checked if one knows that the minimal Hecke ring
is a complete intersection,Combining this with the main result of [TW] we
complete the proof of Conjecture 2.16 under a hypothesis that ensures that a
minimal Hecke ring exists.
Estimates for the Selmer group
Let ρ
0
,Gal(Q
Σ
/Q) → GL
2
(k) be an odd irreducible representation which
we will assume is modular,Let D be a deformation theory of type (·,Σ,O,M)
such that ρ
0
is type D,where · is Selmer,strict or?at,We remind the reader
that k is assumed to be the residue?eld of O,Then as explained in Theorem
2.14,we can pick a modular lifting ρ
f,λ
of ρ
0
of type D (altering k if necessary
and replacing O by a ring containing O
f,λ
) provided that ρ
0
is not induced
from a character of Q(

3)ifp = 3,For the rest of this chapter,we will
make the assumption that ρ
0
is not of this exceptional type,Theorem 2.14 also
speci?es a certain minimum level and character for f and in particular ensures
that we can pick f to have level prime to p when ρ
0
|
D
p
is associated to a?nite
at group scheme over Z
p
and detρ
0
|
I
p
= ω.
In Chapter 2,Section 3,we de?ned a ring T
D
associated to D,Here we
make a slight modi?cation of this ring,In the case where · is Selmer and ρ
0
|
D
p
is associated to a?nite?at group scheme and detρ
0
|
I
p
= ω we set
(3.1) T
D
0
= T
prime
H
(M
0
)
m
prime
0
W(k
0
)
O
with M
0
as in (2.24),H de?ned following (2.24) (it is actually a subgroup
of (Z/M
0
Z)
) and m
prime
0
the maximal ideal of T
prime
H
(M
0
) associated to ρ
0
,The
same proof as in Proposition 2.15 ensures that there is a maximal ideal m
0
of
T
H
(M
0
) with m
0
∩T
prime
H
(M
0
)=m
prime
0
and such that the natural map
(3.2) T
D
0
= T
prime
H
(M
0
)
m
prime
0
W(k
0
)
O→T
H
(M
0
)
m
0
W(k
0
)
O
is an isomorphism,The maximal ideal m
0
which we choose is characterized by
the properties that ρ
m
0
= ρ
0
and U
q
∈ m
0
for q ∈ Σ?M∪{p},(The value of
T
p
or of U
q
for q ∈Mis determined by the other operators; see the proof of
Proposition 2.15.) We now de?ne T
D
0
in general by the following:
518 ANDREW JOHN WILES
T
D
0
is given by (3.1) if · is Se and ρ
0
|
D
p
is associated
to a?nite?at group scheme over Z
p
and
detρ
0
|
I
p
= ω;
(3.3)
T
D
0
= T
D
if · is str or?,or ρ
0
|D
p
is not associated
to a?nite?at group scheme over Z
p
,or
detρ
0
|
I
p
negationslash= ω.
We choose a pair (f,λ) of minimum level and character as given by Theo-
rem 2.14 and this gives a homomorphism of O-algebras
π
f
,T
CalD
0
→O?O
f,λ
.
We set p
T,f
=kerπ
f
and similarly we let p
R,f
denote the inverse image of p
T,f
in R
D
,We de?ne a principal ideal (η
T,f
)ofT
D
0
by taking an adjoint?π
f
of π
f
with respect to parings as in (2.42) and write
η
T,f
=(?π
f
(1)).
Note that p
T,f
/p
2
T,f
is?nite and π
f

T,f
) negationslash= 0 because T
D
0
is reduced,We
also write η
T,f
for π
f

T,f
) if the context makes this usage reasonable,We let
V
f
=Adρ
p
O
K/O where ρ
p
is the extension of scalars of ρ
f,λ
to O.
Theorem 3.1,Assume that D is minimal,i.e.,
summationtext
= M∪{p},and that
ρ
0
isabsolutelyirreduciblewhenrestrictedto Q
parenleftbigg
radicalBig
(?1)
p?1
2
p
parenrightbigg
,Then
(i) #H
1
D
(Q
Σ
/Q,V
f
) ≤ #(p
T,f
/p
2
T,f
)
2
·c
p
/#(O/η
T,f
)
where c
p
=#(O/U
2
p
〈p〉) < ∞ when ρ
0
isSelmerand ρ
0
|
D
p
isassociatedto
a?nite?atgroupschemeover Z
p
and detρ
0
|
I
p
= ω,and c
p
=1otherwise;
(ii) ifT
D
0
isacompleteintersectionover O then (i) isanequality,R
D
similarequal
T
D
andT
D
isacompleteintersection.
In general,for any (not necessarily minimal) D of Selmer,strict or?at
type,andany ρ
f,λ
oftype D,#H
1
D
(Q
Σ
/Q,V
f
) < ∞ if ρ
0
isasabove.
Remarks,The?niteness was proved by Flach in [Fl] under some restric-
tions on f,p and D by a di?erent method,In particular,he did not consider
the strict case,The bound we obtain in (i) is in fact the actual order of
H
1
D
(Q
Σ
/Q,V
f
) as follows from the main result of [TW] which proves the hy-
pothesis of part (ii),Then applying Theorem 2.17 we obtain the order of this
group for more general D’s associated to ρ
0
under the condition that a minimal
D exists associated to ρ
0
,This is stated in Theorem 3.3.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 519
The case where the projective representation associated to ρ
0
is dihedral
does not always have the property that a twist of it has an associated minimal
D,In the case where the associated quadratic?eld is imaginary we will give a
di?erent argument in Chapter 4.
Proof,We will assume throughout the proof that D is minimal,indicating
only at the end the slight changes needed fot the?nal assertion of the theorem.
Let Q be a?nite set of primes disjoint from Σ satisfying q ≡ 1(p) and ρ
0
(Frobq)
having distinct eigenvalues for each q ∈ Q,For the minimal deformation
problem D =(·,Σ,O,M),let D
Q
be the deformation problem described before
(2.34); i.e.,it is the re?nement of (·,Σ ∪ Q,O,M) obtained by imposing the
additional restriction (2.34) at each q ∈ Q,(We will assume for the proof that
O is chosen so O/λ = k contains the eigenvalues of ρ
0
(Frobq) for each q ∈ Q.)
We set
T = T
D
0
,R= R
D
and recall the de?nition of T
Q
and R
Q
from Chapter 2,§3 (cf,(2.35)),We
write V for V
f
and recall the de?nition of V
(q)
following (2.38),Also remember
that m
Q
is a maximal ideal of T
H
(Nq
1
...q
r
) as in (2.35) for which ρ
m
Q
similarequal ρ
0
over
ˉ
F
p
(recall that this uses the same choice of embedding k
m
Q
→ k as in
the de?nition of T
Q
),We use m
Q
also to denote the maximal ideal of T
Q
if
the context makes this reasonable.
Consider the exact and commutative diagram
0 → H
1
D
(Q
Σ
/Q,V) → H
1
D
Q
(Q
Σ∪Q
/Q,V)
δ
Q

producttext
q∈Q
H
1
(Q
unr
q
,V
(q)
)
Gal(Q
unr
q
/Q
q
)
|wreathproduct |wreathproduct
0 → (p
R
/p
2
R
)
→ (p
R
Q
/p
2
R
Q
)
arrowtp
ι
Q
↑↑
0 → (p
T
/p
2
T
)
→ (p
T
Q
/p
2
T
Q
)
u
Q
→ K
Q
→ 0
where K
Q
is by de?nition the cokernel in the horizontal sequence and? denotes
Hom
O
(,K/O) for K the?eld of fractions of O,The key result is:
Lemma 3.2,The map ι
Q
is injective for any?nite set of primes Q
satisfying
q ≡ 1(p),T
2
q
negationslash≡〈q〉(1 + q)
2
modm for all q ∈ Q.
Proof,Note that the hypotheses of the lemma ensure that ρ
0
(Frobq) has
distinct eigenvaluesw for each q ∈ Q,First,consider the ideal a
Q
of R
Q
de?ned
520 ANDREW JOHN WILES
by
(3.4) a
Q
=
braceleftbigg
a
i
1,b
i
,c
i
,d
i
1:
parenleftbigg
a
i
b
i
c
i
d
i
parenrightbigg
= ρ
D
Q

i
) with σ
i
∈ I
q
i
,q
i
∈ Q
bracerightbigg
.
Then the universal property of R
Q
shows that R
Q
/a
Q
similarequal R,This permits us
to identify (p
R
/p
2
R
)
as
(p
R
/p
2
R
)
= {f ∈ (p
R
Q
/p
2
R
Q
)
,f(a
Q
)=0}.
If we prove the same relation for the Hecke rings,i.e.,with T and T
Q
replacing
R and R
Q
then we will have the injectivity of ι
Q
,We will write ˉa
Q
for the
image of a
Q
in T
Q
under the map?
Q
of (2.37).
It will be enough to check that for any q ∈ Q
prime
,Q
prime
a subset of Q,T
Q
prime/ˉa
q
similarequal
T
Q
prime
{q}
where a
q
is de?ned as in (3.4) but with Q replaced by q,Let
N
prime
= N(ρ
0
)p
δ(ρ
0
)
·
producttext
q
i
∈Q
prime
{q}
q
i
where δ(ρ
0
) is as de?ned in Theorem 2.14.
Then take an element σ ∈ I
q
Gal(
ˉ
Q
q
/Q
q
) which restricts to a generator
of Gal(Q(ζ
N
prime
q
/Q(ζ
N
prime)),Then det(σ)=〈t
q
〉∈T
Q
prime in the representation to
GL
2
(T
Q
prime) de?ned after Theorem 2.1,(Thus t
q
≡ 1(N
prime
) and t
q
is a primitive
root mod q.) It is easily checked that
(3.5) J
H
(N
prime
.q)
m
Q
prime
(
ˉ
Q) similarequal J
H
(N
prime
q)
m
Q
prime
(
ˉ
Q)[〈t
q
〉?1].
Here H is still a subgroup of (Z/M
0
Z)
,(We use here that ρ
0
is not reducible
for the injectivity and also that ρ
0
is not induced from a character of Q(

3)
for the surjectivity when p = 3,The latter is to avoid the rami?cation points of
the covering X
H
(N
prime
q) → X
H
(N
prime
,q) of order 3 which can give rise to invariant
divisors of X
H
(N
prime
q) which are not the images of divisors on X
H
(N
prime
,q).)
Now by Corollary 1 to Theorem 2.1 the Pontrjagin duals of the modules
in (3.5) are free of rank two,It follows that
(3.6) (T
H
(N
prime
q)
m
Q
prime
)
2
/(〈t
q
〉?1) similarequal (T
H
(N
prime
,q)
m
Q
prime
)
2
.
The hypotheses of the lemma imply the condition that ρ
0
(Frobq) has distinct
eigenvalues,So applying Proposition 2.4’ (at the end of §2) and the remark
following it (or using the fact remarked in Chapter 2,§3 that this condition
implies that ρ
0
does not occur as the residual representation associated to any
form which has the special representation at q) we see that after tensoring over
W(k
m
Q
prime
) with O,the right-hand side of (3.6) can be replaced by T
2
Q
prime
{q}
thus
giving
T
2
Q
prime
/ˉa
q
similarequalT
2
Q
prime
{q}
,
since 〈t
q
〉?1 ∈ ˉa
q
,Repeated inductively this gives the desired relation
T
Q
/ˉa
Q
similarequalT,and completes the proof of the lemma,square
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 521
Suppose now that Q is a?nite set of primes chosen as in the lemma,Recall
that from the theory of congruences (Prop,2.4’ at the end of §2)
η
T
Q,f

T,f
=
productdisplay
q∈Q
(q?1),
the factors (α
2
q
〈q〉) being units by our hypotheses on q ∈ Q,(We only need
that the right-hand side divides the left which is somewhat easier.) Also,from
the theory of Fitting ideals (see the proof of (2.44))
#(p
T
/p
2
T
) ≥ #(O/η
T
f
)
#(p
T
Q
/p
2
T
Q
≥ #(O/η
T
Q,f
).
We dedeuce that
#K
Q
≥ #
parenleftBigg
O
slashBig
productdisplay
q∈Q
(q?1)
parenrightBigg
·t
1
where t =#(p
T
/p
2
T
)/#(O/η
T,f
),Since the range of ι
Q
has order given by
#
braceleftBigg
O
slashBig
productdisplay
q∈Q
(q?1)
bracerightBigg
,
we compute that the index of the image of ι
Q
is ≤ t as ι
Q
is injective.
Keeping our assumption on Q from Lemma 3.2,consider the kernel of λ
M
applied to the diagram at the beginning of the proof of the theorem,Then
with M chosen large enough so that λ
M
annihilates p
T
/p
2
T
(which is?nite
because T is reduced) we get:
0 → H
1
D
(Q
Σ
/Q,V[λ
M
]) → H
1
D
Q
(Q
Σ∪Q
/Q,V[λ
M
])
δ
Q

producttext
q∈Q
H
1
(Q
unr
q
,V
(q)

M
])
Gal(Q
unr
q
/Q
q
)
↑↑ψ
Q
↑ ι
Q
0 → (p
T
/p
2
T
)
→ (p
T
Q
/p
2
T
Q
)

M
] → K
Q

M
] → (p
T
/p
2
T
)
.
See (1.7) for the justi?cation that λ
M
can be taken inside the parentheses in
the?rst two terms,Let X
Q
= ψ
Q
((p
T
Q
/p
2
T
Q
)

M
]),Then we can estimate
the order of δ
Q
(X
Q
) using the fact that the image if ι
Q
has index at most t.
We get
(3.7) #δ
Q
(X
Q
) ≥
parenleftBigg
productdisplay
q∈Q
#O/(λ
M
,q?1)
parenrightBigg
·(1/t)·(1/#(p
T
/p
2
T
)).
Now we choose Q to be a set of primes with the property that
(3.8) ε
Q
,H
1
D
(Q
Σ
/Q,V
λ
M
) →
productdisplay
q∈Q
H
1
(Q
q
,V
λ
M
)
522 ANDREW JOHN WILES
is injective,We also keep the condition that ι
Q
is injective by only allowing
Q to contain primes of the form given in the lemma,In addition,we require
these q’s to satisfy q ≡ 1(p
M
).
To see that this can be done,suppose that x ∈ kerε
Q
and λx = 0 but
x negationslash= 0,We have a commutative diagram
H
1
(Q
Σ
/Q,V
λ
M
[λ]
ε
Q

producttext
q∈Q
H
1
(Q
q
,V
λ
M
)[λ]
|wreathproduct |wreathproduct
H
1
(Q
Σ
/Q,V
λ
)
ˉε
Q

producttext
q∈Q
H
1
(Q
q
,V
λ
)
the left-hand isomorphisms coming from our particular choices of q’s and the
left-hand isomorphism from our hypothesis on ρ
0
,The same diagram will hold
if we replace Q by Q
0
= Q∪{q
0
} and we now need to show that we can choose
q
0
so that ˉε
Q
0
(x) negationslash=0.
The restriction map
H
1
(Q
Σ
/Q,V
λ
) → Hom(Gal(
ˉ
Q/K
0

p
)),V
λ
)
Gal(K
0

p
)/Q)
has kernel H
1
(K
0

p
)/Q,k(1)) by Proposition 1.11 where here K
0
is the split-
ting?eld of ρ
0
.Nowifx ∈ H
1
(K
0

p
)/Q,k(1)) and x negationslash= 0 then p = 3 and x
factors through an abelian extension L of Q(ζ
3
) of exponent 3 which is non-
abelian over Q,In this exeptional case,L must ramify at some prime q of
Q(ζ
3
),and if q lies over the rational prime q negationslash= 3 then the composite map
H
1
(K
0

3
)/Q,k(1)) → H
1
(Q
unr
q
,k(1)) → H
1
(Q
unr
q
,(O/λ
M
)(1))
is nonzero on x,But then x is not of type D
which gives a contradiction,This
only leaves the possibility that L = Q(ζ
3
,
3

3) but again this means that x is
not of type D
as locally at the prime above 3,L is not generated by the cube
root of a unit over Q
3

3
),This argument holds whether or not D is minimal.
So x,which we view in ker ˉε
Q
,gives a nontrivial Galois-equivalent ho-
momorphism f
x
∈ Hom(Gal(
ˉ
Q/K
0

p
)),V
λ
) which factors through an abelian
extension M
x
of K
0

p
) of exponent p,Speci?cally we choose M
x
to be the
minimal such extension,Assume?rst that the projective representation?ρ
0
associated to ρ
0
is not dihedral so that Sym
2
ρ
0
is absolutely irreducible,Pick
a σ ∈ Gal(M
x

p
M)/Q) satisfying
(3.9) (i) ρ
0
(σ) has order m ≥ 3 with (m,p)=1,
(ii) σ?xes Q(detρ
0
)(ζ
p
M),
(iii) f
x

m
) negationslash=0.
To show that this is possible,observe?rst that the?rst two conditions can
be achieved by Lemma 1.10(i) and the subsequent remark,Let σ
1
be an el-
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 523
ement satisfying (i) and (ii) and let ˉσ
1
denote its image in Gal(K
0

p
)/Q).
Then 〈ˉσ
1
〉 acts on G = Gal(M
x
/K
0

p
)) and under this action G decom-
poses as G similarequal G
1
⊕G
prime
1
where σ
1
acts trivially on G
1
and without?xed points
on G
prime
1
.IfX is any irreducible Galois stable
ˉ
k-subspace of f
x
(G)?
F
p
ˉ
k then
ker(σ
1
1)|
X
negationslash= 0 since Sym
2
ρ
0
is assumed absolutely irreducible,So also
ker(σ
1
1)|
f
x
(G)
negationslash= 0 and thus we can?nd τ ∈ G
1
such that f
x
(τ) negationslash=0.
Viewing τ as an element of G we then take
τ
1
= τ ×1 ∈ Gal(M
x

p
M)/K
0

p
)) similarequal G×Gal(K
0

p
M)/K
0

p
))
(This decomposition holds because M
x
is minimal and because Sym
2
ρ
0
and
μ
p
are distinct from the trivial representation.) Now τ
1
commutes with σ
1
and
either f
x
((τ
1
σ
1
)
m
) negationslash=0orf
x

m
1
) negationslash=0,Since ρ
0

1
σ
1
)=ρ
0

1
) this gives
(3.9) with at least one of σ = τ
1
σ
1
or σ = σ
1
,We may then choose q
0
so that
Frobq
0
= σ and we will then have ˉε
Q
0
(x) negationslash= 0,Note that conditions (i) and (ii)
imply that q
0
≡ 1(p) and also that ρ
0
(σ) has distinct eigenvalues,thus giving
both the hypothses of Lemma 3.2.
If on the other hand?ρ
0
is dihedral then we pick σ’s satisfying
(i)?ρ
0
(σ) negationslash=1,
(ii) σ?xes Q(ζ
p
M),
(iii) f
x

m
) negationslash=0,
with m the order of ρ
0
(σ) (and pnotbarm since?ρ
0
is dihedral),The?rst two condi-
tions can be achieved using Lemma 1.12 and,in addition,we can assume that
σ takes the eigenvalue 1 on any given irreducible Galois stable subspace X
of W
λ
ˉ
k,Arguing as above,we?nd a τ ∈ G
1
such that f
x
(τ) negationslash= 0 and
we proceed as before,Again,conditions (i) and (ii) imply the hypotheses of
Lemma 3.2,So by successively adjoining q’s we can assume that Q is chosen
so that ε
Q
is injective.
We have thus shown that we can choose Q = {q
1
,...,q
r
} to be a?nite
set of primes q
i
≡ 1(p
M
) satisfying the hypotheses of Lemma 3.2 as well as the
injectivity of ε
Q
in (3.8),By Proposition 1.6,the injectivity of ε
Q
implies that
(3.10) #H
1
D
(Q
Σ∪Q
/Q,V
g

M
]) = h

·
productdisplay
q∈Σ∪Q
h
q
.
Here we are using the convention explained after Proposition 1.6 to de?ne H
1
D
.
Now,as D was chosen to be minimal,h
q
= 1 for q ∈
summationtext
{p} by Proposi-
tion 1.8,Also,h
q
=#(O/λ
M
)
2
for q ∈ Q.If· is str or? then h

h
p
=1
by Proposition 1.9 (iv) and (v),If · is Se,h

h
p
≤ c
p
by Proposition 1.9 (iii).
(To compute this we can assume that I
p
acts on W
0
λ
via ω,as otherwise we
524 ANDREW JOHN WILES
get h

h
p
≤ 1,Then with this hypothesis,(W
0
λ
n
)
is easily veri?ed to be un-
rami?ed with Frobp acting as U
2
p
〈p〉
1
by the description of ρ
f,λ
|
D
p
in [Wi1,
Th,2.1.4].) On the other hand,we have constructed classes which are rami?ed
at primes in Q in (3.7),These are of type D
Q
,We also have classes in
Hom(Gal(Q
Σ∪Q
/Q),O/λ
M
)=H
1
(Q
Σ∪Q
/Q,O/λ
M
) arrowhookleft→ H
1
(Q
Σ∪Q
/Q,V
λ
M)
coming from the cyclotomic extension Q(ζ
q
1
...ζ
q
r
),These are of type D and
disjoint from the classes obtained from (3.7),Combining these with (3.10)
gives
#H
1
D
(Q
Σ
/Q,V
f

M
]) ≤ t·#(p
T
/p
2
T
)·c
p
as required,This proves part (i) of Theorem 3.1.
Now if we assume that T is a complete intersection we have that t =1
by Proposition 2 of the appendix,In the strict or?at cases (and indeed in
all cases where c
p
= 1) this implies that R
D
similarequal T
D
by Proposition 1 of the
appendix together with Proposition 1.2,In the Selmer case we get
(3.11) #(p
T
/p
2
T
)·c
p
=#(O/η
T,f
)c
p
=#(O/η
T
D,f
) ≤ #(p
T
D
/p
2
T
D
)
where the central equality is by Remark 2.18 and the right-hand inequality
is from the theory of Fitting ideals,Now applying part (i) we see that the
inequality in (3.11) is an equality,By Proposition 2 of the appendix,T
D
is
also a complete intersection.
The?nal assertion of the theorem is proved in exactly the same way on
noting that we only used the minimality to ensure that the h
q
’s were 1,In
general,they are bounded independently of M and easily computed,(The only
point to note is that if ρ
f,λ
is multiplicative type at q then ρ
f,λ|
D
q
does not
split.) square
Remark,The ring T
D
0
de?ned in (3.1) and used in this chapter should
be the deformation ring associated to the following deformation prblem D
0
.
One alters D only by replacing the Selmer condition by the condition that the
deformations be?at in the sense of Chapter 1,i.e.,that each deformation ρ
of ρ
0
to GL
2
(A) has the property that for any quotient A/a of?nite order,
ρ|
D
p
moda is the Galois representation associated to the
ˉ
Q
p
-points of a?nite
at group scheme over Z
p
,(Of course,ρ
0
is ordinary here in contrast to our
usual assumption for?at deformations.)
From Theorem 3.1 we deduce our main results about representations by
using the main result of [TW],which proves the hypothesis of Theorem 3.1
(ii),and then applying Theorem 2.17,More precisely,the main result of [TW]
shows that T is a complete intersection and hence that t = 1 as explained
above,The hypothesis of Theorem 2.17 is then given by Theorem 3.1 (i),
together with the equality t = 1 (and the central equality of (3.11) in the
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 525
Selmer case) and Proposition 1.2,Strictly speaking,Theorem 1 of [TW] refers
to a slightly smaller class of D’s than those covered by Theorem 3.1 but up to
a twist every such D is covered,It is straightforward to see that it is enough
to check Theorem 3.3 for ρ
0
up to a suitable twist.
Theorem 3.3,Assume that ρ
0
is modular and absolutely irreducible
when restricted to Q
parenleftBig
radicalBig
(?1)
p?1
2
p
parenrightBig
,Assume also that ρ
0
is of type (A),(B)
or (C) at each q negationslash= p in Σ,Then the map?
D
,R
D
→ T
D
of Conjecture 2.16
isanisomorphismforall D associatedto ρ
0
,i.e.,where D =(·,Σ,O,M) with
· =Se,str,? or ord,In particular if · =Se,str or? and f is any newform
forwhich ρ
f,λ
isadeformationof ρ
0
oftype D then
#H
1
D
(Q
Σ
/Q,V
f
)=#(O/η
D,f
) < ∞
where η
D,f
istheinvariantde?nedinChapter 2 priorto (2.43).
The condition at q negationslash= p in Σ ensures that there is a minimal D associated
to ρ
0
,The computation of the Selmer group follows from Theorem 2.17 and
Proposition 1.2,Theorem 0.2 of the introduction follows from Theorem 3.3,
after it is checked that a twist of a ρ
0
as in Theorem 0.2 satis?es the hypotheses
of Theorem 3.3.
Chapter 4
In this chapter we give a di?erent (and slightly more general) derivation
of the bound for the Selmer group in the CM case,In the?rst section we
estimate the Selmer group using the main theorem of [Ru 4] which is based on
Kolyvagin’s method,In the second section we use a calculation of Hida to relate
the η-invariant to special values of an L-function,Some of these computations
are valid in the non-CM case also,They are needed if one wishes to give the
order of the Selmer group in terms of the special value of an L-function.
1,The ordinaryCM case
In this section we estimate the order of the Selmer group in the ordinary
CM case,In Section 1 we use the proof of the main conjecture by Rubin to
bound the Selmer group in terms of an L-function,The methods are standard
(cf,[de Sh]) and some special cases have been described elsewhere (cf,[Guo]).
In Section 2 we use a calculation of Hida to relate this to the η-invariant.
We assume that
(4.1) ρ = Ind
Q
L
κ,Gal(
ˉ
Q/Q) → GL
2
(O)
526 ANDREW JOHN WILES
is the p-adic representation associated to a character κ,Gal(L/L) →O
×
of an
imaginary quadratic?eld L,We assume that p is unrami?ed in L and that κ
factors through an extension of L whose Galois group has the form A similarequalZ
p
⊕T
where T is a?nite group of order prime to p,The ring O is assumed to be the
ring of integers of a local?eld with maximal ideal λ and we also assume that
ρ is a Selmer deformation of ρ
0
= ρmodλ which is supposed irreducible with
detρ
0
|
I
p
= ω,In particular it follows that p splits in L,p = p
ˉ
p say,and that
precisely one of κ,κ
is rami?ed at p (κ
being the character τ → κ(στσ
1
)
for any σ representing the nontrivial coset in Gal(
ˉ
Q/Q)/Gal(
ˉ
Q/L)),We can
suppose without loss of generality that κ is rami?ed at p.
We consider the representation module V similarequal (K/O)
4
(where K is the?eld
of fractions of O) and the representation is Adρ,In this case V splits as
V similarequal Y ⊕(K/O)(ψ)⊕K/O
where ψ is the quadratic character of Gal(
ˉ
Q/Q) associated to L,We let Σ
denote a?nite set of primes including all those which ramify in ρ (and in
particular p),Our aim is to compute H
1
Se
(Q
Σ
/Q,V),The decomposition of
V gives a corresponding decomposition of H
1
(Q
Σ
/Q,V) and we can use it to
de?ne H
1
Se
(Q
Σ
/Q,Y),Since W
0
Y (see Chapter 1 for the de?nition of W
0
)
we can de?ne H
1
Se
(Q
Σ
/Q,Y)by
H
1
Se
(Q
Σ
/Q,Y)=ker{H
1
(Q
Σ
/Q,Y) → H
1
(Q
unr
p
,Y/W
0
)}.
Let Y
be the arithmetic dual of Y,i.e.,Hom(Y,μ
p
∞)?Q
p
/Z
p
,Where
ν for κε/κ
and let L(ν) be the splitting?eld of ν,Then we claim that
Gal(L(ν)/L) similarequal Z
p
⊕ T
prime
with T
prime
a?nite group of order prime to p,For this
it is enough to show that χ = κκ
/ε factors through a group of order prime
to p since ν = κ
2
χ
1
,Suppose that χ has order m = m
0
p
r
with (m
0
,p)=1.
Then χ
m
0
extends to a character of Q which is then unrami?ed at p since the
same is true of χ,Also it factors through an abelian extension of L with Galois
group isomorphic to Z
2
p
since χ factors through such an extension with Galois
group isomorphic to Z
2
p
⊕T
1
with T
1
of order prime to p (the composite of the
splitting?elds of κ and κ
),It follows that χ
m
0
is also unrami?ed outside p,
whence it is trivial,This proves the claim.
Over L there is an isomorphism of Galois modules
Y
similarequal (K/O)(ν)⊕(K/O)(ν
1
ε
2
).
In analogy to the above we de?ne H
1
Se
(Q
Σ
/Q,Y
)by
H
1
Se
(Q
Σ
/Q,Y
)=ker{H
1
(Q
Σ
/Q,Y
) → H
1
(Q
unr
p
,(W
0
)
)}.
Analogous de?nitions apply if Y
is replaced by Y
λ
n
,Also we say informally
that a cohomology class is Selmer at p if it vanishes in H
1
(Q
unr
p
,(W
0
)
) (resp.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 527
H
1
(Q
unr
p
,(W
0
λ
n
)
)),Let M

be the maximal abelian p-extension of L(ν) un-
rami?ed outside p,The following proposition generalizes [CS,Prop,5.9].
Proposition 4.1,Thereisanisomorphism
H
1
unr
(Q
Σ
/Q,Y
)

→Hom(Gal(M

/L(ν)),(K/O)(ν))
Gal(L(ν)/L)
where H
1
unr
denotesthesubgroupofclasseswhichareSelmerat p andunram-
i?edeverywhereelse.
Proof,The sequence is obtained from the in?ation-restriction sequence as
follows,First we can replace H
1
(Q
Σ
/Q,Y
)by
braceleftBig
H
1
(Q
Σ
/L,(K/O)(ν))⊕H
1
parenleftBig
Q
Σ
/L,(K/O)(ν
1
ε
2
)
parenrightBigbracerightBig
where? = Gal(L/Q),The unrami?ed condition then translates into the
requirement that the cohomology class should lie in
braceleftBig
H
1
unr in Σ?p
(Q
Σ
/L,(K/O)(ν))⊕H
1
unr in Σ?p
parenleftBig
Q
Σ
/L,(K/O)(ν
1
ε
2
)
parenrightBigbracerightBig
.
Since? interchanges the two groups inside the parentheses it is enough to
compute the?rst of them,i.e.,
(4.2) H
1
unr in Σ?p
(Q
Σ
/L,K/O(ν)).
The in?ation-restriction sequence applied to this gives an exact sequence
0 → H
1
unr in Σ?p
(L(ν)/L,(K/O)(ν))(4.3)
→ H
1
unr in Σ?p
(Q
Σ
/L,(K/O)(ν))
→ Hom(Gal(M

/L(ν)),(K/O)(ν))
Gal(L(ν)/L)
.
The?rst term is zero as one easily check using the divisibility of (K/O)(ν).
Next note that H
2
(L(ν)/L,(K/O)(ν)) is trivial,If ν negationslash≡ 1(λ) this is straight-
forward (cf,Lemma 2.2 of [Ru1]),If ν ≡ 1(λ) then Gal(L(ν)/L) similarequalZ
p
and so
it is trivial in this case also,It follows that any class in the?nal term of (4.3)
lifts to a class c in H
1
(Q
Σ
/L,(K/O)(ν)),Let L
0
be the splitting?eld of Y
λ
.
Then M

L
0
/L
0
is unrami?ed outside p and L
0
/L has degree prime to p.It
follows that c is unrami?ed outside p,square
Now write H
1
str
(Q
Σ
/Q,Y
n
) (where Y
n
= Y
λ
n
and similarly for Y
n
) for
the supgroup of H
1
unr
(Q
Σ
/Q,Y
n
) given by
H
1
str
(Q
Σ
/Q,Y
n
)=
braceleftBig
α ∈ H
1
unr
(Q
Σ
/Q,Y
n
):α
p
=0inH
1
(Q
p
,Y
n
/(Y
n
)
0
)
bracerightBig
where (Y
n
)
0
is the?rst step in the?ltration under D
p
,thus equal to (Y
n
/Y
0
n
)
or equivalently to (Y
)
0
λ
n
where (Y
)
0
is the divisible submodule of Y
on
which the action of I
p
is via ε
2
,(If p negationslash= 3 one can characterize (Y
n
)
0
as the
528 ANDREW JOHN WILES
maximal submodule on which I
p
acts via ε
2
.) A similar de?nition applies with
Y
n
replacing Y
n
,It follows from an examination of the action of I
p
on Y
λ
that
(4.4) H
1
str
(Q
Σ
/Q,Y
n
)=H
1
unr
(Q
Σ
/Q,Y
n
).
In the case of Y
we will use the inequality
(4.5) #H
1
str
(Q
Σ
/Q,Y
) ≤ #H
1
unr
(Q
Σ
/Q,Y
).
We also need the fact that for n su?ciently large the map
(4.6) H
1
str
(Q
Σ
/Q,Y
n
) → H
1
str
(Q
Σ
/Q,Y
)
is injective,One can check this by replacing these groups by the subgroups
of H
1
(L,(K/O)(ν)
λ
n) and H
1
(L,(K/O)(ν)) which are unrami?ed outside p
and trivial at p
,in a manner similar to the beginning of the proof of Proposi-
tion 4.1,the above map is then injective whenever the connecting homomor-
phism
H
0
(L
p
,(K/O)(ν)) → H
1
(L
p
,(K/O)(ν)
λ
n)
is injective,which holds for su?ciently large n.
Now,by Propsition 1.6,
(4.7)
#H
1
str
(Q
Σ
/Q,Y
n
)
#H
1
str
(Q
Σ
/Q,Y
n
)
=#H
0
(Q
p
,(Y
0
n
)
)
#H
0
(Q,Y
n
)
#H
0
(Q,Y
n
)
.
Also,H
0
(Q,Y
n
) = 0 and a simple calculation shows that
#H
0
(Q,Y
n
)=
braceleftBigg
inf
q
#(O/1?ν(q)) if ν = 1 mod λ
1 otherwise
where q runs through a set of primes of O
L
prime to pcond(ν) of density one.
This can be checked since Y
= Ind
Q
L
(ν)?
O
K/O,So,setting
(4.8) t =
braceleftbigg
inf
q
#(O/(1?ν(q))) if ν mod λ =1
1ifν mod λ negationslash=1
we get
(4.9)
#H
1
Se
(Q
Σ
/Q,Y) ≤
1
t
·
producttext
∈Σ
lscript
q
·#Hom(Gal(M

/L(ν)),(K/O)(ν))
Gal(L(ν)/L)
where lscript
q
=#H
0
(Q
q
,Y
) for q negationslash= p,lscript
p
= lim
n→∞
#H
0
(Q
p
,(Y
0
n
)
),This follows
from Proposition 4.1,(4.4)-(4.7) and the elementary estimate
(4.10) #(H
1
Se
(Q
Σ
/Q,Y)/H
1
unr
(Q
Σ
/Q,Y)) ≤
productdisplay
q∈Σ?{p}
lscript
q
,
which follows from the fact that #H
1
(Q
unr
q
,Y)
Gal(Q
unr
q
/Q
q
)
= lscript
q
.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 529
Our objective is to compute H
1
Se
(Q
Σ
/Q,V) and the main problem is to es-
timate H
1
Se
(Q
Σ
/Q,Y),By (4.5) this in turn reduces to the problem of estimat-
ing
#Hom(Gal(M

/L(ν)),(K/O)(ν))
Gal(L(ν)/L)
),This order can be computed
using the ‘main conjecture’ established by Rubin using ideas of Kolyvagin,(cf.
[Ru2] and especially [Ru4],In the former reference Rubin assumes that the
class number of L is prime to p.) We could now derive the result directly from
this by referring to [de Sh,Ch.3],but we will recall some of the steps here.
Let w
f
denote the number of roots of unity ζ of L such that ζ ≡ 1modf
(f an integral ideal of O
L
),We choose an f prime to p such that w
f
=1.
Then there is a grossencharacter? of L satisfying?((α)) = α for α ≡ 1modf
(cf,[de Sh,II.1.4]),According to Weil,after?xing an embedding
ˉ
Q arrowhookleft→
ˉ
Q
p
we
can asssociate a p-adic character?
p
to? (cf,[de Sh,II.1.1 (5)]),We choose
an embedding corresponding to a prime above p and then we?nd?
p
= κ·χ
for some χ of?nite order and conductor prime to p,Indeed?
p
and κ are
both unrami?ed at p
and satisfy?
p
|
I
p
= κ|
I
p
= ε where ε is the cyclotomic
character and I
p
is an inertia group at p,Without altering f we can even choose
so that the order of χ is prime to p,This is by our hyppothesis that κ factored
through an extension of the form Z
p
⊕T with T of order prime to p,To see
this pick an abelian splitting?eld of?
p
and κ whose Galois group has the form
G ⊕ G
prime
with G a pro-p-group and G
prime
of order prime to p,Then we see that
|
G
has conductor dividing fp

,Also the only primes which ramify in a Z
p
-
extension lie above p so our hypothesis on κ ensures that κ|
G
has conductor
dividing fp

,The same is then true of the p-part of χ which therefore has
conductor dividing f,We can therefore adjust? so that χ has order prime
to p as claimed,We will not however choose? so that χ is 1 as this would
require fp

to be divisible by condχ,However we will make the assumption,
by altering f if necessary,but still keeping f prime to p,that both ν and?
p
have conductor dividing fp

,Thus we replace fp

by l.c.m.{f,condν}.
The grossencharacter? (or more precisely N
F/L
) is associated to a
(unique) elliptic curve E de?ned over F = L(f),the ray class?eld of conductor
f,with complex multiplication by O
L
and isomorphic over C to C/O
L
(cf.
[de Sh,II,Lemma 1.4]),We may even?x a Weierstrass model of E over O
F
which has good reduction at all primes above p,For each prime P of F above
p we have a formal group
E
P
,and this is a relative Lubin-Tate group with
respect to F
P
over L
p
(cf,[de Sh,Ch,II,§1.10]),We let λ = λ
E
P
be the
logarithm of this formal group.
Let U

be the product of the principal local units at the primes above p
of L(fp

); i.e.,
U

=
productdisplay
P|p
U
∞,P
where U
∞,P
= lim
←?
U
n
,P,
530 ANDREW JOHN WILES
each U
n,P
being the principal local units in L(fp
n
)
P
,(Note that the primes
of L(f) above p are totally rami?ed in L(fp

) so we still call them {P}.) We
wish to de?ne certain homomorphisms δ
k
on U

,These were?rst introduced
in [CW] in the case where the local?eld F
P
is Q
p
.
Assume for the moment that F
P
is Q
p
,In this case
E
P
is isomorphic to
the Lubin-Tate group associated to πx+ x
p
where π =?(p),Then letting ω
n
be nontrivial roots of [π
n
](x) = 0 chosen so that [π](ω
n
)=ω
n?1
,it was shown
in [CW] that to each element u = lim
←?
u
n
∈ U
∞,P
there corresponded a unique
power series f
u
(T) ∈Z
p
[[T]]
×
such that f
u

n
)=u
n
for n ≥ 1,The de?nition
of δ
k,P
(k ≥ 1) in this case was then
δ
k,P
(u)=
parenleftbigg
1
λ
prime
(T)
d
dT
parenrightbigg
k
logf
n
(T)
vextendsingle
vextendsingle
vextendsingle
vextendsingle
T=0
.
It is easy to see that δ
k,P
gives a homomorphism,U

→ U
∞,P
→O
p
satisfying
δ
k,P

σ
)=θ(σ)
k
δ
k,P
(ε) where θ,Gal
parenleftBig
F/F
parenrightBig
→O
×
p
is the character giving
the action on E[p

].
The construction of the power series in [CW] does not extend to the case
where the formal group has height > 1 or to the case where it is de?ned over
an extension of Q
p
,A more natural approach was developed bt Coleman [Co]
which works in general,(See also [Iw1].) The corresponding generalizations of
δ
k
were given in somewhat greater generality in [Ru3] and then in full generality
by de Shalit [de Sh],We now summarize these results,thus returning to the
general case where F
P
is not assumed to be Q
p
.
To an element u = lim
←?
u
n
∈ U

we can associate a power series f
u,P
(T) ∈
O
P
[[T]]
×
where O
P
is the ring of integers of F
P; see [de Sh,Ch,II §4.5],(More
precisely f
u,P
(T)istheP-component of the power series described there.) For
P we will choose the prime above p corresponding to our chosen embedding
Q arrowhookleft→Q
p
,This power series satis?es u
n,P
=(f
u,P
)(ω
n
) for all n>0,n≡ 0(d)
where d =[F
P
,L
p
] and {ω
n
} is chosen as before as an inverse system of π
n
division points of
E
P
,We de?ne a homomorphism δ
k
,U

→O
P
by
(4.11) δ
k
(u):=δ
k,P
(u)=
parenleftBigg
1
λ
prime
hatwide
E
P
(T)
d
dT
parenrightBigg
k
logf
u,P
(T)
vextendsingle
vextendsingle
vextendsingle
vextendsingle
vextendsingle
T=0
.
Then
(4.12) δ
k
(u
τ
)=θ(τ)
k
δ
k
(u) for τ ∈ Gal(
ˉ
F/F)
where θ again denotes the action on E[p

],Now θ =?
p
on Gal(
ˉ
F/F),We
actually want a homomorphism on u

with a transformation property corre-
sponding to ν on all of Gal(
ˉ
L/L),Observe that ν =?
2
p
on Gal(
ˉ
F/F),Let S
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 531
be a set of coset representatives for Gal(
ˉ
L/L)/Gal(
ˉ
L/F) and de?ne
(4.13) Φ
2
(u)=
summationdisplay
σ∈S
ν
1
(σ)δ
2
(u
σ
) ∈O
P
[ν].
Each term is independent of the choice of coset representative by (4.8) and it
is easily checked that
Φ
2
(u
σ
)=ν(σ)Φ
2
(u).
It takes integral values in O
P
[ν],Let U

(ν) denote the product of the groups
of local principal units at the primes above p of the?eld L(ν) (by which we
mean projective limis of local principal units as before),Then Φ
2
factors
through U

(ν) and thus de?nes a continuous homomorphism
Φ
2
,U

(ν) →C
p
.
Let C

be the group of projective limits of elliptic units in L(ν) as de?ned
in [Ru4],Then we have a crucial theorem of Rubin (cf,[Ru4],[Ru2]),proved
using the ideas of Kolyvagin:
Theorem 4.2,There is an equality of characteristic ideals as Λ=
Z
p
[[Gal(L(ν)/L)]]-modules:
char

(Gal(M

/L(ν))) = char

(U

(ν)/C

).
Let ν
0
= ν mod λ,For any Z
p
[Gal(L(ν
0
)/L)]-module X we write X

0
)
for the maximal quotient of X?
Z
p
O on which the action of Gal(L(ν
0
)/L)isvia
the Teichm¨uller lift of ν
0
,Since Gal(L(ν)/L) decomposes into a direct product
of a pro-p group and a group of order prime to p,
Gal(L(ν)/L) similarequal Gal(L(ν)/L(ν
0
))×Gal(L(ν
0
)/L),
we can also consider anyZ
p
[[Gal(L(ν)/L)]]-module also as aZ
p
[Gal(L(ν
0
)/L)]-
module,In particular X

0
)
is a module over Z
p
[Gal(L(ν
0
)/L)]

0
)
similarequalO,Also
Λ
ν
0
)
similarequalO[[T]].
Now according to results of Iwasawa ([Iw2,§12],[Ru2,Theorem 5.1]),
U

(ν)

0
)
is a free Λ

0
)
-module of rank one,We extend Φ
2
O-linearly to
U

(ν)?
Z
p
O and it then factors through U

(ν)

0
)
,Suppose that u is a
generator of U

(ν)

0
)
and β an element of
ˉ
C

0
)

,Then f(γ?1)u = β for some
f(T) ∈O[[T]] and γ a topological generator of Gal(L(ν)/L(ν
0
)),Computing
Φ
2
on both u and β gives
(4.14) f(ν(γ)?1) = φ
2
(β)/Φ
2
(u).
Next we let e(a) be the projective limit of elliptic units in lim
←?
L
×
fp
n
for
a some ideal prime to 6fp described in [de Sh,Ch,II,§4.9],Then by the
proposition of Chapter II,§2.7 of [de Sh] this is a 12
th
power in lim
←?
L
×
fp
n
,We
532 ANDREW JOHN WILES
let β
1
= β(a)
1/12
be the projection of e(a)
1/12
to U

and take β = Normβ
1
where the norm is from L
fp
∞ to L(ν),A generalization of the calculation in
[CW] which may be found in [de Sh,Ch,II,§4.10] shows that
(4.15) Φ
2
(β) = (root of unity)?
2
(Na?ν(a))L
f
(2,ˉν) ∈O
P
[ν]
where? is a basis for theO
L
-module of periods of our chosen Weierstrass model
of E
/F
,(Recall that this was chosen to have good reduction at primes above p.
The periods are those of the standard Neron di?erential.) Also ν here should
be interpreted as the grossencharacter whose associated p-adic character,via
the chosen embedding Q arrowhookleft→Q
p
,isν,and ν is the complex conjugate of ν.
The only restrictions we have placed on f are that (i) f is prime to p;
(ii) w
f
= 1; and (iii) condν|fp

,Now let f
0
p

be the conductor of ν with f
0
prime to p,We show now that we can choose f such that L
f
(2,ν)/L
f
0
(2,ν)is
a p-adic unit unless ν
0
= 1 in which case we can choose it to be t as de?ned
in (4.4),We can clearly choose L
f
(2,ν)/L
f
0
(2,ν) to be a unit if ν
0
negationslash=1,as
ν(q)ν(q) = Normq
2
for any ideal q prime to f
0
p,Note that if ν
0
= 1 then also
p = 3,Also if ν
0
= 1 then we see that
inf
q
#
braceleftBig
O/{L
f
0
q
(2,ν)/L
f
0
(2,ν)}
bracerightBig
= t
since νε
2
= ν
1
.
We can compute Φ
2
(u) by choosing a special local unit and showing that
Φ
2
(u)isap-adic unit,but it is su?cient for us to know that it is integral,Then
since Gal(M

/L(ν)) has no?nite Λ-submodule (by a result of Greenberg; see
[Gre2,end of §4]) we deduce from Theorem 4.2,(4.14) and (4.15) that
#Hom(Gal(M

/L(ν)),(K/O)(ν))
Gal(L(ν)/L)

braceleftbigg
#O/?
2
L
f
0
(2,ˉν)ifν
0
negationslash=1
(#O/?
2
L
f
0
(2,ˉν))·t if ν
0
=1.
Combining this with (4.9) gives:
#H
1
Se
(Q
Σ
/Q,Y) ≤ #
parenleftBig
O/?
2
L
f
0
(2,ˉν)
parenrightBig
·
productdisplay
q∈Σ
lscript
q
where lscript
q
=#H
0
(Q
q
,Y
) (for q negationslash= p),lscript
p
=#H
0
(Q
p
,(Y
0
)
).
Since V similarequal Y ⊕(K/O)(ψ)⊕K/O we need also a formula for
#ker
braceleftBig
H
1
(Q
Σ
/Q,(K/O)(ψ)⊕K/O) → H
1
(Q
unr
p
,(K/O)(ψ)⊕K/O)
bracerightBig
.
This is easily computed to be
(4.16) #(O/h
L

productdisplay
q∈Σ?{p}
lscript
q
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 533
where lscript
q
=#H
0
(Q
q
,((K/O)(ψ)⊕K/O)
) and h
L
is the class number of O
L
.
Combining these gives:
Proposition 4.3.
#H
1
Se
(Q
Σ
/Q,V) ≤ #(O/?
2
L
f
0
(2,ν))·#(O/h
L

productdisplay
q∈Σ
lscript
q
where lscript
q
=#H
0
(Q
q
,V
)(for q negationslash= p),lscript
p
=#H
0
(Q
p
,(Y
0
)
).
2,Calculation of η
We need to calculate explicitly the invariants η
D,f
introduced in Chapter 2,
§3 in a special case,Let ρ
0
be an irreducible representation as in (1.1),Suppose
that f is a newform of weight 2 and level N,λ a prime of O
f
above p and ρ
f,λ
a
deformation of ρ
0
,Let m be the kernel of the homomorphism T
1
(N) →O
f

arising from f,We write T for T
1
(N)
m
W(k
m
)
O,where O = O
f,λ
and k
m
is
the residue?eld of m,Assume that p notbar N,We assume here that k is the
residue?eld of O and that it is chosen to contain k
m
,Then by Corollary 1 of
Theorem 2.1,T
1
(N)
m
is Gorenstein andit follows that T is also a Gorenstein
O-algebra (see the discussion following (2.42)),So we can use perfect pairings
(the second one T-bilinear)
O×O→O,〈,〉,T ×T →O
to de?ne an invariant η of T.Ifπ,T →Ois the natural map,we set
(η)=(?π(1)) where?π is the adjoint of π with respect to the pairings,It is
well-de?ned as an ideal of T,depending only on π,Furthermore,as we noted
in Chapter 2,§3,π(η)=〈η,η〉 up to a unit in O and as noted in the appendix
η = Ann p = T[p] where p =kerπ,We now give an explicit formula for η
developed by Hida (cf,[Hi2] for a survey of his earlier results) by interpreting
〈,〉 in terms of the cup product pairing on the cohomology of X
1
(N),and
then in terms of the Petersson inner product of f with itself,The following
account (which does not require the CM hypothesis) is adapted from [Hi2] and
we refer there for more details.
Let
(4.17) (,):H
1
(X
1
(N),O
f
)×H
1
(X
1
(N),O
f
) →O
f
be the cup product pairing with O
f
as coe?cients,(We sometimes drop the
C from X
1
(N)
/C
or J
1
(N)
/C
if the context makes it clear that we are re-
ferring to the complex manifolds.) In particular (t
x,y)=(x,t
y) for all
x,y and for each standard Hecke correspondence t,We use the action of t on
H
1
(X
1
(N),O
f
) given by x mapsto→ t
x and simply write tx for t
x,This is the same
534 ANDREW JOHN WILES
as the action induced by t
∈ T
1
(N)onH
1
(J
1
(N),O
f
) similarequal H
1
(X
1
(N),O
f
).
Let p
f
be the minimal prime of T
1
(N)?O
f
associated to f (i.e.,the kernel of
T
1
(N)?O
f
→O
f
given by t
l
β mapsto→ βc
t
(f) where tf = c
t
(f)f),and let
L
f
= H
1
(X
1
(N),O
f
)[p
f
].
If f =Σa
n
q
n
let f
ρ
=Σˉa
n
q
n
,Then f
ρ
is again a newform and we de?ne
L
f
ρ by replacing f by f
ρ
in the de?nition of L
f
,(Note here that O
f
= O
f
ρ
as these rings are the integers of?elds which are either totally real or CM by
a result of Shimura,Actually this is not essential as we could replace O
f
by
any ring of integers containing it.) Then the pairing (,) induces another by
restriction
(4.18) (,):L
f
×L
f
ρ →O
f
.
Replacing O (and the O
f
-modules) by the localization of O
f
at p (if necessary)
we can assume that L
f
and L
f
ρ are free of rank 2 and direct summands as
O
f
-modules of the respective cohomology groups,Let δ
1

2
be a basis of L
f
.
Then also
ˉ
δ
1
,
ˉ
δ
2
is a basis of L
f
ρ = L
f
,Here complex conjugation acts on
H
1
(X
1
(N),O
f
) via its action on O
f
,We can then verify that
(δ,
ˉ
δ),= det(δ
i
,
ˉ
δ
j
)
is an element of O
f
(or its localization at p) whose image in O
f,λ
is given by
π(η
2
) (unit),To see this,consider a modi?ed pairing 〈,〉 de?ned by
(4.19) 〈x,y〉 =(x,w
ζ
y)
where w
ζ
is de?ned as in (2.4),Then 〈tx,y〉 = 〈x,ty〉 for all x,y and Hecke
operators t,Furthermore
det〈δ
i

j
〉 = det(δ
i
,w
ζ
δ
j
)=cdet(δ
i
δ
j
)
for some p-adic unit c (in O
f
),This is because w
ζ
(L
f
ρ)=L
f
and w
ζ
(L
f
)=
L
f
ρ,(One can check this,foe example,using the explicit bases described
below.) Moreover,by Theorem 2.1,
H
1
(X
1
(N),Z)?
T
1
(N)
T
1
(N)
m
similarequalT
1
(N)
2
m
,
H
1
(X
1
(N),O
f
)?
T
1
(N)?O
f
T similarequal T
2
.
Thus (4.18) can be viewed (after tensoring with O
f,λ
and modifying it as in
(4.19)) as a perfect pairing of T-modules and so this serves to compute π(η
2
)
as explained earlier (the square coming from the fact that we have a rank 2
module).
To give a more useful expression for (δ,
ˉ
δ) we observe that f and f
ρ
can be
viewed as elements of H
1
(X
1
(N),C) similarequal H
1
DR
(X
1
(N),C) via f mapsto→ f(z)dz,f
ρ
mapsto→
f
ρ
dz,Then {f,f
ρ
} form a basis for L
f
O
f
C,Similarly {
ˉ
f,f
ρ
} form a basis
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 535
for L
f
ρ?
O
f
C,De?ne the vectors ω
1
=(f,f
ρ
),ω
2
=(
ˉ
f,f
ρ
) and write
ω
1
= Cδ and ω
2
=
ˉ
C
ˉ
δ with C ∈ M
2
(C),Then writing f
1
= f,f
2
= f
ρ
we set
(ω,ˉω),= det((f
i
,f
j
)) = (δ,
ˉ
δ)det(C
ˉ
C).
Now (ω,ˉω) is given explicitly in terms of the (non-normalized) Petersson inner
product 〈,〉:
(ω,ˉω)=?4〈f,f〉
2
where 〈f,f〉 =
integraltext
H/Γ
1
(N)
f
ˉ
fdxdy.
To compute det(C) we consider integrals over classes in H
1
(X
1
(N),O
f
).
By Poincar’e duality there exist classes c
1
,c
2
in H
1
(X
1
(N),O
f
) such that
det(
integraltext
c
j
δ
i
) is a unit in O
f
,Hence detC generates the same O
f
-module as
is generated by
braceleftBig
det
parenleftBig
integraltext
c
j
f
i
parenrightBigbracerightBig
for all such choices of classes (c
1
,c
2
) and with
{f
1
,f
2
} = {f,f
ρ
},Letting u
f
be a generator of the O
f
-module
braceleftBig
det
parenleftBig
integraltext
c
j
f
i
parenrightBigbracerightBig
we have the following formula of Hida:
Proposition 4.4,π(η
2
)=〈f,f〉
2
/u
f
ˉu
f
×( unitin O
f,λ
).
Now we restrict to the case where ρ
0
= Ind
Q
L
κ
0
for some imaginary
quadratic?eld L which is unrami?ed at p and some k
×
-valued character κ
0
of Gal(
ˉ
L/L),We assume that ρ
0
is irreducible,i.e.,that κ
0
negationslash= κ
0,σ
where
κ
0,σ
(δ)=κ
0

1
δσ) for any σ representing the nontrivial coset of
Gal(
ˉ
L/Q)/Gal(
ˉ
L/L),In addition we wish to assume that ρ
0
is ordinary and
detρ
0
|
I
p
= ω,In particular p splits in L,These conditions imply that,if p is a
prime of L above pκ
0
(α) ≡ α
1
mod p on U
p
after possible replacement of κ
0
by κ
0,σ
,Here the U
p
are the units of L
p
and since κ
0
is a character,the restric-
tion of κ
0
to an inertia group I
p
induces a homomorphism on U
p
,We assume
now that p is?xed and κ
0
chosen to satisfy this congruence,Our choice of
κ
0
will imply that the grossencharacter introduced below has conductor prime
to p.
We choose a (primitive) grossencharacter? on L together with an em-
bedding Q arrowhookleft→Q
p
corresponding to the prime p above p such that the induced
p-adic character?
p
has the properties:
(i)?
p
mod p = κ
0
(p = maximal ideal of Q
p
).
(ii)?
p
factors through an abelian extension isomorphic to Z
p
⊕T with T of
nite order prime to p.
(iii)?((α)) = α for α ≡ 1(f) for some integral ideal f prime to p.
To obtain? it is necessary?rst to de?ne?
p
,Let M

denote the maximal
abelian extension of L which is unrami?ed outside p,Let θ,Gal(M

/L) →
Q
p
×
be any character which factors through a Z
p
-extension and induces the
536 ANDREW JOHN WILES
homomorphism α mapsto→ α
1
on U
p,1
mapsto→ Gal(M

/L) where U
p,1
= {u ∈ U
p
,u ≡
1(p)},Then set?
p
= κ
0
θ,and pick a grossencharacter? such that (?)
p
=?
p
.
Note that our choice of? here is not necessarily intended to be the same as
the choice of grossencharacter in Section 1.
Now let f
be the conductor of? and let F be the ray class?eld of con-
ductor f
ˉ
f
,Then over F there is an elliptic curve,unique up to isomorphism,
with complex multiplication by O
L
and period lattice free,of rank one over O
L
and with associated grossencharacterN
F/L
,The curve E
/F
is the extension
of scalars of a unique elliptic curve E
/F
+ where F
+
is the sub?eld of F of
index 2,(See [Sh1,(5.4.3)].) Over F
+
this elliptic curve has only the p-power
isogenies of the form ±p
m
for m ∈Z,To see this observe that F is unrami?ed
at p and ρ
0
is ordinary so that the only isogenies of degree p over F are the
ones that correspond to division by kerp and kerp
prime
where pp
prime
=(p)inL.Over
F
+
these two subgroups are interchanged by complex conjugation,which gives
the assertion,We let E/
O
F
+
,(p)
denote a Weierstrass model over O
F
+
,(p)
,the
localization of O
F
+ at p,with good reduction at the primes above p,Let ω
E
be a Neron di?erential of E
/O
F
+
,(p)
,Let? be a basis for the O
L
-module of
periods of ω
E
,Then?=u·? for some p-adic unit in F
×
.
According to a theorem of Hecke,? is associated to a cusp form f
in such
a way that the L-series L(s,?) and L(s,f
) are equal (cf,[Sh4,Lemma 3]).
Moreover since? was assumed primitive,f = f
is a newform,Thus the
integer N = cond f = |?
L/Q
|Norm
L/Q
(cond?) is prime to p and there is a
homomorphism
ψ
f
,T
1
(N)dblarrowheadrightR
f
O
f
O
satisfying ψ
f
(T
l
)=?(c)+?(?c)ifl = c?c in L,(lnotbarN) and ψ
f
(T
l
)=0ifl is inert
in L (l notbarN),Also ψ
f
(l〈l〉)=?((l))ψ(l) where ψ is the quadratic character
associated to L,Using the embedding of
ˉ
Q in
ˉ
Q
p
chosen above we get a
prime λ of O
f
above p,a maximal ideal m of T
1
(N) and a homomorphism
T
1
(N)
m
→O
f,λ
such that the associated representation ρ
f,λ
reduces to
ρ
0
mod λ.
Let p
0
=kerψ
f
,T
1
(N) →O
f
and let
A
f
= J
1
(N)/p
0
J
1
(N)
be the abelian variety associated to f by Shimura,Over F
+
there is an isogeny
A
f/F
+ ~ (E
/F
+)
d
where d =[O
f
,Z] (see [Sh4,Th,1]),To see this one checks that the p-adic Ga-
lois representation associated to the Tate modules on each side are equivalent
to (Ind
F
+
F
o
)?
Z
p
K
f,p
where K
f,p
= O
f
Q
p
and where?
p
,Gal(F/F) →Z
×
p
is the p-adic character associated to? and restricted to F,(one compares
trace(Frob lscript) in the two representations for lscriptnotbarNp and lscript split completely in
F
+; cf,the discussion after Theorem 2.1 for the representation on A
f
.)
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 537
Now pick a nonconstant map
π,X
1
(N)
/F
+ → E
/F
+
which factors through A
f/F
+,Let M be the composite of F
+
and the nor-
mal closure of K
f
viewed in C,Let ω
E
be a Neron di?erential of E
/O
F
+
,(p)
.
Extending scalars to M we can write
π
ω
E
=
summationdisplay
σ∈Hom(K
f
,C)
a
σ
ω
f
σ,a
σ
∈ M
where ω
f
σ =

summationtext
n=1
a
n
(f
σ
)q
n
dq
q
for each σ,By suitably choosing π we can assume
that a
id
negationslash=0,Then there exist λ
i
∈O
M
and t
i
∈T
1
(N) such that
summationdisplay
λ
i
t
i
π
ω
E
= c
1
ω
f
for some c
1
∈ M.
We consider the map
(4.20) π
prime
,H
1
(X
1
(N)
/C
,Z)?O
M,(p)
→ H
1
(E
/C
,Z)?O
M,(p)
given by π
prime
=
summationtext
λ
i
(π?t
i
),Even if π
prime
is not surjective we claim that the image
of π
prime
always has the form H
1
(E
/C
,Z)? aO
M,(p)
for some a ∈O
M
,This is
because tensored with Z
p
π
prime
can be viewed as a Gal(Q/F
+
)-equivariant map
of p-adic Tate-modules,and the omly p-power isogenies on E
/F
+ have the form
±p
m
for some m ∈ Z,It follows that we can factor π
prime
as (1?a)?α for some
other surjective α
α,H
1
(X
1
(N)
/C
,Z)?O
M
→ H
1
(E
/C
,Z)?O
M
,
now allowing a to be in O
M,(p)
,Now de?ne α
on?
1
E/C
by α
=
summationtext
a
1
λ
i
t
i
π
where π
:?
1
E/C
→?
1
J
1
(N)/C
is the map induced by π and t
i
has the usual
action on?
1
J
1
(N)/C
,Then α

E
)=cω
f
for some c ∈ M and
(4.21)
integraldisplay
γ
α

E
)=
integraldisplay
α(γ)
ω
E
for any class γ ∈ H
1
(X
1
(N)
/C
,O
M
),We note that α (on homology as in
(4.20)) also comes from a map of abelian varieties α,J
1
(N)
/F
+?
Z
O
M

E
/F
+?
Z
O
M
although we have not used this to de?ne α
.
We claim now that c ∈O
M,(p)
,We can compute α

E
) by considering
α

E
1) =
summationtext
t
i
π
a
1
λ
i
on?
1
E/F
+
O
M
and then mapping the image in
1
J
1
(N)/F
+
O
M
to?
1
J
1
(N)/F
+
O
F
+
O
M
=?
1
J
1
(N)/M
,Now let us write O
1
for
O
F
+
,(p)
,Then there are isomorphisms
1
J
1
(N)
/O
1
O
2
s
1

→ Hom(O
M
,?
1
J
1
(N)
/O
1
)
s
2

→?
1
J
1
(N)
/O
1
δ
1
538 ANDREW JOHN WILES
where δ is the di?erent of M/Q,The?rst isomorphism can be described as
follows,Let e(γ):J
1
(N) → J
1
(N)?O
M
for γ ∈O
M
be the map x mapsto→ x?γ.
Then t
1
(ω)(δ)=e(γ)
ω,Similar identi?cations occur for E in place of J
1
(N).
So to check that α

E
1) ∈?
1
J
1
(N)
/O
1
O
M
it is enough to observe that by
its construction α comes from a homomorphism J
1
(N)
/O
1
O
M
→ E
/O
1
O
M
.
It follows that we can compare the periods of f and of ω
E
.
For f
ρ
we use the fact that
integraltext
γ
f
ρ
dz =
integraltext
γ
c
fdzwhere c is the O
M
-linear
map on homology coming from complex conjugation on the curve,We deduce:
Proposition 4.5,u
f
=
1

2
2
.(1/p-adicinteger)).
We now give an expression for 〈f
,f
〉 in terms of the L-function of?.
This was?rst observed by Shimura [Sh2] although the precise form we want
was given by Hida.
Proposition 4.6.
〈f
,f
〉 =
1
16π
3
N
2
braceleftBigg
productdisplay
q|N
qnegationslash∈S
parenleftBig
1?
1
q
parenrightBig
bracerightBigg
L
N
(2,?
2
ˉ
χ)L
N
(1,ψ)
where χ isthecharacterof f
and?χ itsrestrictionto L;
ψ isthequadraticcharacterassociatedto L;
L
N
()denotes that the Euler factors for primes dividing N have been
removed;
S
is the set of primes q|N such that q = qq
prime
with qnotbarcond? and q,q
prime
primesof L,notnecessarilydistinct.
Proof,One begins with a formula of Petterson that for an eigenform of
weight 2 on Γ
1
(N)says
〈f,f〉 =(4π)
2
Γ(2)
parenleftBig
1
3
parenrightBig
π[SL
2
(Z):Γ
1
(N)·(±1)]·Res
s=2
D(s,f,f
ρ
)
where D(s,f,f
ρ
)=

summationtext
n=1
|a
n
|
2
n
s
if f =

summationtext
n=1
a
n
q
n
(cf,[Hi3,(5.13)]),One checks
that,removing the Euler factors at primes dividing N,
D
N
(s,f,f
ρ
)=L
N
(s,?
2
ˉ
χ)L
N
(s?1,ψ)ζ
Q,N
(s?1)/ζ
Q,N
(2s?2)
by using Lemma 1 of [Sh3],For each Euler factor of f at a q|N of the form
(1?α
q
q
s
) we get also an Euler factor in D(s,f,f
ρ
) of the form (1?α
q
ˉα
q
q
s
).
When f = f
this can only happen for a split prime q where q
prime
divides the
conductor of? but q does not,or for a rami?ed prime q which does not divide
the conductor of?,In this case we get a term (1?q
1?s
) since |?(q)|
2
= q.
Putting together the propositions of this section we now have a formula for
π(η) as de?ned at the beginning of this section,Actually it is more convenient
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 539
to give a formula for π(η
M
),an invariant de?ned in the same way but with
T
1
(M)
m
1
W(k
m
1
)
O replacing T
1
(N)
m
W(k
m
)
O where M = pM
0
with pnotbarM
0
and M/N is of the form
productdisplay
q∈S
q ·
productdisplay
qnotbarN
q|M
0
q
2
.
Here m
1
is de?ned by the requirements that ρ
m
1
= ρ
0
,U
q
∈ m if q|M(q negationslash= p)
and there is an embedding (which we?x) k
m
1
arrowhookleft→ k over k
0
taking U
p
→ α
p
where α
p
is the unit eigenvalue of Frob p in ρ
f,λ
.Soiff
prime
is the eigenform
obtained from f by ‘removing the Euler factors’ at q|(M/N)(q negationslash= p) and
removing the non-unit Euler factor at p we have η
M
=?π(1) where π,T
1
=
T
1
(M)
m
1
W(k
m
1
)
O→Ocorresponds to f
prime
and the adjoint is taken with respect
to perfect pairings of T
1
and O with themselves as O-modules,the?rst one
assumed T
1
-bilinear.
Property (ii) of?
p
ensures that M is as in (2.24) with D = (Se,Σ,O,φ)
where Σ is the set of primes dividing M,(Note that S
is precisely the set of
primes q for which n
q
= 1 in the notation of Chapter 2,§3.) As in Chapter 2,
§3 there is a canonical map
R
D
→T
D
similarequalT
1
(M)
m
1
W(k
m
1
)
O
which is surjective by the arguments in the proof of Proposition 2.15,Here
we are considering a slightly more general situation than that in Chapter 2,
§3 as we are allowing ρ
0
to be induced from a character of Q(

3),In this
special case we de?ne T
D
to be T
1
(M)
m
1
W(k
m
1
)
O,The existence of the map
in (4.22) is proved as in Chapter 2,§3,For the surjectivity,note that for each
q|M (with q negationslash= p) U
q
is zero in T
D
as U
q
∈ m
1
for each such q so that we
can apply Remark 2.8,To see that U
p
is in the image of R
D
we use that it
is the eigenvalue of Frobp on the unique unrami?ed quotient which is free of
rank one in the representation ρ described after the corollaries to Theorem 2.1
(cf,Theorem 2.1.4 of [Wi1]),To verify this one checks that T
D
is reduced
or alternatively one can apply the method of Remark 2.11,We deduce that
U
p
∈T
tr
D
,the W(k
m
1
)-subalgebra of T
1
(M)
m
1
generated by the traces,and it
follows then that it is in the image of R
D
,We also need to give a de?nition of
T
D
where D = (ord,Σ,O,φ) and ρ
0
is induced from a character of Q(

3).
For this we use (2.31).
Now we take
M = Np
productdisplay
q∈S
q.
540 ANDREW JOHN WILES
The arguments in the proof of Theorem 2.17 show that
π(η
M
) is divisible by π(η)(α
2
p
〈p〉)·
productdisplay
q∈S
(q?1)
where α
p
is the unit eigenvalue of Frobp in ρ
f,λ
,The factor at p is given by
remark 2.18 and at q it comes from the argument of Proposition 2.12 but with
H = H
prime
= 1,Combining this with Propositions 4.4,4.5,and 4.6,we have that
(4.23) π(η
M
) is divisible by?
2
L
N
parenleftBig
2,?
2
ˉ
χ
parenrightBig
L
N
(1,φ)
π

2
p
〈p〉)
productdisplay
q|N
(q?1).
We deduce:
Theorem 4.7,#(O/π(η
M
)) = #H
1
Se
(Q
Σ
/Q,V).
Proof,As explained in Chapter 2,§3 it is su?cient to prove the inequality
#(O/π(η
M
)) ≥ #H
1
Se
(Q
Σ
/Q,V) as the opposite one is immediate,For this it
su?ces to compare (4.23) with Proposition 4.3,Since
L
N
(2,ˉν)=L
N
(2,ν)=L
N
(2,?
2
ˉ
χ)
(note that the right-hand term is real by Proposition 4.6) it su?ces to air up
the Euler factors at q for q|N in (4.23) and in the expression for the upper
bound of #H
1
Se
(Q
Σ
/Q,V),square
We now deduce the main theorem in the CM case using the method of
Theorem 2.17.
Theorem 4.8,Suppose that ρ
0
as in (1.1) is an irreducible represen-
tation of odd determinant such that ρ
0
= Ind
Q
L
κ
0
for a character κ
0
of an
imaginary quadratic extension L of Q which is unrami?ed at p,Assume also
that:
(i) detρ
0
vextendsingle
vextendsingle
vextendsingle
I
p
= ω;
(ii) ρ
0
isordinary.
Thenforevery D =(·,Σ,O,φ) uchthat ρ
0
osoftype D with · =Seor ord,
R
D
similarequalT
D
and T
D
isacompleteintersection.
Corollary,Forany ρ
0
asinthetheoremsupposethat
ρ,Gal(
ˉ
Q/Q) → GL
2
(O)
is a continuous representation with values in the ring of integers of a local
eld,unrami?ed outside a?nite set of primes,satisfying ˉρ similarequal ρ
0
when viewed
asrepresentationsto GL
2
(
ˉ
F
p
),Supposefurtherthat:
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 541
(i) ρ
vextendsingle
vextendsingle
vextendsingle
D
p
isordinary;
(ii) detρ
vextendsingle
vextendsingle
vextendsingle
I
p
= χε
k?1
with χ of?niteorder,k ≥ 2.
Then ρ isassociatedtoamodularformofweight k.
Chapter 5
In this chapter we prove the main results about elliptic curves and espe-
cially show how to remove the hypothesis that the representation associated
to the 3-division points should be irreducible.
Application to elliptic curves
The key result used is the following theorem of Langlands and Tunnell,
extending earlier results of Hecke in the case where the projective image is
dihedral.
Theorem 5.1 (Langlands-Tunnell),Suppose that ρ,Gal(
ˉ
Q/Q) →
GL
2
(C) is a continuous irreducible representation whose image is?nite and
solvable,Suppose further that detρ is odd,Then there exists a weight one
newform f suchthat L(s,f)=L(s,ρ) upto?nitelymanyEulerfactors.
Langlands actually proved in [La] a much more general result without
restriction on the determinant or the number?eld (which in our case is Q).
However in the crucial case where the image in PGL
2
(C)isS
4
,the result was
only obtained with an additional hypothesis,This was subsequently removed
by Tunnell in [Tu].
Suppose then that
ρ
0
,Gal(
ˉ
Q/Q) → GL
2
(F
3
)
is an irreducible representation of odd determinant,We now show,using
the theorem,that this representation is modular in the sense that over
ˉ
F
3
,
ρ
0
≈ ρ
g,μ
mod μ for some pair (g,μ) with g some newform of weight 2 (cf,[Se,
§5.3]),There exists a representation
i,GL
2
(F
3
) arrowhookleft→ GL
2
parenleftBig
Z
bracketleftBig

2
bracketrightBigparenrightBig
GL
2
(C).
By composing i with an automorphism of GL
2
(F
3
) if necessary we can assume
that i induces the identity on reduction mod
parenleftbig
1+

2
parenrightbig
,So if we consider
542 ANDREW JOHN WILES
i?ρ
0
,Gal(
ˉ
Q/Q) → GL
2
(C) we obtain an irreducible representation which is
easily seen to be odd and whose image is solvable,Applying the theorem we
nd a newform f of weight one associated to this representation,Its eigenvalues
lie in Z
bracketleftbig√
2
bracketrightbig
,Now pick a modular form E of weight one such that E ≡ 1(3).
For example,we can take E =6E
1,χ
where E
1,χ
is the Eisenstein series with
Mellin transform given by ζ(s)ζ(s,χ) for χ the quadratic character associated
to Q(

3),Then fE ≡ f mod 3 and using the Deligne-Serre lemma ([DS,
Lemma 6.11]) we can?nd an eigenform g
prime
of weight 2 with the same eigenvalues
as f modulo a prime μ
prime
above (1 +

2),There is a newform g of weight 2
which has the same eigenvalues as g
prime
for almost all T
l
’s,and we replace (g
prime

prime
)
by (g,μ) for some prime μ above (1+

2),Then the pair (g,μ) satis?es our
requirements for a suitable choice of μ (compatible with μ
prime
).
We can apply this to an elliptic curve E de?ned over Q by considering
E[3],We now show how in studying elliptic curves our restriction to irreducible
representations in the deformation theory can be circumvented.
Theorem 5.2,Allsemistableellipticcurvesover Q aremodular.
Proof,Suppose that E is a semistable elliptic curve over Q,Assume
rst that the representation ˉρ
E,3
on E[3] is irreducible,Then if ρ
0
=ˉρ
E,3
restricted to Gal(
ˉ
Q/Q(

3)) were not absolutely irreducible,the image of the
restriction would be abelian of order prime to 3,As the semistable hypothesis
implies that all the inertia groups outside 3 in the splitting?eld of ρ
0
have
order dividing 3 this means that the splitting?eld of ρ
0
is unrami?ed outside
3,However,Q(

3) has no nontrivial abelian extensions unrami?ed outside 3
and of order prime to 3,So ρ
0
itself would factor through an abelian extension
of Q and this is a contradiction as ρ
0
is assumed odd and irreducible,So
ρ
0
restricted to Gal(
ˉ
Q/Q(

3)) is absolutely irreducible and ρ
E,3
is then
modular by Theorem 0.2 (proved at the end of Chapter 3),By Serre’s isogeny
theorem,E is also modular (in the sense of being a factor of the Jacobian of a
modular curve).
So assume now that ˉρ
E,3
is reducible,Then we claim that the represen-
tation ˉρ
E,5
on the 5-division points is irreducible,This is because X
0
(15)(Q)
has only four rational points besides the cusps and these correspond to non-
semistable curves which in any case are modular; cf,[BiKu,pp,79-80],If we
knew that ˉρ
E,5
was modular we could now prove the theorem in the same way
we did knowing that ˉρ
E,3
was modular once we observe that ˉρ
E,5
restricted to
Gal(
ˉ
Q/Q(

5)) is absolutely irreducible,This irreducibility follows a similar
argument to the one for ˉρ
E,3
since the only nontrivial abelian extension of
Q(

5) unrami?ed outside 5 and of order prime to 5 is Q(ζ
5
) which is abelian
over Q,Alternatively,it is enough to check that there are no elliptic curves
E for which ˉρ
E,5
is an induced representation over Q(

5) and E is semistable
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 543
at 5,This can be checked in the supersingular case using the description of
ˉρ
E,5
|
D
5
(in particular it is induced from a character of the unrami?ed quadratic
extension of Q
5
whose restriction to inertia is the fundamental character of
level 2) and in the ordinary case it is straightforward.
Consider the twisted form X(ρ)
/Q
of X(5)
/Q
de?ned as follows,Let
X(5)
/Q
be the (geometrically disconnected) curve whose non-cuspidal points
classify elliptic curves with full level 5 structure and let the twisted curve be
de?ned by the cohomology class (even homomorphism) in
H
1
(Gal(L/Q),Aut !X(5)
/L
)
given by ˉρ
E,5
,Gal(L/Q)?→ GL
2
(Z/5Z)? AutX(5)
/L
where L denotes the
splitting?eld of ˉρ
E,5
,Then E de?nes a rational point on X(ρ)
/Q
and hence
also of an irreducible component of it which we denote C,This curve C is
smooth as X(ρ)
/
ˉ
Q
= X(5)
/
ˉ
Q
is smooth,It has genus zero since the same is
true of the irreducible components of X(5)
/
ˉ
Q
.
A rational point on C (necessarily non-cuspidal) corresponds to an elliptic
curve E
prime
over Q with an isomorphism E
prime
[5] similarequal E[5] as Galois modules (cf,[DR,
VI,Prop,3.2]),We claim that we can choose such a point with the two
properties that (i) the Galois representation ˉρ
E
prime
,3
is irreducible and (ii) E
prime
(or
a quadtratic twist)has semistable reduction at 5,The curve E
prime
(or a quadratic
twist) will then satisfy all the properties needed to apply Theorem 0.2,(For the
primes q negationslash= 5 we just use the fact that E
prime
is semistable at q #ˉρ
E
prime
,5
(I
q
)|5.)
So E
prime
will be modular and hence so too will ˉρ
E
prime
,5
.
To pick a rational point on C satisfying (i) and (ii) we use the Hilbert irre-
ducibility theorem,For,to ensure condition (i) holds,we only have to eliminate
the possibility that the image of ˉρ
E
prime
,3
is reducible,But this corresponds to E
prime
being the image of a rational point on an irreducible covering of C of degree
4,Let Q(t) be the function?eld of C,We have therefore an irreducible poly-
nomial f(x,t) ∈ Q(t)[x] of degree > 1 and we need to ensure that for many
values t
0
in Q,f(x,t
0
) has no rational solution,Hilbert’s theorem ensures
that there exists a t
1
such that f(x,t
1
) is irreducible,Then we pick a prime
p
1
negationslash= 5 such that f(x,t
1
) has no root mod p
1
,(This is easily achieved using the
ˇ
Cebotarev density theorem; cf,[CF,ex,6.2,p,362].) So?nally we pick any
t
0
∈Q which is p
1
-adically close to t
1
and also 5-adically close to the original
value of t giving E,This last condition ensures that E
prime
(corresponding to t
0
)
or a quadratic twist has semistable reduction at 5,To see this,observe that
since j
E
negationslash=0,1728,we can?nd a family E(j):y
2
= x
3
g
2
(j)x?g
3
(j) with
rational functions g
2
(j),g
3
(j) which are?nite at j
E
and with the j-invariant of
E(j
0
) equal to j
0
whenever the g
i
(j
0
) are?nite,Then E is given by a quadratic
twist of E(j
E
) and so after a change of functions of the form g
2
(j) mapsto→ u
2
g
2
(j),
g
3
(j) mapsto→ u
3
g
3
(j) with u ∈ Q
×
we can assume that E(j
E
)=E and that the
equation E(j
E
) is minimal at 5,Then for j
prime
∈Q close enough 5-adically to j
E
544 ANDREW JOHN WILES
the equation E(j
prime
) is still minimal and semistable at 5,since a criterion for this,
for an integral model,is that either ord
5
(triangle(E(j
prime
))) = 0 or ord
5
(c
4
(E(j
prime
)))=0.
So up to a quadratic twist E
prime
is also semistable,square
This kind of argument can be applied more generally.
Theorem 5.3,Suppose that E is an elliptic curve de?ned over Q with
thefollowingproperties:
(i) E hasgoodormultiplicativereductionat 3,5,
(ii)For p =3,5andforanyprimeq≡?1modpeither ˉρ
E,p
|
D
q
isreducible
over
ˉ
F
p
or ˉρ
E,p
|I
q
isirreducibleover
ˉ
F
p
.
Then E ismodular.
Proof,the main point to be checked is that one can carry over condi-
tion (ii) to the new curve E
prime
,For this we use that for any odd prime p negationslash= q,
ˉρ
E,p
|
D
q
is absolutely irreducible and ˉρ
E,p
|
I
q
is absolutely reducible
and 3notbar#ˉρ
E,p
(I
q
)
arrowdblbothv
E acquires good reduction over an abelian 2-power extension of
Q
unr
q
but not over an abelian extension of Q
q
.
Suppose then that q ≡?1(3) and that E
prime
does not satisfy condition (ii) at
q (for p = 3),Then we claim that also 3notbar#ˉρ
E
prime
,3
(I
q
),For otherwise ˉρ
E
prime
,3
(I
q
)
has its normalizer in GL
2
(F
3
) contained in a Borel,whence ˉρ
E
prime
,3
(D
q
) would
be reducible which contradicts our hypothesis,So using the above equivalence
we deduce,by passing via ˉρ
E
prime
,5
similarequal ˉρ
E,5
,that E also does not satisfy hypothesis
(ii) at p =3.
We also need to ensure that ˉρ
E
prime
,3
is absolutely irreducible over Q(

3).
This we can do by observing that the property that the image of ˉρ
E
prime
,3
lies in the
Sylow 2-subgroup of GL
2
(F
3
) implies that E
prime
is the image of a rational point
on a certain irreducible covering of C of nontrivial degree,We can then argue
in the same way we did in the previous theorem to eliminate the possibility
that ˉρ
E
prime
,3
was reducible,this time using two separate coverings to ensure that
the image of ˉρ
E
prime
,3
is neither reducible nor contained in a Sylow 2-subgroup.
Finally one also has to show that if both ˉρ
E,5
is irreducible and ˉρ
E,3
is
induced from a character of Q(

3 ) then E is modular,(The case where
both were reducible has already been considered.) Taylor has pointed out
that curves satisfying both these conditions are classi?ed by the non-cuspidal
rational points on a modular curve isomorphic to X
0
(45)/W
9
,and this is an
elliptic curve isogenous to X
0
(15) with rank zero over Q,The non-cuspidal
rational points correspond to modular elliptic curves of conductor 338,square
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 545
Appendix
Gorenstein rings and local complete intersections
Proposition 1,Suppose that O is a complete discrete valuation ring
andthat?,S → T isasurjectivelocalO-algebrahomomorphismbetweencom-
plete local Noetherian O-algebras,Suppose further that p
T
is a prime ideal of
T suchthat T/p
T

→ O andlet p
S
=?
1
(p
T
),Assumethat
(i) T similarequalO[[x
1
,...,x
r
]]/(f
1
,...,f
r?u
)wherer isthesizeofaminimalsetof
O-generatorsof p
T
/p
2
T
,
(ii)?inducesanisomorphism p
S
/p
2
S

→ p
T
/p
2
T
andthattheseare?nitely
generated O-moduleswhosefreeparthasrank u.
Then? isanisomorphism.
Proof,First we consider the case where u = 0,We may assume that the
generators x
1
,...,x
r
lie in p
T
by subtracting their residues in T/p
T

→ O,By
(ii) we may also write
S similarequalO[[x
1
,...,x
r
]]/(g
1
,...,g
s
)
with s ≥ r (by allowing repetitions if necessary) and p
S
generated by the
images of {x
1
...,x
r
},Let p =(x
1
,...,x
r
)in[[x
1
,...,x
r
]],Writing f
i

Σa
ij
x
j
mod p
2
with a
ij
∈O,we see that the Fitting ideal as an O-module of
p
T
/p
2
T
is given by
F
O
(p
T
/p
2
T
) = det(a
ij
) ∈O
and that this is nonzero by the hypothesis that u =0,Similarly,if each
g
i
≡ Σb
ij
x
j
mod p
2
,then
F
O
(p
S
/p
2
S
)={det(b
ij
):i ∈ I,#I = r,I?{1,...,s}}.
By (ii) again we see that det(a
ij
) = det(b
ij
) as ideals of O for some choice I
0
of I,After renumbering we may assume that I
0
= {1,...,r},Then each g
i
(i =1,...,r) can be written g
i
=Σr
ij
f
i
for some r
ij
∈ [[x
1
,...,x
r
]] and we
have
det(b
ij
) ≡ det(r
ij
)·det(a
ij
)modp.
Hence det(r
ij
) is a unit,whence (r
ij
) is an invertible matrix,Thus the f
i
’s can
be expressed in terms of the g
i
’s and so S similarequal T.
We can extend this to the case u negationslash= 0 by picking x
1
,...,x
r?u
so that they
generate (p
T
/p
2
T
)
tors
,Then we can write each f
i

summationtext
r?u
i=1
a
ij
x
j
mod p
2
and
likewise for the g
i
’s,The argument is now just as before but applied to the
Fitting ideals of (p
T
/p
2
T
)
tors
,square
546 ANDREW JOHN WILES
For the next proposition we continue to assume that O is a complete
discrete valuation ring,Let T be a local O-algebra which as a module is?nite
and free over O,In addition,we assume the existence of an isomorphism of
T-modules T

→ Hom
O
(T,O),We call a local O-algebra which is?nite and
free and satis?es this extra condition a Gorenstein O-algebra (cf,§5 of [Ti1]).
Now suppose that p is a prime ideal of T such that T/p similarequalO.
Let β,T → T/p similarequalObe the natural map and de?ne a principal ideal of T
by

T
)=(
β(1))
where
β,O→T is the adjoint of β with respect to perfect O-pairings on O
and T,and where the pairing of T with itself is T-bilinear,(By a perfect
pairing on a free O-module M of?nite rank we mean a pairing M ×M →O
such that both the induced maps M→Hom
O
(M,O) are isomorphisms,When
M = T we are thus requiring that this be an isomorphism of T-modules also.)
The ideal (η
T
) is independent of the pairing,Also T/η
T
is torsion-free as an
O-module,as can be seen by applying Hom(,O) to the sequence
0 → p → T →O→0,
to obtain a homomorphism T/η
T
arrowhookleft→ Hom(p,O),This also shows that (η
T
)=
Annp.
If we let l(M) denote the length of an O-module M,then
l(p/p
2
) ≥ l(O/η
T
)
(where we write η
T
for β(η
T
)) because p is a faithful T/η
T
-module,(For a
brief account of the relevant properties of Fitting ideals see the appendix to
[MW1].) Indeed,writing F
R
(M) for the Fitting ideal of M as an R-module,
we have
F
T/η
T
(p)=0? F
T
(p)? (η
T
)? F
T/p
(p/p
2
)? (η
T
)
and we then use the fact that the length of an O-module M is equal to the
length of O/F
O
(M)asO is a discrete valuation ring,In particular when p/p
2
is a torsion O-module then η
T
negationslash=0.
We need a criterion for a Gorenstein O-algebra to be a complete inter-
section,We will say that a local O-algebra S which is?nite and free over
O is a complete intersection over O if there is an O-algebra isomorphism
S similarequalO[[x
1
,...,x
r
]]/(f
1
,...,f
r
) for some r,Such a ring is necessarily a Goren-
stein O-algebra and {f
1
,...,f
r
} is necessarily a regular sequence,That (i)?
(ii) in the following proposition is due to Tate (see A.3,conclusion 4,in the
appendix in [M Ro].)
Proposition 2,Assume that O is a complete discrete valuation ring
andthat T isalocalGorenstein O-algebrawhichis?niteandfreeover O and
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 547
that p
T
is a prime ideal of T such that T/p
T

= O and p
T
/p
2
T
is a torsion
O-module,Thenthefollowingtwoconditionsareequivalent:
(i) T isacompleteintersectionover O.
(ii) l(p
T
/p
2
T
)=l(O/η
T
) as O-modules.
Proof,To prove that (ii)? (i),pick a complete intersection S over O (so
assumed?nite and?at overO) such that α:SdblarrowheadrightT and such that p
S
/p
2
S
similarequal p
T
/p
2
T
where p
S
= α
1
(p
T
),The existence of such an S seems to be well known
(cf,[Ti2,§6]) but here is an argument suggested by N,Katzand H,Lenstra
(independently).
Write T = O[x
1
,...,x
r
]/(f
1
,...,f
s
) with p
T
the image in T of p =
(x
1
,...,x
r
),Since T is local and?nite and free over O,it follows that also
T similarequalO[[x
1
,...,x
r
]]/(f
1
,...,f
s
),We can pick g
1
,...,g
r
such that g
i
=Σa
ij
f
j
with a
ij
∈Oand such that
(f
1
,...,f
s
,p
2
)=(g
1
,...,g
r
,p
2
).
We then modify g
1
,...,g
r
by the addition of elements {α
i
} of (f
1
,...,f
s
)
2
and
set (g
prime
1
= g
1

1
,...,g
prime
r
= g
r

r
),Since T is?nite over O,there exists an N
such that for each i,x
N
i
can be written in T as a polynomial h
i
(x
1
,...,x
r
)of
total degree less than N,We can assume also that N is chosen greater than
the total degree of g
i
for each i,Set α
i
=(x
N
i
h
i
(x
1
,...,x
r
))
2
,Then set
S = O[[x
1
,...,x
r
]]/(g
prime
1
,...,g
prime
r
),Then S is?nite overO by construction and also
dim(S) ≤ 1 since dim(S/λ) = 0 where (λ) is the maximal ideal of O,It follows
that {g
prime
1
,...,g
prime
r
} is a regular sequence and hence that depth(S) = dim(S)=1.
In particular the maximal O-torsion submodule of S is zero since it is also a
nite length S-submodule of S.
Now O/(ˉη
S
) similarequalO/(ˉη
T
),since l(O/(ˉη
S
)) = l(p
S
/p
2
S
)by(i)? (ii) and
l(O/(?η
T
)) = l(p
T
/p
2
T
) by hypothesis,Pick isomorphisms
T similarequal Hom
O
(T,O),Ssimilarequal Hom
O
(S,O)
as T-modules and S-modules,respectively,The existence of the latter for
complete intersections over O is well known; cf,conclusion 1 of Theorem A.3
of [M Ro],Then we have a sequence of maps,in which?α and
β denote the
adjoints with respect to these isomorphisms:
O
β
→ T
α
→ S
α
→ T
β
→ O.
One checks that?α is a map of S-modules (T being given an S-action via α)
and in particular that αα is multiplication by an element t of T.Now
(β?
β)=(ˉη
T
)inO and (β?α)?(
hatwider
β?α )=(ˉη
S
)inO.As(ˉη
S
)=(ˉη
T
)inO,we
have that t is a unit mod p
T
and hence that αα is an isomorphism,It follows
548 ANDREW JOHN WILES
that S similarequal T,as otherwise S similarequal kerα ⊕ im?α is a nontrivial decomposition as
S-modules,which contradicts S being local,square
Remark,Lenstra has made an important improvement to this proposi-
tion by showing that replacing ˉη
T
by β(ann p) gives a criterion valid for all
local O-algebra which are?nite and free over O,thus without the Gorenstein
hypothesis.
Princeton University,Princeton,NJ
References
[AK] A.AltmanandS.Kleiman,An Introduction to Grothendieck Duality Theory,vol.
146,Springer Lecture Notes in Mathematics,1970.
[BiKu] B,Birch and W,Kuyk (eds.),Modular Functions of One Variable IV,vol,476,
Springer Lecture Notes in Mathematics,1975.
[Bo] N.Boston,FamiliesofGaloisrepresentations?Increasingtherami?cation,Duke
Math,J,66,357-367.
[BH] W,Bruns and J,Herzog,Cohen-Macauley Rings,Cambridge UniversityPress,
1993.
[BK] S,Bloch and K,Kato,L-Functions and Tamagawa Numbers of Motives,The
Grothendieck Festschrift,Vol,1 (P,Cartier et al,eds.),Birkh¨auser,1990.
[BLR] N.Boston,H.Lenstra,andK.Ribet,Quotientsofgroupringsarisingfromtwo-
dimensional representations,C,R,Acad,Sci,Paris t312,Ser,1 (1991),323-328.
[CF] J.W.S.CasselsandA.Fr¨olich(eds.),Algebraic Number Theory,AcademicPress,
1967.
[Ca1] H,Carayol,Sur les repr′esentations p-adiques associ′ees aux formes modulares de
Hilbert,Ann,Sci,Ec,Norm,Sup,IV,Ser,19 (1986),409-468.
[Ca2],Sur les repr′esentationes galoisiennes modulo lscript attach′ees aux formes mod-
ulaires,Duke Math,J,59 (1989),785-901.
[Ca3],Formes modulaires et repr′esentations Galoisiennes `a valeurs dans un an-
neaulocalcomplet,inp-Adic Monodromy and the Birch-Swinnerton-Dyer Conjec-
ture (eds,B,Mazur and G,Stevens),Contemp,Math.,vol,165,1994.
[CPS] E,Cline,B,Parshall,andL.Scott,Cohomologyof?nitegroupsofLietypeI,
Publ,Math,IHES 45 (1975),169-191.
[CS] J.Coates andC.G.Schmidt,Iwasawa theoryfor the symmetric square of an elliptic
curve,J,reine und angew,Math,375/376 (1987),104-156.
[CW] J.CoatesandA.Wiles,On p-adic L-functionsandellipticunits,Ser.A26,J.Aust.
Math,Soc,(1978),1-25.
[Co] R,Coleman,Division values in local?elds,Invent,Math,53 (1979),91-116.
[DR] P.DeligneandM.Rapoport,Sch′emasdemodularesdecourbeselliptiques,inSpringer
Lecture Notes in Mathematics,Vol,349,1973.
[DS] P,DeligneandJ-P,Serre,Formesmodulairesdepoids1,Ann,Sci,Ec,Norm.
Sup,IV,Ser,7 (1974),507-530.
[Dia] F,Diamond,The re?ned conjecture of Serre,in Proc,1993 Hong Kong Conf,on
Elliptic Curves,Modular Forms and Fermat’s Last Theorem,J,Coates,S,T,Yau,
eds.,International Press,Boston,22-37 (1995).
[Di] L.E.Dickson,Linear Groups with an Exposition of the Galois Field Theory,Teub-
ner,Leipzig,1901.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 549
[Dr] V.Drinfeld,Two-dimensionallscript-adicrepresentationsofthefundamentalgroupof
a curve over a?nite?eld and automorphic forms on GL(2),Am,J,Math,105
(1983),85-114.
[E1] B,Edixhoven,TwoweightinSerre’sconjectureonmodularforms,Invent,Math.
109 (1992),563-594.
[E2],L’action de l’alg`ebre de Hecke sur les groupes de composantes des jacobi-
ennes des courbes modulaires set,Eisenstein”,in Courbes Modulaires et Courbes
de Shimura,Ast′erisque 196-197 (1991),159-170.
[Fl] M.Flach,A?nitenesstheoremforthesymmetricsquareofanellipticcurve,Invent.
Math,109 (1992),307-327.
[Fo] J.-M.Fontaine,Surcertainstypesderepr′esentationsp-adiquesdugroupedeGalois
d’un corp local; construction d’un anneau de Barsotti-Tate,Ann,of Math,115
(1982),529-577.
[Fr] G,Frey,Links between stable elliptic curves and certain diophantine equations,
Annales Universitatis Saraviensis 1 (1986),1-40.
[Gre1] R.Greenberg,Iwasawa theoryfor p-adic representations,Adv.St.Pure Math,17
(1989),97-137.
[Gre2],On the structure of certain Galois groups,Invent.Math,47 (1978),85-99.
[Gro] B.H.Gross,AtamenesscriterionforGaloisrepresentationsassociatedtomodular
forms mod p,Duke Math,J,61 (1990),445-517.
[Guo] L,Gou,General Selmer groups and critical values of Hecke L-functions,Math.
Ann,297 (1993),221-233.
[He] Y.Hellegouarch,Pointsd’ordre2p
h
surlescourbeselliptiques,ActaArith.XXVI
(1975),253-263.
[Hi1] H.Hida,Iwasawamodulesattachedtocongruencesofcuspforms,Ann,Sci,Ecole
Norm,Sup,(4) 19 (1986),231-273.
[Hi2],Theoryof p-adic Hecke algebras and Galois representations,Sugaku Ex-
positions 2-3 (1989),75-102.
[Hi3],Congruences of Cusp forms and special values of their zeta functions,
Invent,Math,63 (1981),225-261.
[Hi4],Onp-adic Hecke algebras for GL
2
over totallyreal?elds,Ann,of Math.
128 (1988),295-384.
[Hu] B,Huppert,Endliche Gruppen I,Springer-Verlag,1967.
[Ih] Y,Ihara,On modular curves over?nite?elds,in Proc,Intern,Coll,on discrete
subgroups of Lie groups and application to moduli,Bombay,1973,pp,161-202.
[Iw1] K,Iwasawa,Local Class Field Theory,Oxford UniversityPress,Oxford,1986.
[Iw2],OnZ
l
-extension of algebraic number?elds,Ann,of Math,98 (1973),
246-326.
[Ka] N,Katz,A result on modular forms in characteristic p,inModular Functions of
One Variable V,Springer L,N,M,601 (1976),53-61.
[Ku1] E.Kunz,Introduction to Commutative Algebra and Algebraic Geometry,Birkha¨user,
1985.
[Ku2],Almost complete intersection are not Gorenstein,J,Alg,28 (1974),111-
115.
[KM] N.Katz andB.Mazur,Arithmetic Moduli of Elliptic Curves,Ann.ofMath.Studies
108,Princeton UniversityPress,1985.
[La] R,Langlands,Base Change for GL
2
,Ann,of Math,Studies,Princeton Univer-
sityPress 96,1980.
[Li] W,Li,Newforms and functional equations,Math,Ann,212 (1975),285-315.
[Liv] R.Livn′e,Ontheconductorsofmod lscript Galoisrepresentationscomingfrommodular
forms,J,of No,Th,31 (1989),133-141.
[Ma1] B,Mazur,Deforming Galois representations,in Galois Groups over Q,vol,16,
MSRI Publications,Springer,New York,1989.
550 ANDREW JOHN WILES
[Ma2]
,Modular curves and the Eisenstein ideal,Publ,Math,IHES 47 (1977),
33-186.
[Ma3]
,Rational isogenies of prime degree,Invent,Math,44 (1978),129-162.
[M Ri] B,Mazur and K,Ribet,Two-dimensional representations in the arithmetic of
modular curves,Courbes Modulaires et Courbes de Shimura,Ast′erisque 196-197
(1991),215-255.
[M Ro] B,Mazur and L,Roberts,Local Euler characteristics,Invent,Math,9 (1970),
201-234.
[MT] B.MazurandJ.Tilouine,Repr′esentationsgaloisiennes,di?erentiellesdeK¨ahler
et conjectures principales,Publ,Math,IHES 71 (1990),65-103.
[MW1] B.MazurandA.Wiles,Class?eldsofabelianextensionsof Q,Invent.Math,76
(1984),179-330.
[MW2]
,Onp-adic analytic families of Galois representations,Comp,Math,59
(1986),231-264.
[Mi1] J,S,Milne,Jacobian varieties,in Arithmetic Geometry (Cornell and Silverman,
eds.),Springer-Verlag,1986.
[Mi2]
,Arithmetic Duality Theorems,Academic Press,1986.
[Ram] R.Ramakrishna,OnavariationofMazur’sdeformationfunctor,Comp.Math,87
(1993),269-286.
[Ray1] M,Raynaud,Sch′emas en groupes de type (p,p,...,p),Bull,Soc,Math,France
102 (1974),241-280.
[Ray2]
,Sp′ecialisation du foncteur de Picard,Publ.Math.IHES 38 (1970),27-76.
[Ri1] K.A.Ribet,OnmodularrepresentationsofGal(
ˉ
Q/Q)arisingfrommodularforms,
Invent,Math,100 (1990),431-476.
[Ri2]
,Congruence relations between modular forms,Proc,Int,Cong,of Math.
17 (1983),503-514.
[Ri3]
,Report on mod l representations of Gal(
ˉ
Q/Q),Proc,of Symp,in Pure
Math,55 (1994),639-676.
[Ri4]
,Multiplicities of p-?nite mod p Galois representations in J
0
(Np),Boletim
da Sociedade Brasileira de Matematica,Nova Serie 21 (1991),177-188.
[Ru1] K.Rubin,Tate-ShafarevichgroupsandL-functionsofellipticcurveswithcomplex
multiplication,Invent,Math,89 (1987),527-559.
[Ru2]
,The ‘main conjectures’ of Iwasawa theoryfor imaginaryquadratic?elds,
Invent,Math,103 (1991),25-68.
[Ru3]
,Elliptic curves with complex multiplication and the conjecture of Birch
and Swinnerton-Dyer,Invent,Math,64 (1981),455-470.
[Ru4]
,More‘mainconjectures’forimaginaryquadratic?elds,CRMProceedings
and Lecture Notes,4,1994.
[Sch] M,Schlessinger,FunctorsonArtinRings,Trans,A.M.S,130 (1968),208-222.
[Scho] R,Schoof,The structure of the minus class groups of abelian number?elds,
in Seminaire de Th′eorie des Nombres,Paris (1988-1989),Progress in Math,91,
Birkhauser (1990),185-204.
[Se] J.-P,Serre,Sur les repr′esentationes modulaires de degr′e 2 de Gal(
ˉ
Q/Q),Duke
Math,J,54 (1987),179-230.
[de Sh] E,de Shalit,Iwasawa Theory of Elliptic Curves with Complex Multiplication,
Persp,in Math.,Vol,3,Academic Press,1987.
[Sh1] G,Shimura,Introduction to the Arithmetic Theory of Automorphic Functions,
Iwanami Shoten and Princeton UniversityPress,1971.
[Sh2]
,On the holomorphyof certain Dirichlet series,Proc,London Math,Soc.
(3) 31 (1975),79-98.
[Sh3]
,Thespecialvaluesofthezetafunctionassociatedwithcuspforms,Comm.
Pure and Appl,Math,29 (1976),783-803.
MODULAR ELLIPTIC CURVES AND FERMAT’S LAST THEOREM 551
[Sh4],On elliptic curves with complex multiplication as factors of the Jacobians
of modular function?elds,Nagoya Math,J,43 (1971),1999-208.
[Ta] J.Tate,p-divisible groups,Proc.Conf.on Local Fields,Driebergen,1966,Springer-
Verlag,1967,pp,158-183.
[Ti1] J.Tilouine,Un sous-groupe p-divisible de la jacobienne de X
1
(Np
r
) comme module
sur l’algebre de Hecke,Bull,Soc,Math,France 115 (1987),329-360.
[Ti2],Th′eorie d’Iwasawa classique et de l’algebre de Hecke ordinaire,Comp.
Math,65 (1988),265-320.
[Tu] J.Tunnell,Artin’s conjecture for representations of octahedral type,Bull.A.M.S.
5 (1981),173-175.
[TW] R,Taylor and A,Wiles,Ring theoretic properties of certain Hecke algebras,
Ann,of Math,141 (1995),553-572.
[We] A.Weil,UberdieBestimmungDirichletscherReihendurchFunktionalgleichungen,
Math,Ann,168 (1967),149-156.
[Wi1] A.Wiles,Onordinaryλ-adicrepresentationsassociatedtomodularforms,Invent.
Math,94 (1988),529-573.
[Wi2],On p-adic representations for totallyreal?elds,Ann.of Math,123(1986),
407-456.
[Wi3],Modular curves and the class group of Q(ζ
p
),Invent,Math,58 (1980),
1-35.
[Wi4],The Iwasawa conjecture for totallyreal?elds,Ann,of Math,131 (1990),
493-540.
[Win] J.P.Wintenberger,Structure galoisienne de limites projectives d’unit′ees locales,
Comp,Math,42 (1982),89-103.
(Received October 14,1994)