TITLE: Why does representing functors help solving Diophantine equations?
QUESTION [25 upvotes]: Here I read:

Another insight of Grothendieck and his school was, how important it is to represent functors in algebraic geometry - regardless of what you want at the end. [as Mazur reports, Hendrik Lenstra was once sure that he did want to solve Diophantine equations and did not want to represent functors - and later he was amused that he represented functors to solve Diophantine equations.]

My question is already in the title: Why does representing functors help solving Diophantine equations?
As a category theory enthusiast I am fascinated by the fact that sometimes category theory is helpful to prove concrete things (here: solving Diophantine equations). So I'd really want to know how that works, roughly.

REPLY [8 votes]: Let me give an answer that pertains to the Diophantine equation that, according to David Speyer's answer, Lenstra was specifically talking about.
How does representing functors help solve the Diophantine equation $a^n + b^n=c^n$?
A solution to this Diophantine equation defines an elliptic curve $y^2 = x (x-a^n)(x-b^n)$ (Frey). The Galois group of the rational numbers acts on the $\overline{\mathbb Q}$-points of this curve, thus on the $\ell^m$-torsion points for each $m$. Taking an inverse limit as $m$ goes to $\infty$, we obtain a Galois action on a rank two free $\mathbb Z_\ell$-module (the Tate module).
We also obtain Galois actions on rank two free $\mathbb Z_\ell$-modules from modular forms, after Eichler-Shimura and Deligne. In fact, for many different rings $S$ we can obtain Galois actions on rank two free $S$-modules.
It turns out that the Galois representations arising from curves of the form $y^2 = x (x-a^n)(x-b^n)$ have very special properties on congruence mod $n$, properties which the Galois representations arising from modular forms cannot have (Ribet). So if we can show that every Galois representation arising from an elliptic curve also arises from a modular form, we can obtain a contradiction from any solution to the Diophantine equation.
Now here's where we introduce the functors to be represented. We consider the category of complete local rings $S$ of residue characteristic $\ell$, and the functor that sends each such ring to the set of isomorphism classes of rank two free $S$-modules with a Galois action that is congruent mod $\ell$ to some fixed Galois representation, satisfying some conditions known to hold for elliptic curves. We can consider another functor that sends the ring $S$ to only the set of isomorphism classes that arise from modular forms.
We'd like to prove the natural transformation from one of these functors to the other is an isomorphism, which is equivalent to the statement about every Galois representation arising from a modular form. In general, this is a hard problem.
But if we can represent these functors by complete local rings of residue characteristic $\ell$, then it becomes equivalent to proving that a map of local rings $R \to T$ is an isomorphism. That's a question which is much easier to tackle, because we can use all the commutative algebra theory of local rings. In particular, we can hope to prove a criterion for the map to be an isomorphism that depends on concrete properties of these rings which can be expressed in terms of the original functors. (The simplest case of this is that a map of smooth local rings is an isomorphism if and only if it's an isomorphism on the residue field and tangent space, which both have a functorial interpretation in terms of very simple rings.) We then reduce the problem to checking some new properties are satisfied by the functors. These properties turn out to be much more tractable than proving the isomorphism directly. In part, this is because they connect to areas where there is a pre-existing theory (related to $L$-functions, the class number formula, Iwasawa theory) that can be applied (though of course deep new ideas were needed as well).

REPLY [6 votes]: Solving a Diophantine equation is the same thing as showing that the functor defined by a certain scheme $S$ of finite type over $\bf Z$ gives a non-empty set when evaluated at ${\rm Spec}({\bf Z})$. So it is about a functor in the first place.
Now when trying to solve that (extremely hard) problem, one will be led to study different and more tractable functors on the category of schemes of finite type over ${\rm Spec}({\bf Z})$. In order to say something about these new functors, one will wonder whether they too have geometric meaning, which roughly translates to asking whether they are representable in the same category.
As explained in Donu Arapura's answer, this is at work in Faltings's proof of the Mordell conjecture but an easier example is Buium's proof of the Manin-Mumford conjecture for curves. In this situation, one starts with a curve $C$ over a number field $K$ and one takes a prime $\mathfrak p$ of $K$, which is unramified over $\bf Z$ and where $C$ has good reduction. A property of a prime to $\mathfrak p$ torsion point of the Jacobian of $C$, which lies on $C$, is that it provides a point of the curve $C_{{\mathcal O}_K/{\mathfrak p}}$ (the curve over a finite field obtained by reduction), which lifts to an element of $C_{{\mathcal O}_K/{\mathfrak p}^2}({\mathcal O}_K/{\mathfrak p}^2)$, which has the property that it is divisible in the Jacobian by the prime number $p$ lying under $\mathfrak p$. Buium's proof shows that there can only be finitely many such points and to do this, he uses that fact that the set $C_{{\mathcal O}_K/{\mathfrak p}^2}({\mathcal O}_K/{\mathfrak p}^2)$ can be seen as the set of ${\mathcal O}_K/{\mathfrak p}$-points of a certain variety over ${\mathcal O}_K/{\mathfrak p}$, which represents a functor, which appears as an adjoint to a naturally representable functor. If one could not represent this adjoint, one couldn't understand the set $C_{{\mathcal O}_K/{\mathfrak p}^2}({\mathcal O}_K/{\mathfrak p}^2)$ geometrically and it would not be clear how to approach the statement proven by Buium.
So I would say that one solves Diophantine equations by representing functors, because a Diophantine equation is a question about a functor, which can be studied by replacing it by simpler ones. If you can show that the new ones are also representable then you will be led to another Diophantine problem and you can start all over again. This is exactly what happens in the example given above.