(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
Require Export QArith_base.
(** Injection of rational numbers into real numbers. *)

(* Specifications: *)
Lemma IZR_nz : forall p : positive, IZR (Zpos p) <> 0%R.
#[global]
Hint Resolve IZR_nz Rmult_integral_contrapositive : core.
Lemma eqR_Qeq : forall x y : Q, Q2R x = Q2R y -> x==y.
Lemma Qeq_eqR : forall x y : Q, x==y -> Q2R x = Q2R y.
Lemma Rle_Qle : forall x y : Q, (Q2R x <= Q2R y)%R -> x<=y.
Lemma Qle_Rle : forall x y : Q, x<=y -> (Q2R x <= Q2R y)%R.
Lemma Rlt_Qlt : forall x y : Q, (Q2R x < Q2R y)%R -> x<y.
Lemma Qlt_Rlt : forall x y : Q, x<y -> (Q2R x < Q2R y)%R.
Lemma Q2R_plus : forall x y : Q, Q2R (x+y) = (Q2R x + Q2R y)%R.
Lemma Q2R_mult : forall x y : Q, Q2R (x*y) = (Q2R x * Q2R y)%R.
Lemma Q2R_opp : forall x : Q, Q2R (- x) = (- Q2R x)%R.
Lemma Q2R_minus : forall x y : Q, Q2R (x-y) = (Q2R x - Q2R y)%R.
Lemma Q2R_inv : forall x : Q, ~ x==0 -> Q2R (/x) = (/ Q2R x)%R.
Lemma Q2R_div :
forall x y : Q, ~ y==0 -> Q2R (x/y) = (Q2R x / Q2R y)%R.