I'm doing the second part of the following exercise in Miles Reid's Undergraduate Commutative Algebra:
Exercise 0.18: Prove the cases $n=3$ and $n=4$ of Fermat's last theorem.
I would like to know:
- Is my proof correct?
- Is there a simpler way to prove the result using the Gaussian integers? (I'm aware of the proof that uses infinite descent, over the integers, so I would like to know if there is a very short proof using the power of the Gaussian integers)
Here is my attempt:
Let $$x^4+y^4=z^4$$ with $x,y,z\in\Bbb N$. We can assume that $x,y,z$ has no common factor, otherwise we could divide through by that factor. If $z$ is even, then $x^4+y^4\equiv_4 0$, which is only possible if $x^4,y^4\equiv_4 0$, but then $x,y,z$ all have a common factor. So assume that $x$ is even. Write $$(x^2+iy^2)(x^2-iy^2)=z^4$$
Let $\pi\in\Bbb Z[i]$ be a prime such that $\pi\mid x^2+iy^2, x^2-iy^2$. Then, $\pi\mid 2x^2,2y^2$. If $\pi=1-i$ then $N(\pi)=2\mid z$. Contradiction.
Therefore $x^2+iy^2,x^2-iy^2$ are relatively prime. We can write $x^2+iy^2=i^k\alpha^4=i^k(a+bi)^4$, and we get $$x^2+y^2i=i^k(a^4-6a^2b^2+b^4+i4ab(a^2-b^2))$$ $k=0,2$ is impossible, since this implies that $y$ is even, so $k=1,3$.
Therefore $$\begin{align}x^2&=\pm 4ab(a^2-b^2)\\y^2&=\mp (a^4-6a^2b^2+b^4)\end{align}$$ Since $y$ is odd, we must have that $a,b$ have different parities. If $k=3$ we get a contradiction no matter which of $a,b$ we assume to be even, since then $y^2\equiv_4 -a^4$ or $y^2\equiv_4 -b^4$, which is impossible. Therefore $k=1$, and so $$\begin{align}x^2&=4ab(b^2-a^2)\\y^2&=a^4-6a^2b^2+b^4=(b^2-2ab-a^2)(b^2+2ab-a^2)\end{align}$$ The factors of $b^2-2ab-a^2,b^2+2ab-a^2$ are relatively prime so they must both be odd squares. To see this, let $d\mid b^2-2ab-a^2,b^2+2ab-a^2$. Then $d\mid b^2-a^2, ab$, in particular $d\mid a^2b^2-a^2,b^4-a^2b^2$.
Let therefore $$C^2=b^2-2ab-a^2$$ solving for $b$ yields $$b=1\pm\sqrt{2+\frac{C^2}{a^2}}$$ which implies that $a\mid C\Rightarrow a\mid y$. Hence both $x,y$ have an even factor of $a$. This is only possible if $a=0$.