divMod is:exact

simultaneous div and mod. WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
simultaneous div and mod WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
simultaneous div and mod
\n (QC.NonZero m) -> let (q,r) = divMod n m in n == (q*m+r :: Integer)
\x y -> case (PolyCore.normalize x, PolyCore.normalize y) of (nx, ny) -> not (null (ratioPoly ny)) ==> mapSnd PolyCore.normalize (PolyCore.divMod nx ny) == mapPair (PolyCore.normalize, PolyCore.normalize) (PolyCore.divMod x y)
\x y -> not (isZero (ratioPoly y)) ==> let z = fst $ PolyCore.divMod (Poly.coeffs x) y in  PolyCore.normalize z == z
\x y -> case PolyCore.normalize $ ratioPoly y of ny -> not (null ny) ==> List.length (snd $ PolyCore.divMod x y) < List.length ny
Simultaneous div and mod.
simultaneous div and mod