]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/LAMBDA-TYPES/LambdaDelta-1/T/dec.ma
tagged 0.5.0-rc1
[helm.git] / matita / contribs / LAMBDA-TYPES / LambdaDelta-1 / T / dec.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* This file was automatically generated: do not edit *********************)
16
17 include "LambdaDelta-1/T/defs.ma".
18
19 theorem terms_props__bind_dec:
20  \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) ((eq B b1 b2) \to (\forall 
21 (P: Prop).P))))
22 \def
23  \lambda (b1: B).(B_ind (\lambda (b: B).(\forall (b2: B).(or (eq B b b2) ((eq 
24 B b b2) \to (\forall (P: Prop).P))))) (\lambda (b2: B).(B_ind (\lambda (b: 
25 B).(or (eq B Abbr b) ((eq B Abbr b) \to (\forall (P: Prop).P)))) (or_introl 
26 (eq B Abbr Abbr) ((eq B Abbr Abbr) \to (\forall (P: Prop).P)) (refl_equal B 
27 Abbr)) (or_intror (eq B Abbr Abst) ((eq B Abbr Abst) \to (\forall (P: 
28 Prop).P)) (\lambda (H: (eq B Abbr Abst)).(\lambda (P: Prop).(let H0 \def 
29 (eq_ind B Abbr (\lambda (ee: B).(match ee in B return (\lambda (_: B).Prop) 
30 with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow 
31 False])) I Abst H) in (False_ind P H0))))) (or_intror (eq B Abbr Void) ((eq B 
32 Abbr Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Void)).(\lambda 
33 (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee in B return 
34 (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | 
35 Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda 
36 (b2: B).(B_ind (\lambda (b: B).(or (eq B Abst b) ((eq B Abst b) \to (\forall 
37 (P: Prop).P)))) (or_intror (eq B Abst Abbr) ((eq B Abst Abbr) \to (\forall 
38 (P: Prop).P)) (\lambda (H: (eq B Abst Abbr)).(\lambda (P: Prop).(let H0 \def 
39 (eq_ind B Abst (\lambda (ee: B).(match ee in B return (\lambda (_: B).Prop) 
40 with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow 
41 False])) I Abbr H) in (False_ind P H0))))) (or_introl (eq B Abst Abst) ((eq B 
42 Abst Abst) \to (\forall (P: Prop).P)) (refl_equal B Abst)) (or_intror (eq B 
43 Abst Void) ((eq B Abst Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B 
44 Abst Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: 
45 B).(match ee in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | 
46 Abst \Rightarrow True | Void \Rightarrow False])) I Void H) in (False_ind P 
47 H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Void b) ((eq B 
48 Void b) \to (\forall (P: Prop).P)))) (or_intror (eq B Void Abbr) ((eq B Void 
49 Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abbr)).(\lambda (P: 
50 Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee in B return 
51 (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | 
52 Void \Rightarrow True])) I Abbr H) in (False_ind P H0))))) (or_intror (eq B 
53 Void Abst) ((eq B Void Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B 
54 Void Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: 
55 B).(match ee in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | 
56 Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind P 
57 H0))))) (or_introl (eq B Void Void) ((eq B Void Void) \to (\forall (P: 
58 Prop).P)) (refl_equal B Void)) b2)) b1).
59
60 theorem bind_dec_not:
61  \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) (not (eq B b1 b2))))
62 \def
63  \lambda (b1: B).(\lambda (b2: B).(let H_x \def (terms_props__bind_dec b1 b2) 
64 in (let H \def H_x in (or_ind (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: 
65 Prop).P)) (or (eq B b1 b2) ((eq B b1 b2) \to False)) (\lambda (H0: (eq B b1 
66 b2)).(or_introl (eq B b1 b2) ((eq B b1 b2) \to False) H0)) (\lambda (H0: 
67 (((eq B b1 b2) \to (\forall (P: Prop).P)))).(or_intror (eq B b1 b2) ((eq B b1 
68 b2) \to False) (\lambda (H1: (eq B b1 b2)).(H0 H1 False)))) H)))).
69
70 theorem terms_props__flat_dec:
71  \forall (f1: F).(\forall (f2: F).(or (eq F f1 f2) ((eq F f1 f2) \to (\forall 
72 (P: Prop).P))))
73 \def
74  \lambda (f1: F).(F_ind (\lambda (f: F).(\forall (f2: F).(or (eq F f f2) ((eq 
75 F f f2) \to (\forall (P: Prop).P))))) (\lambda (f2: F).(F_ind (\lambda (f: 
76 F).(or (eq F Appl f) ((eq F Appl f) \to (\forall (P: Prop).P)))) (or_introl 
77 (eq F Appl Appl) ((eq F Appl Appl) \to (\forall (P: Prop).P)) (refl_equal F 
78 Appl)) (or_intror (eq F Appl Cast) ((eq F Appl Cast) \to (\forall (P: 
79 Prop).P)) (\lambda (H: (eq F Appl Cast)).(\lambda (P: Prop).(let H0 \def 
80 (eq_ind F Appl (\lambda (ee: F).(match ee in F return (\lambda (_: F).Prop) 
81 with [Appl \Rightarrow True | Cast \Rightarrow False])) I Cast H) in 
82 (False_ind P H0))))) f2)) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F 
83 Cast f) ((eq F Cast f) \to (\forall (P: Prop).P)))) (or_intror (eq F Cast 
84 Appl) ((eq F Cast Appl) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Cast 
85 Appl)).(\lambda (P: Prop).(let H0 \def (eq_ind F Cast (\lambda (ee: F).(match 
86 ee in F return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast 
87 \Rightarrow True])) I Appl H) in (False_ind P H0))))) (or_introl (eq F Cast 
88 Cast) ((eq F Cast Cast) \to (\forall (P: Prop).P)) (refl_equal F Cast)) f2)) 
89 f1).
90
91 theorem terms_props__kind_dec:
92  \forall (k1: K).(\forall (k2: K).(or (eq K k1 k2) ((eq K k1 k2) \to (\forall 
93 (P: Prop).P))))
94 \def
95  \lambda (k1: K).(K_ind (\lambda (k: K).(\forall (k2: K).(or (eq K k k2) ((eq 
96 K k k2) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (k2: K).(K_ind 
97 (\lambda (k: K).(or (eq K (Bind b) k) ((eq K (Bind b) k) \to (\forall (P: 
98 Prop).P)))) (\lambda (b0: B).(let H_x \def (terms_props__bind_dec b b0) in 
99 (let H \def H_x in (or_ind (eq B b b0) ((eq B b b0) \to (\forall (P: 
100 Prop).P)) (or (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to 
101 (\forall (P: Prop).P))) (\lambda (H0: (eq B b b0)).(eq_ind B b (\lambda (b1: 
102 B).(or (eq K (Bind b) (Bind b1)) ((eq K (Bind b) (Bind b1)) \to (\forall (P: 
103 Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to 
104 (\forall (P: Prop).P)) (refl_equal K (Bind b))) b0 H0)) (\lambda (H0: (((eq B 
105 b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq 
106 K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) 
107 (Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: 
108 K).(match e in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | 
109 (Flat _) \Rightarrow b])) (Bind b) (Bind b0) H1) in (let H3 \def (eq_ind_r B 
110 b0 (\lambda (b1: B).((eq B b b1) \to (\forall (P0: Prop).P0))) H0 b H2) in 
111 (H3 (refl_equal B b) P))))))) H)))) (\lambda (f: F).(or_intror (eq K (Bind b) 
112 (Flat f)) ((eq K (Bind b) (Flat f)) \to (\forall (P: Prop).P)) (\lambda (H: 
113 (eq K (Bind b) (Flat f))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Bind b) 
114 (\lambda (ee: K).(match ee in K return (\lambda (_: K).Prop) with [(Bind _) 
115 \Rightarrow True | (Flat _) \Rightarrow False])) I (Flat f) H) in (False_ind 
116 P H0)))))) k2))) (\lambda (f: F).(\lambda (k2: K).(K_ind (\lambda (k: K).(or 
117 (eq K (Flat f) k) ((eq K (Flat f) k) \to (\forall (P: Prop).P)))) (\lambda 
118 (b: B).(or_intror (eq K (Flat f) (Bind b)) ((eq K (Flat f) (Bind b)) \to 
119 (\forall (P: Prop).P)) (\lambda (H: (eq K (Flat f) (Bind b))).(\lambda (P: 
120 Prop).(let H0 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee in K return 
121 (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow 
122 True])) I (Bind b) H) in (False_ind P H0)))))) (\lambda (f0: F).(let H_x \def 
123 (terms_props__flat_dec f f0) in (let H \def H_x in (or_ind (eq F f f0) ((eq F 
124 f f0) \to (\forall (P: Prop).P)) (or (eq K (Flat f) (Flat f0)) ((eq K (Flat 
125 f) (Flat f0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq F f f0)).(eq_ind 
126 F f (\lambda (f1: F).(or (eq K (Flat f) (Flat f1)) ((eq K (Flat f) (Flat f1)) 
127 \to (\forall (P: Prop).P)))) (or_introl (eq K (Flat f) (Flat f)) ((eq K (Flat 
128 f) (Flat f)) \to (\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) 
129 (\lambda (H0: (((eq F f f0) \to (\forall (P: Prop).P)))).(or_intror (eq K 
130 (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) 
131 (\lambda (H1: (eq K (Flat f) (Flat f0))).(\lambda (P: Prop).(let H2 \def 
132 (f_equal K F (\lambda (e: K).(match e in K return (\lambda (_: K).F) with 
133 [(Bind _) \Rightarrow f | (Flat f1) \Rightarrow f1])) (Flat f) (Flat f0) H1) 
134 in (let H3 \def (eq_ind_r F f0 (\lambda (f1: F).((eq F f f1) \to (\forall 
135 (P0: Prop).P0))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) k2))) k1).
136
137 theorem term_dec:
138  \forall (t1: T).(\forall (t2: T).(or (eq T t1 t2) ((eq T t1 t2) \to (\forall 
139 (P: Prop).P))))
140 \def
141  \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (t2: T).(or (eq T t t2) ((eq 
142 T t t2) \to (\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (t2: 
143 T).(T_ind (\lambda (t: T).(or (eq T (TSort n) t) ((eq T (TSort n) t) \to 
144 (\forall (P: Prop).P)))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in 
145 (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: 
146 Prop).P)) (or (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to 
147 (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda 
148 (n1: nat).(or (eq T (TSort n) (TSort n1)) ((eq T (TSort n) (TSort n1)) \to 
149 (\forall (P: Prop).P)))) (or_introl (eq T (TSort n) (TSort n)) ((eq T (TSort 
150 n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) 
151 (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T 
152 (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) 
153 (\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def 
154 (f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with 
155 [(TSort n1) \Rightarrow n1 | (TLRef _) \Rightarrow n | (THead _ _ _) 
156 \Rightarrow n])) (TSort n) (TSort n0) H1) in (let H3 \def (eq_ind_r nat n0 
157 (\lambda (n1: nat).((eq nat n n1) \to (\forall (P0: Prop).P0))) H0 n H2) in 
158 (H3 (refl_equal nat n) P))))))) H)))) (\lambda (n0: nat).(or_intror (eq T 
159 (TSort n) (TLRef n0)) ((eq T (TSort n) (TLRef n0)) \to (\forall (P: Prop).P)) 
160 (\lambda (H: (eq T (TSort n) (TLRef n0))).(\lambda (P: Prop).(let H0 \def 
161 (eq_ind T (TSort n) (\lambda (ee: T).(match ee in T return (\lambda (_: 
162 T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | 
163 (THead _ _ _) \Rightarrow False])) I (TLRef n0) H) in (False_ind P H0)))))) 
164 (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TSort n) t) ((eq T 
165 (TSort n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or 
166 (eq T (TSort n) t0) ((eq T (TSort n) t0) \to (\forall (P: 
167 Prop).P)))).(or_intror (eq T (TSort n) (THead k t t0)) ((eq T (TSort n) 
168 (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) 
169 (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TSort n) (\lambda 
170 (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) 
171 \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow 
172 False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (n: 
173 nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TLRef n) t) ((eq T 
174 (TLRef n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(or_intror (eq T 
175 (TLRef n) (TSort n0)) ((eq T (TLRef n) (TSort n0)) \to (\forall (P: Prop).P)) 
176 (\lambda (H: (eq T (TLRef n) (TSort n0))).(\lambda (P: Prop).(let H0 \def 
177 (eq_ind T (TLRef n) (\lambda (ee: T).(match ee in T return (\lambda (_: 
178 T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | 
179 (THead _ _ _) \Rightarrow False])) I (TSort n0) H) in (False_ind P H0)))))) 
180 (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind 
181 (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TLRef n) 
182 (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P))) (\lambda 
183 (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TLRef n) 
184 (TLRef n1)) ((eq T (TLRef n) (TLRef n1)) \to (\forall (P: Prop).P)))) 
185 (or_introl (eq T (TLRef n) (TLRef n)) ((eq T (TLRef n) (TLRef n)) \to 
186 (\forall (P: Prop).P)) (refl_equal T (TLRef n))) n0 H0)) (\lambda (H0: (((eq 
187 nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) 
188 ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T 
189 (TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat 
190 (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) 
191 \Rightarrow n | (TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n])) 
192 (TLRef n) (TLRef n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n1: 
193 nat).((eq nat n n1) \to (\forall (P0: Prop).P0))) H0 n H2) in (H3 (refl_equal 
194 nat n) P))))))) H)))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T 
195 (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: 
196 T).(\lambda (_: (or (eq T (TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: 
197 Prop).P)))).(or_intror (eq T (TLRef n) (THead k t t0)) ((eq T (TLRef n) 
198 (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) 
199 (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TLRef n) (\lambda 
200 (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) 
201 \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow 
202 False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (k: 
203 K).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).(or (eq T t t2) ((eq T t 
204 t2) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda (H0: ((\forall 
205 (t2: T).(or (eq T t0 t2) ((eq T t0 t2) \to (\forall (P: 
206 Prop).P)))))).(\lambda (t2: T).(T_ind (\lambda (t3: T).(or (eq T (THead k t 
207 t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (n: 
208 nat).(or_intror (eq T (THead k t t0) (TSort n)) ((eq T (THead k t t0) (TSort 
209 n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TSort 
210 n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: 
211 T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow 
212 False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I 
213 (TSort n) H1) in (False_ind P H2)))))) (\lambda (n: nat).(or_intror (eq T 
214 (THead k t t0) (TLRef n)) ((eq T (THead k t t0) (TLRef n)) \to (\forall (P: 
215 Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TLRef n))).(\lambda (P: 
216 Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee in T 
217 return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) 
218 \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in 
219 (False_ind P H2)))))) (\lambda (k0: K).(\lambda (t3: T).(\lambda (H1: (or (eq 
220 T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: 
221 Prop).P)))).(\lambda (t4: T).(\lambda (H2: (or (eq T (THead k t t0) t4) ((eq 
222 T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in 
223 (let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: 
224 Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) 
225 (THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let 
226 H5 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T 
227 (THead k t t0) t5) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t 
228 (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t 
229 t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in 
230 (let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: 
231 Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) 
232 (THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let 
233 H8 \def (eq_ind_r T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T 
234 (THead k t t0) t5) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 
235 (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t 
236 t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def 
237 (terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq 
238 K k k0) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t0)) 
239 ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P))) (\lambda 
240 (H10: (eq K k k0)).(eq_ind K k (\lambda (k1: K).(or (eq T (THead k t t0) 
241 (THead k1 t t0)) ((eq T (THead k t t0) (THead k1 t t0)) \to (\forall (P: 
242 Prop).P)))) (or_introl (eq T (THead k t t0) (THead k t t0)) ((eq T (THead k t 
243 t0) (THead k t t0)) \to (\forall (P: Prop).P)) (refl_equal T (THead k t t0))) 
244 k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror 
245 (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) 
246 \to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t 
247 t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e 
248 in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) 
249 \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t 
250 t0) H11) in (let H13 \def (eq_ind_r K k0 (\lambda (k1: K).((eq K k k1) \to 
251 (\forall (P0: Prop).P0))) H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) 
252 t4 H7))) (\lambda (H7: (((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror 
253 (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) 
254 \to (\forall (P: Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t 
255 t4))).(\lambda (P: Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e 
256 in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) 
257 \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t 
258 t4) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e in T return 
259 (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 
260 | (THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t t4) H8) in 
261 (\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t5: T).((eq 
262 T t0 t5) \to (\forall (P0: Prop).P0))) H7 t0 H10) in (let H13 \def (eq_ind_r 
263 T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k t t0) t5) 
264 \to (\forall (P0: Prop).P0)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) 
265 H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: 
266 Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k 
267 t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead 
268 k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K 
269 (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) 
270 \Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) 
271 (THead k t t0) (THead k0 t3 t4) H5) in ((let H7 \def (f_equal T T (\lambda 
272 (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t 
273 | (TLRef _) \Rightarrow t | (THead _ t5 _) \Rightarrow t5])) (THead k t t0) 
274 (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e 
275 in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) 
276 \Rightarrow t0 | (THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t3 
277 t4) H5) in (\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def 
278 (eq_ind_r T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k 
279 t t0) t5) \to (\forall (P0: Prop).P0)))) H2 t0 H8) in (let H12 \def (eq_ind_r 
280 T t3 (\lambda (t5: T).((eq T t t5) \to (\forall (P0: Prop).P0))) H4 t H9) in 
281 (let H13 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) 
282 ((eq T (THead k t t0) t5) \to (\forall (P0: Prop).P0)))) H1 t H9) in (H12 
283 (refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1).
284
285 theorem binder_dec:
286  \forall (t: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: 
287 T).(eq T t (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall 
288 (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))
289 \def
290  \lambda (t: T).(T_ind (\lambda (t0: T).(or (ex_3 B T T (\lambda (b: 
291 B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) 
292 (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w 
293 u)) \to (\forall (P: Prop).P))))))) (\lambda (n: nat).(or_intror (ex_3 B T T 
294 (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TSort n) (THead (Bind 
295 b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TSort n) 
296 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda 
297 (w: T).(\lambda (u: T).(\lambda (H: (eq T (TSort n) (THead (Bind b) w 
298 u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: 
299 T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow 
300 True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I 
301 (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (n: 
302 nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: 
303 T).(eq T (TLRef n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: 
304 T).(\forall (u: T).((eq T (TLRef n) (THead (Bind b) w u)) \to (\forall (P: 
305 Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq 
306 T (TLRef n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T 
307 (TLRef n) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with 
308 [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) 
309 \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) 
310 (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T 
311 (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w 
312 u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead 
313 (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 
314 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind 
315 b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead 
316 (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda 
317 (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) 
318 w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 
319 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))))))) (\lambda (b: 
320 B).(\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b0: B).(\lambda 
321 (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b0) w u)))))) (\forall (b0: 
322 B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b0) w u)) \to 
323 (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T 
324 (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b0) w 
325 u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead 
326 (Bind b0) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T 
327 (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) 
328 (THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: 
329 T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: 
330 Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: 
331 T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal 
332 T (THead (Bind b) t0 t1))))))))) (\lambda (f: F).(\lambda (t0: T).(\lambda 
333 (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 
334 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: 
335 T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda 
336 (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda 
337 (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: 
338 T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: 
339 Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: 
340 T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) 
341 (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) 
342 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda 
343 (w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead 
344 (Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 
345 t1) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort 
346 _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) 
347 \Rightarrow (match k0 in K return (\lambda (_: K).Prop) with [(Bind _) 
348 \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) 
349 in (False_ind P H2))))))))))))) k)) t).
350
351 theorem abst_dec:
352  \forall (u: T).(\forall (v: T).(or (ex T (\lambda (t: T).(eq T u (THead 
353 (Bind Abst) v t)))) (\forall (t: T).((eq T u (THead (Bind Abst) v t)) \to 
354 (\forall (P: Prop).P)))))
355 \def
356  \lambda (u: T).(T_ind (\lambda (t: T).(\forall (v: T).(or (ex T (\lambda 
357 (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead 
358 (Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda 
359 (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v 
360 t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall 
361 (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind 
362 Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda 
363 (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) 
364 \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow 
365 False])) I (THead (Bind Abst) v t) H) in (False_ind P H0)))))))) (\lambda (n: 
366 nat).(\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TLRef n) (THead 
367 (Bind Abst) v t)))) (\forall (t: T).((eq T (TLRef n) (THead (Bind Abst) v t)) 
368 \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TLRef n) 
369 (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) 
370 (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) 
371 \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow 
372 False])) I (THead (Bind Abst) v t) H) in (False_ind P H0)))))))) (\lambda (k: 
373 K).(\lambda (t: T).(\lambda (_: ((\forall (v: T).(or (ex T (\lambda (t0: 
374 T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead (Bind 
375 Abst) v t0)) \to (\forall (P: Prop).P))))))).(\lambda (t0: T).(\lambda (_: 
376 ((\forall (v: T).(or (ex T (\lambda (t1: T).(eq T t0 (THead (Bind Abst) v 
377 t1)))) (\forall (t1: T).((eq T t0 (THead (Bind Abst) v t1)) \to (\forall (P: 
378 Prop).P))))))).(\lambda (v: T).(let H_x \def (terms_props__kind_dec k (Bind 
379 Abst)) in (let H1 \def H_x in (or_ind (eq K k (Bind Abst)) ((eq K k (Bind 
380 Abst)) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead k t 
381 t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead 
382 (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H2: (eq K k (Bind 
383 Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex T (\lambda (t1: 
384 T).(eq T (THead k0 t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T 
385 (THead k0 t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))) (let 
386 H_x0 \def (term_dec t v) in (let H3 \def H_x0 in (or_ind (eq T t v) ((eq T t 
387 v) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind 
388 Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind 
389 Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda 
390 (H4: (eq T t v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq 
391 T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq 
392 T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: 
393 Prop).P))))) (or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) 
394 (THead (Bind Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) 
395 (THead (Bind Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda 
396 (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 
397 (refl_equal T (THead (Bind Abst) t t0)))) v H4)) (\lambda (H4: (((eq T t v) 
398 \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead 
399 (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead 
400 (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) 
401 (\lambda (t1: T).(\lambda (H5: (eq T (THead (Bind Abst) t t0) (THead (Bind 
402 Abst) v t1))).(\lambda (P: Prop).(let H6 \def (f_equal T T (\lambda (e: 
403 T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | 
404 (TLRef _) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead (Bind Abst) 
405 t t0) (THead (Bind Abst) v t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: 
406 T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | 
407 (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind 
408 Abst) t t0) (THead (Bind Abst) v t1) H5) in (\lambda (H8: (eq T t v)).(H4 H8 
409 P))) H6))))))) H3))) k H2)) (\lambda (H2: (((eq K k (Bind Abst)) \to (\forall 
410 (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead 
411 (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind 
412 Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H3: (eq T 
413 (THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H4 \def 
414 (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with 
415 [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) 
416 \Rightarrow k0])) (THead k t t0) (THead (Bind Abst) v t1) H3) in ((let H5 
417 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) 
418 with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t2 _) 
419 \Rightarrow t2])) (THead k t t0) (THead (Bind Abst) v t1) H3) in ((let H6 
420 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) 
421 with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) 
422 \Rightarrow t2])) (THead k t t0) (THead (Bind Abst) v t1) H3) in (\lambda (_: 
423 (eq T t v)).(\lambda (H8: (eq K k (Bind Abst))).(H2 H8 P)))) H5)) H4))))))) 
424 H1))))))))) u).
425