(************************************************************************)
(*         *      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)         *)
(************************************************************************)
(************************************************************************)
(** Proof that Cauchy reals are Cauchy-complete.  WARNING: this file is experimental and likely to change in future releases. *)
Local Open Scope CReal_scope.
(* We use <= in sort Prop rather than < in sort Set, it is equivalent for the definition of limits and it extracts smaller programs. *)
Definition seq_cv (un : nat -> CReal) (l : CReal) : Set
:= forall p : positive,
{ n : nat  |  forall i:nat, le n i -> CReal_abs (un i - l) <= inject_Q (1#p) }.
Definition Un_cauchy_mod (un : nat -> CReal) : Set
:= forall p : positive,
{ n : nat  |  forall i j:nat, le n i -> le n j
-> CReal_abs (un i - un j) <= inject_Q (1#p) }.

Lemma seq_cv_proper : forall (un : nat -> CReal) (a b : CReal),
seq_cv un a
-> a == b
-> seq_cv un b.