]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/library/nat/sigma_and_pi.ma
permutation.ma added to the repository.
[helm.git] / helm / matita / library / nat / sigma_and_pi.ma
index 29df3a1dfdab2b76f726748897621bd7758dd3d1..470bb9d69f7ea3992ff413b7f63ad7ff3879228f 100644 (file)
@@ -14,7 +14,7 @@
 
 set "baseuri" "cic:/matita/nat/sigma_and_pi".
 
-include "nat/times.ma".
+include "nat/lt_arith.ma".
 
 let rec sigma n f \def
   match n with 
@@ -24,4 +24,26 @@ let rec sigma n f \def
 let rec pi n f \def
   match n with 
   [ O \Rightarrow (S O)
-  | (S p) \Rightarrow (f p)*(pi p f)].
\ No newline at end of file
+  | (S p) \Rightarrow (f p)*(pi p f)].
+  
+theorem eq_sigma: \forall f,g:nat \to nat.
+\forall n:nat. (\forall m:nat. m < n \to f m = g m) \to
+(sigma n f) = (sigma n g).
+intros 3.elim n.
+simplify.reflexivity.
+simplify.
+apply eq_f2.apply H1.simplify. apply le_n.
+apply H.intros.apply H1.
+apply trans_lt ? n1.assumption.simplify.apply le_n.
+qed.
+
+theorem eq_pi: \forall f,g:nat \to nat.
+\forall n:nat. (\forall m:nat. m < n \to f m = g m) \to
+(pi n f) = (pi n g).
+intros 3.elim n.
+simplify.reflexivity.
+simplify.
+apply eq_f2.apply H1.simplify. apply le_n.
+apply H.intros.apply H1.
+apply trans_lt ? n1.assumption.simplify.apply le_n.
+qed.