(************************************************************************)
(*         *   The Coq Proof Assistant / The Coq Development Team       *)
(*  v      *   INRIA, CNRS and contributors - Copyright 1999-2018       *)
(* <O___,, *       (see CREDITS file for the list of authors)           *)
(*   \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.
Definition A1 (x:R) (N:nat) : R :=
sum_f_R0 (fun k:nat => (-1) ^ k / INR (fact (2 * k)) * x ^ (2 * k)) N.
Definition B1 (x:R) (N:nat) : R :=
sum_f_R0 (fun k:nat => (-1) ^ k / INR (fact (2 * k + 1)) * x ^ (2 * k + 1))
N.
Definition C1 (x y:R) (N:nat) : R :=
sum_f_R0 (fun k:nat => (-1) ^ k / INR (fact (2 * k)) * (x + y) ^ (2 * k)) N.
Definition Reste1 (x y:R) (N:nat) : R :=
sum_f_R0
(fun k:nat =>
sum_f_R0
(fun l:nat =>
(-1) ^ S (l + k) / INR (fact (2 * S (l + k))) *
x ^ (2 * S (l + k)) * ((-1) ^ (N - l) / INR (fact (2 * (N - l)))) *
y ^ (2 * (N - l))) (pred (N - k))) (pred N).
Definition Reste2 (x y:R) (N:nat) : R :=
sum_f_R0
(fun k:nat =>
sum_f_R0
(fun l:nat =>
(-1) ^ S (l + k) / INR (fact (2 * S (l + k) + 1)) *
x ^ (2 * S (l + k) + 1) *
((-1) ^ (N - l) / INR (fact (2 * (N - l) + 1))) *
y ^ (2 * (N - l) + 1)) (pred (N - k))) (
pred N).
Definition Reste (x y:R) (N:nat) : R := Reste2 x y N - Reste1 x y (S N).

Lemma C1_cvg : forall x y:R, Un_cv (C1 x y) (cos (x + y)).