X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fng_assembly%2Fcommon%2Fprod.ma;h=1080533d174f6ea77cecf45b84be841f6d193c6b;hb=73052ec76ff5492989f9cbae2ebe0b770fcb985f;hp=39f79e96e79e5dcf01fa482f9835aa0771b72b97;hpb=d3c72253769956a8af10e6ea990ed34c92999e58;p=helm.git diff --git a/helm/software/matita/contribs/ng_assembly/common/prod.ma b/helm/software/matita/contribs/ng_assembly/common/prod.ma index 39f79e96e..1080533d1 100644 --- a/helm/software/matita/contribs/ng_assembly/common/prod.ma +++ b/helm/software/matita/contribs/ng_assembly/common/prod.ma @@ -15,8 +15,8 @@ (* ********************************************************************** *) (* Progetto FreeScale *) (* *) -(* Sviluppato da: Cosimo Oliboni, oliboni@cs.unibo.it *) -(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Sviluppo: 2008-2010 *) (* *) (* ********************************************************************** *) @@ -36,11 +36,11 @@ ndefinition snd ≝ λT1,T2:Type.λp:ProdT T1 T2.match p with [ pair _ x ⇒ x ]. ndefinition eq_pair ≝ -λT1,T2:Type.λp1,p2:ProdT T1 T2. +λT1,T2:Type. λ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) ]]. +λp1,p2:ProdT T1 T2. + (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. @@ -55,11 +55,12 @@ ndefinition thd3T ≝ λT1.λT2.λT3.λp:Prod3T T1 T2 T3.match p with [ triple _ _ x ⇒ x ]. ndefinition eq_triple ≝ -λT1,T2,T3:Type.λp1,p2:Prod3T T1 T2 T3. +λT1,T2,T3:Type. λ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) ]]. +λp1,p2:Prod3T T1 T2 T3. + (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. @@ -77,11 +78,13 @@ ndefinition fth4T ≝ λT1.λT2.λT3.λT4.λp:Prod4T T1 T2 T3 T4.match p with [ quadruple _ _ _ x ⇒ x ]. ndefinition eq_quadruple ≝ -λT1,T2,T3,T4:Type.λp1,p2:Prod4T T1 T2 T3 T4. +λT1,T2,T3,T4:Type. λ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) ]]. +λp1,p2:Prod4T T1 T2 T3 T4. + (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 +98,18 @@ 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. +λT1,T2,T3,T4,T5:Type. λ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) ]]. +λp1,p2:Prod5T T1 T2 T3 T4 T5. + (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)).