(************************************************************************)
(* Copyright 2006 Milad Niqui                                           *)
(* This file is distributed under the terms of the                      *)
(* GNU Lesser General Public License Version 2.1                        *)
(* A copy of the license can be found at                                *)
(*                  <http://www.gnu.org/licenses/lgpl-2.1.html>         *)
(************************************************************************)
(* This file contains properties of the injection from Q into R. *)
(** We define the injection from Q into R *)
Definition Q_to_R (q:Q) : R := ((IZR (numerator q))/(IZR (denominator q)))%R.
Coercion Q_to_R : 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).
intros [ |p|p].