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

(* Specifications: *)
Theorem Ztrunc_Z2R : forall n, Ztrunc (Z2R n) = n.
Theorem Ztrunc_floor : forall x, (0 <= x)%R -> Ztrunc x = Zfloor x.
Theorem Ztrunc_ceil : forall x, (x <= 0)%R -> Ztrunc x = Zceil x.
Theorem Ztrunc_le : forall x y, (x <= y)%R -> (Ztrunc x <= Ztrunc y)%Z.
Theorem Ztrunc_opp : forall x, Ztrunc (- x) = Zopp (Ztrunc x).
Theorem Ztrunc_abs : forall x, Ztrunc (Rabs x) = Zabs (Ztrunc x).
Theorem Ztrunc_lub : forall n x, (Z2R n <= Rabs x)%R -> (n <= Zabs (Ztrunc x))%Z.
Theorem Ztrunc_Z2R : forall n, Ztrunc (Z2R n) = n.
Theorem Ztrunc_floor : forall x, (0 <= x)%R -> Ztrunc x = Zfloor x.
Theorem Ztrunc_ceil : forall x, (x <= 0)%R -> Ztrunc x = Zceil x.
Theorem Ztrunc_le : forall x y, (x <= y)%R -> (Ztrunc x <= Ztrunc y)%Z.
Theorem Ztrunc_opp : forall x, Ztrunc (- x) = Zopp (Ztrunc x).
Theorem Ztrunc_abs : forall x, Ztrunc (Rabs x) = Zabs (Ztrunc x).
Theorem Ztrunc_lub : forall n x, (Z2R n <= Rabs x)%R -> (n <= Zabs (Ztrunc x))%Z.