(** Similarly, the following result doesn't always hold when [c<0]. For instance [3 mod (-2*-2)) = 3] while [3 mod (-2) + (-2)*((3/-2) mod -2) = -1]. *)

Lemma add_mul_mod_distr_l : forall a b c d, 0<=a -> 0<b -> 0<=d<c ->
(c*a+d) mod (c*b) == c*(a mod b)+d.