Suppose that we know that a polynomial f(x) has a root modulo pk. Can we tell if it has a root modulo pk+1? Hensel's lemma states that it is possible under certain conditions.
Hensel's lemma Let f(x)∈Z[x], and a,p∈Z, where p is prime. If f(a)≡0(modp) and f′(a)≡0(modp), then there exists an∈Z/pnZ such that f(an)≡0(modpn) and an≡an−1(modpn) for all n∈N.
Let's try to prove it now:
Let r be a root of f. By induction, it suffices to show that if f(r)≡0(modp), then f(r+tpn)≡0(modpn+1) for some t∈Z.
Let f(x)=i=0∑naixi. Now suppose that f(r)≡0(modpk). Then
f(r+tpk)=i=0∑nai(r+tpk)i.
Note that f(r+tpn)≡0(modpn+1) for some t if and only if
0≡i=0∑nai(r+tpn)i(modpn+1).
Note that by the binomial theorem, (r+tpn)i≡ri+ri−1(1i)tpk(modpn+1). Thus,
0≡i=0∑nai(ri+ri−1(1i)tpn)(modpn+1)≡i=0∑nairi+i=0∑nairi−1(1i)tpn(modpn+1)≡f(r)+f′(r)tpn(modpn+1).
Since f(r)≡0(modpn), we have f(r)=pnk for some k∈Z. Thus,
0≡(k+f′(r)t)pn(modpn+1),
and thus
0≡k+f′(r)t(modp).
Solving gives t≡−k(f′(r))−1(modp), which is valid because f′(r)=0. Hence, we have found a t, and there exists an∈Z/pnZ such that f(an)(modpn) and an≡an−1(modpn) for all n∈N.