Definition split_bits x :=
  let mm := Zpower 2 mw in
  let em := Zpower 2 ew in
  (Zle_bool (mm * em) x, Zmod x mm, Zmod (Zdiv x mm) em)%Z.

Theorem split_bits_inj : forall x y, (0 <= x < Zpower 2 (mw + ew + 1))%Z -> (0 <= y < Zpower 2 (mw + ew + 1))%Z -> split_bits x = split_bits y -> x = y.