Proof with auto using Z_lt_neq.
intros H1 H2 (p,Hp).
rewrite (Z.div_mod a m) at 1...
rewrite Hp at 1.
rewrite Z.mul_shuffle0, Z.add_comm, Z.mod_add...
Qed.

Lemma Zmod_divide_minus a b c:
0 < b -> a mod b = c -> (b | a - c).