Introduction
Fermat's Last Theorem states
(1)
has no integer solutions for any
.
This problem had been unsolved for centuries, making it one of the longest standing challenges to mathematicians everywhere.
Due to continued work on its proof, branches of mathematics from all over the spectrum have been created and linked together. One such area is:
Diophantine Equations
Definition: A polynomial equation whose domain is restricted to the integers is called a Diophantine Equation.
Some examples include:
1) 
2) Pell's equation: 
3) Brahmagupta: 
4) linear: 
Fermat
- Living in 17th century France, Fermat's official profession was a judge for the king. He did math as a hobby.
- One of his favorite pastimes included posing questions to his mathematical friends, while taunting his friends with the assertion that he had already solved them.
- He also highly disliked publishing any of his proofs, and rarely wrote them down in full. It is because of this that the hype and fury of solving this theorem has grown.
- Most of the proofs he did write down contained jumps that were not easily followed.
Fermat often used a technique known as "infinite descent." This technique is specialized form of induction: we assume the opposite of what we want to prove and come up with a contradiction.
- Suppose we have an solution to an equation.
- Manipulate the equation to acquire a new solution to the equation that is strictly smaller than the original solution.
- This process can be repeated infinitely, which is a contradiction.
Example: Method of infinite descent
Consider the equation
(2)
Suppose a non-zero solution exists; call it x_0 and y_0. Then we get
(3)
This equation gives us that
. Moreover, since 5 is prime, we can say that
. Then for some
, we have
. Substituting back in, we get


Thus, we have found a new solution that is smaller than our original solution. By applying the method of infinite descent, we can do this infinitely, creating infinitely smaller solutions. This is a contradiction, as the positive integers have a smallest element. Hence, there are no non-zero solutions to
. 
It is speculated that Fermat would have used this method to prove the general case of Fermat's Last Theorem, but no one has been able to recreate such a proof.
Lemmas for Proof of Fermat's Last Theorem for n=4
We now want to move on to proving Fermat's Last Theorem for the
case. Before we start, though, let's look at three lemmas to help us get through the proof.
Lemma 1: If we have integers
,
that are relatively prime, then
and
are relatively prime.
Proof: Assume
. By the Fundamental Theorem of Arithmetic, we know that
for some prime
.
We know that
, so
. Since
and
are relatively prime, then either
or
. Assume that
and that
for some r.
Also,
, so we get that
. Then
for some
. Plugging this in, we find that

This implies that
, or
since
is prime. However, then we have that
and
, which is a contradiction since
and
are relatively prime. 
Lemma 2: Any solution to
can be reduced to an equivalent solution with
pairwise relatively prime.
Proof: It is easy to see that if any prime divides
and
, we can easily reduce the equation by dividing through by it. However, it is not immediately obvious that we can say that they are pairwise relatively prime. We will show that if a prime divides two of
, then it must also divide the third. We will only prove one of the cases, but the other case's proof is nearly identical.
Assume that a prime
divides both
and
. Then
and
for some
. Plugging this in, we get

This implies that
and hence
.
We can then reduce the original equation by dividing through by
. We can then continue this process until all variables are pairwise relatively prime. 
Lemma 3: If
are relatively prime and
for some integer
, then
and
are both squares.
Proof Sketch: For every prime
that divides
, we know that it must divide either
or
. Moreover, since we have
, then there must be an even number of copies of primes found in
and
, so they must both be squares. 
Now, with these three lemmas under our belt, let's move on to prove the
case of Fermat's Last Theorem.
Proof of Fermat's Last Theorem for n=4
The proof we will show is based off of one of the few proofs that Fermat bothered to write down. To help give a sense of how sparse Fermat's proofs were, at least in comparison to the verbosity we use today, we'll interject a few of lines of his proof to help motivate the proof.
Theorem: There is no right triangle whose area is a perfect square.
To get us started, here is a translation of the first line of Fermat's proof:
"If the area of a right-angled triangle were a square, there would exist two biquadrates, the difference of which would be a square number."
A biquadrate is a fancy word for a fourth power; for example, 16 is a biquadrate since
. Thus, Fermat is claiming that given a right triangle whose area is a square, we can find an equation
. If we let
,
and
, we get
. Thus, if there were a solution to the
case of Fermat's Last Theorem, we could find a right triangle whose area is a square; however, as this theorem states, there is no such right triangle, and hence there are no integer solutions to
.
Let's consider a right triangle that gives us
by the Pythagorean Theorem. It's area then is
and is equal to
for some integer
by our hypothesis.
To see how Fermat's logic flows, we need to employ the solution to Pythagorean Triples. Note that we will not give a proof of why this is true or where it comes from. We get that
and
, where
. Plugging this back in, we get

