(************************************************************************)
(*         *      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)         *)
(************************************************************************)
Local Open Scope R_scope.
(*****************************************************************)
(**           Convergence properties of sequences                *)
(*****************************************************************)
Definition Un_decreasing (Un:nat -> R) : Prop :=
forall n:nat, Un (S n) <= Un n.
Definition opp_seq (Un:nat -> R) (n:nat) : R := - Un n.
Definition has_ub (Un:nat -> R) : Prop := bound (EUn Un).
Definition has_lb (Un:nat -> R) : Prop := bound (EUn (opp_seq Un)).

(* Specifications: *)
(**********)
Lemma growing_cv :
forall Un:nat -> R, Un_growing Un -> has_ub Un -> { l:R | Un_cv Un l }.
Lemma decreasing_growing :
forall Un:nat -> R, Un_decreasing Un -> Un_growing (opp_seq Un).
Lemma decreasing_cv :
forall Un:nat -> R, Un_decreasing Un -> has_lb Un -> { l:R | Un_cv Un l }.
(***********)
Lemma ub_to_lub :
forall Un:nat -> R, has_ub Un -> { l:R | is_lub (EUn Un) l }.
(**********)
Lemma lb_to_glb :
forall Un:nat -> R, has_lb Un -> { l:R | is_lub (EUn (opp_seq Un)) l }.