1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / Matita is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/nat/sigma_and_pi".
17 include "nat/factorial.ma".
18 include "nat/lt_arith.ma".
20 let rec sigma n f \def
23 | (S p) \Rightarrow (f p)+(sigma p f)].
28 | (S p) \Rightarrow (f p)*(pi p f)].
30 theorem eq_sigma: \forall f,g:nat \to nat.
31 \forall n:nat. (\forall m:nat. m < n \to f m = g m) \to
32 (sigma n f) = (sigma n g).
36 apply eq_f2.apply H1.simplify. apply le_n.
37 apply H.intros.apply H1.
38 apply trans_lt ? n1.assumption.simplify.apply le_n.
41 theorem eq_pi: \forall f,g:nat \to nat.
42 \forall n:nat. (\forall m:nat. m < n \to f m = g m) \to
47 apply eq_f2.apply H1.simplify. apply le_n.
48 apply H.intros.apply H1.
49 apply trans_lt ? n1.assumption.simplify.apply le_n.
52 theorem eq_fact_pi: \forall n. n! = pi n S.
55 change with (S n1)*n1! = (S n1)*(pi n1 S).
56 apply eq_f.assumption.