(** This file is part of the Coquelicot formalization of real analysis in Coq: http://coquelicot.saclay.inria.fr/  Copyright (C) 2011-2015 Sylvie Boldo #<br /># Copyright (C) 2011-2015 Catherine Lelay #<br /># Copyright (C) 2011-2015 Guillaume Melquiond  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYING file for more details. *)
(** This file gives definitions and properties about series defined on a normed module. An equivalence with the standard library and several convergence criteria are provided. *)
Section Definitions.
(** * Definitions *)
Context {K : AbsRing} {V : NormedModule K}.
Definition is_series (a : nat -> V) (l : V) :=
filterlim (sum_n a) (eventually) (locally l).
Definition ex_series (a : nat -> V) :=
exists l : V, is_series a l.
Definition Cauchy_series (a : nat -> V) :=
forall eps : posreal,
exists N : nat, forall n m : nat,
(N <= n)%nat -> (N <= m)%nat ->
norm (sum_n_m a n m) < eps.
End Definitions.
Definition Series (a : nat -> R) : R :=
real (Lim_seq (sum_n a)).

Lemma is_series_unique (a : nat -> R) (l : R) :
is_series a l -> Series a = l.