elim r'0_eq_2; intro H; rewrite H. left. apply f_equal2 with (f := Zplus). trivial. symmetry. apply f_equal2 with (f := Zmod).
apply r'0_eq_6. trivial. right. apply f_equal2 with (f := Zplus). trivial. symmetry. apply f_equal2 with (f := Zmod).
apply r'0_eq_6. trivial. Qed.

(* Specifications: *)
Lemma r'0_eq_8 : forall a b : Z, a = b / 2 ^ p * 2 ^ p mod M + b mod 2 ^ p mod M -> a = b mod M \/ a = b mod M + M.
intros a b H. elim (mod_plus (b / 2 ^ p * 2 ^ p) (b mod 2 ^ p) M). intro H0. left. rewrite H. rewrite H0. rewrite Zdivmod_split.