(** Division with remainder. *)

(* Specifications: *)
Theorem div_rem :
forall d n : nat,
d > 0 -> exists q : nat, (exists r : nat, 0 <= r /\ r < d /\ n = q * d + r).
Lemma div_rem0 :
forall n d q r : nat, n = q * d + r -> r < d -> Divides d n -> r = 0.
Theorem notdiv_rem :
forall d n : nat,
0 < d ->
~ Divides d n ->
exists q : nat, (exists r : nat, 0 < r /\ r < d /\ n = q * d + r).