The last theorem of Fermat. Correct proof

Виктор Сорокин
                In Memory of my MOTHER

The contradiction: In the equation A^n=A^n+B^n [...=(A+B)R], the number R has two values.
All calculations are done with numbers in base n, a prime number greater than 2.

The notations: A', A'', A_(t) - the first, the second, the t-th digit from the end of the number A;
A_2, A_2, A_[t] is the 2-, 3-, t-digit ending of the number A (i.e. A_[t]=A mod n^t); nn=n*n=n^2=n^2.

Definitions:
The ''power'' ending A_[t] of t (t>1) digits is the ending A'^{n^(t-1)}_[t]  of some natural number A=A'^{n^(t-1)}+Dn^t, where A' is the last digit of A.
The ''one'' ending r_[t] is the t-digits ending of a number r, equal to 1.

The FLT is proved for the base case (see: http://vixra.org/abs/1707.0410):

L1) Lemma. The digit A^n_(t+1) is determined by the ending A_[t] in a unique way (this is a consequence of the Newton binomial). Which means that the endings A^n_2, A^{n^2}_3, and so on do not depend on the digit A" and are a only a function of the digit A'.

L1.1) Corollary: if A_[t+1]=d^{n^t}_[t+1], where d_2=e^n_2, then
A_[t+2]=e^{n^(t+1)}_[t+2] and A^{n-1}_[t+2]=A'^{n-1}_[t+2]=1.
L1.2) Moreover, g'^{n-1}_[t+2]=1, where g is any factor of the number A and g' is any factor of the number A'.
L1.3) If C_[t]=Z_[t], A_[t]=X_[t], B_[t]=Y_[t] and C^n_[t+1]=A^n_[t+1]+B^n_[t+1], then Z^n_[t+1]=X^n_[t+1]+Y^n_[t+1] (a consequence of L1.1 and Newton's binomial).

L2) The lemma. t-digits ending of any prime factor of the number R in the equality
 (A^n+B^n)_[t+1]=[(A+B)R]_[t+1]

(where A_[t]=A^{n^(t-1)}_[t], B_[t]=B^{n^(t-1)}_[t], (A^{n^t}+B^{n^t})_[t+1]=C^{n^t}_[t+1], t>1, the numbers A and B are co-prime and the number A+B is not divisible by the prime n>2)

is equal to 1. - The consequence of: a) the equality (CC^{n-1})_[t+1]=[(A+B)R]_[t+1], where C_[t]=(A+B)_[t]=0, b) definition of degree and c) L1.2.

Hypothetical Fermat's equality has three equivalent forms:
1) C^n=A^n+B^n [...=(A+B)R=c^n*r^n], A=C^n-B^n [...=(C-B)P=a^n*p^n] §Ъ B^n=C^n-A^n [...=(C-A)Q=b^n*q^n], where for (ABC)'=/=0 the numbers in the pairs (c, r), (a, p), (b, q) are co-prime.

1.1) The numbers R, P, Q (without a possible factor n) have ''one'' endings with their shortest length of k digits. If, for example, k=2, then the shortest ending is 01.
1.2) Therefore, the smallest ''one'' ending for the numbers r, p, q is k-1 digits.

1.3) The number U=A+B-C [...=un^k] ends with k zeroes, even if A', B' or C'=0.

1.4) If, for example, C'= 0 then the number C ends with exactly k zeros. In this case, its special factor R ends exactly by one zero, which is not included in the number r.
1.5) Therefore, in this case the number A+B ends with nk-1 [>k] zeroes.

L3) Lemma. If the shortest length of a ''one'' ending of the numbers r, p, q is k-1 (and for the numbers R, P, Q is k), then the k-digits ''power'' endings of the numbers A and C-B, B and C-A, C and A+B (not multiples of n) are equal to: A'^{n^(k-1)}, B'^{n^(k-1)}, C'^{n^(k-1)}.

Proof of Lemma. Let start with k=2. Then from the equality A+B-C=un^k (1.3), taking into account 1 and L1, we find equalities for the two-digit endings:
C=c'^n, A=a'^n, B=b'^n mod n{2, or C_2=c'^n_2, A_2=a'^n_2, B_2=b'^n_2.

Then, if k>2, we substitute these values of the numbers A, B, C in the left parts of the equalities 1, then we take into account the property L1.1 and solve the system of equations C^n=A+B, A^n=C-B, B^n=C-A, with respect to A, B, C. And we continue the process until we reach the values A'^{n^(k-1)}, B'^{n^(k-1)}, C'^{n^(k-1)}.

Proof of the FLT

2) Let the shortest length of the ''one'' ending among the numbers r, p, q be for the number r and equal to k-1 (in this case C'=/=0). Then the shortest length of the ''one'' ending for the numbers R, P, Q not multiples of n, will be equal to k. And, consequently, the number U=A+B-C=un^k.

Then, according to L3, in the equalities C^n=A^n+B^n=(A+B)R=c^n*r^n=CC^{n-1} (see: 1) and 
3) D=(A+B)^n_[k+1]=[(C-B)^n+(C-A)^n]_[k+1]={[(C-B)+(C-A)]T}_[k+1] k-digit endings of numbers in the pairs C and A+B, A and C-B, B and C-A, C^{n-1} (=1) and (A+B)^{n-1} (=1), R (=1) and T (=1) will be equal and power. According to Lemma L2, every prime (and composite) factor of T has a ''one'' ending of at least k digits.
However among the factors of the number T there is also a number r, strictly in the first degree (since the number [(C-B)+(C-A)] is not divisible by r, and the numbers r and D/r are co-prime)!

And we arrived to a contradiction: in the Fermat's equality, the ''one'' ending of r has a length of strictly k-1 digits, but in the number of T it has k digits. Thus, the FLT is proved.

Me'zos, December 1, 2017
+++++++++++++++++++

P.S. Text in the Word: http://em.ixbb.ru/viewtopic.php?id=7588&p=4#p488182 ,
.