Example

Consider the polynomial f = Xn+1 in Z/pZ[X]. Its derivative Df is nXn-1.

If p | n then Df = 0, and gcd(f,Df) = f. The lemma does not apply. In fact, f = (Xn/p+1)p and so multiple roots occur.

Otherwise, gcd(p,n) = 1, so n is invertible in Z/pZ, whence gcd(f,Df) = gcd(Xn+1,Xn-1) = gcd(1,Xn-1) = 1, and, by the lemma, f has no multiple roots.