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/getl.ma".
19 include "basic_1/csuba/props.ma".
21 include "basic_1/arity/fwd.ma".
23 include "basic_1/csubv/getl.ma".
26 \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1
27 t a) \to (\forall (c2: C).((csuba g c1 c2) \to (arity g c2 t a)))))))
29 \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H:
30 (arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0:
31 A).(\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 a0)))))) (\lambda (c:
32 C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (csuba g c
33 c2)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u:
34 T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr)
35 u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall
36 (c2: C).((csuba g d c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda
37 (H3: (csuba g c c2)).(let H4 \def (csuba_getl_abbr g c d u i H0 c2 H3) in
38 (ex2_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda
39 (d2: C).(csuba g d d2)) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda
40 (H5: (getl i c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (csuba g d
41 x)).(arity_abbr g c2 x u i H5 a0 (H2 x H6))))) H4)))))))))))) (\lambda (c:
42 C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c
43 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc
44 g a0))).(\lambda (H2: ((\forall (c2: C).((csuba g d c2) \to (arity g c2 u
45 (asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c c2)).(let H4 \def
46 (csuba_getl_abst g c d u i H0 c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(getl
47 i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d d2))) (ex4_3 C T
48 A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2
49 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g
50 d d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u (asucc
51 g a1))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2
52 a1))))) (arity g c2 (TLRef i) a0) (\lambda (H5: (ex2 C (\lambda (d2: C).(getl
53 i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d d2)))).(ex2_ind C
54 (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2:
55 C).(csuba g d d2)) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H6:
56 (getl i c2 (CHead x (Bind Abst) u))).(\lambda (H7: (csuba g d x)).(arity_abst
57 g c2 x u i H6 a0 (H2 x H7))))) H5)) (\lambda (H5: (ex4_3 C T A (\lambda (d2:
58 C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2)))))
59 (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d d2)))) (\lambda
60 (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u (asucc g a1)))))
61 (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2
62 a1)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_:
63 A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_:
64 T).(\lambda (_: A).(csuba g d d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda
65 (a1: A).(arity g d u (asucc g a1))))) (\lambda (d2: C).(\lambda (u2:
66 T).(\lambda (a1: A).(arity g d2 u2 a1)))) (arity g c2 (TLRef i) a0) (\lambda
67 (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H6: (getl i c2 (CHead x0
68 (Bind Abbr) x1))).(\lambda (_: (csuba g d x0)).(\lambda (H8: (arity g d u
69 (asucc g x2))).(\lambda (H9: (arity g x0 x1 x2)).(arity_repl g c2 (TLRef i)
70 x2 (arity_abbr g c2 x0 x1 i H6 x2 H9) a0 (asucc_inj g x2 a0 (arity_mono g d u
71 (asucc g x2) H8 (asucc g a0) H1)))))))))) H5)) H4)))))))))))) (\lambda (b:
72 B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u:
73 T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall
74 (c2: C).((csuba g c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda
75 (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4:
76 ((\forall (c2: C).((csuba g (CHead c (Bind b) u) c2) \to (arity g c2 t0
77 a2))))).(\lambda (c2: C).(\lambda (H5: (csuba g c c2)).(arity_bind g b H0 c2
78 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) (csuba_head g c c2 H5 (Bind
79 b) u)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1:
80 A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2:
81 C).((csuba g c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda (t0:
82 T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0
83 a2)).(\lambda (H3: ((\forall (c2: C).((csuba g (CHead c (Bind Abst) u) c2)
84 \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (csuba g c
85 c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u)
86 (csuba_head g c c2 H4 (Bind Abst) u)))))))))))))) (\lambda (c: C).(\lambda
87 (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1:
88 ((\forall (c2: C).((csuba g c c2) \to (arity g c2 u a1))))).(\lambda (t0:
89 T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3:
90 ((\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 (AHead a1
91 a2)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c c2)).(arity_appl g c2 u a1
92 (H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u:
93 T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1:
94 ((\forall (c2: C).((csuba g c c2) \to (arity g c2 u (asucc g
95 a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3:
96 ((\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 a0))))).(\lambda (c2:
97 C).(\lambda (H4: (csuba g c c2)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2
98 H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_:
99 (arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c c2) \to (arity
100 g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2:
101 C).(\lambda (H3: (csuba g c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2
102 H2)))))))))) c1 t a H))))).
104 lemma csuba_arity_rev:
105 \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1
106 t a) \to (\forall (c2: C).((csuba g c2 c1) \to ((csubv c2 c1) \to (arity g c2
109 \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H:
110 (arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0:
111 A).(\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 t0
112 a0))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_:
113 (csuba g c2 c)).(\lambda (_: (csubv c2 c)).(arity_sort g c2 n)))))) (\lambda
114 (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl
115 i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u
116 a0)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 d) \to ((csubv c2 d) \to
117 (arity g c2 u a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2
118 c)).(\lambda (H4: (csubv c2 c)).(let H_x \def (csuba_getl_abbr_rev g c d u i
119 H0 c2 H3) in (let H5 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(getl i c2
120 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d))) (ex4_3 C T A
121 (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind
122 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2
123 d)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2
124 (asucc g a1))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d
125 u a1))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2
126 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d)))) (arity
127 g c2 (TLRef i) a0) (\lambda (H6: (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2
128 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2:
129 C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d))
130 (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H7: (getl i c2 (CHead x
131 (Bind Abbr) u))).(\lambda (H8: (csuba g x d)).(let H_x0 \def (csubv_getl_conf
132 c2 c H4 Abbr x u i H7) in (let H9 \def H_x0 in (ex2_3_ind B C T (\lambda (_:
133 B).(\lambda (d2: C).(\lambda (_: T).(csubv x d2)))) (\lambda (b2: B).(\lambda
134 (d2: C).(\lambda (v2: T).(getl i c (CHead d2 (Bind b2) v2))))) (arity g c2
135 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda
136 (H10: (csubv x x1)).(\lambda (H11: (getl i c (CHead x1 (Bind x0) x2))).(let
137 H12 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0
138 (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x1
139 (Bind x0) x2) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e
140 with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d
141 (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) i
142 H0 (CHead x1 (Bind x0) x2) H11)) in ((let H14 \def (f_equal C B (\lambda (e:
143 C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow
144 (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead
145 d (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u)
146 i H0 (CHead x1 (Bind x0) x2) H11)) in ((let H15 \def (f_equal C T (\lambda
147 (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow
148 t0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d
149 (Bind Abbr) u) i H0 (CHead x1 (Bind x0) x2) H11)) in (\lambda (H16: (eq B
150 Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda
151 (t0: T).(getl i c (CHead x1 (Bind x0) t0))) H12 u H15) in (let H19 \def
152 (eq_ind_r C x1 (\lambda (c0: C).(getl i c (CHead c0 (Bind x0) u))) H18 d H17)
153 in (let H20 \def (eq_ind_r C x1 (\lambda (c0: C).(csubv x c0)) H10 d H17) in
154 (let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c (CHead d (Bind b) u)))
155 H19 Abbr H16) in (arity_abbr g c2 x u i H7 a0 (H2 x H8 H20))))))))) H14))
156 H13)))))))) H9)))))) H6)) (\lambda (H6: (ex4_3 C T A (\lambda (d2:
157 C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2)))))
158 (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda
159 (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1)))))
160 (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u
161 a1)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_:
162 A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_:
163 T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: C).(\lambda (u2:
164 T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda (_: C).(\lambda
165 (_: T).(\lambda (a1: A).(arity g d u a1)))) (arity g c2 (TLRef i) a0)
166 (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H7: (getl i c2
167 (CHead x0 (Bind Abst) x1))).(\lambda (_: (csuba g x0 d)).(\lambda (H9: (arity
168 g x0 x1 (asucc g x2))).(\lambda (H10: (arity g d u x2)).(arity_repl g c2
169 (TLRef i) x2 (arity_abst g c2 x0 x1 i H7 x2 H9) a0 (arity_mono g d u x2 H10
170 a0 H1))))))))) H6)) (\lambda (H6: (ex2_2 C T (\lambda (d2: C).(\lambda (u2:
171 T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_:
172 T).(csuba g d2 d))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl
173 i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
174 d2 d))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda
175 (H7: (getl i c2 (CHead x0 (Bind Void) x1))).(\lambda (_: (csuba g x0 d)).(let
176 H_x0 \def (csubv_getl_conf_void c2 c H4 x0 x1 i H7) in (let H9 \def H_x0 in
177 (ex2_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubv x0 d2))) (\lambda (d2:
178 C).(\lambda (v2: T).(getl i c (CHead d2 (Bind Void) v2)))) (arity g c2 (TLRef
179 i) a0) (\lambda (x2: C).(\lambda (x3: T).(\lambda (_: (csubv x0 x2)).(\lambda
180 (H11: (getl i c (CHead x2 (Bind Void) x3))).(let H12 \def (eq_ind C (CHead d
181 (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x2 (Bind Void) x3)
182 (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x2 (Bind Void) x3) H11)) in
183 (let H13 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee
184 with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with
185 [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow
186 False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead
187 x2 (Bind Void) x3) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x2 (Bind
188 Void) x3) H11)) in (False_ind (arity g c2 (TLRef i) a0) H13))))))) H9)))))))
189 H6)) H5)))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u:
190 T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst)
191 u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2:
192 ((\forall (c2: C).((csuba g c2 d) \to ((csubv c2 d) \to (arity g c2 u (asucc
193 g a0))))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(\lambda (H4:
194 (csubv c2 c)).(let H_x \def (csuba_getl_abst_rev g c d u i H0 c2 H3) in (let
195 H5 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind
196 Abst) u))) (\lambda (d2: C).(csuba g d2 d))) (ex2_2 C T (\lambda (d2:
197 C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2:
198 C).(\lambda (_: T).(csuba g d2 d)))) (arity g c2 (TLRef i) a0) (\lambda (H6:
199 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2:
200 C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind
201 Abst) u))) (\lambda (d2: C).(csuba g d2 d)) (arity g c2 (TLRef i) a0)
202 (\lambda (x: C).(\lambda (H7: (getl i c2 (CHead x (Bind Abst) u))).(\lambda
203 (H8: (csuba g x d)).(let H_x0 \def (csubv_getl_conf c2 c H4 Abst x u i H7) in
204 (let H9 \def H_x0 in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2:
205 C).(\lambda (_: T).(csubv x d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda
206 (v2: T).(getl i c (CHead d2 (Bind b2) v2))))) (arity g c2 (TLRef i) a0)
207 (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H10: (csubv x
208 x1)).(\lambda (H11: (getl i c (CHead x1 (Bind x0) x2))).(let H12 \def (eq_ind
209 C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x1 (Bind
210 x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x1 (Bind x0) x2)
211 H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _)
212 \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u)
213 (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x1
214 (Bind x0) x2) H11)) in ((let H14 \def (f_equal C B (\lambda (e: C).(match e
215 with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with
216 [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst)
217 u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead
218 x1 (Bind x0) x2) H11)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match
219 e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d
220 (Bind Abst) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i
221 H0 (CHead x1 (Bind x0) x2) H11)) in (\lambda (H16: (eq B Abst x0)).(\lambda
222 (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t0: T).(getl i c
223 (CHead x1 (Bind x0) t0))) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda
224 (c0: C).(getl i c (CHead c0 (Bind x0) u))) H18 d H17) in (let H20 \def
225 (eq_ind_r C x1 (\lambda (c0: C).(csubv x c0)) H10 d H17) in (let H21 \def
226 (eq_ind_r B x0 (\lambda (b: B).(getl i c (CHead d (Bind b) u))) H19 Abst H16)
227 in (arity_abst g c2 x u i H7 a0 (H2 x H8 H20))))))))) H14)) H13))))))))
228 H9)))))) H6)) (\lambda (H6: (ex2_2 C T (\lambda (d2: C).(\lambda (u2:
229 T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_:
230 T).(csuba g d2 d))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl
231 i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g
232 d2 d))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda
233 (H7: (getl i c2 (CHead x0 (Bind Void) x1))).(\lambda (_: (csuba g x0 d)).(let
234 H_x0 \def (csubv_getl_conf_void c2 c H4 x0 x1 i H7) in (let H9 \def H_x0 in
235 (ex2_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubv x0 d2))) (\lambda (d2:
236 C).(\lambda (v2: T).(getl i c (CHead d2 (Bind Void) v2)))) (arity g c2 (TLRef
237 i) a0) (\lambda (x2: C).(\lambda (x3: T).(\lambda (_: (csubv x0 x2)).(\lambda
238 (H11: (getl i c (CHead x2 (Bind Void) x3))).(let H12 \def (eq_ind C (CHead d
239 (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x2 (Bind Void) x3)
240 (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x2 (Bind Void) x3) H11)) in
241 (let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee
242 with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with
243 [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst
244 \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])]))
245 I (CHead x2 (Bind Void) x3) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead
246 x2 (Bind Void) x3) H11)) in (False_ind (arity g c2 (TLRef i) a0) H13)))))))
247 H9))))))) H6)) H5)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b
248 Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity
249 g c u a1)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c)
250 \to (arity g c2 u a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_:
251 (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((csuba
252 g c2 (CHead c (Bind b) u)) \to ((csubv c2 (CHead c (Bind b) u)) \to (arity g
253 c2 t0 a2)))))).(\lambda (c2: C).(\lambda (H5: (csuba g c2 c)).(\lambda (H6:
254 (csubv c2 c)).(arity_bind g b H0 c2 u a1 (H2 c2 H5 H6) t0 a2 (H4 (CHead c2
255 (Bind b) u) (csuba_head g c2 c H5 (Bind b) u) (csubv_bind_same c2 c H6 b u
256 u))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda
257 (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((csuba g c2
258 c) \to ((csubv c2 c) \to (arity g c2 u (asucc g a1))))))).(\lambda (t0:
259 T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0
260 a2)).(\lambda (H3: ((\forall (c2: C).((csuba g c2 (CHead c (Bind Abst) u))
261 \to ((csubv c2 (CHead c (Bind Abst) u)) \to (arity g c2 t0 a2)))))).(\lambda
262 (c2: C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv c2 c)).(arity_head
263 g c2 u a1 (H1 c2 H4 H5) t0 a2 (H3 (CHead c2 (Bind Abst) u) (csuba_head g c2 c
264 H4 (Bind Abst) u) (csubv_bind_same c2 c H5 Abst u u))))))))))))))) (\lambda
265 (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u
266 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to
267 (arity g c2 u a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity
268 g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((csuba g c2 c) \to
269 ((csubv c2 c) \to (arity g c2 t0 (AHead a1 a2))))))).(\lambda (c2:
270 C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv c2 c)).(arity_appl g c2
271 u a1 (H1 c2 H4 H5) t0 a2 (H3 c2 H4 H5)))))))))))))) (\lambda (c: C).(\lambda
272 (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda
273 (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 u
274 (asucc g a0))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda
275 (H3: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 t0
276 a0)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv
277 c2 c)).(arity_cast g c2 u a0 (H1 c2 H4 H5) t0 (H3 c2 H4 H5)))))))))))))
278 (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c t0
279 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to
280 (arity g c2 t0 a1)))))).(\lambda (a2: A).(\lambda (H2: (leq g a1
281 a2)).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(\lambda (H4: (csubv c2
282 c)).(arity_repl g c2 t0 a1 (H1 c2 H3 H4) a2 H2))))))))))) c1 t a H))))).
284 theorem arity_appls_appl:
285 \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (a1: A).((arity g c
286 v a1) \to (\forall (u: T).((arity g c u (asucc g a1)) \to (\forall (t:
287 T).(\forall (vs: TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) vs
288 (THead (Bind Abbr) v t)) a2) \to (arity g c (THeads (Flat Appl) vs (THead
289 (Flat Appl) v (THead (Bind Abst) u t))) a2)))))))))))
291 \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (a1: A).(\lambda (H:
292 (arity g c v a1)).(\lambda (u: T).(\lambda (H0: (arity g c u (asucc g
293 a1))).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0:
294 TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) t0 (THead (Bind Abbr)
295 v t)) a2) \to (arity g c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead
296 (Bind Abst) u t))) a2)))) (\lambda (a2: A).(\lambda (H1: (arity g c (THead
297 (Bind Abbr) v t) a2)).(let H_x \def (arity_gen_bind Abbr not_abbr_abst g c v
298 t a2 H1) in (let H2 \def H_x in (ex2_ind A (\lambda (a3: A).(arity g c v a3))
299 (\lambda (_: A).(arity g (CHead c (Bind Abbr) v) t a2)) (arity g c (THead
300 (Flat Appl) v (THead (Bind Abst) u t)) a2) (\lambda (x: A).(\lambda (_:
301 (arity g c v x)).(\lambda (H4: (arity g (CHead c (Bind Abbr) v) t
302 a2)).(arity_appl g c v a1 H (THead (Bind Abst) u t) a2 (arity_head g c u a1
303 H0 t a2 (csuba_arity_rev g (CHead c (Bind Abbr) v) t a2 H4 (CHead c (Bind
304 Abst) u) (csuba_abst g c c (csuba_refl g c) u a1 H0 v H) (csubv_bind c c
305 (csubv_refl c) Abst not_abst_void Abbr u v))))))) H2))))) (\lambda (t0:
306 T).(\lambda (t1: TList).(\lambda (H1: ((\forall (a2: A).((arity g c (THeads
307 (Flat Appl) t1 (THead (Bind Abbr) v t)) a2) \to (arity g c (THeads (Flat
308 Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u t))) a2))))).(\lambda (a2:
309 A).(\lambda (H2: (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1
310 (THead (Bind Abbr) v t))) a2)).(let H3 \def (arity_gen_appl g c t0 (THeads
311 (Flat Appl) t1 (THead (Bind Abbr) v t)) a2 H2) in (ex2_ind A (\lambda (a3:
312 A).(arity g c t0 a3)) (\lambda (a3: A).(arity g c (THeads (Flat Appl) t1
313 (THead (Bind Abbr) v t)) (AHead a3 a2))) (arity g c (THead (Flat Appl) t0
314 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u t)))) a2)
315 (\lambda (x: A).(\lambda (H4: (arity g c t0 x)).(\lambda (H5: (arity g c
316 (THeads (Flat Appl) t1 (THead (Bind Abbr) v t)) (AHead x a2))).(arity_appl g
317 c t0 x H4 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u
318 t))) a2 (H1 (AHead x a2) H5))))) H3))))))) vs))))))))).