intros; elim (Zdiv_rest_correct x p); intros q r Hx Hr1 Hr2; exists q;
rewrite (Zplus_0_r_reverse (q * two_power_pos p));
rewrite Hx; split;
[ apply Zplus_le_compat_l; assumption
| unfold Zsucc in |- *; rewrite Zmult_plus_distr_l; apply Zplus_lt_compat_l;
rewrite Zmult_1_l; assumption ].
Qed.
Definition ZROUND_inf (p : positive) (x : Z) :=
let (x', p) := ZROUND_inf_spec p x in x'.

(* Specifications: *)
Lemma ZROUND_sup_spec :
forall (p : positive) (x : Z),
{y : Z | (Zpred y * two_power_pos p < x <= y * two_power_pos p)%Z}.