$ $Let $n$, $x$, $y$ and $z$ be positive integers. Fermat's Last Theorem states that there are no solutions of the following equation for $n≧3$.
$$x^n+y^n=z^n\ ...(1)$$
If two variables of $x$, $y$ and $z$ have a same prime as factor, then a rest of those must include the prime. We suppose that these variables do not have a same prime factor and $y>x$ holds. There is no loss of generality in making these suppositions. We will consider below by dividing the cases depending on whether $n$ is an odd prime, $4$ or some other value.
Ⅰ. When $n$ is an odd prime
$ $Let $a$ be a positive integer. We consider that the following equation holds.
$$z^n=(x+y)a$$
We will consider as follows by dividing the cases according to whether $z^n/a$ is divisible by $z$ or not.
ⅰ. When $z^n/a$ is a multiple of $z$
$ $Let $b$ and $z'$ be positive integers. We suppose that $z'$ is a prime factor of $x+y$ and consider that the following equations hold.
$$z^n/a=x+y=bz\ ...(2)$$
Since $a=\sum_{i=0}^{n-1}y^i(-x)^{n-1-i}$ and $x+y≡0\pmod{z'}$ hold,
$$z^n/(x+y)≡nx^{n-1}\pmod{z'}$$
holds. If $x+y≢0\pmod{n}$ holds, then the value on the right side is not $0$ and there are no common prime factors of $a$ and $x+y$ since $x$ and $z$ are relatively prime. Conversely, if $x+y≡0\pmod{n}$ holds, then the value on the right side is $0$ for $z'=n$, the one is not $0$ for $z'≠n$ and there is a common prime factor of $a$ and $x+y$ $n$. By the equation (2),
$$(x+y)a=((x+y)/b)^n$$
$$ab^n=(x+y)^{n-1}\ ...(3)$$
holds.
$ $We take account the case where $x+y≢0\pmod{n}$ holds. Let $c$ be a positive integer. Since $a$ and $x+y$ are prime to each other, by the equation (3),
$$b^n=(x+y)^{n-1}c$$
holds. Thereby, $a=1$ holds since $ac=1$ holds. By the equations (1) and (2),
$$x^n+y^n=x+y$$
holds. The positive integer solution to this equation is $x=1$ and $y=1$ when $n≧3$ holds. Then, $z$ is not an integer since $z^n=2$ holds.
$ $Next, we give consideration to the case where $x+y≡0\pmod{n}$ holds. Let $d$, $e$, $f$ and $g$ be positive integers. We suppose that $d≢0\pmod{n}$, $x+y=dn^e$, $f≢0\pmod{n}$ and $a=fn^g$ hold. Let $h$ be a positive integer. Since the greatest common divisor of $(x+y)^{n-1}$ and $a$ is $n^g$ by the equation (3), the following equation holds.
$$b^n=(x+y)^{n-1}/n^g×h$$
$$a(x+y)^{n-1}/n^g×h=(x+y)^{n-1}$$
$$ah=n^g$$
Since $a$ and $h$ are positive integers, $a≦n^g$ and $f≦1$ hold. Thus, $f=1$ holds since $f$ is a positive integer. Since $a=n^g$ holds, the following equation holds.
$$(x^n+y^n)/(x+y)=n^g$$
$$\sum_{i=0}^{n-1}(-y)^ix^{n-1-i}=n^g$$
$$\sum_{i=0}^{n-1}(x-dn^e)^ix^{n-1-i}=n^g\ ...(4)$$
$ $We consider the case where $g≦e$ holds.
$$nx^{n-1}≡0\pmod{n^g}$$
Therefore, $g=1$ and $a=n$ hold since $x$ and $z$ are relatively prime. The following equation holds for $a=n$.
$$(x^{n-1}-n)x+(y^{n-1}-n)y=0$$
Since $x$ and $y$ are positive and $y>x$ holds, the following inequalities must hold.
$$x^{n-1}-n<0$$
$$y^{n-1}-n>0$$
If $x≧2$ and $n≧3$ hold, then $x^{n-1}>n$ holds and this is a contradiction. Thus $x=1$ holds. For $x=1$, by the equation (1),
$$z^n-y^n=1$$
$$(z-y)\sum_{i=0}^{n-1}z^iy^{n-1-i}=1$$
holds. It becomes a contradiction since $\sum_{i=0}^{n-1}z^iy^{n-1-i}>n$ holds.
$ $We consider the case where $g>e$ holds. By the equation (4),
$$nx^{n-1}≡0\pmod{n^e}$$
holds. Hence, $e=1$ holds since $x$ and $z$ are relatively prime. By the equation (1),
$$x^n+(dn-x)^n=dn^{g+1}$$
$$\sum_{i=1}^{n}{}_n\mathrm{C}_i(dn)^i(-x)^{n-i}=dn^{g+1}$$
$$\sum_{i=1}^{n}{}_n\mathrm{C}_i(dn)^{i-1}(-x)^{n-i}=n^g$$
holds. If $g≧2$ holds, then the following congruent expression holds.
$$nx^{n-1}≡0\pmod{n^2}$$
It becomes a contradiction contrary to the condition that $x$ and $z$ are coprime. Thus, $g=1$ holds. This contradicts the condition $g>e$.
ⅱ. When $z^n/a$ is not a multiple of $z$
$ $Let $a_i$ and $k$ be positive integers and $j$ be a non-negative integer. In the case ⅱ, we suppose that $z^n/a=jz+k$ and $k≢0\pmod{z}$ hold.
$$z^n=(jz+k)a$$
Since $ak≡0\pmod{z}$ holds, $a=a_1z$ holds. Then,
$$z^{n-1}=(jz+k)a_1$$
holds. Since $a_1k≡0\pmod{z}$ holds, $a_1=a_2z$ holds. By repeating this operation, we obtain the following congruent expression.
$$a≡0\pmod{z^n}$$
Hence, $x+y=1$ holds. In this case, the equation (1) has no positive integer solutions.
Ⅱ. When $n$ is $4$
$ $We suppose that $x$ is even and $y$ and $z$ are odd since there are no integer solutions to the equation (1) when $z$ is even. Let $a$ be a positive integer. We consider that the following equation holds.
$$y^4=(x+z)a$$
We will consider as follows by dividing the cases according to whether $y^4/a$ is divisible by $y$ or not.
ⅰ. When $y^4/a$ is a multiple of $y$
$ $Let $b$ and $y'$ be positive integers. We suppose that $y'$ is a prime factor of $x+z$ and consider that the following equations hold.
$$y^4/a=x+z=by\ ...(5)$$
Since $a=\sum_{i=0}^3z^i(-x)^{3-i}$ and $x+z≡0\pmod{y'}$ hold,
$$y^4/(x+z)≡4z^3\pmod{y'}$$
holds. The value on the right side is not $0$ since $x$ and $y$ are relatively prime and $y$ is odd. Therefore, $a$ and $x+z$ have no common prime factors. By the equation (5),
$$(x+z)a=((x+z)/b)^4$$
$$ab^4=(x+z)^3$$
holds. Let $c$ be a positive integer. Since $a$ and $x+z$ are prime to each other,
$$b^4=(x+z)^3c$$
holds. Thereby, $a=1$ holds since $ac=1$ holds. By the equations (1) and (5),
$$z^4-x^4=x+z$$
$$(x^2+z^2)(z-x)=1$$
holds. In order for this equation to have integer solutions, $x^2+z^2=1$ and $z-x=1$ must hold. The integer solutions are $(x, z)=(0, 1), (-1, 0)$. Therefore, the equation (1) does not have a positive integer solution.
ⅱ. When $y^4/a$ is not a multiple of $y$
$ $Let $a_i$ and $e$ be positive integers and $d$ be a non-negative integer. In the case ⅱ, we suppose that $y^4/a=dy+e$ and $e≢0\pmod{y}$ hold.
$$y^4=(dy+e)a$$
Since $ae≡0\pmod{y}$ holds, $a=a_1y$ holds. Then,
$$y^3=(dy+e)a_1$$
holds. Since $a_1e≡0\pmod{y}$ holds, $a_1=a_2y$ holds. By repeating this operation, we obtain the following congruent expression.
$$a≡0\pmod{y^4}$$
Hence, $x+z=1$ holds. Therefore, the equation (1) has no positive integer solutions.
Ⅲ. When $n$ is not an odd prime and $n≧6$ holds.
$ $We will take account of two cases depending on the order as follows.
ⅰ. When the order includes an odd prime
$ $Let $a$, $b$, $q_i$, $r$, $x'$, $y'$ and $z'$ be positive integers and $p_i$ be an odd prime. We suppose that $b=\prod_{i=1}^rp_i^{q_i}×2^a$ holds and the following equation holds when the order is $b$.
$$(x'^{b/p_i})^{p_i}+(y'^{b/p_i})^{p_i}=(z'^{b/p_i})^{p_i}$$
However, there are no positive integer solutions to this equation since this is the equation (1) when $x=x'^{b/p_i}$, $y=y'^{b/p_i}$, $z=z'^{b/p_i}$ and $n=p_i$ hold.
ⅱ. When the order does not include an odd prime
$ $Let $c$, $x''$, $y''$ and $z''$ be positive integers and $c≧3$ holds. We suppose that the following equation holds when the order is $2^c$.
$$(x''^{2^{c-2}})^4+(y''^{2^{c-2}})^4=(z''^{2^{c-2}})^4$$
Though, no positive integer solutions exist to this equation since this is the equation (1) when $x=x''^{2^{c-2}}$, $y=y''^{2^{c-2}}$, $z=z''^{2^{c-2}}$ and $n=4$ hold.
$ $From the above, it is proved that Fermat's Last Theorem is true. (Q.E.D.)