(*********************************************************)
(** ** Injection from [nat] to [R]                       *)
(*********************************************************)

(* Specifications: *)
Lemma S_INR : forall n, INR (S n) = INR n + 1.
Lemma INR_0 : INR 0 = 0.
#[global]
Hint Resolve plus_INR: real.
Lemma minus_INR : forall n m, (m <= n)%nat -> INR (n - m) = INR n - INR m.
#[global]
Hint Resolve minus_INR: real.
Lemma mult_INR : forall n m:nat, INR (n * m) = INR n * INR m.
#[global]
Hint Resolve mult_INR: real.
Lemma pow_INR : forall m n:nat, INR (m ^ n) = pow (INR m) n.
Lemma lt_0_INR : forall n:nat, (0 < n)%nat -> 0 < INR n.
#[global]
Hint Resolve lt_0_INR: real.
Lemma lt_INR : forall n m:nat, (n < m)%nat -> INR n < INR m.
#[global]
Hint Resolve lt_INR: real.
Lemma lt_1_INR : forall n:nat, (1 < n)%nat -> 1 < INR n.
#[global]
Hint Resolve pos_INR: real.
Lemma INR_lt : forall n m:nat, INR n < INR m -> (n < m)%nat.
#[global]
Hint Resolve INR_lt: real.
Lemma le_INR : forall n m:nat, (n <= m)%nat -> INR n <= INR m.
#[global]
Hint Resolve le_INR: real.
Lemma INR_not_0 : forall n:nat, INR n <> 0 -> n <> 0%nat.
#[global]
Hint Resolve not_0_INR: real.
Lemma not_INR : forall n m:nat, n <> m -> INR n <> INR m.
#[global]
Hint Resolve not_INR: real.
Lemma INR_eq : forall n m:nat, INR n = INR m -> n = m.
Lemma INR_le : forall n m:nat, INR n <= INR m -> (n <= m)%nat.
#[global]
Hint Resolve INR_le: real.
Lemma not_1_INR : forall n:nat, n <> 1%nat -> INR n <> 1.
Lemma IPR_xH : IPR xH = 1.
Lemma IPR_xO : forall p : positive, IPR (p~0) = 2 * IPR p.
Lemma IPR_xI : forall p : positive, IPR (p~1) = 2 * IPR p + 1.
Lemma INR_IPR : forall p, INR (Pos.to_nat p) = IPR p.
Lemma succ_IPR : forall p, IPR (Pos.succ p) = IPR 1 + IPR p.
Lemma plus_IPR : forall p q, IPR (p + q) = IPR p + IPR q.
Lemma minus_IPR : forall p q, (q < p)%positive -> IPR (p - q) = IPR p - IPR q.
Lemma mult_IPR : forall p q:positive, IPR (p * q) = IPR p * IPR q.
Lemma pow_IPR (q p: positive) : IPR (q ^ p) = pow (IPR q) (Pos.to_nat p).
Lemma IPR_ge_1 : forall p:positive, 1 <= IPR p.
Lemma IPR_gt_0 : forall p:positive, 0 < IPR p.
Lemma lt_IPR : forall p q:positive, (p < q)%positive -> IPR p < IPR q.
Lemma lt_1_IPR : forall p:positive, (1 < p)%positive -> 1 < IPR p.
Lemma le_IPR : forall p q:positive, (p <= q)%positive -> IPR p <= IPR q.
Lemma IPR_not_1 : forall p:positive, IPR p <> 1 -> p <> 1%positive.
Lemma not_IPR : forall p q:positive, p <> q -> IPR p <> IPR q.
Lemma IPR_eq : forall p q:positive, IPR p = IPR q -> p = q.
Lemma IPR_le : forall p q:positive, IPR p <= IPR q -> (p <= q)%positive.
(*********************************************************)
(** ** Injection from [Z] to [R]                         *)
(*********************************************************)
(* NOTES: - Z has 3 constructors : * Z0 : Z, representing 0 * Zpos : positive -> Z, for a positive integer * Zneg : positive -> Z, for a negative integer - Definition of Z is in Numbers.BinNums - Operations and lemmas are in ZArith (modules Z, Z2Nat, Nat2Z) *)
Lemma IZN : forall n:Z, (0 <= n)%Z -> exists m : nat, n = Z.of_nat m.
Lemma IZR_NEG : forall p, IZR (Zneg p) = Ropp (IZR (Zpos p)).
Lemma IZR_POS_xI : forall p, IZR (Zpos (xI p)) = 1 + 2 * IZR (Zpos p).
Lemma plus_IZR_NEG_POS :
forall p q:positive, IZR (Zpos p + Zneg q) = IZR (Zpos p) + IZR (Zneg q).
Lemma plus_IZR : forall n m:Z, IZR (n + m) = IZR n + IZR m.
Lemma mult_IZR : forall n m:Z, IZR (n * m) = IZR n * IZR m.
Lemma pow_IZR : forall z n, pow (IZR z) n = IZR (Z.pow z (Z.of_nat n)).
Lemma succ_IZR : forall n:Z, IZR (Z.succ n) = IZR n + 1.
Definition Ropp_Ropp_IZR := opp_IZR.
Lemma minus_IZR : forall n m:Z, IZR (n - m) = IZR n - IZR m.
Lemma Z_R_minus : forall n m:Z, IZR n - IZR m = IZR (n - m).
Lemma lt_0_IZR : forall n:Z, 0 < IZR n -> (0 < n)%Z.
Lemma lt_IZR : forall n m:Z, IZR n < IZR m -> (n < m)%Z.
Lemma eq_IZR_R0 : forall n:Z, IZR n = 0 -> n = 0%Z.
Lemma eq_IZR : forall n m:Z, IZR n = IZR m -> n = m.
Lemma not_0_IZR : forall n:Z, n <> 0%Z -> IZR n <> 0.
Lemma le_IZR : forall n m:Z, IZR n <= IZR m -> (n <= m)%Z.
(* NOTE: 1 is a notation for (IZR 1) *)
Lemma le_IZR_R1 : forall n:Z, IZR n <= 1 -> (n <= 1)%Z.
Lemma IZR_le : forall n m:Z, (n <= m)%Z -> IZR n <= IZR m.
Lemma eq_IZR_contrapositive : forall n m:Z, n <> m -> IZR n <> IZR m.
Lemma one_IZR_r_R1 :
forall r (n m:Z), r < IZR n <= r + 1 -> r < IZR m <= r + 1 -> n = m.
Lemma INR_unbounded : forall A, exists n, INR n > A.
Lemma INR_archimed :
forall eps A : R, eps > 0 -> exists n : nat, (INR n) * eps > A.
Lemma R_rm : ring_morph
0%R 1%R Rplus Rmult Rminus Ropp eq
0%Z 1%Z Zplus Zmult Zminus Z.opp Zeq_bool IZR.
(* NOTE: keeping inconsistent variable names for backward compatibility. *)
Lemma Zeq_bool_IZR : forall x y:Z, IZR x = IZR y -> Zeq_bool x y = true.
#[deprecated(since="8.19")]
Notation inser_trans_R := inser_trans_R_depr (only parsing).
Lemma Ropp_minus_distr'_depr : forall r1 r2, - (r2 - r1) = r1 - r2.
#[deprecated(since="8.19")]
Notation sum_inequa_Rle_lt := sum_inequa_Rle_lt_depr (only parsing).
Lemma Rle_Rinv_depr : forall x y:R, 0 < x -> 0 < y -> x <= y -> / y <= / x.
#[deprecated(since="8.19",note="Use Rplus_sqr_eq_0.")]
Notation Rplus_sqr_eq_0_l := Rplus_sqr_eq_0_l_depr (only parsing).