apply is_gcd_intro; auto.
intros d H'1 H'2.
inversion_clear H'.
elim (eq_nat_dec d 1); intros H'4; auto.
rewrite H'4; auto.
elim (eq_nat_dec p d); intros H'5; auto.
case H'0; try rewrite H'5; auto.
case H'5; apply H0; auto.
Qed.

(* Specifications: *)
Lemma gcd_rec :
forall P : nat -> nat -> Set,
(forall x : nat, P 0 x) ->
(forall x : nat, P x 0) ->
(forall a b : nat, P a b -> P a (b + a)) ->
(forall a b : nat, P a b -> P (a + b) b) -> forall a b : nat, P a b.
Lemma gcd_ind :
forall P : nat -> nat -> Prop,
(forall x : nat, P 0 x) ->
(forall x : nat, P x 0) ->
(forall a b : nat, P a b -> P a (b + a)) ->
(forall a b : nat, P a b -> P (a + b) b) -> forall a b : nat, P a b.