intros. elim H; intros; elim H5; intros; elim H6; intros; elim H8; intros.
elim H11; intros; elim H12; intros; elim H14; intros; elim H16; intros.
elim H18; intros. clear H6 H8 H9 H12 H13 H14 H15 H16 H17 H18 H19 H21.
rewrite (opp_opp S A Add O Opp H11 x H2).
symmetry  in |- *; apply (opp_unicity S A Add O Opp H11 (Opp x) I).
elim (H22 x H2); intros; elim H8; intros; elim H10; intros.
apply (opp_com S A Add O H7 (Opp x) I H9 H13). clear H6 H8 H12 H13.
elim (H0 a (Add (Opp x) I)); intros.
elim H3. exact a0. exact b.
elim (H20 a (Opp x) I); intros. rewrite H8. elim (H14 a H1); intros.
rewrite H12. clear H6 H8 H9 H12 H13 H14.
rewrite (mult_opp_r H5 a x H1 H2). rewrite H4.
elim (H22 a H1); intros; elim H8; intros; elim H12; intros; exact H14.
Qed.

(* Specifications: *)
(******************************) (* Pas aussi propre que je le souhaiterais *)
Lemma gcd_unicity_apart_unities :
is_unitary_commutative_ring ->
integrity ->
forall a b d1 d2 : S,
is_gcd a b d1 ->
is_gcd a b d2 ->
exists x : S, inversible S Mult I x /\ A x /\ d2 = Mult d1 x.