(** 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 describes improper integrals, such as integrals with an infinity endpoint or integrals of a function with a singularity. A few properties are given: Chasles, operations, composition, derivation.*)
Open Scope R_scope.
(** * Improper Riemann integral *)
Section is_RInt_gen.
Context {V : NormedModule R_AbsRing}.
Definition is_RInt_gen (f : R -> V) (Fa Fb : (R -> Prop) -> Prop) (l : V) :=
filterlimi (fun ab => is_RInt f (fst ab) (snd ab)) (filter_prod Fa Fb) (locally l).
Definition ex_RInt_gen (f : R -> V) (Fa Fb : (R -> Prop) -> Prop) :=
exists l : V, is_RInt_gen f Fa Fb l.
Definition is_RInt_gen_at_point f a b l :
is_RInt_gen f (at_point a) (at_point b) l
<-> is_RInt f a b l.
(** * Basic properties of integrals *)

Lemma is_RInt_gen_swap {Fa Fb : (R -> Prop) -> Prop}
{FFa : Filter Fa} {FFb : Filter Fb} (f : R -> V) (l : V) :
is_RInt_gen f Fb Fa l -> is_RInt_gen f Fa Fb (opp l).