1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* ********************************************************************** *)
16 (* Progetto FreeScale *)
18 (* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
19 (* Sviluppo: 2008-2010 *)
21 (* ********************************************************************** *)
23 include "num/bool.ma".
29 ninductive ProdT (T1:Type) (T2:Type) : Type ≝
30 pair : T1 → T2 → ProdT T1 T2.
33 λT1,T2:Type.λp:ProdT T1 T2.match p with [ pair x _ ⇒ x ].
36 λT1,T2:Type.λp:ProdT T1 T2.match p with [ pair _ x ⇒ x ].
40 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.
42 (f1 (fst … p1) (fst … p2)) ⊗
43 (f2 (snd … p1) (snd … p2)).
45 ninductive Prod3T (T1:Type) (T2:Type) (T3:Type) : Type ≝
46 triple : T1 → T2 → T3 → Prod3T T1 T2 T3.
49 λT1.λT2.λT3.λp:Prod3T T1 T2 T3.match p with [ triple x _ _ ⇒ x ].
52 λT1.λT2.λT3.λp:Prod3T T1 T2 T3.match p with [ triple _ x _ ⇒ x ].
55 λT1.λT2.λT3.λp:Prod3T T1 T2 T3.match p with [ triple _ _ x ⇒ x ].
57 ndefinition eq_triple ≝
59 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.
60 λp1,p2:Prod3T T1 T2 T3.
61 (f1 (fst3T … p1) (fst3T … p2)) ⊗
62 (f2 (snd3T … p1) (snd3T … p2)) ⊗
63 (f3 (thd3T … p1) (thd3T … p2)).
65 ninductive Prod4T (T1:Type) (T2:Type) (T3:Type) (T4:Type) : Type ≝
66 quadruple : T1 → T2 → T3 → T4 → Prod4T T1 T2 T3 T4.
69 λT1.λT2.λT3.λT4.λp:Prod4T T1 T2 T3 T4.match p with [ quadruple x _ _ _ ⇒ x ].
72 λT1.λT2.λT3.λT4.λp:Prod4T T1 T2 T3 T4.match p with [ quadruple _ x _ _ ⇒ x ].
75 λT1.λT2.λT3.λT4.λp:Prod4T T1 T2 T3 T4.match p with [ quadruple _ _ x _ ⇒ x ].
78 λT1.λT2.λT3.λT4.λp:Prod4T T1 T2 T3 T4.match p with [ quadruple _ _ _ x ⇒ x ].
80 ndefinition eq_quadruple ≝
82 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.λf4:T4 → T4 → bool.
83 λp1,p2:Prod4T T1 T2 T3 T4.
84 (f1 (fst4T … p1) (fst4T … p2)) ⊗
85 (f2 (snd4T … p1) (snd4T … p2)) ⊗
86 (f3 (thd4T … p1) (thd4T … p2)) ⊗
87 (f4 (fth4T … p1) (fth4T … p2)).
89 ninductive Prod5T (T1:Type) (T2:Type) (T3:Type) (T4:Type) (T5:Type) : Type ≝
90 quintuple : T1 → T2 → T3 → T4 → T5 → Prod5T T1 T2 T3 T4 T5.
93 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple x _ _ _ _ ⇒ x ].
96 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ x _ _ _ ⇒ x ].
99 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ x _ _ ⇒ x ].
102 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ _ x _ ⇒ x ].
105 λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ _ _ x ⇒ x ].
107 ndefinition eq_quintuple ≝
108 λT1,T2,T3,T4,T5:Type.
109 λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.λf4:T4 → T4 → bool.λf5:T5 → T5 → bool.
110 λp1,p2:Prod5T T1 T2 T3 T4 T5.
111 (f1 (fst5T … p1) (fst5T … p2)) ⊗
112 (f2 (snd5T … p1) (snd5T … p2)) ⊗
113 (f3 (thd5T … p1) (thd5T … p2)) ⊗
114 (f4 (fth5T … p1) (fth5T … p2)) ⊗
115 (f5 (fft5T … p1) (fft5T … p2)).