(** Slice of an integer *)

Definition Zslice n k1 k2 :=
  if Zle_bool 0 k2 then Z.rem (Zscale n (-k1)) (Zpower beta k2) else Z0.

Theorem Zslice_scale : forall n k k1 k2, (0 <= k1)%Z -> Zslice (Zscale n k) k1 k2 = Zslice n (k1 - k) k2.