(************************************************************************)
(*         *      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 nat_scope.
Local Open Scope R_scope.
Definition E1 (x:R) (N:nat) : R :=
sum_f_R0 (fun k:nat => / INR (fact k) * x ^ k) N.

(* Specifications: *)
Lemma E1_cvg : forall x:R, Un_cv (E1 x) (exp x).
Definition Reste_E (x y:R) (N:nat) : R :=
sum_f_R0
(fun k:nat =>
sum_f_R0
(fun l:nat =>
/ INR (fact (S (l + k))) * x ^ S (l + k) *
(/ INR (fact (N - l)) * y ^ (N - l))) (
pred (N - k))) (pred N).
Lemma exp_form :
forall (x y:R) (n:nat),
(0 < n)%nat -> E1 x n * E1 y n - Reste_E x y n = E1 (x + y) n.