(** We get Euclid's algorithm by applying [euclid_rec] on [1,0,a,0,1,b] when [b>=0] and [1,0,a,0,-1,-b] when [b<0]. *)

(* Specifications: *)
Lemma euclid : Euclid.
End extended_euclid_algorithm.
Theorem gcd_uniqueness_apart_sign :
forall a b d d' : Z, gcd a b d -> gcd a b d' -> d = d' \/ d = (- d')%Z.