# Fermat’s Last Theorem (the divisible by 4 case)

Fermat’s last Theorem is infamous, it was unsolved for 358 years and when Andrew Wiles proved the result in 1994 the world received it so well he was offered an opportunity to model for gap jeans.

Although Fermat didn’t give his ‘proof’ of the result due to the width of the margin being too small he did give a proof of the case when $n = 4$ and hence proved the sub-sequential cases when $n$ is divisible by $4$. He did this by considering the more general Diophantine equation $X^4 + Y^4 = Z^2$ and using the chain that a solution of $X^{4n} + Y^{4n} = Z^{4n}$ gives a solution of $X^4 + Y^4 = Z^4$ which gives a solution of $X^4 + Y^4 = Z^2$ it is sufficient to show the last equation has no integer solutions. The symmetry of the equation also means it is sufficient to consider positive integer solutions.

Theorem: The equation $X^4 + Y^4 = Z^2$ has no positive integer solutions.

Proof of Theorem:  We are going to give Fermat’s original proof which invokes the method of infinite descent. The idea of this method in the most imprecise and general way is to assume the existence of a ‘minimal’ something and show there is a more ‘minimal’ something of the same type hence giving a contradiction to conclude no something exists.

To begin, we assume that $z$ is the least positive integer for which the equation $X^2 + Y^2 = z^2$ has a solution with positive integers $x, y$. Due to the minimality condition of $z$ we can assume that $\gcd(x,y) = 1$. This means at least one of $x$ and $y$ is odd and we shall assume $x$ is odd. One can check $a^2 \equiv 0$ (mod $4$) or $a^2 \equiv 1$ (mod $4$) for any integer $a$. Using this knowledge $z^2 = x^2 + y^2 \equiv 1$ or $2$ (mod $4$) and as a square cannot be congruent to $2$ mod $4$ we must have $z$ being odd. This implies that $y$ is even.

Our solution $x,y$ and $z$ gives a primitive Pythagorean triple $(x^2,y^2,z)$ so using the parametrization in our previous post we can conclude: $x^2 = a^2 - b^2$, $y^2 = 2ab$ and $z = a^2 + b^2$ where $a$ and $b$ are coprime integers of opposite parity. If $a$ is even and $b$ is odd then $x^2 \equiv a^2 - b^2 \equiv 0 - 1 = -1$ ( mod $4$ ) which is impossible. Thus, $a$ is odd and $b$ is even with $b = 2c$ for some integer $c$. Looking back we observe that $(\frac{1}{2}y)^2 = ac$ where $\gcd(a,c) = 1$ as $a$ and $b$ are coprime. This means that $a$ and $c$ are perfect squares so we can find coprime positive integers $u$ and $v$ such that $a = u^2$ and $b = v^2$. Due to $a$ being odd we must have $u$ being odd.

Using the fact $x^2 + b^2 = a^2$ we can conclude that $(2v^2)^2 + x^2 = (u^2)^2$ where the integers $2v^2,x$ and $u^2$ have no common factor pairwise. This means $(2v^2,x,u^2)$ is a primitive Pythagorean triple so using the parametrization of such triples we have two coprime positive integers $A$ and $B$ such that $2v^2 = 2AB$ and $u^2 = A^2 + B^2$.

From $2v^2 = 2AB$ we have $v^2 = AB$ and as $\gcd(A,B) = 1$ we must have some positive coprime integers $X$ and $Y$ where $A = X^2$ and $B = Y^2$. Looking at the equation $u^2 = A^2 + B^2$ we must have $u^2 = X^4 + Y^4$.

Following the method of infinite decent we have constructed a new solution $(X,Y,u)$ from our minimal solution $(x,y,z)$. However, $u \leq u^2 \leq a \leq a^2 < a^2 + b^2 = z$ so we have in fact constructed a ‘more’ minimal solution which impossible by our assumption on $z$. This means that our hypothesis that a minimal solution exists or any solution existing is false so we conclude $X^4 + Y^4 = Z^2$ has no positive integer solutions.