]> matita.cs.unibo.it Git - helm.git/blobdiff - 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
diff --git a/helm/matita/library/nat/sigma_and_pi.ma b/helm/matita/library/nat/sigma_and_pi.ma
new file mode 100644 (file)
index 0000000..b9b8065
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                               *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
+(*      ||A||       E.Tassi, S.Zacchiroli                                 *)
+(*      \   /                                                             *)
+(*       \ /        Matita is distributed under the terms of the          *)
+(*        v         GNU Lesser General Public License Version 2.1         *)
+(*                                                                        *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/nat/sigma_and_pi".
+
+include "nat/times.ma".
+
+let rec sigma n f \def
+  match n with 
+  [ O \Rightarrow O
+  | (S p) \Rightarrow (f p)+(sigma p f)].
+
+let rec pi n f \def
+  match n with 
+  [ O \Rightarrow (S O)
+  | (S p) \Rightarrow (f p)*(pi p f)].
+
+
+