(** We define the injection from Q into R *)

Definition Q_to_R (q:Q) : R := ((IZR (numerator q))/(IZR (denominator q)))%R.

(* Specifications: *)
Lemma Q_to_Req: forall x y, @eq Q x y -> ((Q_to_R x)=(Q_to_R y))%R.
Lemma Q_to_R_Zero: (Q_to_R Zero=0)%R.
Lemma Q_to_R_Qone: (Q_to_R Qone=1)%R.
Lemma Q_to_R_Qneg_One: (Q_to_R (Qneg One)=(-1))%R.
Lemma Q_to_Ropp: forall x, Q_to_R (Qopp x) = Ropp (Q_to_R x).
Lemma Q_to_Rplus: forall x y, Q_to_R (Qplus x y) = (Rplus (Q_to_R x) (Q_to_R y)).
Lemma Q_to_Rmult: forall x y, Q_to_R (Qmult x y) = (Rmult (Q_to_R x) (Q_to_R y)).
Lemma Q_to_Rinv: forall x, ~(x=Zero) -> Q_to_R (Qinv x) = Rinv (Q_to_R x).
Lemma Q_to_Rminus: forall x y, Q_to_R (Qminus x y) = (Rminus (Q_to_R x) (Q_to_R y)).
Lemma Q_to_Rdiv: forall x y, ~(y=Zero) -> Q_to_R (Qdiv x y) = (Rdiv (Q_to_R x) (Q_to_R y)).
Lemma not_Qlt:forall x y, ~(Qlt y x) -> (Qle x y).
Lemma Q_to_Rle: forall x y, Qle x y -> Rle (Q_to_R x) (Q_to_R y).
Lemma Q_to_Rlt: forall x y, Qlt x y -> Rlt (Q_to_R x) (Q_to_R y).
Lemma Q_to_R_not_eq: forall x y, ~(x=y)->~(Q_to_R x = Q_to_R y).
Lemma Q_to_R_Qle:forall x y : Q, Rle (Q_to_R x) (Q_to_R y) -> Qle x y.
Lemma Q_to_R_Qlt:forall x y : Q, Rlt (Q_to_R x) (Q_to_R y) -> Qlt x y.
Lemma Q_to_R_Qneq:forall x y : Q, (Q_to_R x)<>(Q_to_R y) -> x<>y.
Lemma Q_to_R_Qeq:forall x y : Q, (Q_to_R x)=(Q_to_R y) -> x=y.
Lemma Z_to_Q_to_R_IZR: forall z, Q_to_R (Z_to_Q z) = IZR z.