Since
and
are relatively prime, we know that
and
are relatively prime by Lemma 1. Then, by Lemma 3, we know that
and
are both squares. We can apply this again to
and find that
and
are squares. So, let
,
, and
. Substituting back in, we get

Letting
for ease, this equation gives us
, which is of the form that we wanted. Factoring, we get

Since
and
are relatively prime, then intuitively, it should make sense that
and
must also be relatively prime; proof is left as an exercise. By Lemma 3, we know then that
and
are squares. Let

Rearranging the second equation gives us
. Substituting back into the first equation gives us

Now, Lemma 2 tells us that
are pairwise relatively prime and
are also pairwise relatively prime; we already knew that
and
were relatively prime from before, so we have that
are all pairwise relatively prime.
We know that at most one of
can be even. It's easy to see that
and
must have the same parity; since they cannot both be even,
and
must both be odd. Solving for
in the last equation, we get

We saw that
and
were odd, so then
and
must be even; let
and
. Thus,

Since
and
are odd, then they are either 1 or 3 mod 4. We can then see that
and
must be 0 and 2 mod 4. Thus, after dividing by 2, we can see that at one of
and
will be even; WLOG,
be even. Then
for some
. This gives us

Similar to earlier, since
and
are relatively prime, then so are
and
; this gives us that
and
are relatively prime, which implies that
and
are relatively prime. Thus, by the above equation and Lemma 3, we know that
and
are squares; let
and
. This gives us the equation

So where does Fermat go from here? He says:
"From this, we conclude that the said side is the sum of the sides about the right angle in a right-angled triangle and that the simple square contained in the sum is the base, and the double of the other square is the perpendicular."
So what does this mean? (Good question!) This translates to
(17)
We can see this through the following:
(18)
since
and
. Thus, we have the equation
, to which we can apply the solution to Pythagorean Triples. We get that for some
relatively prime,
,
, and
. This gives us

Since
are relatively prime, then Lemma 1 tells us that
and
, which are both squares by Lemma 3. Since
is a square, then both
and
are squares; let
and
. We then get

Since
and
are relatively prime, we can say then that
and
are relatively prime; this means that they are both squares, by Lemma 3.
So what have we found? Recall that we started with the equation
where
and
were relatively prime and were both squares. Thus we have found another solution to the equation. However,

so our new solution is strictly smaller. Thus, we can repeat this process infinitely to find infinitely small solutions; however, this is a contradiction since there is a smallest element in the positive integers. Thus, there can be no triangle whose area is a perfect square.
Fermat concludes his proof by saying:
"The margin is too small to enable me to give the proof completely and with all detail."

Andrew Wiles
We ran out of time in class to talk about Andrew Wiles, but here are some facts for your reading pleasure.
- On June 23, 1993, Andrew Wiles gave the last of three lectures given at a mathematical conference. He concluded with "I think I'll stop here" and was met with thunderous applause. He had just proved Fermat's Last Theorem.
- His written proof was comprised of nearly 300 pages.
Overview of Wiles' Proof
He used many different and complex mathematical techniques throughout several branches including elliptic curves, modular forms, Galois Theory, and the Taniyama-Shimura Conjecture.
- Elliptic Curves: polynomials taking the form
- Note that these are NOT ellipses.
- They have applications in cryptography for integer solutions. This is because problems based on the discrete logarithm are extremely difficult to solve. It is thought by some that elliptic curve cryptography will replace the current methods.
- Modular Forms: function F on the complex plane with solutions on the lattice points
- They are built on elliptic curves in the complex plane.
- Galois Theory: solves many previously unsolved problems, as mentioned by Andy
- It started with permutation groups and polynomial equations, using the theory of symmetric polynomials.
- Taniyama-Shimura Conjecture: relates elliptic curves to modular forms
- In 1960, Gerhard Frey proposed that proving the Taniyama-Shimura Conjecture would prove Fermat's Last Theorem.
- Wiles used a special case (with semistable elliptic curves) to prove Fermat's Last Theorem.






and
are relatively prime.
are relatively prime and
for some integer