intro n. case n. intros. apply P_O; assumption. intro n0. intros. apply P_S with (n := n0); assumption. Qed.

Lemma Q_lem : forall (n : nat),
0 <= x -> x < 2 ^ (Z_of_nat n * w) ->
_Z (r'''0 M_in_Z_ ptM'cM'' (foldlz f' (zero_in_Z_, zero_in_Z_) n)) = x mod M.