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 (* This file was automatically generated: do not edit *********************)
17 include "basic_1/wf3/defs.ma".
19 implied rec lemma wf3_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (m:
20 nat).(P (CSort m) (CSort m)))) (f0: (\forall (c1: C).(\forall (c2: C).((wf3 g
21 c1 c2) \to ((P c1 c2) \to (\forall (u: T).(\forall (t: T).((ty3 g c1 u t) \to
22 (\forall (b: B).(P (CHead c1 (Bind b) u) (CHead c2 (Bind b) u))))))))))) (f1:
23 (\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to ((P c1 c2) \to (\forall
24 (u: T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(P
25 (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O))))))))))) (f2: (\forall
26 (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to ((P c1 c2) \to (\forall (u:
27 T).(\forall (f2: F).(P (CHead c1 (Flat f2) u) c2)))))))) (c: C) (c0: C) (w:
28 wf3 g c c0) on w: P c c0 \def match w with [(wf3_sort m) \Rightarrow (f m) |
29 (wf3_bind c1 c2 w0 u t t0 b) \Rightarrow (f0 c1 c2 w0 ((wf3_ind g P f f0 f1
30 f2) c1 c2 w0) u t t0 b) | (wf3_void c1 c2 w0 u f3 b) \Rightarrow (f1 c1 c2 w0
31 ((wf3_ind g P f f0 f1 f2) c1 c2 w0) u f3 b) | (wf3_flat c1 c2 w0 u f3)
32 \Rightarrow (f2 c1 c2 w0 ((wf3_ind g P f f0 f1 f2) c1 c2 w0) u f3)].
35 \forall (g: G).(\forall (x: C).(\forall (m: nat).((wf3 g (CSort m) x) \to
38 \lambda (g: G).(\lambda (x: C).(\lambda (m: nat).(\lambda (H: (wf3 g (CSort
39 m) x)).(insert_eq C (CSort m) (\lambda (c: C).(wf3 g c x)) (\lambda (c:
40 C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda
41 (c: C).(\lambda (c0: C).((eq C c (CSort m)) \to (eq C c0 c)))) (\lambda (m0:
42 nat).(\lambda (H1: (eq C (CSort m0) (CSort m))).(let H2 \def (f_equal C nat
43 (\lambda (e: C).(match e with [(CSort n) \Rightarrow n | (CHead _ _ _)
44 \Rightarrow m0])) (CSort m0) (CSort m) H1) in (eq_ind_r nat m (\lambda (n:
45 nat).(eq C (CSort n) (CSort n))) (refl_equal C (CSort m)) m0 H2)))) (\lambda
46 (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 c2)).(\lambda (_: (((eq C c1
47 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: T).(\lambda (t: T).(\lambda (_:
48 (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c1 (Bind b) u)
49 (CSort m))).(let H5 \def (eq_ind C (CHead c1 (Bind b) u) (\lambda (ee:
50 C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow
51 True])) I (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind b) u) (CHead c1
52 (Bind b) u)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_:
53 (wf3 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2
54 c1)))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u t) \to
55 False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CSort
56 m))).(let H5 \def (eq_ind C (CHead c1 (Bind b) u) (\lambda (ee: C).(match ee
57 with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I
58 (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind Void) (TSort O)) (CHead c1
59 (Bind b) u)) H5)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3
60 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u:
61 T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 (Flat f) u) (CSort m))).(let
62 H4 \def (eq_ind C (CHead c1 (Flat f) u) (\lambda (ee: C).(match ee with
63 [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort m)
64 H3) in (False_ind (eq C c2 (CHead c1 (Flat f) u)) H4))))))))) y x H0))) H)))).
67 \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (b:
68 B).((wf3 g (CHead c1 (Bind b) v) x) \to (or (ex3_2 C T (\lambda (c2:
69 C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda
70 (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3
71 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2:
72 C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to
75 \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (b:
76 B).(\lambda (H: (wf3 g (CHead c1 (Bind b) v) x)).(insert_eq C (CHead c1 (Bind
77 b) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(or (ex3_2 C T (\lambda
78 (c2: C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2:
79 C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
80 v w)))) (ex3 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O))))
81 (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v
82 w) \to False)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g
83 (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 (Bind b) v)) \to (or
84 (ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C c0 (CHead c2 (Bind b) v))))
85 (\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w:
86 T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C c0 (CHead c2 (Bind Void)
87 (TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w:
88 T).((ty3 g c1 v w) \to False)))))))) (\lambda (m: nat).(\lambda (H1: (eq C
89 (CSort m) (CHead c1 (Bind b) v))).(let H2 \def (eq_ind C (CSort m) (\lambda
90 (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _)
91 \Rightarrow False])) I (CHead c1 (Bind b) v) H1) in (False_ind (or (ex3_2 C T
92 (\lambda (c2: C).(\lambda (_: T).(eq C (CSort m) (CHead c2 (Bind b) v))))
93 (\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w:
94 T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C (CSort m) (CHead c2 (Bind
95 Void) (TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall
96 (w: T).((ty3 g c1 v w) \to False))))) H2)))) (\lambda (c0: C).(\lambda (c2:
97 C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Bind b)
98 v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3
99 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_:
100 C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead
101 c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_:
102 C).(\forall (w: T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda
103 (t: T).(\lambda (H3: (ty3 g c0 u t)).(\lambda (b0: B).(\lambda (H4: (eq C
104 (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C
105 (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _)
106 \Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6
107 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 |
108 (CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _)
109 \Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let
110 H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u |
111 (CHead _ _ t0) \Rightarrow t0])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v)
112 H4) in (\lambda (H8: (eq B b0 b)).(\lambda (H9: (eq C c0 c1)).(eq_ind_r B b
113 (\lambda (b1: B).(or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead
114 c2 (Bind b1) u) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_:
115 T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C
116 (\lambda (c3: C).(eq C (CHead c2 (Bind b1) u) (CHead c3 (Bind Void) (TSort
117 O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g
118 c1 v w) \to False)))))) (let H10 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0
119 t0 t)) H3 v H7) in (eq_ind_r T v (\lambda (t0: T).(or (ex3_2 C T (\lambda
120 (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) t0) (CHead c3 (Bind b) v))))
121 (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w:
122 T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) t0)
123 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda
124 (_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))))) (let H11 \def (eq_ind
125 C c0 (\lambda (c: C).(ty3 g c v t)) H10 c1 H9) in (let H12 \def (eq_ind C c0
126 (\lambda (c: C).((eq C c (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda
127 (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3:
128 C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
129 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O))))
130 (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v
131 w) \to False))))))) H2 c1 H9) in (let H13 \def (eq_ind C c0 (\lambda (c:
132 C).(wf3 g c c2)) H1 c1 H9) in (or_introl (ex3_2 C T (\lambda (c3: C).(\lambda
133 (_: T).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind b) v)))) (\lambda (c3:
134 C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
135 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind
136 Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall
137 (w: T).((ty3 g c1 v w) \to False)))) (ex3_2_intro C T (\lambda (c3:
138 C).(\lambda (_: T).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind b) v))))
139 (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w:
140 T).(ty3 g c1 v w))) c2 t (refl_equal C (CHead c2 (Bind b) v)) H13 H11))))) u
141 H7)) b0 H8)))) H6)) H5))))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda
142 (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Bind b) v)) \to (or
143 (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v))))
144 (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w:
145 T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void)
146 (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w:
147 T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda (H3: ((\forall
148 (t: T).((ty3 g c0 u t) \to False)))).(\lambda (b0: B).(\lambda (H4: (eq C
149 (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C
150 (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _)
151 \Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6
152 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 |
153 (CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _)
154 \Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let
155 H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u |
156 (CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v)
157 H4) in (\lambda (_: (eq B b0 b)).(\lambda (H9: (eq C c0 c1)).(let H10 \def
158 (eq_ind T u (\lambda (t: T).(\forall (t0: T).((ty3 g c0 t t0) \to False))) H3
159 v H7) in (let H11 \def (eq_ind C c0 (\lambda (c: C).(\forall (t: T).((ty3 g c
160 v t) \to False))) H10 c1 H9) in (let H12 \def (eq_ind C c0 (\lambda (c:
161 C).((eq C c (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3:
162 C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3:
163 C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
164 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O))))
165 (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v
166 w) \to False))))))) H2 c1 H9) in (let H13 \def (eq_ind C c0 (\lambda (c:
167 C).(wf3 g c c2)) H1 c1 H9) in (or_intror (ex3_2 C T (\lambda (c3: C).(\lambda
168 (_: T).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind b) v))))
169 (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w:
170 T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind Void)
171 (TSort O)) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3))
172 (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))) (ex3_intro C
173 (\lambda (c3: C).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind Void)
174 (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w:
175 T).((ty3 g c1 v w) \to False))) c2 (refl_equal C (CHead c2 (Bind Void) (TSort
176 O))) H13 H11))))))))) H6)) H5)))))))))) (\lambda (c0: C).(\lambda (c2:
177 C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Bind b) v))
178 \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind
179 b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_:
180 C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead
181 c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_:
182 C).(\forall (w: T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda
183 (f: F).(\lambda (H3: (eq C (CHead c0 (Flat f) u) (CHead c1 (Bind b) v))).(let
184 H4 \def (eq_ind C (CHead c0 (Flat f) u) (\lambda (ee: C).(match ee with
185 [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind
186 _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead c1 (Bind b) v)
187 H3) in (False_ind (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2
188 (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3)))
189 (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq
190 C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3))
191 (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))))) H4))))))))) y
195 \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (f:
196 F).((wf3 g (CHead c1 (Flat f) v) x) \to (wf3 g c1 x))))))
198 \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (f:
199 F).(\lambda (H: (wf3 g (CHead c1 (Flat f) v) x)).(insert_eq C (CHead c1 (Flat
200 f) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(wf3 g c1 x)) (\lambda (y:
201 C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda (c: C).(\lambda (c0:
202 C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c0)))) (\lambda (m:
203 nat).(\lambda (H1: (eq C (CSort m) (CHead c1 (Flat f) v))).(let H2 \def
204 (eq_ind C (CSort m) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow
205 True | (CHead _ _ _) \Rightarrow False])) I (CHead c1 (Flat f) v) H1) in
206 (False_ind (wf3 g c1 (CSort m)) H2)))) (\lambda (c0: C).(\lambda (c2:
207 C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Flat f) v))
208 \to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u
209 t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) (CHead c1 (Flat
210 f) v))).(let H5 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda (ee: C).(match
211 ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k
212 with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead c1
213 (Flat f) v) H4) in (False_ind (wf3 g c1 (CHead c2 (Bind b) u)) H5)))))))))))
214 (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_:
215 (((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u:
216 T).(\lambda (_: ((\forall (t: T).((ty3 g c0 u t) \to False)))).(\lambda (b:
217 B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) (CHead c1 (Flat f) v))).(let H5
218 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda (ee: C).(match ee with [(CSort
219 _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _)
220 \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead c1 (Flat f) v)
221 H4) in (False_ind (wf3 g c1 (CHead c2 (Bind Void) (TSort O))) H5))))))))))
222 (\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2:
223 (((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u:
224 T).(\lambda (f0: F).(\lambda (H3: (eq C (CHead c0 (Flat f0) u) (CHead c1
225 (Flat f) v))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort
226 _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Flat f0) u)
227 (CHead c1 (Flat f) v) H3) in ((let H5 \def (f_equal C F (\lambda (e:
228 C).(match e with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match
229 k with [(Bind _) \Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead c0
230 (Flat f0) u) (CHead c1 (Flat f) v) H3) in ((let H6 \def (f_equal C T (\lambda
231 (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow
232 t])) (CHead c0 (Flat f0) u) (CHead c1 (Flat f) v) H3) in (\lambda (_: (eq F
233 f0 f)).(\lambda (H8: (eq C c0 c1)).(let H9 \def (eq_ind C c0 (\lambda (c:
234 C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c2))) H2 c1 H8) in (let H10
235 \def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H8) in H10))))) H5))
236 H4))))))))) y x H0))) H)))))).
239 \forall (g: G).(\forall (x: C).(\forall (c: C).(\forall (v: T).(\forall (k:
240 K).((wf3 g x (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b)))))))))
242 \lambda (g: G).(\lambda (x: C).(\lambda (c: C).(\lambda (v: T).(\lambda (k:
243 K).(\lambda (H: (wf3 g x (CHead c k v))).(insert_eq C (CHead c k v) (\lambda
244 (c0: C).(wf3 g x c0)) (\lambda (_: C).(ex B (\lambda (b: B).(eq K k (Bind
245 b))))) (\lambda (y: C).(\lambda (H0: (wf3 g x y)).(wf3_ind g (\lambda (_:
246 C).(\lambda (c1: C).((eq C c1 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K
247 k (Bind b))))))) (\lambda (m: nat).(\lambda (H1: (eq C (CSort m) (CHead c k
248 v))).(let H2 \def (eq_ind C (CSort m) (\lambda (ee: C).(match ee with [(CSort
249 _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c k v) H1)
250 in (False_ind (ex B (\lambda (b: B).(eq K k (Bind b)))) H2)))) (\lambda (c1:
251 C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2
252 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (u:
253 T).(\lambda (t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda
254 (H4: (eq C (CHead c2 (Bind b) u) (CHead c k v))).(let H5 \def (f_equal C C
255 (\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _)
256 \Rightarrow c0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in ((let H6 \def
257 (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) |
258 (CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in
259 ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _)
260 \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead
261 c k v) H4) in (\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c2
262 c)).(let H10 \def (eq_ind T u (\lambda (t0: T).(ty3 g c1 t0 t)) H3 v H7) in
263 (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex
264 B (\lambda (b0: B).(eq K k (Bind b0)))))) H2 c H9) in (let H12 \def (eq_ind C
265 c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let H13 \def (eq_ind_r K k
266 (\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B (\lambda (b0: B).(eq K k0
267 (Bind b0)))))) H11 (Bind b) H8) in (eq_ind K (Bind b) (\lambda (k0: K).(ex B
268 (\lambda (b0: B).(eq K k0 (Bind b0))))) (ex_intro B (\lambda (b0: B).(eq K
269 (Bind b) (Bind b0))) b (refl_equal K (Bind b))) k H8)))))))) H6))
270 H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1
271 c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K
272 k (Bind b))))))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u
273 t) \to False)))).(\lambda (_: B).(\lambda (H4: (eq C (CHead c2 (Bind Void)
274 (TSort O)) (CHead c k v))).(let H5 \def (f_equal C C (\lambda (e: C).(match e
275 with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2
276 (Bind Void) (TSort O)) (CHead c k v) H4) in ((let H6 \def (f_equal C K
277 (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind Void) | (CHead _
278 k0 _) \Rightarrow k0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in
279 ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _)
280 \Rightarrow (TSort O) | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind Void)
281 (TSort O)) (CHead c k v) H4) in (\lambda (H8: (eq K (Bind Void) k)).(\lambda
282 (H9: (eq C c2 c)).(let H10 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0
283 (CHead c k v)) \to (ex B (\lambda (b0: B).(eq K k (Bind b0)))))) H2 c H9) in
284 (let H11 \def (eq_ind C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let
285 H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B
286 (\lambda (b0: B).(eq K k0 (Bind b0)))))) H10 (Bind Void) H8) in (eq_ind K
287 (Bind Void) (\lambda (k0: K).(ex B (\lambda (b0: B).(eq K k0 (Bind b0)))))
288 (let H13 \def (eq_ind_r T v (\lambda (t: T).((eq C c (CHead c (Bind Void) t))
289 \to (ex B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))))) H12 (TSort O) H7)
290 in (ex_intro B (\lambda (b0: B).(eq K (Bind Void) (Bind b0))) Void
291 (refl_equal K (Bind Void)))) k H8))))))) H6)) H5)))))))))) (\lambda (c1:
292 C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2
293 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (_:
294 T).(\lambda (_: F).(\lambda (H3: (eq C c2 (CHead c k v))).(let H4 \def
295 (f_equal C C (\lambda (e: C).e) c2 (CHead c k v) H3) in (let H5 \def (eq_ind
296 C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b: B).(eq
297 K k (Bind b)))))) H2 (CHead c k v) H4) in (let H6 \def (eq_ind C c2 (\lambda
298 (c0: C).(wf3 g c1 c0)) H1 (CHead c k v) H4) in (H5 (refl_equal C (CHead c k
299 v))))))))))))) x y H0))) H)))))).
302 \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall
303 (c2: C).((wf3 g c c2) \to (eq C c1 c2))))))
305 \lambda (g: G).(\lambda (c: C).(\lambda (c1: C).(\lambda (H: (wf3 g c
306 c1)).(wf3_ind g (\lambda (c0: C).(\lambda (c2: C).(\forall (c3: C).((wf3 g c0
307 c3) \to (eq C c2 c3))))) (\lambda (m: nat).(\lambda (c2: C).(\lambda (H0:
308 (wf3 g (CSort m) c2)).(let H_y \def (wf3_gen_sort1 g c2 m H0) in (eq_ind_r C
309 (CSort m) (\lambda (c0: C).(eq C (CSort m) c0)) (refl_equal C (CSort m)) c2
310 H_y))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2
311 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3
312 c4))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c2 u
313 t)).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g (CHead c2 (Bind b)
314 u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in (let H4 \def H_x in
315 (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind
316 b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_:
317 C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq C c0 (CHead
318 c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_:
319 C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 (Bind b) u)
320 c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead
321 c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda
322 (_: C).(\lambda (w: T).(ty3 g c2 u w))))).(ex3_2_ind C T (\lambda (c4:
323 C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4:
324 C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2
325 u w))) (eq C (CHead c3 (Bind b) u) c0) (\lambda (x0: C).(\lambda (x1:
326 T).(\lambda (H6: (eq C c0 (CHead x0 (Bind b) u))).(\lambda (H7: (wf3 g c2
327 x0)).(\lambda (_: (ty3 g c2 u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda
328 (c4: C).(eq C (CHead c3 (Bind b) u) c4)) (f_equal3 C K T C CHead c3 x0 (Bind
329 b) (Bind b) u u (H1 x0 H7) (refl_equal K (Bind b)) (refl_equal T u)) c0
330 H6)))))) H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind
331 Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall
332 (w: T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0
333 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda
334 (_: C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind b)
335 u) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) (TSort
336 O)))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: ((\forall (w: T).((ty3 g c2 u
337 w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c4:
338 C).(eq C (CHead c3 (Bind b) u) c4)) (let H_x0 \def (H8 t H2) in (let H9 \def
339 H_x0 in (False_ind (eq C (CHead c3 (Bind b) u) (CHead x0 (Bind Void) (TSort
340 O))) H9))) c0 H6))))) H5)) H4))))))))))))) (\lambda (c2: C).(\lambda (c3:
341 C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4)
342 \to (eq C c3 c4))))).(\lambda (u: T).(\lambda (H2: ((\forall (t: T).((ty3 g
343 c2 u t) \to False)))).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g
344 (CHead c2 (Bind b) u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in
345 (let H4 \def H_x in (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C
346 c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4)))
347 (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq
348 C c0 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4))
349 (\lambda (_: C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3
350 (Bind Void) (TSort O)) c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda
351 (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_:
352 T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u
353 w))))).(ex3_2_ind C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4
354 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_:
355 C).(\lambda (w: T).(ty3 g c2 u w))) (eq C (CHead c3 (Bind Void) (TSort O))
356 c0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c0 (CHead x0 (Bind
357 b) u))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: (ty3 g c2 u x1)).(eq_ind_r
358 C (CHead x0 (Bind b) u) (\lambda (c4: C).(eq C (CHead c3 (Bind Void) (TSort
359 O)) c4)) (let H_x0 \def (H2 x1 H8) in (let H9 \def H_x0 in (False_ind (eq C
360 (CHead c3 (Bind Void) (TSort O)) (CHead x0 (Bind b) u)) H9))) c0 H6))))))
361 H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind Void)
362 (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall (w:
363 T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 (CHead
364 c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_:
365 C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind Void)
366 (TSort O)) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void)
367 (TSort O)))).(\lambda (H7: (wf3 g c2 x0)).(\lambda (_: ((\forall (w: T).((ty3
368 g c2 u w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda
369 (c4: C).(eq C (CHead c3 (Bind Void) (TSort O)) c4)) (f_equal3 C K T C CHead
370 c3 x0 (Bind Void) (Bind Void) (TSort O) (TSort O) (H1 x0 H7) (refl_equal K
371 (Bind Void)) (refl_equal T (TSort O))) c0 H6))))) H5)) H4))))))))))))
372 (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1:
373 ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 c4))))).(\lambda (u:
374 T).(\lambda (f: F).(\lambda (c0: C).(\lambda (H2: (wf3 g (CHead c2 (Flat f)
375 u) c0)).(let H_y \def (wf3_gen_flat1 g c2 c0 u f H2) in (H1 c0 H_y))))))))))