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_1A/csubst1/props.ma".
19 include "basic_1A/csubst0/getl.ma".
21 include "basic_1A/subst1/props.ma".
23 include "basic_1A/drop/props.ma".
25 lemma csubst1_getl_ge:
26 \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall
27 (c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c1
28 e) \to (getl n c2 e)))))))))
30 \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1:
31 C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1
32 c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c1 e) \to
33 (getl n c e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda
34 (c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2:
35 (getl n c1 e)).(csubst0_getl_ge i n H c1 c3 v H1 e H2))))) c2 H0))))))).
37 lemma csubst1_getl_lt:
38 \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall
39 (c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e1: C).((getl n c1
40 e1) \to (ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2:
41 C).(getl n c2 e2)))))))))))
43 \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1:
44 C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1
45 c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e1: C).((getl n c1 e1) \to
46 (ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: C).(getl
47 n c e2)))))) (\lambda (e1: C).(\lambda (H1: (getl n c1 e1)).(eq_ind_r nat (S
48 (minus i (S n))) (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1
49 e2)) (\lambda (e2: C).(getl n c1 e2)))) (ex_intro2 C (\lambda (e2:
50 C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c1 e2)) e1
51 (csubst1_refl (S (minus i (S n))) v e1) H1) (minus i n) (minus_x_Sy i n H))))
52 (\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e1: C).(\lambda
53 (H2: (getl n c1 e1)).(eq_ind_r nat (S (minus i (S n))) (\lambda (n0:
54 nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 e2)) (\lambda (e2: C).(getl n
55 c3 e2)))) (let H3 \def (csubst0_getl_lt i n H c1 c3 v H1 e1 H2) in (or4_ind
56 (getl n c3 e1) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u:
57 T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b:
58 B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0
59 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w:
60 T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b:
61 B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind
62 b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u:
63 T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: B).(\lambda (e2:
64 C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3))))))
65 (ex4_5 B C C T T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda
66 (u: T).(\lambda (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b:
67 B).(\lambda (_: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n
68 c3 (CHead e3 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_:
69 C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))))
70 (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda
71 (_: T).(csubst0 (minus i (S n)) v e2 e3))))))) (ex2 C (\lambda (e2:
72 C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2)))
73 (\lambda (H4: (getl n c3 e1)).(ex_intro2 C (\lambda (e2: C).(csubst1 (S
74 (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2)) e1 (csubst1_refl
75 (S (minus i (S n))) v e1) H4)) (\lambda (H4: (ex3_4 B C T T (\lambda (b:
76 B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind
77 b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w:
78 T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_:
79 C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u
80 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u:
81 T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b:
82 B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0
83 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w:
84 T).(subst0 (minus i (S n)) v u w))))) (ex2 C (\lambda (e2: C).(csubst1 (S
85 (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0:
86 B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H5: (eq C e1
87 (CHead x1 (Bind x0) x2))).(\lambda (H6: (getl n c3 (CHead x1 (Bind x0)
88 x3))).(\lambda (H7: (subst0 (minus i (S n)) v x2 x3)).(eq_ind_r C (CHead x1
89 (Bind x0) x2) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S
90 n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2:
91 C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x2) e2)) (\lambda (e2:
92 C).(getl n c3 e2)) (CHead x1 (Bind x0) x3) (csubst1_sing (S (minus i (S n)))
93 v (CHead x1 (Bind x0) x2) (CHead x1 (Bind x0) x3) (csubst0_snd_bind x0 (minus
94 i (S n)) v x2 x3 H7 x1)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex3_4 B C C T
95 (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1
96 (CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3:
97 C).(\lambda (u: T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_:
98 B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n))
99 v e2 e3))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda
100 (_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind b) u)))))) (\lambda (b:
101 B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: T).(getl n c3 (CHead e3
102 (Bind b) u)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda
103 (_: T).(csubst0 (minus i (S n)) v e2 e3))))) (ex2 C (\lambda (e2: C).(csubst1
104 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0:
105 B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H5: (eq C e1
106 (CHead x1 (Bind x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0)
107 x3))).(\lambda (H7: (csubst0 (minus i (S n)) v x1 x2)).(eq_ind_r C (CHead x1
108 (Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S
109 n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2:
110 C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x3) e2)) (\lambda (e2:
111 C).(getl n c3 e2)) (CHead x2 (Bind x0) x3) (csubst1_sing (S (minus i (S n)))
112 v (CHead x1 (Bind x0) x3) (CHead x2 (Bind x0) x3) (csubst0_fst_bind x0 (minus
113 i (S n)) x1 x2 v H7 x3)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex4_5 B C C T
114 T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda
115 (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: B).(\lambda (_:
116 C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e3
117 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda
118 (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_:
119 B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (_: T).(csubst0
120 (minus i (S n)) v e2 e3)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda
121 (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e2
122 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda
123 (_: T).(\lambda (w: T).(getl n c3 (CHead e3 (Bind b) w))))))) (\lambda (_:
124 B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0
125 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3:
126 C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3))))))
127 (ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2:
128 C).(getl n c3 e2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2:
129 C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H5: (eq C e1 (CHead x1 (Bind
130 x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H7:
131 (subst0 (minus i (S n)) v x3 x4)).(\lambda (H8: (csubst0 (minus i (S n)) v x1
132 x2)).(eq_ind_r C (CHead x1 (Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2:
133 C).(csubst1 (S (minus i (S n))) v c e2)) (\lambda (e2: C).(getl n c3 e2))))
134 (ex_intro2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind
135 x0) x3) e2)) (\lambda (e2: C).(getl n c3 e2)) (CHead x2 (Bind x0) x4)
136 (csubst1_sing (S (minus i (S n))) v (CHead x1 (Bind x0) x3) (CHead x2 (Bind
137 x0) x4) (csubst0_both_bind x0 (minus i (S n)) v x3 x4 H7 x1 x2 H8)) H6) e1
138 H5)))))))))) H4)) H3)) (minus i n) (minus_x_Sy i n H)))))) c2 H0))))))).
140 lemma csubst1_getl_ge_back:
141 \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall
142 (c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c2
143 e) \to (getl n c1 e)))))))))
145 \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1:
146 C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1
147 c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c e) \to
148 (getl n c1 e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda
149 (c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2:
150 (getl n c3 e)).(csubst0_getl_ge_back i n H c1 c3 v H1 e H2))))) c2 H0))))))).
153 \forall (d: nat).(\forall (c: C).(\forall (e: C).(\forall (u: T).((getl d c
154 (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_:
155 C).(csubst1 d u c a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) d a0
158 \lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (c: C).(\forall (e:
159 C).(\forall (u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C
160 (\lambda (a0: C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0:
161 C).(\lambda (a: C).(drop (S O) n a0 a))))))))) (\lambda (c: C).(C_ind
162 (\lambda (c0: C).(\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind
163 Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0
164 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a)))))))) (\lambda
165 (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (getl O (CSort n)
166 (CHead e (Bind Abbr) u))).(getl_gen_sort n O (CHead e (Bind Abbr) u) H (ex2_2
167 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CSort n) a0))) (\lambda
168 (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (c0: C).(\lambda
169 (H: ((\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind Abbr) u)) \to
170 (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda
171 (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))).(\lambda (k: K).(K_ind
172 (\lambda (k0: K).(\forall (t: T).(\forall (e: C).(\forall (u: T).((getl O
173 (CHead c0 k0 t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0:
174 C).(\lambda (_: C).(csubst1 O u (CHead c0 k0 t) a0))) (\lambda (a0:
175 C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (b: B).(\lambda (t:
176 T).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl O (CHead c0 (Bind b)
177 t) (CHead e (Bind Abbr) u))).(let H1 \def (f_equal C C (\lambda (e0:
178 C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1]))
179 (CHead e (Bind Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e
180 (Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u)
181 H0))) in ((let H2 \def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort
182 _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0)
183 \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead e (Bind Abbr) u)
184 (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t
185 (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in ((let H3
186 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u |
187 (CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind Abbr) u) (CHead c0 (Bind b)
188 t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind
189 b) t) (CHead e (Bind Abbr) u) H0))) in (\lambda (H4: (eq B Abbr b)).(\lambda
190 (_: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(ex2_2 C C (\lambda (a0:
191 C).(\lambda (_: C).(csubst1 O t0 (CHead c0 (Bind b) t) a0))) (\lambda (a0:
192 C).(\lambda (a: C).(drop (S O) O a0 a))))) (eq_ind B Abbr (\lambda (b0:
193 B).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t (CHead c0 (Bind
194 b0) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a)))))
195 (ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t (CHead c0
196 (Bind Abbr) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a)))
197 (CHead c0 (Bind Abbr) t) c0 (csubst1_refl O t (CHead c0 (Bind Abbr) t))
198 (drop_drop (Bind Abbr) O c0 c0 (drop_refl c0) t)) b H4) u H3)))) H2))
199 H1))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (e: C).(\lambda (u:
200 T).(\lambda (H0: (getl O (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u))).(let
201 H_x \def (subst1_ex u t O) in (let H1 \def H_x in (ex_ind T (\lambda (t2:
202 T).(subst1 O u t (lift (S O) O t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_:
203 C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a:
204 C).(drop (S O) O a0 a)))) (\lambda (x: T).(\lambda (H2: (subst1 O u t (lift
205 (S O) O x))).(let H3 \def (H e u (getl_intro O c0 (CHead e (Bind Abbr) u) c0
206 (drop_refl c0) (clear_gen_flat f c0 (CHead e (Bind Abbr) u) t (getl_gen_O
207 (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u) H0)))) in (ex2_2_ind C C
208 (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda (a0:
209 C).(\lambda (a: C).(drop (S O) O a0 a))) (ex2_2 C C (\lambda (a0: C).(\lambda
210 (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a:
211 C).(drop (S O) O a0 a)))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H4:
212 (csubst1 O u c0 x0)).(\lambda (H5: (drop (S O) O x0 x1)).(ex2_2_intro C C
213 (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0)))
214 (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) (CHead x0 (Flat f)
215 (lift (S O) O x)) x1 (csubst1_flat f O u t (lift (S O) O x) H2 c0 x0 H4)
216 (drop_drop (Flat f) O x0 x1 H5 (lift (S O) O x))))))) H3)))) H1)))))))) k))))
217 c)) (\lambda (n: nat).(\lambda (H: ((\forall (c: C).(\forall (e: C).(\forall
218 (u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0:
219 C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: C).(\lambda (a:
220 C).(drop (S O) n a0 a)))))))))).(\lambda (c: C).(C_ind (\lambda (c0:
221 C).(\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead e (Bind Abbr) u))
222 \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0)))
223 (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))) (\lambda (n0:
224 nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl (S n) (CSort n0)
225 (CHead e (Bind Abbr) u))).(getl_gen_sort n0 (S n) (CHead e (Bind Abbr) u) H0
226 (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CSort n0) a0)))
227 (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) (\lambda
228 (c0: C).(\lambda (H0: ((\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead
229 e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S
230 n) u c0 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0
231 a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall
232 (e: C).(\forall (u: T).((getl (S n) (CHead c0 k0 t) (CHead e (Bind Abbr) u))
233 \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 k0
234 t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))))
235 (\lambda (b: B).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (H1:
236 (getl (S n) (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u))).(let H_x \def
237 (subst1_ex u t n) in (let H2 \def H_x in (ex_ind T (\lambda (t2: T).(subst1 n
238 u t (lift (S O) n t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1
239 (S n) u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S
240 O) (S n) a0 a)))) (\lambda (x: T).(\lambda (H3: (subst1 n u t (lift (S O) n
241 x))).(let H4 \def (H c0 e u (getl_gen_S (Bind b) c0 (CHead e (Bind Abbr) u) t
242 n H1)) in (ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 n u c0
243 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) n a0 a))) (ex2_2 C C
244 (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0)))
245 (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0:
246 C).(\lambda (x1: C).(\lambda (H5: (csubst1 n u c0 x0)).(\lambda (H6: (drop (S
247 O) n x0 x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n)
248 u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S
249 n) a0 a))) (CHead x0 (Bind b) (lift (S O) n x)) (CHead x1 (Bind b) x)
250 (csubst1_bind b n u t (lift (S O) n x) H3 c0 x0 H5) (drop_skip_bind (S O) n
251 x0 x1 H6 b x)))))) H4)))) H2)))))))) (\lambda (f: F).(\lambda (t: T).(\lambda
252 (e: C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Flat f) t) (CHead
253 e (Bind Abbr) u))).(let H_x \def (subst1_ex u t (S n)) in (let H2 \def H_x in
254 (ex_ind T (\lambda (t2: T).(subst1 (S n) u t (lift (S O) (S n) t2))) (ex2_2 C
255 C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t)
256 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda
257 (x: T).(\lambda (H3: (subst1 (S n) u t (lift (S O) (S n) x))).(let H4 \def
258 (H0 e u (getl_gen_S (Flat f) c0 (CHead e (Bind Abbr) u) t n H1)) in
259 (ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0)))
260 (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (ex2_2 C C
261 (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0)))
262 (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0:
263 C).(\lambda (x1: C).(\lambda (H5: (csubst1 (S n) u c0 x0)).(\lambda (H6:
264 (drop (S O) (S n) x0 x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_:
265 C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a:
266 C).(drop (S O) (S n) a0 a))) (CHead x0 (Flat f) (lift (S O) (S n) x)) (CHead
267 x1 (Flat f) x) (csubst1_flat f (S n) u t (lift (S O) (S n) x) H3 c0 x0 H5)
268 (drop_skip_flat (S O) n x0 x1 H6 f x)))))) H4)))) H2)))))))) k)))) c)))) d).