Documentation

HexHenselMathlib.CoprimeLift

Reducing an integer coefficient modulo p gives zero exactly when p divides it.

Equality after coefficientwise reduction modulo p is equivalent to divisibility of the coefficient difference.

theorem HexHenselMathlib.coeff_ediv_mul_eq_of_dvd {f : Polynomial } {m n : } (h : m f.coeff n) :
f.coeff n / m * m = f.coeff n

Exact divisibility lets us recover an integer coefficient from its quotient.

theorem HexHenselMathlib.coeff_mul_ediv_eq_of_dvd {f : Polynomial } {m n : } (h : m f.coeff n) :
m * (f.coeff n / m) = f.coeff n

Exact divisibility also gives the left-multiplication form used in coefficientwise quotient rewrites.

Reducing coefficients from ZMod (p^(k+1)) to ZMod p agrees with direct reduction.

Reducing coefficients from ZMod (p^(k+1)) to ZMod (p^k) agrees with direct reduction.

Polynomial reduction from ZMod (p^(k+1)) to ZMod p is compatible with direct reduction.

Polynomial reduction from ZMod (p^(k+1)) to ZMod (p^k) is compatible with direct reduction.

theorem HexHenselMathlib.isUnit_one_add_C_mul (p k : ) (u : Polynomial (ZMod (p ^ k))) :
IsUnit (1 + Polynomial.C p * u)

In Polynomial (ZMod (p^k)), the correction term p * u is nilpotent, so 1 + p * u is a unit.

Coprimality modulo p lifts to coprimality modulo p^k.

The 0 < k hypothesis is part of the calling convention; the proof does not need it (the k = 0 case is vacuous because ZMod 1 is the zero ring).

theorem HexHenselMathlib.isCoprime_cancel_of_natDegree_lt {R : Type u_1} [CommRing R] [IsDomain R] {g h a b : Polynomial R} (hg : g.Monic) (hcop : IsCoprime g h) (heq : a * h + b * g = 0) (hdeg : a.natDegree < g.natDegree) :
a = 0 b = 0

Coprime monic cancellation with a strict degree bound.

If a * h + b * g = 0 in R[X] for a commutative domain R, where g is monic and IsCoprime g h, then a.natDegree < g.natDegree forces both a = 0 and b = 0.

This is the load-bearing analytic step for the binary-Hensel uniqueness theorem hensel_unique (HexHenselMathlib/Correctness.lean): after reducing the integer-polynomial difference equation modulo p, the problem becomes a coprime cancellation in Polynomial (ZMod p), with the strict degree bound following from the monicity of both g and g' at the same natDegree.