Coprime-factor Hensel lifting (source code)

= Coprime-factor Hensel lifting

A monic <polynomial> over a complete <discrete valuation ring> factors with prescribed coprime monic residue factors. Given monic lifts $g_r,h_r$ correct modulo $\pi^r$, the degree-bounded map $(u,v)\mapsto u\bar h_r+v\bar g_r$ is a bijection over the <residue field>, by coprimality and equality of dimensions. Solve it for the error $(f-g_rh_r)/\pi^r$, and replace the lifts by $g_r+\pi^ru,h_r+\pi^rv$. Their coefficients converge by completeness and the limiting product is $f$. The completeness assumption cannot be replaced just by localization.