So we get the following:
Let r be the smallest integer not dividing N. then condition (2) is obviously satisfies as r is not divisor
( ni-1) for . Condition (1) is also satisfies because
Now we prove (3). It is clear that (r,n) <r,as otherwise r would divide n and hence N. Thus is an integer less than max
not dividing N. Because r was chosen to be minimal,it must be case that
.hence we have found the r.
Because Or(n) >1, n must have some prime divisor p such that Or (p) >1. STEP 3 did not output COMPOSITE, so we know that (n, r)=(p, r) =1. Additionally, we know that p > r as otherwise STEP 3 or STEP 4 would have returned a decision regarding the primality n.
Hypothesis:
We now focus our attention on STEP 5 of the algorithm. Let us define an introspective. For polynomial f(X) and number m ∈ N, we say that m is introspective for f(X) if
f(X)m = f(Xm) (mod Xr-1, p).
Lemma: let n ∈ N have prime divisor p and let a ∈ N with 0 ≤ a ≤ l.if n,p are introspective for (x+a), then
is introspective for (x+a) as well.