(** 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]. *)

(* Specifications: *)
Lemma rem_mul_r : forall a b c, b~=0 -> 0<c ->
a mod (b*c) == a mod b + b*((a/b) mod c).
Lemma mod_div: forall a b, b~=0 ->
a mod b / b == 0.
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.