omega. exact r'_small. cut (M <= r'_i). omega. apply Zle_trans with c. rewrite c_M. exact le_M_2pp. omega.
cut (r'_i < 2 ^ w). cut (0 < M). omega. omega. apply lt_z__Z. assumption. rewrite ltw_true. rewrite <- c_M. assumption.
assumption. Qed.

(* Specifications: *)
Lemma r'a_eq : _Z r'a = x mod M \/ _Z r'a = x mod M + M.
unfold r'a. elim (Zle_or_lt c r'_i); intro H. rewrite ltw_false. elim r'_i_eq'_i; intro H0. rewrite H0 in H.