Hensel lifting

If we have some polynomial ff and xx such that

f(x0)=0modpf(x_0) = 0 \; mod \; p

and f(x0)0modpf'(x_0) \neq 0 \; mod \; p, we can find x1x_1 such that

f(x1)=0modp2f(x_1) = 0 \; mod \; p^2

We use the Newton’s method (opens new window), which relies on the Taylor series:

f(x0+kp)=f(x0)+kpf(x0)+(kp)2f(x0)2+...f(x_0 + k p) = f(x_0) + k p f'(x_0) + (k p)^2 \frac{f''(x_0)}{2} + ...

Now, using kpk p as a small value might seem strange, right? Well, we are using p-adic numbers here. A great resource on p-adic numbers is p-adic numbers and Diophantine equations (opens new window) by Yuri Bilu. The p-adic numbers are an extension of the rational numbers, distinct from the real numbers. The distinction arises from how we measure the distance between the numbers.

To understand how the distance between xx and yy is defined, let’s first see how the length of xx is determined. The length of xx is pkp^{-k}, where kk is the highest power of pp such that pkxp^k | x.

The distance between xx and yy is defined as the length of xyx-y.

We write a p-adic number as a series. For example, let’s say

x=a0+a1p+a2p2+...x = a_0 + a_1 p + a_2 p^2 + ...

If a0=0a_0 = 0 and a10a_1 \neq 0, we have x=p1|x| = p^{-1}.

If a0=0,a1=0a_0 = 0, a_1 = 0, and a20a_2 \neq 0, then x=p2|x| = p^{-2}.

So, using kpk p and (kp)2(k p)^2 in the Taylor series actually makes sense. The beauty of p-adic numbers is that we still have the analysis and topology tools at our disposal. While the metric is different, we can still utilize derivatives and the Taylor series, for instance.

Back to our original problem—let’s find x1x_1 such that f(x1)=0modp2f(x_1) = 0 \; mod \; p^2.

We can see:

f(x0+kp)=f(x0)+kpf(x0)modp2f(x_0 + k p) = f(x_0) + k p f'(x_0) \; mod \; p^2

We set kk:

k=f(x0)pf(x0)k = - \frac{f(x_0)}{p f'(x_0)}

Now we have f(x0+kp)=0modp2f(x_0 + k p) = 0 \; mod \; p^2.