Definition Zaway x := if Rlt_bool x 0 then Zfloor x else Zceil x.

(* Specifications: *)
Theorem Zaway_Z2R : forall n, Zaway (Z2R n) = n.
Theorem Zaway_ceil : forall x, (0 <= x)%R -> Zaway x = Zceil x.
Theorem Zaway_floor : forall x, (x <= 0)%R -> Zaway x = Zfloor x.
Theorem Zaway_le : forall x y, (x <= y)%R -> (Zaway x <= Zaway y)%Z.
Theorem Zaway_opp : forall x, Zaway (- x) = Zopp (Zaway x).
Theorem Zaway_abs : forall x, Zaway (Rabs x) = Zabs (Zaway x).
Theorem Zfloor_div : forall x y, y <> Z0 -> Zfloor (Z2R x / Z2R y) = (x / y)%Z.
Theorem radix_pos : (0 < Z2R r)%R.
Theorem Zaway_Z2R : forall n, Zaway (Z2R n) = n.
Theorem Zaway_ceil : forall x, (0 <= x)%R -> Zaway x = Zceil x.
Theorem Zaway_floor : forall x, (x <= 0)%R -> Zaway x = Zfloor x.
Theorem Zaway_le : forall x y, (x <= y)%R -> (Zaway x <= Zaway y)%Z.
Theorem Zaway_opp : forall x, Zaway (- x) = Zopp (Zaway x).
Theorem Zaway_abs : forall x, Zaway (Rabs x) = Zabs (Zaway x).
Theorem Zfloor_div : forall x y, y <> Z0 -> Zfloor (Z2R x / Z2R y) = (x / y)%Z.
Theorem radix_pos : (0 < Z2R r)%R.