Formal series:

- serial developments are (infinite) lists of coefficients

- we assume we are working with rational numbers (

(* Opposite of a formal serie *)

**let** **rec** uminus cs =` map ( fun x -> -x) cs`

(* Integration *)

**l et**

(* The serie: `(-1) ^{n} = [1; -1; 1;
-1; ...] `*)

**let** **rec** s1 = 1 :: (uminus s1)

(* Logarithm can be defined as the integral of
s1, with 0 as constant term *)

(* `[0; 1; -1/2; 1/3; -1/4; 1/7; -1/8; 1/9;
...]`

**let** log1 = 0 :: integrate s1

(* Sine and cosine can be mutually recursively
defined.

`sin = [0;
1; 0; -1/6; 0; ...]`

`cos = [1;
0; -1/2; 0; 1/24; ...]`

*)

**let** **rec** sin = 0 :: (integrate cos)**and** cos = 1 :: (integrate (uminus
sin))`
`