452 ANDREW 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 first 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 ficient 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 field 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 g -1modp for the argument.The e main difficulty was that although I knew how the n-invariant changed as one Dassed to an auxiliary level from the results of Chapter 2,I did not know how to estimate the change in the p/p2-invariant precisely.However,the method did give the right bound for the generalised class group,or Selmer group as it is 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 fields in a cyclotomi tower would be expected to be a power series ring,at least if one assumed the vanishing of the u-invariant.However,in the setting with auxiliary primes where one would change the lev el but not the field,the natural limiting process did not appear to be helpful,with the exception of the closely related and very important construction of Hida Hill.This method of Hida often gave one step wards a power series ring in the ordinary case. ofn ment in thry (Schol W 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 first 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 began then to consider the remaining case where the mod3 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 8 452 ANDREW 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 first 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 sufficient in this case and, as explained earlier, when translated into the ringtheoretic 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 field that is used in Iwasawa theory. The Galois cohomology estimates described in Chapter 3 were now much stronger, although at that time I was still using primes q = -1 modp for the argument. The main difficulty was that although I knew how the 7-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/p2-invariant precisely. However, the method did give the right bound for the generalised class group, or Selmer group as it is 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 fields in a cyclotomic tower would be expected to be a power series ring, at least if one assumed the vanishing of the p-invariant. However, in the setting with auxiliary primes where one would change the level but not the field, the natural limiting process did not appear to be helpful, with the exception of the closely related and very important construction of Hida [Hill. 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, §lo]), 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 plausible. Flach's approach seemed to be the first 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 began 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