(** * LimSup and LimInf of sequences *)
(** ** Definitions *)
Definition is_LimSup_seq (u : nat -> R) (l : Rbar) :=
match l with
| Finite l => forall eps : posreal,
(forall N : nat, exists n : nat, (N <= n)%nat /\ l - eps < u n)
/\ (exists N : nat, forall n : nat, (N <= n)%nat -> u n < l + eps)
| p_infty => forall M : R, (forall N : nat, exists n : nat, (N <= n)%nat /\ M < u n)
| m_infty => forall M : R, (exists N : nat, forall n : nat, (N <= n)%nat -> u n < M)
end.
Definition is_LimInf_seq (u : nat -> R) (l : Rbar) :=
match l with
| Finite l => forall eps : posreal,
(forall N : nat, exists n : nat, (N <= n)%nat /\ u n < l + eps)
/\ (exists N : nat, forall n : nat, (N <= n)%nat -> l - eps < u n)
| p_infty => forall M : R, (exists N : nat, forall n : nat, (N <= n)%nat -> M < u n)
| m_infty => forall M : R, (forall N : nat, exists n : nat, (N <= n)%nat /\ u n < M)
end.
(** Equivalent forms *)

Lemma is_LimSup_infSup_seq (u : nat -> R) (l : Rbar) :
is_LimSup_seq u l <-> is_inf_seq (fun m => Sup_seq (fun n => u (n + m)%nat)) l.