(** 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 is an example of how to use power series. It defines and gives properties of the Bessel functions. *)
Definition Bessel1_seq (n k : nat) :=
(-1)^(k)/(INR (fact (k)) * INR (fact (n + (k)))).
Definition Bessel1 (n : nat) (x : R) :=
(x/2)^n * PSeries (Bessel1_seq n) ((x/2)^2).
(** * Unicity *)

Lemma Bessel1_uniqueness_aux_1 (a : nat -> R) (n : nat) :
(a 0%nat = 0 \/ n = O) ->
(a 1%nat = 0 \/ n = 1%nat) ->
(forall k, (INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k)) + a k = 0) ->
(forall k : nat, (k < n)%nat -> a k = 0)
/\ (forall p : nat, a (n + 2 * p + 1)%nat = 0)
/\ (forall p : nat, a (n + 2 * p)%nat = Bessel1_seq n p * / 2 ^ (2 * p) * INR (fact n) * a n).