(* 5) the end: we glue everything together and take care of situations not corresponding to [0<a<b]. *)

(* Specifications: *)
Lemma Zgcd_bound_opp a : Zgcd_bound (-a) = Zgcd_bound a.
Lemma Zgcdn_opp n a b : Zgcdn n (-a) b = Zgcdn n a b.
Lemma Zgcdn_is_gcd_pos n a b : (Zgcd_bound (Zpos a) <= n)%nat ->
Zis_gcd (Zpos a) b (Zgcdn n (Zpos a) b).
Lemma Zgcdn_is_gcd n a b :
(Zgcd_bound a <= n)%nat -> Zis_gcd a b (Zgcdn n a b).
Lemma Zgcd_is_gcd :
forall a b, Zis_gcd a b (Zgcd_alt a b).