Let , , and be positive integers. Fermat's Last Theorem states that there are no solutions of the following equations for .
If two variables of , and have a same prime as factor, then a rest of those must include the prime. Therefore, we suppose these variables do not have a same prime factor and there is no loss of generality in this way. We will consider below by dividing the cases depending on whether is an odd prime, or some other value.
Ⅰ. When is an odd prime
Let be a positive integer. We suppose holds and there is no loss of generality in making this supposition. We suppose the following equation holds.
We will consider as follows by dividing the cases according to whether is divisible by or not.
ⅰ. When is a multiple of
Let and be positive integers and is a prime factor of . We suppose the following equation holds.
Since holds,
holds. The value on the right side is not since and are relatively prime and holds. Therefore, and have no common prime factors. By the equation (2),
holds. Let be a positive integer. Since and are prime to each other,
holds. Thus, holds since holds. By the equations (1) and (2), holds. The positive solutions are and when holds. Then, is not an integer since holds.
ⅱ. When is not a multiple of
Let , and be integers and is a prime factor of . In the case ⅱ, there is at least one prime factor where holds. In this instance, does not have a prime as a factor. By the way, we suppose and hold.
Hence, holds since does not have any prime factors of . In this case, the equation (1) has no positive integer solutions.
Ⅱ. When is
We suppose is even and and are odd since there are no integer solutions to the equation (1) when is even. Let be a positive integer. We suppose the following equation holds.
We will consider as follows by dividing the cases according to whether is divisible by or not.
ⅰ. When is a multiple of
Let and be positive integers. We suppose the following equation holds.
Since holds,
holds. The value on the right side is not since and are relatively prime and is odd. Therefore, and have no common prime factors. By the equation (2),
holds. Let be a positive integer. Since and are prime to each other,
holds. Thereby, holds since holds. By the equations (1) and (3),
holds. In order for this equation to have integer solutions, and must hold. The integer solutions are . Therefore, the equation (1) does not have a positive solution.
ⅱ. When is not a multiple of
Let , and be integers and is a prime factor of . In the case ⅱ, holds for at least one prime factor . And does not have a prime as a factor. On the other hand, we suppose and hold.
Hence, holds since has no prime factors of and the equation (1) has no positive integer solutions.
Ⅲ. When is not an odd prime and holds.
We will take account of two cases depending on the order as follows.
ⅰ. When the order includes an odd prime
Let be an odd prime and and be positive integers. Let , , , and be positive integers and holds. We suppose the following equation holds when the order is .
However, there are no positive integer solutions to this equation since this is the equation (1) when , , and hold.
ⅱ. When the order does not include an odd prime
In this instance, we use the fact that there is no integer solution when holds, which was proven by Fermat. Let be an integer and holds. Let , and be positive integers. We suppose the following equation holds when the order is .
Though, no positive integer solutions exist to this equation since this is the equation (1) when , , and hold.
From the above, it is proved that Fermat's Last Theorem is true. (Q.E.D.)