(* KEEP TOGETHER> *)
replace (x mod 2 ^ p) with (x mod 2 ^ w mod 2 ^ p). apply Zdiv_a_b_b_Zmod. auto with a.
replace (2 ^ w) with (2 ^ (w - p) * 2 ^ p). apply Zmod_prod_Zmod. apply lt_0_Zpow. auto with a.
auto with a. rewrite <- Zpower_exp. apply f_equal2 with (f := Zpower). trivial. ring. apply Zle_ge.
auto with a. apply Zle_ge. auto with a. fold (0 * 0). apply Zmult_le_compat. apply Zle_0_div.
apply Zmod_le_0_z. auto with a. auto with a. apply Zlt_le_weak. auto with a. omega. omega.
apply Zle_lt_trans with (x mod 2 ^ w). rewrite Zmult_comm. apply Z_mult_div_ge. apply Zlt_gt.
auto with a. apply Zmod_lt_z_m. auto with a. Qed.

(* Specifications: *)
(* <KEEP TOGETHER - h_eq *)
Lemma h_eq : _Z h = x / 2 ^ w * 2 ^ (w - p).
simpl. fold t v. elim t_M; intro H. rewrite H. rewrite <- v_eq. rewrite Zmult_comm. apply modred.