Qed.

(* Specifications: *)
(** gcd(a,b) | b *)
Lemma gcd_div_r : forall (d a b:nat),(is_gcd d a b)->(divides b d).
unfold is_gcd;unfold is_cd;intros;tauto.
(** if l and l' are well-formed and (refactor l)=(refactor l') then l' is a permutation of l *)
Lemma factorisation_unique_upto_perm : forall (l l':list (nat*nat)),(is_wf l)->(is_wf l')->(refactor l)=(refactor l')->(is_permutation (nat*nat) l l').
intros.
Lemma permutation_in : forall (A:Set)(l l':list A),(is_permutation A l l')->forall (x:A),(In x l)<->(In x l').
induction l;simpl;intros.