]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/library/nat/sigma_and_pi.ma
New entries in nat: factorial.ma minimization.ma primes.ma primes1.ma
[helm.git] / helm / matita / library / nat / sigma_and_pi.ma
1 (**************************************************************************)
2 (*       ___                                                                *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
8 (*      ||A||       E.Tassi, S.Zacchiroli                                 *)
9 (*      \   /                                                             *)
10 (*       \ /        Matita is distributed under the terms of the          *)
11 (*        v         GNU Lesser General Public License Version 2.1         *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/nat/sigma_and_pi".
16
17 include "nat/times.ma".
18
19 let rec sigma n f \def
20   match n with 
21   [ O \Rightarrow O
22   | (S p) \Rightarrow (f p)+(sigma p f)].
23
24 let rec pi n f \def
25   match n with 
26   [ O \Rightarrow (S O)
27   | (S p) \Rightarrow (f p)*(pi p f)].
28
29
30