Proof.
Indeed, let

and

be solutions of
Equation (
8).
Then the product

is a multiple of

.
Since

then

must be
0
.
Hence there is a constant

and polynomials

with degree less than

such that
 |
(9) |
It follows that

is a multiple of

.
By repeating the same argument we show that

.
Then by induction on

we obtain

.
Proof.
Theorem
1
tell us that Algorithm
2
computes the inverse of

modulo

.
Since

divides

, the result is also valid modulo

.
Before proving the complexity result, we point out
the following relation for

.
 |
(17) |
Indeed, by virtue of
Theorem
1
we have
 |
(18) |
Therefore when computing

we only care about powers of

in the range

.
This says that
- half of the computation of
is made
during the last iteration of the for loop,
- a quater is made when computing
etc.
Now recall that
 |
(19) |
So
roughly the cost of the algorithm is in the order
of magnitude of the cost of the last iteration.
which consists of
- two multiplications of polynomials with degree less than
,
- a multiplication of a polynomial (with degree less than
)
by a constant,
- truncations modulo
- a subtraction of polynomials with degree less than
.
leading to

operations in

.
But this was not a formal proof, although the principle was correct.
Let us give a more formal proof.
The cost for the
-th iteration is
-
for the computation of
,
-
for the product
,
- and then the opposite of the upper half of
modulo
(which is the upper half
) takes
operations.
Thus we have

, resulting in a total running time:
 |
(20) |
since

for all
Remark 6
Let us take a closer look at the computation of
 |
(22) |
in Algorithm 2.
Consider first the product
. It satisfies:
 |
(23) |
Moreover, the polynomials
and
can be seen as polynomials
with degrees less than
and
respectively.
Hence, there exist polynomials
with degree less
than
such that we have:
 |
(24) |
We are only interested in computing
.
In order to avoid computing
, let us observe that we have
 |
(25) |
In other words, the upper part (that is, the terms of
degree at least
) of the convolution product of
gives us exactly
.
So let us assume from now on that we have at hand
a primitive
-th root of unity, such that we can
compute DFT's.
Therefore, we can compute
at the cost of one
multiplication in degree less than
.
Consider now that we have computed
.
Viewing
and
as polynomials
with degrees less than
and
respectively,
there exist polynomials
with degree less
than
such that
 |
(26) |
We know that
.
Hence, we are only interested in computing
.
Similarly to the above, we observe that
 |
(27) |
Therefore, using DFT, we can compute
at the cost of one
multiplication in degree less than
.
It follows that, in the complexity analysis above
(in the proof of Theorem 2)
we can replace
by
leading to
instead of
.