(*****************************************************************************)
 
Inductive is_div : nat -> nat -> nat -> nat -> Prop :=
    is_div_def :
      forall a b q r : nat, r < b -> a = q * b + r -> is_div a b q r.(*****************************************************************************)
 
Inductive is_div : nat -> nat -> nat -> nat -> Prop :=
    is_div_def :
      forall a b q r : nat, r < b -> a = q * b + r -> is_div a b q r.Inductive ex_div : nat -> nat -> Prop :=
    ex_div_def : forall a b q r : nat, is_div a b q r -> ex_div a b.Inductive ex_div : nat -> nat -> Prop :=
    ex_div_def : forall a b q r : nat, is_div a b q r -> ex_div a b.

(* Specifications: *)
Lemma div_x_nO : forall x y q r : nat, is_div x y q r -> y <> 0.
Lemma div_x_O_r : forall x q r : nat, is_div 0 x q r -> r = 0.
Lemma div_x_O_q : forall x q r : nat, is_div 0 x q r -> q = 0.
Lemma div_pred : forall x y q : nat, 0 < x -> is_div x y q 0 -> is_div (pred x) y (pred q) (pred y).
Lemma div_SxS : forall x y q r : nat, 0 < r -> is_div x y q r -> is_div (pred x) y q (pred r).
Lemma div_unic_r : forall a b q1 q2 r1 r2 : nat, is_div a b q1 r1 -> is_div a b q2 r2 -> r1 = r2.
Theorem simpl_mult_r : forall n m p : nat, 0 < n -> m * n = p * n -> m = p.
Lemma div_unic_q : forall a b q1 q2 r1 r2 : nat, is_div a b q1 r1 -> is_div a b q2 r2 -> q1 = q2.
Lemma quot_eq : forall a b c q1 r1 q2 r2 : nat, a = b -> is_div a c q1 r1 -> is_div b c q2 r2 -> q1 = q2.
Lemma mult_div_r : forall x y q r : nat, is_div (x * y) y q r -> r = 0.
Lemma mult_div_q : forall x y q r : nat, is_div (x * y) y q r -> q = x.
Lemma diveucl_divex : forall a b : nat, diveucl a b -> exists q : _, (exists r : _, is_div a b q r).
Lemma div_ex : forall a b : nat, b <> 0 -> exists q : _, (exists r : _, is_div a b q r).
Lemma eq_mult : forall a b c : nat, c <> 0 -> c * a = c * b -> a = b.
Lemma le_plus_le : forall a b c d : nat, a <= b -> a + c = b + d -> d <= c.
Lemma plus_minus_assoc : forall a b c : nat, b <= a -> a - b + c = a + c - b.