elim r'0_eq_7; intro H; rewrite H. left. apply r'0_eq_8. trivial. right. apply r'0_eq_8. trivial. Qed.

Lemma r'0_eq : _Z r'0 = x mod M \/ _Z r'0 = x mod M + M.
elim r'0_eq_9; intro H. elim H; intro H0; rewrite H0. left. rewrite Zmod_plus_distr_l. rewrite <- Zmod_mult_distr_l.