Require Export misc.
Require Export Zstruct.
Require Export ZArith.
Unset Standard Proposition Elimination Names.

Lemma gcd_OZ_absZ : forall b : Z, is_gcd Z IdZ Zmult 0%Z 0%Z b (Zabs b).
Inductive is_gcdZ : Z -> Z -> Z -> Prop :=
| gcd_OZ : forall b : Z, is_gcdZ 0%Z b (Zabs b)
| gcd_mod :
forall b a d q r : Z,
b <> 0%Z ->
(0 <= r < Zabs b)%Z ->
a = (b * q + r)%Z -> is_gcdZ r b d -> is_gcdZ b a d.