Coefficientwise congruence modulo m.
10.4. Congruence for Hensel lifting
Hensel lifting works modulo a prime power, so HexPolyZ carries a
coefficientwise congruence predicate and the notion of two polynomials
being coprime modulo p.
Two integer polynomials are coprime mod p when they admit a Bezout
combination congruent to 1 modulo p.
The congruence is an equivalence relation and is compatible with the ring operations, so Hensel-step reasoning can rewrite under it.
Coefficientwise congruence modulo m is reflexive.
Coefficientwise congruence modulo m is symmetric.
Hex.ZPoly.congr_trans (f g h : Hex.ZPoly) (m : Nat) (hfg : f.congr g m) (hgh : g.congr h m) : f.congr h mHex.ZPoly.congr_trans (f g h : Hex.ZPoly) (m : Nat) (hfg : f.congr g m) (hgh : g.congr h m) : f.congr h m
Coefficientwise congruence modulo m is transitive.
Hex.ZPoly.congr_add (f g f' g' : Hex.ZPoly) (m : Nat) (hf : f.congr f' m) (hg : g.congr g' m) : (f + g).congr (f' + g') mHex.ZPoly.congr_add (f g f' g' : Hex.ZPoly) (m : Nat) (hf : f.congr f' m) (hg : g.congr g' m) : (f + g).congr (f' + g') m
Addition preserves coefficientwise congruence modulo m in both inputs.
Hex.ZPoly.congr_mul (f g f' g' : Hex.ZPoly) (m : Nat) (hf : f.congr f' m) (hg : g.congr g' m) : (f * g).congr (f' * g') mHex.ZPoly.congr_mul (f g f' g' : Hex.ZPoly) (m : Nat) (hf : f.congr f' m) (hg : g.congr g' m) : (f * g).congr (f' * g') m
Multiplication preserves coefficientwise congruence modulo m in both
inputs.