Definition Z__from_Mset (M : Mset) := exist (in_Z_ (2 ^ w)) M (in_Z__if_in_Mset M).(* <KEEP TOGETHER - Cdef *)
Definition C (M : Mset) :=
      ( exist (in_Z_ w)       (Zlog_sup M)                       (pex M),
        exist (in_Z_ w)       (w - Zlog_sup M - 1 / M)           (tex M),
        exist (in_Z_ (2 ^ w)) (2 ^ (Zlog_sup M + w) / M - 2 ^ w) (M'ex M)).

Theorem ModRed_eq2 : forall (M : Mset) (v : Z_ (2 ^ Zlog_sup M)) (u : Z_ (2 ^ w)), ModRed M (C M) (exist (in_Z_ (2 ^ w)) v (xheex M v)) (exist (in_Z_ (2 ^ w)) u (xleex u)) = (2 ^ w * v + u) mod M.