Definition CReal_from_cauchy_seq (xn : nat -> CReal) (xcau : Un_cauchy_mod xn) (n : Z) : Q :=
let p := CReal_from_cauchy_cm n in
let (q, _) := xcau (4 * 2^p)%positive in
seq (xn q) (Z.neg p - 2)%Z.

(* Specifications: *)
Lemma CReal_from_cauchy_cauchy : forall (xn : nat -> CReal) (xcau : Un_cauchy_mod xn),
QCauchySeq (CReal_from_cauchy_seq xn xcau).
Lemma Rup_pos (x : CReal)
: { n : positive  &  x < inject_Q (Z.pos n # 1) }.
Lemma CReal_abs_upper_bound (x : CReal)
: { n : positive  &  CReal_abs x < inject_Q (Z.pos n # 1) }.
Lemma CRealLt_QR_from_single_dist : forall (q : Q) (r : CReal) (n :Z),
(2^n < seq r n - q)%Q
-> inject_Q q < r .
Lemma CReal_abs_Qabs: forall (x : CReal) (q : Q) (n : Z),
CReal_abs x <= inject_Q q
-> (Qabs (seq x n) <= q + 2^n)%Q.
Lemma CReal_abs_Qabs_seq: forall (x : CReal) (n : Z),
(seq (CReal_abs x) n == Qabs (seq x n))%Q.
Lemma CReal_abs_Qabs_diff: forall (x y : CReal) (q : Q) (n : Z),
CReal_abs (x - y) <= inject_Q q
-> (Qabs (seq x n - seq y n) <= q + 2*2^n)%Q.