(** d is a common divisor of a and b if d | a and d | b *)
Definition is_cd (d a b : nat) := (divides a d)/\(divides b d).(** d is a greatest common divisor of a and b if it is a maximal common divisor *)
Definition is_gcd (d a b:nat) := (is_cd d a b)/\(forall (d':nat),(is_cd d' a b)->(divides d d')).

(* Specifications: *)
Theorem gcd_unique : forall (d d' a b:nat),(is_gcd d a b)->(is_gcd d' a b)->d=d'.
Lemma gcd_sym : forall (d a b:nat),(is_gcd d a b)->(is_gcd d b a).
Lemma gcd_zero : forall (a:nat),(is_gcd a O a).
Lemma gcd_one : forall (a:nat),(is_gcd 1 1 a).
Lemma gcd_minus : forall (d a b:nat),(a <= b)->((is_gcd d a b)<->(is_gcd d a (b-a))).
Lemma gcd_refl : forall (a:nat),(is_gcd a a a).
Lemma gcd_div_l : forall (d a b:nat),(is_gcd d a b)->(divides a d).
Lemma gcd_div_r : forall (d a b:nat),(is_gcd d a b)->(divides b d).