proposition: Lemma Qgcd_divides (a b: Q): exists c: Z, inject_Z c * Qgcd a b == a.
proof: Proof. revert a b. intros [an ad] [bn bd]. unfold Qgcd. simpl. destruct (Zgcd_nat_divides (an * bd) (bn * ad)) as [c E]. exists c. unfold Qmult, Qeq. simpl. rewrite E, Zpos_mult_morphism. ring. Qed.
imports: Coq.QArith.QArith CoRN.model.Zmod.ZGcd CoRN.model.totalorder.QposMinMax CoRN.stdlib_omissions.Q