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