]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/common/prod.ma
(no commit message)
[helm.git] / helm / software / matita / contribs / ng_assembly / common / prod.ma
index 5be106fcb33faaa57a21b6ee69b74e53f90c0224..fca58bc223094c7cf2220813a95d182fb4c6fa35 100644 (file)
@@ -16,7 +16,7 @@
 (*                          Progetto FreeScale                            *)
 (*                                                                        *)
 (*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
-(*   Ultima modifica: 05/08/2009                                          *)
+(*   Sviluppo: 2008-2010                                                  *)
 (*                                                                        *)
 (* ********************************************************************** *)
 
@@ -38,9 +38,8 @@ ndefinition snd ≝
 ndefinition eq_pair ≝
 λT1,T2:Type.λp1,p2:ProdT T1 T2.
 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.
- match p1 with [ pair x1 y1 ⇒
-  match p2 with [ pair x2 y2 ⇒
-   (f1 x1 x2) ⊗ (f2 y1 y2) ]].
+ (f1 (fst … p1) (fst … p2)) ⊗
+ (f2 (snd … p1) (snd … p2)).
 
 ninductive Prod3T (T1:Type) (T2:Type) (T3:Type) : Type ≝
 triple : T1 → T2 → T3 → Prod3T T1 T2 T3.
@@ -57,9 +56,9 @@ ndefinition thd3T ≝
 ndefinition eq_triple ≝
 λT1,T2,T3:Type.λp1,p2:Prod3T T1 T2 T3.
 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.
- match p1 with [ triple x1 y1 z1 ⇒
-  match p2 with [ triple x2 y2 z2 ⇒
  (f1 x1 x2) ⊗ (f2 y1 y2) ⊗ (f3 z1 z2) ]].
+ (f1 (fst3T … p1) (fst3T … p2)) ⊗
+ (f2 (snd3T … p1) (snd3T … p2)) ⊗
(f3 (thd3T … p1) (thd3T … p2)).
 
 ninductive Prod4T (T1:Type) (T2:Type) (T3:Type) (T4:Type) : Type ≝
 quadruple : T1 → T2 → T3 → T4 → Prod4T T1 T2 T3 T4.
@@ -79,9 +78,10 @@ ndefinition fth4T ≝
 ndefinition eq_quadruple ≝
 λT1,T2,T3,T4:Type.λp1,p2:Prod4T T1 T2 T3 T4.
 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.λf4:T4 → T4 → bool.
- match p1 with [ quadruple x1 y1 z1 w1 ⇒
-  match p2 with [ quadruple x2 y2 z2 w2 ⇒
-   (f1 x1 x2) ⊗ (f2 y1 y2) ⊗ (f3 z1 z2) ⊗ (f4 w1 w2) ]].
+ (f1 (fst4T … p1) (fst4T … p2)) ⊗
+ (f2 (snd4T … p1) (snd4T … p2)) ⊗
+ (f3 (thd4T … p1) (thd4T … p2)) ⊗
+ (f4 (fth4T … p1) (fth4T … p2)).
 
 ninductive Prod5T (T1:Type) (T2:Type) (T3:Type) (T4:Type) (T5:Type) : Type ≝
 quintuple : T1 → T2 → T3 → T4 → T5 → Prod5T T1 T2 T3 T4 T5.
@@ -95,15 +95,17 @@ ndefinition snd5T ≝
 ndefinition thd5T ≝
 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ x _ _ ⇒ x ].
 
-ndefinition frth5T ≝
+ndefinition fth5T ≝
 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ _ x _ ⇒ x ].
 
-ndefinition ffth5T ≝
+ndefinition fft5T ≝
 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ _ _ x ⇒ x ].
 
 ndefinition eq_quintuple ≝
 λT1,T2,T3,T4,T5:Type.λp1,p2:Prod5T T1 T2 T3 T4 T5.
 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.λf4:T4 → T4 → bool.λf5:T5 → T5 → bool.
- match p1 with [ quintuple x1 y1 z1 w1 v1 ⇒
-  match p2 with [ quintuple x2 y2 z2 w2 v2 ⇒
-   (f1 x1 x2) ⊗ (f2 y1 y2) ⊗ (f3 z1 z2) ⊗ (f4 w1 w2) ⊗ (f5 v1 v2) ]].
+ (f1 (fst5T … p1) (fst5T … p2)) ⊗
+ (f2 (snd5T … p1) (snd5T … p2)) ⊗
+ (f3 (thd5T … p1) (thd5T … p2)) ⊗
+ (f4 (fth5T … p1) (fth5T … p2)) ⊗
+ (f5 (fft5T … p1) (fft5T … p2)).