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/csuba/defs.ma".
19 implied rec lemma csuba_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n:
20 nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csuba
21 g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (u: T).(P (CHead c1 k u)
22 (CHead c2 k u))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csuba g c1
23 c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1:
24 T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b)
25 u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to ((P
26 c1 c2) \to (\forall (t: T).(\forall (a: A).((arity g c1 t (asucc g a)) \to
27 (\forall (u: T).((arity g c2 u a) \to (P (CHead c1 (Bind Abst) t) (CHead c2
28 (Bind Abbr) u)))))))))))) (c: C) (c0: C) (c1: csuba g c c0) on c1: P c c0
29 \def match c1 with [(csuba_sort n) \Rightarrow (f n) | (csuba_head c2 c3 c4 k
30 u) \Rightarrow (f0 c2 c3 c4 ((csuba_ind g P f f0 f1 f2) c2 c3 c4) k u) |
31 (csuba_void c2 c3 c4 b n u1 u2) \Rightarrow (f1 c2 c3 c4 ((csuba_ind g P f f0
32 f1 f2) c2 c3 c4) b n u1 u2) | (csuba_abst c2 c3 c4 t a a0 u a1) \Rightarrow
33 (f2 c2 c3 c4 ((csuba_ind g P f f0 f1 f2) c2 c3 c4) t a a0 u a1)].
36 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g
37 (CHead d1 (Bind Abbr) u) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2
38 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))
40 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H:
41 (csuba g (CHead d1 (Bind Abbr) u) c)).(insert_eq C (CHead d1 (Bind Abbr) u)
42 (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2 C (\lambda (d2: C).(eq
43 C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (\lambda
44 (y: C).(\lambda (H0: (csuba g y c)).(csuba_ind g (\lambda (c0: C).(\lambda
45 (c1: C).((eq C c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C
46 c1 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda
47 (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(let H2
48 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _)
49 \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr)
50 u) H1) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind
51 Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H2)))) (\lambda (c1:
52 C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1
53 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2
54 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (k:
55 K).(\lambda (u0: T).(\lambda (H3: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr)
56 u))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
57 \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u0) (CHead d1
58 (Bind Abbr) u) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e
59 with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k
60 u0) (CHead d1 (Bind Abbr) u) H3) in ((let H6 \def (f_equal C T (\lambda (e:
61 C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t]))
62 (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H3) in (\lambda (H7: (eq K k (Bind
63 Abbr))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u (\lambda (t: T).(ex2 C
64 (\lambda (d2: C).(eq C (CHead c2 k t) (CHead d2 (Bind Abbr) u))) (\lambda
65 (d2: C).(csuba g d1 d2)))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C
66 (\lambda (d2: C).(eq C (CHead c2 k0 u) (CHead d2 (Bind Abbr) u))) (\lambda
67 (d2: C).(csuba g d1 d2)))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C
68 c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2
69 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) H2 d1 H8) in (let H10
70 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in (ex_intro2 C
71 (\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u)))
72 (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abbr) u))
73 H10))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2:
74 C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind
75 Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u)))
76 (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (b: B).(\lambda (_: (not (eq B
77 b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1
78 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(let H5 \def (eq_ind C (CHead c1
79 (Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False
80 | (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0
81 with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow
82 True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H4) in
83 (False_ind (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind b) u2) (CHead d2
84 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5))))))))))) (\lambda
85 (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C
86 c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2
87 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (t:
88 T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0:
89 T).(\lambda (_: (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst)
90 t) (CHead d1 (Bind Abbr) u))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) t)
91 (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _)
92 \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr
93 \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat
94 _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H5) in (False_ind (ex2 C
95 (\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u)))
96 (\lambda (d2: C).(csuba g d1 d2))) H6)))))))))))) y c H0))) H))))).
99 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g
100 (CHead d1 (Bind Void) u1) c) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2:
101 C).(\lambda (u2: T).(eq C c (CHead d2 (Bind b) u2))))) (\lambda (_:
102 B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))))
104 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda
105 (H: (csuba g (CHead d1 (Bind Void) u1) c)).(insert_eq C (CHead d1 (Bind Void)
106 u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2_3 B C T (\lambda
107 (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind b) u2)))))
108 (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))
109 (\lambda (y: C).(\lambda (H0: (csuba g y c)).(csuba_ind g (\lambda (c0:
110 C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T
111 (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind b)
112 u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1
113 d2)))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind
114 Void) u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with
115 [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1
116 (Bind Void) u1) H1) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (d2:
117 C).(\lambda (u2: T).(eq C (CSort n) (CHead d2 (Bind b) u2))))) (\lambda (_:
118 B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) H2)))) (\lambda (c1:
119 C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1
120 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2:
121 C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_:
122 B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))).(\lambda (k:
123 K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead d1 (Bind Void)
124 u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
125 \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u) (CHead d1
126 (Bind Void) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e
127 with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k
128 u) (CHead d1 (Bind Void) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e:
129 C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t]))
130 (CHead c1 k u) (CHead d1 (Bind Void) u1) H3) in (\lambda (H7: (eq K k (Bind
131 Void))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_3 B C
132 T (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k t)
133 (CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_:
134 T).(csuba g d1 d2)))))) (eq_ind_r K (Bind Void) (\lambda (k0: K).(ex2_3 B C T
135 (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k0 u1)
136 (CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_:
137 T).(csuba g d1 d2)))))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0
138 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2:
139 C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_:
140 B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))) H2 d1 H8) in (let
141 H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in
142 (ex2_3_intro B C T (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C
143 (CHead c2 (Bind Void) u1) (CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda
144 (d2: C).(\lambda (_: T).(csuba g d1 d2)))) Void c2 u1 (refl_equal C (CHead c2
145 (Bind Void) u1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1:
146 C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1
147 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2:
148 C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_:
149 B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))).(\lambda (b:
150 B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2:
151 T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u0) (CHead d1 (Bind Void)
152 u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
153 \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind Void) u0)
154 (CHead d1 (Bind Void) u1) H4) in ((let H6 \def (f_equal C T (\lambda (e:
155 C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t]))
156 (CHead c1 (Bind Void) u0) (CHead d1 (Bind Void) u1) H4) in (\lambda (H7: (eq
157 C c1 d1)).(let H8 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1
158 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b0: B).(\lambda (d2: C).(\lambda
159 (u3: T).(eq C c2 (CHead d2 (Bind b0) u3))))) (\lambda (_: B).(\lambda (d2:
160 C).(\lambda (_: T).(csuba g d1 d2))))))) H2 d1 H7) in (let H9 \def (eq_ind C
161 c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H7) in (ex2_3_intro B C T (\lambda
162 (b0: B).(\lambda (d2: C).(\lambda (u3: T).(eq C (CHead c2 (Bind b) u2) (CHead
163 d2 (Bind b0) u3))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba
164 g d1 d2)))) b c2 u2 (refl_equal C (CHead c2 (Bind b) u2)) H9)))))
165 H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1
166 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T
167 (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b)
168 u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1
169 d2)))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc
170 g a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C
171 (CHead c1 (Bind Abst) t) (CHead d1 (Bind Void) u1))).(let H6 \def (eq_ind C
172 (CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _)
173 \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b)
174 \Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True |
175 Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind
176 Void) u1) H5) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (d2:
177 C).(\lambda (u2: T).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind b) u2)))))
178 (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))
179 H6)))))))))))) y c H0))) H))))).
181 lemma csuba_gen_abst:
182 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g
183 (CHead d1 (Bind Abst) u1) c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead
184 d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda
185 (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr)
186 u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2))))
187 (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g
188 a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2
191 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda
192 (H: (csuba g (CHead d1 (Bind Abst) u1) c)).(insert_eq C (CHead d1 (Bind Abst)
193 u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(or (ex2 C (\lambda (d2:
194 C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))
195 (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead
196 d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_:
197 A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity
198 g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
199 A).(arity g d2 u2 a))))))) (\lambda (y: C).(\lambda (H0: (csuba g y
200 c)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind
201 Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst)
202 u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2:
203 C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abbr) u2)))))
204 (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda
205 (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a)))))
206 (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))
207 (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst)
208 u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with
209 [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1
210 (Bind Abst) u1) H1) in (False_ind (or (ex2 C (\lambda (d2: C).(eq C (CSort n)
211 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A
212 (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CSort n) (CHead d2
213 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
214 d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1
215 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2
216 u2 a)))))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csuba g c1
217 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C
218 (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba
219 g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq
220 C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda
221 (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a:
222 A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda
223 (a: A).(arity g d2 u2 a))))))))).(\lambda (k: K).(\lambda (u: T).(\lambda
224 (H3: (eq C (CHead c1 k u) (CHead d1 (Bind Abst) u1))).(let H4 \def (f_equal C
225 C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c0 _ _)
226 \Rightarrow c0])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H3) in ((let H5
227 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k |
228 (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H3)
229 in ((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _)
230 \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Bind
231 Abst) u1) H3) in (\lambda (H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C c1
232 d1)).(eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (d2: C).(eq C (CHead
233 c2 k t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3
234 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 k t)
235 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_:
236 A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity
237 g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
238 A).(arity g d2 u2 a))))))) (eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2
239 C (\lambda (d2: C).(eq C (CHead c2 k0 u1) (CHead d2 (Bind Abst) u1)))
240 (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda
241 (u2: T).(\lambda (_: A).(eq C (CHead c2 k0 u1) (CHead d2 (Bind Abbr) u2)))))
242 (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda
243 (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a)))))
244 (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))
245 (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abst)
246 u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1)))
247 (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda
248 (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2:
249 C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_:
250 C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda
251 (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) H2 d1 H8)
252 in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in
253 (or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2
254 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda
255 (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abst) u1)
256 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_:
257 A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity
258 g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
259 A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind
260 Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) c2
261 (refl_equal C (CHead c2 (Bind Abst) u1)) H10)))) k H7) u H6)))) H5))
262 H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1
263 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C
264 (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba
265 g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq
266 C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda
267 (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a:
268 A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda
269 (a: A).(arity g d2 u2 a))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b
270 Void))).(\lambda (u0: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 (Bind
271 Void) u0) (CHead d1 (Bind Abst) u1))).(let H5 \def (eq_ind C (CHead c1 (Bind
272 Void) u0) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False |
273 (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 with
274 [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) |
275 (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abst) u1) H4) in (False_ind
276 (or (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind
277 Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2:
278 C).(\lambda (u3: T).(\lambda (_: A).(eq C (CHead c2 (Bind b) u2) (CHead d2
279 (Bind Abbr) u3))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
280 d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1
281 (asucc g a))))) (\lambda (d2: C).(\lambda (u3: T).(\lambda (a: A).(arity g d2
282 u3 a)))))) H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1:
283 (csuba g c1 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or
284 (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2:
285 C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda
286 (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_:
287 T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_:
288 T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda
289 (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))).(\lambda (t: T).(\lambda
290 (a: A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: T).(\lambda
291 (H4: (arity g c2 u a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead d1
292 (Bind Abst) u1))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with
293 [(CSort _) \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind
294 Abst) t) (CHead d1 (Bind Abst) u1) H5) in ((let H7 \def (f_equal C T (\lambda
295 (e: C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow
296 t0])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H5) in (\lambda (H8:
297 (eq C c1 d1)).(let H9 \def (eq_ind T t (\lambda (t0: T).(arity g c1 t0 (asucc
298 g a))) H3 u1 H7) in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(arity g c0
299 u1 (asucc g a))) H9 d1 H8) in (let H11 \def (eq_ind C c1 (\lambda (c0:
300 C).((eq C c0 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C
301 c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T
302 A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind
303 Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1
304 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc
305 g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2
306 a0)))))))) H2 d1 H8) in (let H12 \def (eq_ind C c1 (\lambda (c0: C).(csuba g
307 c0 c2)) H1 d1 H8) in (or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind
308 Abbr) u) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))
309 (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead
310 c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_:
311 T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_:
312 T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda
313 (u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))) (ex4_3_intro C T A (\lambda
314 (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u)
315 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_:
316 A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity
317 g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0:
318 A).(arity g d2 u2 a0)))) c2 u a (refl_equal C (CHead c2 (Bind Abbr) u)) H12
319 H10 H4)))))))) H6)))))))))))) y c H0))) H))))).
321 lemma csuba_gen_flat:
322 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall
323 (f: F).((csuba g (CHead d1 (Flat f) u1) c) \to (ex2_2 C T (\lambda (d2:
324 C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2:
325 C).(\lambda (_: T).(csuba g d1 d2)))))))))
327 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda
328 (f: F).(\lambda (H: (csuba g (CHead d1 (Flat f) u1) c)).(insert_eq C (CHead
329 d1 (Flat f) u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2_2 C T
330 (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda
331 (d2: C).(\lambda (_: T).(csuba g d1 d2))))) (\lambda (y: C).(\lambda (H0:
332 (csuba g y c)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c0
333 (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq
334 C c1 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1
335 d2))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Flat f)
336 u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with
337 [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1
338 (Flat f) u1) H1) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2:
339 T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_:
340 T).(csuba g d1 d2)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1:
341 (csuba g c1 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2
342 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2))))
343 (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))).(\lambda (k:
344 K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead d1 (Flat f)
345 u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
346 \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u) (CHead d1
347 (Flat f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e with
348 [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u)
349 (CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e:
350 C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t]))
351 (CHead c1 k u) (CHead d1 (Flat f) u1) H3) in (\lambda (H7: (eq K k (Flat
352 f))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_2 C T
353 (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k t) (CHead d2 (Flat f)
354 u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) (eq_ind_r K (Flat
355 f) (\lambda (k0: K).(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead
356 c2 k0 u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
357 d1 d2))))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1
358 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2
359 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1
360 d2)))))) H2 d1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0
361 c2)) H1 d1 H8) in (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C
362 (CHead c2 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda
363 (_: T).(csuba g d1 d2))) c2 u1 (refl_equal C (CHead c2 (Flat f) u1)) H10))) k
364 H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_:
365 (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 C
366 T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2))))
367 (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))).(\lambda (b:
368 B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2:
369 T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u0) (CHead d1 (Flat f)
370 u1))).(let H5 \def (eq_ind C (CHead c1 (Bind Void) u0) (\lambda (ee:
371 C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow
372 (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I
373 (CHead d1 (Flat f) u1) H4) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda
374 (u3: T).(eq C (CHead c2 (Bind b) u2) (CHead d2 (Flat f) u3)))) (\lambda (d2:
375 C).(\lambda (_: T).(csuba g d1 d2)))) H5))))))))))) (\lambda (c1: C).(\lambda
376 (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Flat
377 f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2
378 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1
379 d2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g
380 a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C
381 (CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind C
382 (CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _)
383 \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _)
384 \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1)
385 H5) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead
386 c2 (Bind Abbr) u) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_:
387 T).(csuba g d1 d2)))) H6)))))))))))) y c H0))) H)))))).
389 lemma csuba_gen_bind:
390 \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall
391 (v1: T).((csuba g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2:
392 B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2)))))
393 (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))))
395 \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda
396 (v1: T).(\lambda (H: (csuba g (CHead e1 (Bind b1) v1) c2)).(insert_eq C
397 (CHead e1 (Bind b1) v1) (\lambda (c: C).(csuba g c c2)) (\lambda (_:
398 C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2
399 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_:
400 T).(csuba g e1 e2)))))) (\lambda (y: C).(\lambda (H0: (csuba g y
401 c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind
402 b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2:
403 T).(eq C c0 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
404 C).(\lambda (_: T).(csuba g e1 e2)))))))) (\lambda (n: nat).(\lambda (H1: (eq
405 C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n)
406 (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _)
407 \Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T
408 (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2
409 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g
410 e1 e2))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csuba g c1
411 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T
412 (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind
413 b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1
414 e2)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u)
415 (CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e
416 with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k
417 u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e:
418 C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0]))
419 (CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T
420 (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t)
421 \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7:
422 (eq K k (Bind b1))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 (\lambda (t:
423 T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C
424 (CHead c3 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
425 C).(\lambda (_: T).(csuba g e1 e2)))))) (eq_ind_r K (Bind b1) (\lambda (k0:
426 K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C
427 (CHead c3 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
428 C).(\lambda (_: T).(csuba g e1 e2)))))) (let H9 \def (eq_ind C c1 (\lambda
429 (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2:
430 B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2)))))
431 (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) H2 e1
432 H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c3)) H1 e1 H8)
433 in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq
434 C (CHead c3 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_:
435 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) b1 c3 v1 (refl_equal C
436 (CHead c3 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1:
437 C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c1
438 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2:
439 C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_:
440 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))).(\lambda (b:
441 B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2:
442 T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1)
443 v1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
444 \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1)
445 (CHead e1 (Bind b1) v1) H4) in ((let H6 \def (f_equal C B (\lambda (e:
446 C).(match e with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow
447 (match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Void])]))
448 (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) in ((let H7 \def
449 (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead
450 _ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4)
451 in (\lambda (H8: (eq B Void b1)).(\lambda (H9: (eq C c1 e1)).(let H10 \def
452 (eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C
453 T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind
454 b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1
455 e2))))))) H2 e1 H9) in (let H11 \def (eq_ind C c1 (\lambda (c: C).(csuba g c
456 c3)) H1 e1 H9) in (let H12 \def (eq_ind_r B b1 (\lambda (b0: B).((eq C e1
457 (CHead e1 (Bind b0) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2:
458 C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_:
459 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) H10 Void H8) in
460 (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C
461 (CHead c3 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda
462 (e2: C).(\lambda (_: T).(csuba g e1 e2)))) b c3 u2 (refl_equal C (CHead c3
463 (Bind b) u2)) H11))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c3:
464 C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind
465 b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2:
466 T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
467 C).(\lambda (_: T).(csuba g e1 e2)))))))).(\lambda (t: T).(\lambda (a:
468 A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: T).(\lambda (_:
469 (arity g c3 u a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1
470 (Bind b1) v1))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with
471 [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind
472 Abst) t) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def (f_equal C B (\lambda
473 (e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow
474 (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead
475 c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in ((let H8 \def (f_equal C T
476 (\lambda (e: C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0)
477 \Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in
478 (\lambda (H9: (eq B Abst b1)).(\lambda (H10: (eq C c1 e1)).(let H11 \def
479 (eq_ind T t (\lambda (t0: T).(arity g c1 t0 (asucc g a))) H3 v1 H8) in (let
480 H12 \def (eq_ind C c1 (\lambda (c: C).(arity g c v1 (asucc g a))) H11 e1 H10)
481 in (let H13 \def (eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1)
482 v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq
483 C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda
484 (_: T).(csuba g e1 e2))))))) H2 e1 H10) in (let H14 \def (eq_ind C c1
485 (\lambda (c: C).(csuba g c c3)) H1 e1 H10) in (let H15 \def (eq_ind_r B b1
486 (\lambda (b: B).((eq C e1 (CHead e1 (Bind b) v1)) \to (ex2_3 B C T (\lambda
487 (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2)
488 v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1
489 e2))))))) H13 Abst H9) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2:
490 C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 (Bind b2)
491 v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))
492 Abbr c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H14))))))))) H7))
493 H6)))))))))))) y c2 H0))) H)))))).
495 lemma csuba_gen_abst_rev:
496 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c
497 (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2
498 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2:
499 C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) u2)))) (\lambda (d2:
500 C).(\lambda (_: T).(csuba g d2 d1)))))))))
502 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H:
503 (csuba g c (CHead d1 (Bind Abst) u))).(insert_eq C (CHead d1 (Bind Abst) u)
504 (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(or (ex2 C (\lambda (d2:
505 C).(eq C c (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))
506 (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void)
507 u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (\lambda (y:
508 C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda (c1:
509 C).((eq C c1 (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C
510 c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T
511 (\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Bind Void) u2))))
512 (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (n:
513 nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) u))).(let H2 \def
514 (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow
515 True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) u) H1) in
516 (False_ind (or (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind Abst)
517 u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda
518 (u2: T).(eq C (CSort n) (CHead d2 (Bind Void) u2)))) (\lambda (d2:
519 C).(\lambda (_: T).(csuba g d2 d1))))) H2)))) (\lambda (c1: C).(\lambda (c2:
520 C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind
521 Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u)))
522 (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2:
523 T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_:
524 T).(csuba g d2 d1)))))))).(\lambda (k: K).(\lambda (u0: T).(\lambda (H3: (eq
525 C (CHead c2 k u0) (CHead d1 (Bind Abst) u))).(let H4 \def (f_equal C C
526 (\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _)
527 \Rightarrow c0])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) in ((let H5
528 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k |
529 (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3)
530 in ((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _)
531 \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1
532 (Bind Abst) u) H3) in (\lambda (H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C
533 c2 d1)).(eq_ind_r T u (\lambda (t: T).(or (ex2 C (\lambda (d2: C).(eq C
534 (CHead c1 k t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))
535 (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) (CHead d2
536 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))
537 (eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 C (\lambda (d2: C).(eq C
538 (CHead c1 k0 u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))
539 (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k0 u) (CHead d2
540 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let
541 H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abst) u)) \to
542 (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) (\lambda (d2:
543 C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1
544 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2
545 d1))))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba g
546 c1 c0)) H1 d1 H8) in (or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind
547 Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2
548 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abst) u) (CHead
549 d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))
550 (ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) u) (CHead d2 (Bind
551 Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind
552 Abst) u)) H10)))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda
553 (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1
554 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind
555 Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2:
556 C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2:
557 C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (b: B).(\lambda (H3: (not
558 (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead
559 c2 (Bind b) u2) (CHead d1 (Bind Abst) u))).(let H5 \def (f_equal C C (\lambda
560 (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow
561 c0])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abst) u) H4) in ((let H6 \def
562 (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead
563 _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _)
564 \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abst) u) H4) in
565 ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _)
566 \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead
567 d1 (Bind Abst) u) H4) in (\lambda (H8: (eq B b Abst)).(\lambda (H9: (eq C c2
568 d1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Abst
569 H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind
570 Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u)))
571 (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3:
572 T).(eq C c1 (CHead d2 (Bind Void) u3)))) (\lambda (d2: C).(\lambda (_:
573 T).(csuba g d2 d1))))))) H2 d1 H9) in (let H12 \def (eq_ind C c2 (\lambda
574 (c0: C).(csuba g c1 c0)) H1 d1 H9) in (or_intror (ex2 C (\lambda (d2: C).(eq
575 C (CHead c1 (Bind Void) u1) (CHead d2 (Bind Abst) u))) (\lambda (d2:
576 C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C
577 (CHead c1 (Bind Void) u1) (CHead d2 (Bind Void) u3)))) (\lambda (d2:
578 C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2:
579 C).(\lambda (u3: T).(eq C (CHead c1 (Bind Void) u1) (CHead d2 (Bind Void)
580 u3)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) c1 u1 (refl_equal C
581 (CHead c1 (Bind Void) u1)) H12)))))))) H6)) H5))))))))))) (\lambda (c1:
582 C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c2
583 (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2
584 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2:
585 C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2:
586 C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (t: T).(\lambda (a:
587 A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: T).(\lambda (_:
588 (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1
589 (Bind Abst) u))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda
590 (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _)
591 \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr
592 \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat
593 _) \Rightarrow False])])) I (CHead d1 (Bind Abst) u) H5) in (False_ind (or
594 (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst)
595 u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda
596 (u2: T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda
597 (d2: C).(\lambda (_: T).(csuba g d2 d1))))) H6)))))))))))) c y H0))) H))))).
599 lemma csuba_gen_void_rev:
600 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c
601 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind
602 Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))))
604 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H:
605 (csuba g c (CHead d1 (Bind Void) u))).(insert_eq C (CHead d1 (Bind Void) u)
606 (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(ex2 C (\lambda (d2: C).(eq
607 C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))) (\lambda
608 (y: C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda
609 (c1: C).((eq C c1 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C
610 c0 (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda
611 (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Void) u))).(let H2
612 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _)
613 \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void)
614 u) H1) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind
615 Void) u))) (\lambda (d2: C).(csuba g d2 d1))) H2)))) (\lambda (c1:
616 C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2
617 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2
618 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (k:
619 K).(\lambda (u0: T).(\lambda (H3: (eq C (CHead c2 k u0) (CHead d1 (Bind Void)
620 u))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
621 \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1
622 (Bind Void) u) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e
623 with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k
624 u0) (CHead d1 (Bind Void) u) H3) in ((let H6 \def (f_equal C T (\lambda (e:
625 C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t]))
626 (CHead c2 k u0) (CHead d1 (Bind Void) u) H3) in (\lambda (H7: (eq K k (Bind
627 Void))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r T u (\lambda (t: T).(ex2 C
628 (\lambda (d2: C).(eq C (CHead c1 k t) (CHead d2 (Bind Void) u))) (\lambda
629 (d2: C).(csuba g d2 d1)))) (eq_ind_r K (Bind Void) (\lambda (k0: K).(ex2 C
630 (\lambda (d2: C).(eq C (CHead c1 k0 u) (CHead d2 (Bind Void) u))) (\lambda
631 (d2: C).(csuba g d2 d1)))) (let H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C
632 c0 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2
633 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))) H2 d1 H8) in (let H10
634 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H8) in (ex_intro2 C
635 (\lambda (d2: C).(eq C (CHead c1 (Bind Void) u) (CHead d2 (Bind Void) u)))
636 (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind Void) u))
637 H10))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2:
638 C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind
639 Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Void) u)))
640 (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (b: B).(\lambda (H3: (not (eq
641 B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c2
642 (Bind b) u2) (CHead d1 (Bind Void) u))).(let H5 \def (f_equal C C (\lambda
643 (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow
644 c0])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Void) u) H4) in ((let H6 \def
645 (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead
646 _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _)
647 \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Void) u) H4) in
648 ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _)
649 \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead
650 d1 (Bind Void) u) H4) in (\lambda (H8: (eq B b Void)).(\lambda (H9: (eq C c2
651 d1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Void
652 H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind
653 Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Void) u)))
654 (\lambda (d2: C).(csuba g d2 d1))))) H2 d1 H9) in (let H12 \def (eq_ind C c2
655 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H9) in (let H13 \def (match (H10
656 (refl_equal B Void)) in False with []) in H13))))))) H6)) H5)))))))))))
657 (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_:
658 (((eq C c2 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1
659 (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (t:
660 T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0:
661 T).(\lambda (_: (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr)
662 u0) (CHead d1 (Bind Void) u))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr)
663 u0) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k
664 _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr
665 \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat
666 _) \Rightarrow False])])) I (CHead d1 (Bind Void) u) H5) in (False_ind (ex2 C
667 (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u)))
668 (\lambda (d2: C).(csuba g d2 d1))) H6)))))))))))) c y H0))) H))))).
670 lemma csuba_gen_abbr_rev:
671 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g c
672 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c (CHead d2
673 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda
674 (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abst)
675 u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1))))
676 (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g
677 a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))
678 (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void)
679 u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))
681 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda
682 (H: (csuba g c (CHead d1 (Bind Abbr) u1))).(insert_eq C (CHead d1 (Bind Abbr)
683 u1) (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(or3 (ex2 C (\lambda
684 (d2: C).(eq C c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2
685 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c
686 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_:
687 A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
688 A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda
689 (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq
690 C c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2
691 d1)))))) (\lambda (y: C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda
692 (c0: C).(\lambda (c1: C).((eq C c1 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C
693 (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba
694 g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq
695 C c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda
696 (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
697 A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda
698 (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq
699 C c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
700 d2 d1)))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind
701 Abbr) u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with
702 [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1
703 (Bind Abbr) u1) H1) in (False_ind (or3 (ex2 C (\lambda (d2: C).(eq C (CSort
704 n) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T
705 A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CSort n) (CHead d2
706 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
707 d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2
708 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1
709 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CSort n) (CHead
710 d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))
711 H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csuba g c1
712 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C
713 (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba
714 g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq
715 C c1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda
716 (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
717 A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda
718 (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq
719 C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
720 d2 d1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c2 k
721 u) (CHead d1 (Bind Abbr) u1))).(let H4 \def (f_equal C C (\lambda (e:
722 C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0]))
723 (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in ((let H5 \def (f_equal C K
724 (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _)
725 \Rightarrow k0])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in ((let H6
726 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u |
727 (CHead _ _ t) \Rightarrow t])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3)
728 in (\lambda (H7: (eq K k (Bind Abbr))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r
729 T u1 (\lambda (t: T).(or3 (ex2 C (\lambda (d2: C).(eq C (CHead c1 k t) (CHead
730 d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda
731 (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 k t) (CHead d2 (Bind
732 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2
733 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2
734 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1
735 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t)
736 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2
737 d1)))))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(or3 (ex2 C (\lambda (d2:
738 C).(eq C (CHead c1 k0 u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba
739 g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq
740 C (CHead c1 k0 u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda
741 (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2:
742 T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda
743 (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2:
744 C).(\lambda (u2: T).(eq C (CHead c1 k0 u1) (CHead d2 (Bind Void) u2))))
745 (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H9 \def (eq_ind C
746 c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C
747 (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba
748 g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq
749 C c1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda
750 (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a:
751 A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda
752 (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq
753 C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
754 d2 d1))))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba
755 g c1 c0)) H1 d1 H8) in (or3_intro0 (ex2 C (\lambda (d2: C).(eq C (CHead c1
756 (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2
757 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C
758 (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2:
759 C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2:
760 C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda
761 (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T
762 (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2
763 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))
764 (ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind
765 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1
766 (Bind Abbr) u1)) H10)))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1:
767 C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2
768 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead
769 d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda
770 (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst)
771 u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1))))
772 (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g
773 a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))
774 (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void)
775 u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (b:
776 B).(\lambda (H3: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2:
777 T).(\lambda (H4: (eq C (CHead c2 (Bind b) u2) (CHead d1 (Bind Abbr)
778 u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
779 \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u2)
780 (CHead d1 (Bind Abbr) u1) H4) in ((let H6 \def (f_equal C B (\lambda (e:
781 C).(match e with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match
782 k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c2
783 (Bind b) u2) (CHead d1 (Bind Abbr) u1) H4) in ((let H7 \def (f_equal C T
784 (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead _ _ t)
785 \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abbr) u1) H4) in
786 (\lambda (H8: (eq B b Abbr)).(\lambda (H9: (eq C c2 d1)).(let H10 \def
787 (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Abbr H8) in (let H11
788 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to
789 (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda
790 (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u3:
791 T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) u3))))) (\lambda (d2:
792 C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2:
793 C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 u3 (asucc g a))))) (\lambda
794 (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T
795 (\lambda (d2: C).(\lambda (u3: T).(eq C c1 (CHead d2 (Bind Void) u3))))
796 (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H2 d1 H9) in (let H12
797 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H9) in (or3_intro2
798 (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) u0) (CHead d2 (Bind Abbr)
799 u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2:
800 C).(\lambda (u3: T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u0) (CHead d2
801 (Bind Abst) u3))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
802 d2 d1)))) (\lambda (d2: C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 u3
803 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1
804 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C (CHead c1 (Bind
805 Void) u0) (CHead d2 (Bind Void) u3)))) (\lambda (d2: C).(\lambda (_:
806 T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u3: T).(eq
807 C (CHead c1 (Bind Void) u0) (CHead d2 (Bind Void) u3)))) (\lambda (d2:
808 C).(\lambda (_: T).(csuba g d2 d1))) c1 u0 (refl_equal C (CHead c1 (Bind
809 Void) u0)) H12)))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c2:
810 C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind
811 Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr)
812 u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2:
813 C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) u2)))))
814 (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda
815 (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a)))))
816 (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2
817 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2))))
818 (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (t:
819 T).(\lambda (a: A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u:
820 T).(\lambda (H4: (arity g c2 u a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr)
821 u) (CHead d1 (Bind Abbr) u1))).(let H6 \def (f_equal C C (\lambda (e:
822 C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0]))
823 (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1) H5) in ((let H7 \def
824 (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead
825 _ _ t0) \Rightarrow t0])) (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1)
826 H5) in (\lambda (H8: (eq C c2 d1)).(let H9 \def (eq_ind T u (\lambda (t0:
827 T).(arity g c2 t0 a)) H4 u1 H7) in (let H10 \def (eq_ind C c2 (\lambda (c0:
828 C).(arity g c0 u1 a)) H9 d1 H8) in (let H11 \def (eq_ind C c2 (\lambda (c0:
829 C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq
830 C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C
831 T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2
832 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
833 d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2
834 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1
835 u1 a0))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2
836 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H2
837 d1 H8) in (let H12 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1
838 H8) in (or3_intro1 (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t)
839 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A
840 (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst)
841 t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda
842 (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0:
843 A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda
844 (a0: A).(arity g d1 u1 a0))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2:
845 T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2:
846 C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A (\lambda (d2:
847 C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) (CHead d2
848 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
849 d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2
850 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1
851 u1 a0)))) c1 t a (refl_equal C (CHead c1 (Bind Abst) t)) H12 H3 H10))))))))
852 H6)))))))))))) c y H0))) H))))).
854 lemma csuba_gen_flat_rev:
855 \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall
856 (f: F).((csuba g c (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2:
857 C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2:
858 C).(\lambda (_: T).(csuba g d2 d1)))))))))
860 \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda
861 (f: F).(\lambda (H: (csuba g c (CHead d1 (Flat f) u1))).(insert_eq C (CHead
862 d1 (Flat f) u1) (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(ex2_2 C T
863 (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda
864 (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (y: C).(\lambda (H0:
865 (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c1
866 (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq
867 C c0 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2
868 d1))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Flat f)
869 u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with
870 [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1
871 (Flat f) u1) H1) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2:
872 T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_:
873 T).(csuba g d2 d1)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1:
874 (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Flat f) u1)) \to (ex2_2
875 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Flat f) u2))))
876 (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))).(\lambda (k:
877 K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c2 k u) (CHead d1 (Flat f)
878 u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
879 \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u) (CHead d1
880 (Flat f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e with
881 [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u)
882 (CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e:
883 C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t]))
884 (CHead c2 k u) (CHead d1 (Flat f) u1) H3) in (\lambda (H7: (eq K k (Flat
885 f))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_2 C T
886 (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) (CHead d2 (Flat f)
887 u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (eq_ind_r K (Flat
888 f) (\lambda (k0: K).(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead
889 c1 k0 u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
890 d2 d1))))) (let H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1
891 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1
892 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2
893 d1)))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1
894 c0)) H1 d1 H8) in (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C
895 (CHead c1 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda
896 (_: T).(csuba g d2 d1))) c1 u1 (refl_equal C (CHead c1 (Flat f) u1)) H10))) k
897 H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_:
898 (csuba g c1 c2)).(\lambda (_: (((eq C c2 (CHead d1 (Flat f) u1)) \to (ex2_2 C
899 T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Flat f) u2))))
900 (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))).(\lambda (b:
901 B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2:
902 T).(\lambda (H4: (eq C (CHead c2 (Bind b) u2) (CHead d1 (Flat f) u1))).(let
903 H5 \def (eq_ind C (CHead c2 (Bind b) u2) (\lambda (ee: C).(match ee with
904 [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind
905 _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f)
906 u1) H4) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C
907 (CHead c1 (Bind Void) u0) (CHead d2 (Flat f) u3)))) (\lambda (d2: C).(\lambda
908 (_: T).(csuba g d2 d1)))) H5))))))))))) (\lambda (c1: C).(\lambda (c2:
909 C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c2 (CHead d1 (Flat f)
910 u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2
911 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2
912 d1))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g
913 a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C
914 (CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind C
915 (CHead c2 (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _)
916 \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _)
917 \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1)
918 H5) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead
919 c1 (Bind Abst) t) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_:
920 T).(csuba g d2 d1)))) H6)))))))))))) c y H0))) H)))))).
922 lemma csuba_gen_bind_rev:
923 \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall
924 (v1: T).((csuba g c2 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2:
925 B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2)))))
926 (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))))))
928 \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda
929 (v1: T).(\lambda (H: (csuba g c2 (CHead e1 (Bind b1) v1))).(insert_eq C
930 (CHead e1 (Bind b1) v1) (\lambda (c: C).(csuba g c2 c)) (\lambda (_:
931 C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2
932 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_:
933 T).(csuba g e2 e1)))))) (\lambda (y: C).(\lambda (H0: (csuba g c2
934 y)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c0 (CHead e1 (Bind
935 b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2:
936 T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
937 C).(\lambda (_: T).(csuba g e2 e1)))))))) (\lambda (n: nat).(\lambda (H1: (eq
938 C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n)
939 (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _)
940 \Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T
941 (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2
942 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g
943 e2 e1))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csuba g c1
944 c3)).(\lambda (H2: (((eq C c3 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T
945 (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind
946 b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2
947 e1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c3 k u)
948 (CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e
949 with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k
950 u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e:
951 C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0]))
952 (CHead c3 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T
953 (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t)
954 \Rightarrow t])) (CHead c3 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7:
955 (eq K k (Bind b1))).(\lambda (H8: (eq C c3 e1)).(eq_ind_r T v1 (\lambda (t:
956 T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C
957 (CHead c1 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
958 C).(\lambda (_: T).(csuba g e2 e1)))))) (eq_ind_r K (Bind b1) (\lambda (k0:
959 K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C
960 (CHead c1 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2:
961 C).(\lambda (_: T).(csuba g e2 e1)))))) (let H9 \def (eq_ind C c3 (\lambda
962 (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2:
963 B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2)))))
964 (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H2 e1
965 H8) in (let H10 \def (eq_ind C c3 (\lambda (c: C).(csuba g c1 c)) H1 e1 H8)
966 in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq
967 C (CHead c1 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_:
968 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) b1 c1 v1 (refl_equal C
969 (CHead c1 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1:
970 C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c3
971 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2:
972 C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_:
973 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))).(\lambda (b:
974 B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2:
975 T).(\lambda (H4: (eq C (CHead c3 (Bind b) u2) (CHead e1 (Bind b1) v1))).(let
976 H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c3
977 | (CHead c _ _) \Rightarrow c])) (CHead c3 (Bind b) u2) (CHead e1 (Bind b1)
978 v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e with [(CSort
979 _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k with [(Bind b0)
980 \Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c3 (Bind b) u2) (CHead e1
981 (Bind b1) v1) H4) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with
982 [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c3 (Bind b)
983 u2) (CHead e1 (Bind b1) v1) H4) in (\lambda (H8: (eq B b b1)).(\lambda (H9:
984 (eq C c3 e1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0
985 Void))) H3 b1 H8) in (let H11 \def (eq_ind C c3 (\lambda (c: C).((eq C c
986 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2:
987 C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_:
988 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H2 e1 H9) in (let
989 H12 \def (eq_ind C c3 (\lambda (c: C).(csuba g c1 c)) H1 e1 H9) in
990 (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C
991 (CHead c1 (Bind Void) u1) (CHead e2 (Bind b2) v2))))) (\lambda (_:
992 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) Void c1 u1 (refl_equal
993 C (CHead c1 (Bind Void) u1)) H12))))))) H6)) H5))))))))))) (\lambda (c1:
994 C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c3
995 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2:
996 C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_:
997 B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))).(\lambda (t:
998 T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u:
999 T).(\lambda (H4: (arity g c3 u a)).(\lambda (H5: (eq C (CHead c3 (Bind Abbr)
1000 u) (CHead e1 (Bind b1) v1))).(let H6 \def (f_equal C C (\lambda (e: C).(match
1001 e with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3
1002 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def (f_equal C B
1003 (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _)
1004 \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow
1005 Abbr])])) (CHead c3 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H8
1006 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u |
1007 (CHead _ _ t0) \Rightarrow t0])) (CHead c3 (Bind Abbr) u) (CHead e1 (Bind b1)
1008 v1) H5) in (\lambda (H9: (eq B Abbr b1)).(\lambda (H10: (eq C c3 e1)).(let
1009 H11 \def (eq_ind T u (\lambda (t0: T).(arity g c3 t0 a)) H4 v1 H8) in (let
1010 H12 \def (eq_ind C c3 (\lambda (c: C).(arity g c v1 a)) H11 e1 H10) in (let
1011 H13 \def (eq_ind C c3 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to
1012 (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1
1013 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_:
1014 T).(csuba g e2 e1))))))) H2 e1 H10) in (let H14 \def (eq_ind C c3 (\lambda
1015 (c: C).(csuba g c1 c)) H1 e1 H10) in (let H15 \def (eq_ind_r B b1 (\lambda
1016 (b: B).((eq C e1 (CHead e1 (Bind b) v1)) \to (ex2_3 B C T (\lambda (b2:
1017 B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2)))))
1018 (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H13
1019 Abbr H9) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda
1020 (v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda
1021 (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) Abst c1 t
1022 (refl_equal C (CHead c1 (Bind Abst) t)) H14))))))))) H7)) H6)))))))))))) c2 y