(** * Order results about Zrem and Zquot *)
(* Division of positive numbers is positive. *)

(** * Relations between usual operations and Z.modulo and Z.div *)
(** First, a result that used to be always valid with Zdiv, but must be restricted here. For instance, now (9+(-5)*2) rem 2 = -1 <> 1 = 9 rem 2 *)
Lemma Z_rem_plus : forall a b c:Z,
0 <= (a+b*c) * a ->
Z.rem (a + b * c) c = Z.rem a c.