replace ((x / m * m + x mod m) mod m) with (x mod m).
rewrite Zdiv_small_0; auto. rewrite Zdivmod_split. trivial. omega. omega. Qed.

(* Specifications: *)
Lemma Zdiv_a_b_b_Zmod : forall a b : Z, 0 < b -> a / b * b = a - a mod b.
intros a b H. cut (a / b * b + a mod b = a). omega. apply Zdivmod_split. assumption. Qed.
Lemma Zminus_Zdiv_Zmult : forall a b : Z, 0 < b -> a - a / b * b = a mod b.
intros. rewrite Zdiv_a_b_b_Zmod. ring. assumption. Qed.
Lemma Zmod_prod_Zmod : forall x y z : Z, 0 < y -> 0 < z -> x mod (y * z) mod z = x mod z.
intros x y z H H0. rewrite <- Zminus_Zdiv_Zmult with (a := x). rewrite Zmult_assoc.