apply Z_to_inject_nat. assumption. rewrite shift_nat_correct. rewrite Zpower_nat_Zpower.
rewrite Z_to_inject_nat. ring. assumption. Qed.

Lemma two_p_pow : forall z : Z, 0 <= z -> two_p z = 2 ^ z.
intros z H. unfold two_p. case z. trivial. intro p. rewrite two_power_pos_correct. trivial. trivial. Qed.