-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatita-basics-lists-list.agda
518 lines (333 loc) · 309 KB
/
matita-basics-lists-list.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
open import Agda.Primitive
open import matita-basics-relations
open import matita-basics-logic
open import matita-basics-types
open import matita-basics-bool
open import matita-arithmetics-nat
data list (l1-v : Level) (A-v : Set l1-v) : Set l1-v where
nil' : list l1-v A-v
cons' : (X---v : A-v) -> (X--1-v : list l1-v A-v) -> list l1-v A-v
nil : (l1-v : Level) -> (A-v : Set l1-v) -> list l1-v A-v
nil _ _ = nil'
cons : (l4-v : Level) -> (A-v : Set l4-v) -> (X---v : A-v) -> (X--1-v : list l4-v A-v) -> list l4-v A-v
cons _ _ = cons'
match-list : (l8-v : Level) -> (X-A-v : Set l8-v) -> (return-sort-v : Level) -> (return-type-v : (z-v : list l8-v X-A-v) -> Set return-sort-v) -> (case-nil-v : return-type-v (nil l8-v X-A-v)) -> (case-cons-v : (X---v : X-A-v) -> (X--1-v : list l8-v X-A-v) -> return-type-v (cons l8-v X-A-v X---v X--1-v)) -> (z-v : list l8-v X-A-v) -> return-type-v z-v
match-list _ _ _ _ casenil casecons nil' = casenil
match-list _ _ _ _ casenil casecons (cons' x1 x2) = casecons x1 x2
list-ind : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-716-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-718-v : X-A-v) -> (x-717-v : list l13-v X-A-v) -> (X-x-720-v : Q--v x-717-v) -> Q--v (cons l13-v X-A-v x-718-v x-717-v)) -> (x-716-v : list l13-v X-A-v) -> Q--v x-716-v
list-ind _ _ _ _ casenil casecons nil' = casenil
list-ind A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-rect-Type5 : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-721-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-723-v : X-A-v) -> (x-722-v : list l13-v X-A-v) -> (X-x-725-v : Q--v x-722-v) -> Q--v (cons l13-v X-A-v x-723-v x-722-v)) -> (x-721-v : list l13-v X-A-v) -> Q--v x-721-v
list-rect-Type5 _ _ _ _ casenil casecons nil' = casenil
list-rect-Type5 A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-rect-Type4 : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-721-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-723-v : X-A-v) -> (x-722-v : list l13-v X-A-v) -> (X-x-725-v : Q--v x-722-v) -> Q--v (cons l13-v X-A-v x-723-v x-722-v)) -> (x-721-v : list l13-v X-A-v) -> Q--v x-721-v
list-rect-Type4 _ _ _ _ casenil casecons nil' = casenil
list-rect-Type4 A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-rect-Type3 : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-721-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-723-v : X-A-v) -> (x-722-v : list l13-v X-A-v) -> (X-x-725-v : Q--v x-722-v) -> Q--v (cons l13-v X-A-v x-723-v x-722-v)) -> (x-721-v : list l13-v X-A-v) -> Q--v x-721-v
list-rect-Type3 _ _ _ _ casenil casecons nil' = casenil
list-rect-Type3 A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-rect-Type2 : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-721-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-723-v : X-A-v) -> (x-722-v : list l13-v X-A-v) -> (X-x-725-v : Q--v x-722-v) -> Q--v (cons l13-v X-A-v x-723-v x-722-v)) -> (x-721-v : list l13-v X-A-v) -> Q--v x-721-v
list-rect-Type2 _ _ _ _ casenil casecons nil' = casenil
list-rect-Type2 A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-rect-Type1 : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-721-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-723-v : X-A-v) -> (x-722-v : list l13-v X-A-v) -> (X-x-725-v : Q--v x-722-v) -> Q--v (cons l13-v X-A-v x-723-v x-722-v)) -> (x-721-v : list l13-v X-A-v) -> Q--v x-721-v
list-rect-Type1 _ _ _ _ casenil casecons nil' = casenil
list-rect-Type1 A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-rect-Type0 : (l13-v l10-v : Level) -> (X-A-v : Set l13-v) -> (Q--v : (X-x-721-v : list l13-v X-A-v) -> Set l10-v) -> (X-H-nil-v : Q--v (nil l13-v X-A-v)) -> (X-H-cons-v : (x-723-v : X-A-v) -> (x-722-v : list l13-v X-A-v) -> (X-x-725-v : Q--v x-722-v) -> Q--v (cons l13-v X-A-v x-723-v x-722-v)) -> (x-721-v : list l13-v X-A-v) -> Q--v x-721-v
list-rect-Type0 _ _ _ _ casenil casecons nil' = casenil
list-rect-Type0 A1 A2 A3 A4 casenil casecons (cons' x1 x2) = casecons x1 x2 (list-ind A1 A2 A3 A4 casenil casecons x2)
list-inv-ind : (l37 l32 : Level) -> (x1 : Set l37) -> (Hterm : list l37 x1) -> (P : (X-z1302 : list l37 x1) -> Set l32) -> (X-H1 : (X-z1303 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> (X-H2 : (x-718 : x1) -> (x-717 : list l37 x1) -> (X-x-720 : (X-z1303 : eq l37 (list l37 x1) Hterm x-717) -> P x-717) -> (X-z1303 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-718 x-717)) -> P (cons l37 x1 x-718 x-717)) -> P Hterm
list-inv-ind = λ (l37 l32 : Level) -> λ (x1 : Set l37) -> λ (Hterm : list l37 x1) -> λ (P : (X-z1302 : list l37 x1) -> Set l32) -> λ (H1 : (X-z1303 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> λ (H2 : (x-718 : x1) -> (x-717 : list l37 x1) -> (X-x-720 : (X-z1303 : eq l37 (list l37 x1) Hterm x-717) -> P x-717) -> (X-z1303 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-718 x-717)) -> P (cons l37 x1 x-718 x-717)) -> list-ind l37 (l37 ⊔ l32) x1 (λ (X-x-716 : list l37 x1) -> (X-z1303 : eq l37 (list l37 x1) Hterm X-x-716) -> P X-x-716) H1 H2 Hterm (refl l37 (list l37 x1) Hterm)
list-inv-rect-Type4 : (l37 l32 : Level) -> (x1 : Set l37) -> (Hterm : list l37 x1) -> (P : (X-z1308 : list l37 x1) -> Set l32) -> (X-H1 : (X-z1309 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> (X-H2 : (x-723 : x1) -> (x-722 : list l37 x1) -> (X-x-725 : (X-z1309 : eq l37 (list l37 x1) Hterm x-722) -> P x-722) -> (X-z1309 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-723 x-722)) -> P (cons l37 x1 x-723 x-722)) -> P Hterm
list-inv-rect-Type4 = λ (l37 l32 : Level) -> λ (x1 : Set l37) -> λ (Hterm : list l37 x1) -> λ (P : (X-z1308 : list l37 x1) -> Set l32) -> λ (H1 : (X-z1309 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> λ (H2 : (x-723 : x1) -> (x-722 : list l37 x1) -> (X-x-725 : (X-z1309 : eq l37 (list l37 x1) Hterm x-722) -> P x-722) -> (X-z1309 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-723 x-722)) -> P (cons l37 x1 x-723 x-722)) -> list-rect-Type4 l37 (l37 ⊔ l32) x1 (λ (X-x-721 : list l37 x1) -> (X-z1309 : eq l37 (list l37 x1) Hterm X-x-721) -> P X-x-721) H1 H2 Hterm (refl l37 (list l37 x1) Hterm)
list-inv-rect-Type3 : (l37 l32 : Level) -> (x1 : Set l37) -> (Hterm : list l37 x1) -> (P : (X-z1314 : list l37 x1) -> Set l32) -> (X-H1 : (X-z1315 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> (X-H2 : (x-733 : x1) -> (x-732 : list l37 x1) -> (X-x-735 : (X-z1315 : eq l37 (list l37 x1) Hterm x-732) -> P x-732) -> (X-z1315 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-733 x-732)) -> P (cons l37 x1 x-733 x-732)) -> P Hterm
list-inv-rect-Type3 = λ (l37 l32 : Level) -> λ (x1 : Set l37) -> λ (Hterm : list l37 x1) -> λ (P : (X-z1314 : list l37 x1) -> Set l32) -> λ (H1 : (X-z1315 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> λ (H2 : (x-733 : x1) -> (x-732 : list l37 x1) -> (X-x-735 : (X-z1315 : eq l37 (list l37 x1) Hterm x-732) -> P x-732) -> (X-z1315 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-733 x-732)) -> P (cons l37 x1 x-733 x-732)) -> list-rect-Type3 l37 (l37 ⊔ l32) x1 (λ (X-x-731 : list l37 x1) -> (X-z1315 : eq l37 (list l37 x1) Hterm X-x-731) -> P X-x-731) H1 H2 Hterm (refl l37 (list l37 x1) Hterm)
list-inv-rect-Type2 : (l37 l32 : Level) -> (x1 : Set l37) -> (Hterm : list l37 x1) -> (P : (X-z1320 : list l37 x1) -> Set l32) -> (X-H1 : (X-z1321 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> (X-H2 : (x-738 : x1) -> (x-737 : list l37 x1) -> (X-x-740 : (X-z1321 : eq l37 (list l37 x1) Hterm x-737) -> P x-737) -> (X-z1321 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-738 x-737)) -> P (cons l37 x1 x-738 x-737)) -> P Hterm
list-inv-rect-Type2 = λ (l37 l32 : Level) -> λ (x1 : Set l37) -> λ (Hterm : list l37 x1) -> λ (P : (X-z1320 : list l37 x1) -> Set l32) -> λ (H1 : (X-z1321 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> λ (H2 : (x-738 : x1) -> (x-737 : list l37 x1) -> (X-x-740 : (X-z1321 : eq l37 (list l37 x1) Hterm x-737) -> P x-737) -> (X-z1321 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-738 x-737)) -> P (cons l37 x1 x-738 x-737)) -> list-rect-Type2 l37 (l37 ⊔ l32) x1 (λ (X-x-736 : list l37 x1) -> (X-z1321 : eq l37 (list l37 x1) Hterm X-x-736) -> P X-x-736) H1 H2 Hterm (refl l37 (list l37 x1) Hterm)
list-inv-rect-Type1 : (l37 l32 : Level) -> (x1 : Set l37) -> (Hterm : list l37 x1) -> (P : (X-z1326 : list l37 x1) -> Set l32) -> (X-H1 : (X-z1327 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> (X-H2 : (x-743 : x1) -> (x-742 : list l37 x1) -> (X-x-745 : (X-z1327 : eq l37 (list l37 x1) Hterm x-742) -> P x-742) -> (X-z1327 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-743 x-742)) -> P (cons l37 x1 x-743 x-742)) -> P Hterm
list-inv-rect-Type1 = λ (l37 l32 : Level) -> λ (x1 : Set l37) -> λ (Hterm : list l37 x1) -> λ (P : (X-z1326 : list l37 x1) -> Set l32) -> λ (H1 : (X-z1327 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> λ (H2 : (x-743 : x1) -> (x-742 : list l37 x1) -> (X-x-745 : (X-z1327 : eq l37 (list l37 x1) Hterm x-742) -> P x-742) -> (X-z1327 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-743 x-742)) -> P (cons l37 x1 x-743 x-742)) -> list-rect-Type1 l37 (l37 ⊔ l32) x1 (λ (X-x-741 : list l37 x1) -> (X-z1327 : eq l37 (list l37 x1) Hterm X-x-741) -> P X-x-741) H1 H2 Hterm (refl l37 (list l37 x1) Hterm)
list-inv-rect-Type0 : (l37 l32 : Level) -> (x1 : Set l37) -> (Hterm : list l37 x1) -> (P : (X-z1332 : list l37 x1) -> Set l32) -> (X-H1 : (X-z1333 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> (X-H2 : (x-748 : x1) -> (x-747 : list l37 x1) -> (X-x-750 : (X-z1333 : eq l37 (list l37 x1) Hterm x-747) -> P x-747) -> (X-z1333 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-748 x-747)) -> P (cons l37 x1 x-748 x-747)) -> P Hterm
list-inv-rect-Type0 = λ (l37 l32 : Level) -> λ (x1 : Set l37) -> λ (Hterm : list l37 x1) -> λ (P : (X-z1332 : list l37 x1) -> Set l32) -> λ (H1 : (X-z1333 : eq l37 (list l37 x1) Hterm (nil l37 x1)) -> P (nil l37 x1)) -> λ (H2 : (x-748 : x1) -> (x-747 : list l37 x1) -> (X-x-750 : (X-z1333 : eq l37 (list l37 x1) Hterm x-747) -> P x-747) -> (X-z1333 : eq l37 (list l37 x1) Hterm (cons l37 x1 x-748 x-747)) -> P (cons l37 x1 x-748 x-747)) -> list-rect-Type0 l37 (l37 ⊔ l32) x1 (λ (X-x-746 : list l37 x1) -> (X-z1333 : eq l37 (list l37 x1) Hterm X-x-746) -> P X-x-746) H1 H2 Hterm (refl l37 (list l37 x1) Hterm)
list-discr : (l2l222 l293 : Level) -> (a1 : Set ((lsuc lzero) ⊔ (lsuc l2l222))) -> (x : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (y : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (X-e : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) x y) -> match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) (match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) ((P : Set (l2l222 ⊔ l293)) -> (X-z47 : P) -> P) (λ (u0 : a1) -> λ (u1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (P : Set (l2l222 ⊔ l293)) -> P) y) (λ (t0 : a1) -> λ (t1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) ((P : Set (l2l222 ⊔ l293)) -> P) (λ (u0 : a1) -> λ (u1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (P : Set l293) -> (X-z48 : (e0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 (R0 ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0) u0) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) (R1 ((lsuc lzero) ⊔ (lsuc l2l222)) ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0 (λ (x0 : a1) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0 x0) -> list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) t1 u0 e0) u1) -> P) -> P) y) x
list-discr = λ (l2l222 l293 : Level) -> λ (a1 : Set ((lsuc lzero) ⊔ (lsuc l2l222))) -> λ (x : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> λ (y : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> λ (Deq : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) x y) -> eq-rect-Type2 ((lsuc lzero) ⊔ (lsuc l2l222)) ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293))) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) x (λ (x-13 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> λ (X-x-14 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) x x-13) -> match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) (match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) ((P : Set (l2l222 ⊔ l293)) -> (X-z47 : P) -> P) (λ (u0 : a1) -> λ (u1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (P : Set (l2l222 ⊔ l293)) -> P) x-13) (λ (t0 : a1) -> λ (t1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) ((P : Set (l2l222 ⊔ l293)) -> P) (λ (u0 : a1) -> λ (u1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (P : Set l293) -> (X-z48 : (e0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 (R0 ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0) u0) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) (R1 ((lsuc lzero) ⊔ (lsuc l2l222)) ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0 (λ (x0 : a1) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0 x0) -> list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) t1 u0 e0) u1) -> P) -> P) x-13) x) (match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293))) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-0 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) (match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-0 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) ((P : Set (l2l222 ⊔ l293)) -> (X-z47 : P) -> P) (λ (u0 : a1) -> λ (u1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (P : Set (l2l222 ⊔ l293)) -> P) X--) (λ (t0 : a1) -> λ (t1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> match-list ((lsuc lzero) ⊔ (lsuc l2l222)) a1 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l2l222)) ⊔ (lsuc (lsuc l293)))) (λ (X-0 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> Set ((lsuc lzero) ⊔ ((lsuc l2l222) ⊔ (lsuc l293)))) ((P : Set (l2l222 ⊔ l293)) -> P) (λ (u0 : a1) -> λ (u1 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> (P : Set l293) -> (X-z48 : (e0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 (R0 ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0) u0) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) (R1 ((lsuc lzero) ⊔ (lsuc l2l222)) ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0 (λ (x0 : a1) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 t0 x0) -> list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) t1 u0 e0) u1) -> P) -> P) X--) X--) (λ (P : Set (lzero ⊔ (l2l222 ⊔ l293))) -> λ (DH : P) -> DH) (λ (a0 : a1) -> λ (a10 : list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) -> λ (P : Set l293) -> λ (DH : (e0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 (R0 ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0) a0) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) (R1 ((lsuc lzero) ⊔ (lsuc l2l222)) ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0 (λ (x0 : a1) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0 x0) -> list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) a10 a0 e0) a10) -> P) -> DH (refl ((lsuc lzero) ⊔ (lsuc l2l222)) a1 (R0 ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0)) (refl ((lsuc lzero) ⊔ (lsuc l2l222)) (list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) (R1 ((lsuc lzero) ⊔ (lsuc l2l222)) ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0 (λ (x0 : a1) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0 x0) -> list ((lsuc lzero) ⊔ (lsuc l2l222)) a1) a10 a0 (refl ((lsuc lzero) ⊔ (lsuc l2l222)) a1 (R0 ((lsuc lzero) ⊔ (lsuc l2l222)) a1 a0))))) x) y Deq
is-nil : (l12 l13 : Level) -> (A : Set l12) -> (X-- : list l12 A) -> Set l13
is-nil = λ (l12 l13 : Level) -> λ (A : Set l12) -> λ (l : list l12 A) -> match-list l12 A ((lsuc lzero) ⊔ (lsuc l13)) (λ (X-- : list l12 A) -> Set l13) (True l13) (λ (hd : A) -> λ (tl : list l12 A) -> False l13) l
nil-cons : (l27 : Level) -> (A : Set l27) -> (l : list l27 A) -> (a : A) -> Not l27 (eq l27 (list l27 A) (cons l27 A a l) (nil l27 A))
nil-cons = λ (l27 : Level) -> λ (A : Set l27) -> λ (l : list l27 A) -> λ (a : A) -> nmk l27 (eq l27 (list l27 A) (cons l27 A a l) (nil l27 A)) (λ (Heq : eq l27 (list l27 A) (cons l27 A a l) (nil l27 A)) -> eq-ind-r l27 l27 (list l27 A) (nil l27 A) (λ (x : list l27 A) -> λ (X-- : eq l27 (list l27 A) x (nil l27 A)) -> is-nil l27 l27 A x) (I l27) (cons l27 A a l) Heq)
append : (l5-v : Level) -> (H-v : Set l5-v) -> (X---v : list l5-v H-v) -> (X--1-v : list l5-v H-v) -> list l5-v H-v
append l12-v H-v nil' l2 = l2
append l12-v H-v (cons' x' l') l2 = cons l12-v H-v x' (append l12-v H-v l' l2)
hd : (l10 : Level) -> (A : Set l10) -> (X-l : list l10 A) -> (X-d : A) -> A
hd = λ (l10 : Level) -> λ (A : Set l10) -> λ (l : list l10 A) -> λ (d : A) -> match-list l10 A l10 (λ (X-- : list l10 A) -> A) d (λ (a : A) -> λ (X-- : list l10 A) -> a) l
tail : (l11 : Level) -> (A : Set l11) -> (X-l : list l11 A) -> list l11 A
tail = λ (l11 : Level) -> λ (A : Set l11) -> λ (l : list l11 A) -> match-list l11 A l11 (λ (X-- : list l11 A) -> list l11 A) (nil l11 A) (λ (hd-v : A) -> λ (tl : list l11 A) -> tl) l
option-hd : (l12 : Level) -> (A : Set l12) -> (X-l : list l12 A) -> option l12 A
option-hd = λ (l12 : Level) -> λ (A : Set l12) -> λ (l : list l12 A) -> match-list l12 A l12 (λ (X-- : list l12 A) -> option l12 A) (None l12 A) (λ (a : A) -> λ (X-- : list l12 A) -> Some l12 A a) l
append-nil : (l35 : Level) -> (A : Set l35) -> (l : list l35 A) -> eq l35 (list l35 A) (append l35 A l (nil l35 A)) l
append-nil = λ (l35 : Level) -> λ (A : Set l35) -> λ (l : list l35 A) -> list-ind l35 l35 A (λ (X-x-716 : list l35 A) -> eq l35 (list l35 A) (append l35 A X-x-716 (nil l35 A)) X-x-716) (refl l35 (list l35 A) (nil l35 A)) (λ (x-718 : A) -> λ (x-717 : list l35 A) -> λ (X-x-720 : eq l35 (list l35 A) (append l35 A x-717 (nil l35 A)) x-717) -> rewrite-r l35 l35 (list l35 A) x-717 (λ (X-- : list l35 A) -> eq l35 (list l35 A) (cons l35 A x-718 X--) (cons l35 A x-718 x-717)) (refl l35 (list l35 A) (cons l35 A x-718 x-717)) (append l35 A x-717 (nil l35 A)) X-x-720) l
associative-append : (l53 : Level) -> (A : Set l53) -> associative l53 (list l53 A) (append l53 A)
associative-append = λ (l53 : Level) -> λ (A : Set l53) -> λ (l1 : list l53 A) -> λ (l2 : list l53 A) -> λ (l3 : list l53 A) -> list-ind l53 l53 A (λ (X-x-716 : list l53 A) -> eq l53 (list l53 A) (append l53 A (append l53 A X-x-716 l2) l3) (append l53 A X-x-716 (append l53 A l2 l3))) (refl l53 (list l53 A) (append l53 A l2 l3)) (λ (x-718 : A) -> λ (x-717 : list l53 A) -> λ (X-x-720 : eq l53 (list l53 A) (append l53 A (append l53 A x-717 l2) l3) (append l53 A x-717 (append l53 A l2 l3))) -> rewrite-r l53 l53 (list l53 A) (append l53 A x-717 (append l53 A l2 l3)) (λ (X-- : list l53 A) -> eq l53 (list l53 A) (cons l53 A x-718 X--) (cons l53 A x-718 (append l53 A x-717 (append l53 A l2 l3)))) (refl l53 (list l53 A) (cons l53 A x-718 (append l53 A x-717 (append l53 A l2 l3)))) (append l53 A (append l53 A x-717 l2) l3) X-x-720) l1
append-cons : (l36 : Level) -> (A : Set l36) -> (a : A) -> (l : list l36 A) -> (l1 : list l36 A) -> eq l36 (list l36 A) (append l36 A l (cons l36 A a l1)) (append l36 A (append l36 A l (cons l36 A a (nil l36 A))) l1)
append-cons = λ (l36 : Level) -> λ (A : Set l36) -> λ (a : A) -> λ (l : list l36 A) -> λ (l1 : list l36 A) -> eq-ind-r l36 l36 (list l36 A) (append l36 A l (append l36 A (cons l36 A a (nil l36 A)) l1)) (λ (x : list l36 A) -> λ (X-- : eq l36 (list l36 A) x (append l36 A l (append l36 A (cons l36 A a (nil l36 A)) l1))) -> eq l36 (list l36 A) (append l36 A l (cons l36 A a l1)) x) (refl l36 (list l36 A) (append l36 A l (cons l36 A a l1))) (append l36 A (append l36 A l (cons l36 A a (nil l36 A))) l1) (associative-append l36 A l (cons l36 A a (nil l36 A)) l1)
nil-append-elim : (l73 l61 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l73))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> (P : (X-- : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> (X--1 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> Set (lzero ⊔ (l73 ⊔ l61))) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l73)) (list ((lsuc lzero) ⊔ (lsuc l73)) A) (append ((lsuc lzero) ⊔ (lsuc l73)) A l1 l2) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> (X--1 : P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> P l1 l2
nil-append-elim = λ (l73 l61 : Level) -> λ (A : Set ((lsuc lzero) ⊔ (lsuc l73))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> λ (P : (X-- : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> (X--1 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> Set (lzero ⊔ (l73 ⊔ l61))) -> match-list ((lsuc lzero) ⊔ (lsuc l73)) A ((lsuc lzero) ⊔ ((lsuc l73) ⊔ l61)) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l73)) (list ((lsuc lzero) ⊔ (lsuc l73)) A) (append ((lsuc lzero) ⊔ (lsuc l73)) A X-- l2) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> (X--2 : P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> P X-- l2) (λ (auto : eq ((lsuc lzero) ⊔ (lsuc l73)) (list ((lsuc lzero) ⊔ (lsuc l73)) A) l2 (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> λ (auto' : P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> eq-coerc (l73 ⊔ l61) (P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) (P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) l2) auto' (rewrite-l ((lsuc lzero) ⊔ (lsuc l73)) ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (list ((lsuc lzero) ⊔ (lsuc l73)) A) l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> eq ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (Set (l73 ⊔ l61)) (P X-- (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) (P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) l2)) (rewrite-l ((lsuc lzero) ⊔ (lsuc l73)) ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (list ((lsuc lzero) ⊔ (lsuc l73)) A) l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> eq ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (Set (l73 ⊔ l61)) (P l2 X--) (P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) l2)) (rewrite-l ((lsuc lzero) ⊔ (lsuc l73)) ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (list ((lsuc lzero) ⊔ (lsuc l73)) A) l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> eq ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (Set (l73 ⊔ l61)) (P l2 l2) (P X-- l2)) (refl ((lsuc lzero) ⊔ ((lsuc l73) ⊔ (lsuc l61))) (Set (l73 ⊔ l61)) (P l2 l2)) (nil ((lsuc lzero) ⊔ (lsuc l73)) A) auto) (nil ((lsuc lzero) ⊔ (lsuc l73)) A) auto) (nil ((lsuc lzero) ⊔ (lsuc l73)) A) auto)) (λ (a : A) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l73)) A) -> λ (heq : eq ((lsuc lzero) ⊔ (lsuc l73)) (list ((lsuc lzero) ⊔ (lsuc l73)) A) (cons ((lsuc lzero) ⊔ (lsuc l73)) A a (append ((lsuc lzero) ⊔ (lsuc l73)) A l3 l2)) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> list-discr l73 l61 A (cons ((lsuc lzero) ⊔ (lsuc l73)) A a (append ((lsuc lzero) ⊔ (lsuc l73)) A l3 l2)) (nil ((lsuc lzero) ⊔ (lsuc l73)) A) heq ((X-- : P (nil ((lsuc lzero) ⊔ (lsuc l73)) A) (nil ((lsuc lzero) ⊔ (lsuc l73)) A)) -> P (cons ((lsuc lzero) ⊔ (lsuc l73)) A a l3) l2)) l1
nil-to-nil : (l82 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l82))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) -> And ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) l1 (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) (eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) l2 (nil ((lsuc lzero) ⊔ (lsuc l82)) A))
nil-to-nil = λ (l82 : Level) -> λ (A : Set ((lsuc lzero) ⊔ (lsuc l82))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> λ (isnil : eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) -> nil-append-elim l82 ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> λ (X-0 : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> And ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) X-- (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) (eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) X-0 (nil ((lsuc lzero) ⊔ (lsuc l82)) A))) (rewrite-l ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) X--) (refl ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2)) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) isnil) (conj ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) (eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) (rewrite-l ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) X-- (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) (rewrite-l ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) X--) (refl ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2)) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) isnil) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) isnil) (rewrite-l ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) X-- (nil ((lsuc lzero) ⊔ (lsuc l82)) A)) (rewrite-l ((lsuc lzero) ⊔ (lsuc l82)) ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l82)) A) -> eq ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2) X--) (refl ((lsuc lzero) ⊔ (lsuc l82)) (list ((lsuc lzero) ⊔ (lsuc l82)) A) (append ((lsuc lzero) ⊔ (lsuc l82)) A l1 l2)) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) isnil) (nil ((lsuc lzero) ⊔ (lsuc l82)) A) isnil))
cons-injective-l : (l94 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l94))) -> (a1 : A) -> (a2 : A) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l94)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l94)) A) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a1 l1) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> eq ((lsuc lzero) ⊔ (lsuc l94)) A a1 a2
cons-injective-l = λ (l94 : Level) -> λ (A : Set ((lsuc lzero) ⊔ (lsuc l94))) -> λ (a1 : A) -> λ (a2 : A) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l94)) A) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l94)) A) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a1 l1) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> list-discr l94 ((lsuc lzero) ⊔ (lsuc l94)) A (cons ((lsuc lzero) ⊔ (lsuc l94)) A a1 l1) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2) Heq (eq ((lsuc lzero) ⊔ (lsuc l94)) A a1 a2) (λ (e0 : eq ((lsuc lzero) ⊔ (lsuc l94)) A (R0 ((lsuc lzero) ⊔ (lsuc l94)) A a1) a2) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l94)) ((lsuc lzero) ⊔ (lsuc l94)) A a2 (λ (x : A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l94)) A x a2) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A x l1) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (R1 ((lsuc lzero) ⊔ (lsuc l94)) ((lsuc lzero) ⊔ (lsuc l94)) A x (λ (x0 : A) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l94)) A x x0) -> list ((lsuc lzero) ⊔ (lsuc l94)) A) l1 a2 X--) l2) -> eq ((lsuc lzero) ⊔ (lsuc l94)) A x a2) (λ (Heq0 : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l1) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> λ (e00 : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (R1 ((lsuc lzero) ⊔ (lsuc l94)) ((lsuc lzero) ⊔ (lsuc l94)) A a2 (λ (x0 : A) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l94)) A a2 x0) -> list ((lsuc lzero) ⊔ (lsuc l94)) A) l1 a2 (refl ((lsuc lzero) ⊔ (lsuc l94)) A a2)) l2) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l94)) ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) l2 (λ (x : list ((lsuc lzero) ⊔ (lsuc l94)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) x l2) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 x) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> eq ((lsuc lzero) ⊔ (lsuc l94)) A a2 a2) (λ (Heq1 : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> streicherK ((lsuc lzero) ⊔ (lsuc l94)) ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2) (λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l94)) (list ((lsuc lzero) ⊔ (lsuc l94)) A) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2) (cons ((lsuc lzero) ⊔ (lsuc l94)) A a2 l2)) -> eq ((lsuc lzero) ⊔ (lsuc l94)) A a2 a2) (refl ((lsuc lzero) ⊔ (lsuc l94)) A a2) Heq1) l1 e00 Heq0) a1 e0 Heq)
cons-injective-r : (l99 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l99))) -> (a1 : A) -> (a2 : A) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l99)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l99)) A) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a1 l1) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) l1 l2
cons-injective-r = λ (l99 : Level) -> λ (A : Set ((lsuc lzero) ⊔ (lsuc l99))) -> λ (a1 : A) -> λ (a2 : A) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l99)) A) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l99)) A) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a1 l1) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> list-discr l99 ((lsuc lzero) ⊔ (lsuc l99)) A (cons ((lsuc lzero) ⊔ (lsuc l99)) A a1 l1) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2) Heq (eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) l1 l2) (λ (e0 : eq ((lsuc lzero) ⊔ (lsuc l99)) A (R0 ((lsuc lzero) ⊔ (lsuc l99)) A a1) a2) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l99)) ((lsuc lzero) ⊔ (lsuc l99)) A a2 (λ (x : A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l99)) A x a2) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A x l1) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (R1 ((lsuc lzero) ⊔ (lsuc l99)) ((lsuc lzero) ⊔ (lsuc l99)) A x (λ (x0 : A) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l99)) A x x0) -> list ((lsuc lzero) ⊔ (lsuc l99)) A) l1 a2 X--) l2) -> eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) l1 l2) (λ (Heq0 : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l1) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> λ (e00 : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (R1 ((lsuc lzero) ⊔ (lsuc l99)) ((lsuc lzero) ⊔ (lsuc l99)) A a2 (λ (x0 : A) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l99)) A a2 x0) -> list ((lsuc lzero) ⊔ (lsuc l99)) A) l1 a2 (refl ((lsuc lzero) ⊔ (lsuc l99)) A a2)) l2) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l99)) ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) l2 (λ (x : list ((lsuc lzero) ⊔ (lsuc l99)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) x l2) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 x) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) x l2) (λ (Heq1 : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> streicherK ((lsuc lzero) ⊔ (lsuc l99)) ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2) (λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2) (cons ((lsuc lzero) ⊔ (lsuc l99)) A a2 l2)) -> eq ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) l2 l2) (refl ((lsuc lzero) ⊔ (lsuc l99)) (list ((lsuc lzero) ⊔ (lsuc l99)) A) l2) Heq1) l1 e00 Heq0) a1 e0 Heq)
option-cons : (l11 : Level) -> (sig : Set l11) -> (X-c : option l11 sig) -> (X-l : list l11 sig) -> list l11 sig
option-cons = λ (l11 : Level) -> λ (sig : Set l11) -> λ (c : option l11 sig) -> λ (l : list l11 sig) -> match-option l11 sig l11 (λ (X-- : option l11 sig) -> list l11 sig) l (λ (c0 : sig) -> cons l11 sig c0 l) c
opt-cons-tail-expand : (l20 : Level) -> (A : Set l20) -> (l : list l20 A) -> eq l20 (list l20 A) l (option-cons l20 A (option-hd l20 A l) (tail l20 A l))
opt-cons-tail-expand = λ (l20 : Level) -> λ (A : Set l20) -> λ (X-clearme : list l20 A) -> match-list l20 A l20 (λ (X-- : list l20 A) -> eq l20 (list l20 A) X-- (option-cons l20 A (option-hd l20 A X--) (tail l20 A X--))) (refl l20 (list l20 A) (nil l20 A)) (λ (auto : A) -> λ (auto' : list l20 A) -> refl l20 (list l20 A) (cons l20 A auto auto')) X-clearme
compare-append : (l516 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l516))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A l1 l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l4)) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3 (append ((lsuc lzero) ⊔ (lsuc l516)) A l1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))))
compare-append = λ (l516 : Level) -> λ (A : Set ((lsuc lzero) ⊔ (lsuc l516))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> list-ind ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) A (λ (X-x-716 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A X-x-716 l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l4)) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) X-x-716 (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3 (append ((lsuc lzero) ⊔ (lsuc l516)) A X-x-716 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))))) (λ (l2 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l4)) -> ex-intro ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (nil ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3 (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)))) l3 (or-intror ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (nil ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l3)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3 (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) l3)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l4))) (conj ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3 (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) l3)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l4)) (refl ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3) Heq))) (λ (a1 : A) -> λ (tl1 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (Hind : (l2 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l4)) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A l3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))))) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> match-list ((lsuc lzero) ⊔ (lsuc l516)) A ((lsuc lzero) ⊔ (lsuc l516)) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A X-- l4)) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A X-- l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) X-- (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))))) (λ (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) l4)) -> ex-intro ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (nil ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)))) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (or-introl ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1))) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (nil ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1))) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l4))) (conj ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (nil ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1))) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l2)) (refl ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1)) (sym-eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l2) l4 Heq)))) (λ (a3 : A) -> λ (tl3 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (l4 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l2)) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l4))) -> match-ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)))) ((lsuc lzero) ⊔ (lsuc l516)) (λ (X-- : ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))))) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))))) (λ (l : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (X-clearme : Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)))) -> match-Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))) ((lsuc lzero) ⊔ (lsuc l516)) (λ (X-- : Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)))) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l0 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l4))))) (λ (X-clearme0 : And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) -> match-And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2)) ((lsuc lzero) ⊔ (lsuc l516)) (λ (X-- : And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l0 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l4))))) (λ (Heq1 : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl1 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) -> λ (Heq2 : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2)) -> ex-intro ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l0 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l4)))) l (or-introl ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))) (conj ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2)) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l) (λ (x : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) x (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) -> eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 x) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l)) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) A a3 (λ (x : A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) A x a3) -> eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A x (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l)) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l)) (refl ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l))) a1 (cons-injective-l l516 A a1 a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l4) Heq)) tl1 Heq1) (rewrite-l ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 X--) (refl ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4) (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2) Heq2)))) X-clearme0) (λ (X-clearme0 : And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))) -> match-And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)) ((lsuc lzero) ⊔ (lsuc l516)) (λ (X-- : And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))) -> ex ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l0 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l4))))) (λ (Heq1 : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) tl3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) -> λ (Heq2 : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)) -> ex-intro ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (λ (l0 : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> Or ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l0)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l0 l4)))) l (or-intror ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l4 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l2))) (And ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4))) (conj ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 tl3) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4)) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l) (λ (x : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) x (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) -> eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 x) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A a1 tl1) l)) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) A a3 (λ (x : A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l516)) A x a3) -> eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l)) (append ((lsuc lzero) ⊔ (lsuc l516)) A (cons ((lsuc lzero) ⊔ (lsuc l516)) A x tl1) l)) (refl ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) (cons ((lsuc lzero) ⊔ (lsuc l516)) A a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l))) a1 (cons-injective-l l516 A a1 a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l4) Heq)) tl3 Heq1) (rewrite-l ((lsuc lzero) ⊔ (lsuc l516)) ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l516)) A) -> eq ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2 X--) (refl ((lsuc lzero) ⊔ (lsuc l516)) (list ((lsuc lzero) ⊔ (lsuc l516)) A) l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A l l4) Heq2)))) X-clearme0) X-clearme) (Hind l2 tl3 l4 (cons-injective-r l516 A a1 a3 (append ((lsuc lzero) ⊔ (lsuc l516)) A tl1 l2) (append ((lsuc lzero) ⊔ (lsuc l516)) A tl3 l4) Heq))) l3) l1
map : (l5-v l4-v : Level) -> (A-v : Set l5-v) -> (B-v : Set l4-v) -> (X-f-v : (X---v : A-v) -> B-v) -> (X-l-v : list l5-v A-v) -> list l4-v B-v
map l5-v l0-v A-v B-v X-f-v nil' = nil l0-v B-v
map l5-v l0-v A-v B-v X-f-v (cons' x-v tl-v) = cons l0-v B-v (X-f-v x-v) (map l5-v l0-v A-v B-v X-f-v tl-v)
map-append : (l78 l77 : Level) -> (A : Set l78) -> (B-v : Set l77) -> (f : (X-- : A) -> B-v) -> (l1 : list l78 A) -> (l2 : list l78 A) -> eq l77 (list l77 B-v) (append l77 B-v (map l78 l77 A B-v f l1) (map l78 l77 A B-v f l2)) (map l78 l77 A B-v f (append l78 A l1 l2))
map-append = λ (l78 l77 : Level) -> λ (A : Set l78) -> λ (B-v : Set l77) -> λ (f : (X-- : A) -> B-v) -> λ (l1 : list l78 A) -> list-ind l78 (l78 ⊔ l77) A (λ (X-x-716 : list l78 A) -> (l2 : list l78 A) -> eq l77 (list l77 B-v) (append l77 B-v (map l78 l77 A B-v f X-x-716) (map l78 l77 A B-v f l2)) (map l78 l77 A B-v f (append l78 A X-x-716 l2))) (λ (l2 : list l78 A) -> refl l77 (list l77 B-v) (append l77 B-v (map l78 l77 A B-v f (nil l78 A)) (map l78 l77 A B-v f l2))) (λ (h : A) -> λ (t : list l78 A) -> λ (IH : (l2 : list l78 A) -> eq l77 (list l77 B-v) (append l77 B-v (map l78 l77 A B-v f t) (map l78 l77 A B-v f l2)) (map l78 l77 A B-v f (append l78 A t l2))) -> λ (l2 : list l78 A) -> rewrite-r l77 l77 (list l77 B-v) (map l78 l77 A B-v f (append l78 A t l2)) (λ (X-- : list l77 B-v) -> eq l77 (list l77 B-v) (cons l77 B-v (f h) X--) (cons l77 B-v (f h) (map l78 l77 A B-v f (append l78 A t l2)))) (refl l77 (list l77 B-v) (cons l77 B-v (f h) (map l78 l77 A B-v f (append l78 A t l2)))) (append l77 B-v (map l78 l77 A B-v f t) (map l78 l77 A B-v f l2)) (IH l2)) l1
foldr : (l6-v l5-v : Level) -> (A-v : Set l6-v) -> (B-v : Set l5-v) -> (X-f-v : (X---v : A-v) -> (X--1-v : B-v) -> B-v) -> (X-b-v : B-v) -> (X-l-v : list l6-v A-v) -> B-v
foldr l4-v l0-v A-v B-v X-f-v X-b-v nil' = X-b-v
foldr l4-v l0-v A-v B-v X-f-v X-b-v (cons' a-v l) = X-f-v a-v (foldr l4-v l0-v A-v B-v X-f-v X-b-v l)
filter' : (l13 : Level) -> (T : Set l13) -> (X-p : (X-- : T) -> bool) -> (X-l : list l13 T) -> list l13 T
filter' = λ (l13 : Level) -> λ (T : Set l13) -> λ (p : (X-- : T) -> bool) -> foldr l13 l13 T (list l13 T) (λ (x : T) -> λ (l0 : list l13 T) -> match-bool l13 (λ (X-- : bool) -> list l13 T) (cons l13 T x l0) l0 (p x)) (nil l13 T)
compose' : (l19 l18 l17 : Level) -> (A : Set l19) -> (B-v : Set l18) -> (C : Set l17) -> (X-f : (X-- : A) -> (X--1 : B-v) -> C) -> (X-l1 : list l19 A) -> (X-l2 : list l18 B-v) -> list l17 C
compose' = λ (l19 l18 l17 : Level) -> λ (A : Set l19) -> λ (B-v : Set l18) -> λ (C : Set l17) -> λ (f : (X-- : A) -> (X--1 : B-v) -> C) -> λ (l1 : list l19 A) -> λ (l2 : list l18 B-v) -> foldr l19 l17 A (list l17 C) (λ (i : A) -> λ (acc : list l17 C) -> append l17 C (map l18 l17 B-v C (f i) l2) acc) (nil l17 C) l1
filter-true : (l276 : Level) -> (A : Set l276) -> (l : list l276 A) -> (a : A) -> (p : (X-- : A) -> bool) -> (X-- : eq lzero bool (p a) true) -> eq l276 (list l276 A) (filter' l276 A p (cons l276 A a l)) (cons l276 A a (filter' l276 A p l))
filter-true = λ (l276 : Level) -> λ (A : Set l276) -> λ (l : list l276 A) -> λ (a : A) -> λ (p : (X-- : A) -> bool) -> λ (pa : eq lzero bool (p a) true) -> list-ind l276 l276 A (λ (X-x-716 : list l276 A) -> eq l276 (list l276 A) (filter' l276 A p (cons l276 A a X-x-716)) (cons l276 A a (filter' l276 A p X-x-716))) (eq-ind-r lzero l276 bool true (λ (x : bool) -> λ (X-- : eq lzero bool x true) -> eq l276 (list l276 A) (match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A a (nil l276 A)) (nil l276 A) x) (cons l276 A a (nil l276 A))) (refl l276 (list l276 A) (cons l276 A a (nil l276 A))) (p a) pa) (eq-ind-r lzero l276 bool true (λ (x : bool) -> λ (X-- : eq lzero bool x true) -> (x-718 : A) -> (x-717 : list l276 A) -> (X-x-720 : eq l276 (list l276 A) (match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A a (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717)) (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717) x) (cons l276 A a (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717))) -> eq l276 (list l276 A) (match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A a (match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x-718 (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717)) (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717) (p x-718))) (match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x-718 (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717)) (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717) (p x-718)) x) (cons l276 A a (match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x-718 (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717)) (foldr l276 l276 A (list l276 A) (λ (x0 : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-0 : bool) -> list l276 A) (cons l276 A x0 l0) l0 (p x0)) (nil l276 A) x-717) (p x-718)))) (λ (x-718 : A) -> λ (x-717 : list l276 A) -> λ (X-x-720 : eq l276 (list l276 A) (cons l276 A a (foldr l276 l276 A (list l276 A) (λ (x : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-- : bool) -> list l276 A) (cons l276 A x l0) l0 (p x)) (nil l276 A) x-717)) (cons l276 A a (foldr l276 l276 A (list l276 A) (λ (x : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-- : bool) -> list l276 A) (cons l276 A x l0) l0 (p x)) (nil l276 A) x-717))) -> refl l276 (list l276 A) (cons l276 A a (match-bool l276 (λ (X-- : bool) -> list l276 A) (cons l276 A x-718 (foldr l276 l276 A (list l276 A) (λ (x : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-- : bool) -> list l276 A) (cons l276 A x l0) l0 (p x)) (nil l276 A) x-717)) (foldr l276 l276 A (list l276 A) (λ (x : A) -> λ (l0 : list l276 A) -> match-bool l276 (λ (X-- : bool) -> list l276 A) (cons l276 A x l0) l0 (p x)) (nil l276 A) x-717) (p x-718)))) (p a) pa) l
filter-false : (l267 : Level) -> (A : Set l267) -> (l : list l267 A) -> (a : A) -> (p : (X-- : A) -> bool) -> (X-- : eq lzero bool (p a) false) -> eq l267 (list l267 A) (filter' l267 A p (cons l267 A a l)) (filter' l267 A p l)
filter-false = λ (l267 : Level) -> λ (A : Set l267) -> λ (l : list l267 A) -> λ (a : A) -> λ (p : (X-- : A) -> bool) -> λ (pa : eq lzero bool (p a) false) -> list-ind l267 l267 A (λ (X-x-716 : list l267 A) -> eq l267 (list l267 A) (filter' l267 A p (cons l267 A a X-x-716)) (filter' l267 A p X-x-716)) (eq-ind-r lzero l267 bool false (λ (x : bool) -> λ (X-- : eq lzero bool x false) -> eq l267 (list l267 A) (match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A a (nil l267 A)) (nil l267 A) x) (nil l267 A)) (refl l267 (list l267 A) (nil l267 A)) (p a) pa) (eq-ind-r lzero l267 bool false (λ (x : bool) -> λ (X-- : eq lzero bool x false) -> (x-718 : A) -> (x-717 : list l267 A) -> (X-x-720 : eq l267 (list l267 A) (match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A a (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717)) (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717) x) (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717)) -> eq l267 (list l267 A) (match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A a (match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x-718 (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717)) (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717) (p x-718))) (match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x-718 (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717)) (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717) (p x-718)) x) (match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x-718 (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717)) (foldr l267 l267 A (list l267 A) (λ (x0 : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-0 : bool) -> list l267 A) (cons l267 A x0 l0) l0 (p x0)) (nil l267 A) x-717) (p x-718))) (λ (x-718 : A) -> λ (x-717 : list l267 A) -> λ (X-x-720 : eq l267 (list l267 A) (foldr l267 l267 A (list l267 A) (λ (x : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-- : bool) -> list l267 A) (cons l267 A x l0) l0 (p x)) (nil l267 A) x-717) (foldr l267 l267 A (list l267 A) (λ (x : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-- : bool) -> list l267 A) (cons l267 A x l0) l0 (p x)) (nil l267 A) x-717)) -> refl l267 (list l267 A) (match-bool l267 (λ (X-- : bool) -> list l267 A) (cons l267 A x-718 (foldr l267 l267 A (list l267 A) (λ (x : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-- : bool) -> list l267 A) (cons l267 A x l0) l0 (p x)) (nil l267 A) x-717)) (foldr l267 l267 A (list l267 A) (λ (x : A) -> λ (l0 : list l267 A) -> match-bool l267 (λ (X-- : bool) -> list l267 A) (cons l267 A x l0) l0 (p x)) (nil l267 A) x-717) (p x-718))) (p a) pa) l
eq-map : (l64 l63 : Level) -> (A : Set l64) -> (B-v : Set l63) -> (f : (X-- : A) -> B-v) -> (g : (X-- : A) -> B-v) -> (l : list l64 A) -> (X-- : (x : A) -> eq l63 B-v (f x) (g x)) -> eq l63 (list l63 B-v) (map l64 l63 A B-v f l) (map l64 l63 A B-v g l)
eq-map = λ (l64 l63 : Level) -> λ (A : Set l64) -> λ (B-v : Set l63) -> λ (f : (X-- : A) -> B-v) -> λ (g : (X-- : A) -> B-v) -> λ (l : list l64 A) -> λ (eqfg : (x : A) -> eq l63 B-v (f x) (g x)) -> list-ind l64 l63 A (λ (X-x-716 : list l64 A) -> eq l63 (list l63 B-v) (map l64 l63 A B-v f X-x-716) (map l64 l63 A B-v g X-x-716)) (refl l63 (list l63 B-v) (nil l63 B-v)) (λ (x-718 : A) -> λ (x-717 : list l64 A) -> λ (X-x-720 : eq l63 (list l63 B-v) (map l64 l63 A B-v f x-717) (map l64 l63 A B-v g x-717)) -> rewrite-l l63 l63 B-v (f x-718) (λ (X-- : B-v) -> eq l63 (list l63 B-v) (cons l63 B-v (f x-718) (map l64 l63 A B-v f x-717)) (cons l63 B-v X-- (map l64 l63 A B-v g x-717))) (rewrite-l l63 l63 (list l63 B-v) (map l64 l63 A B-v f x-717) (λ (X-- : list l63 B-v) -> eq l63 (list l63 B-v) (cons l63 B-v (f x-718) (map l64 l63 A B-v f x-717)) (cons l63 B-v (f x-718) X--)) (refl l63 (list l63 B-v) (cons l63 B-v (f x-718) (map l64 l63 A B-v f x-717))) (map l64 l63 A B-v g x-717) X-x-720) (g x-718) (eqfg x-718)) l
rev-append : (l5-v : Level) -> (H-v : Set l5-v) -> (X---v : list l5-v H-v) -> (X--1-v : list l5-v H-v) -> list l5-v H-v
rev-append l12-v H-v nil' l2-v = l2-v
rev-append l12-v H-v (cons' a-v tl-v) l2-v = rev-append l12-v H-v tl-v (cons l12-v H-v a-v l2-v)
reverse : (l4 : Level) -> (S-v : Set l4) -> (X-l : list l4 S-v) -> list l4 S-v
reverse = λ (l4 : Level) -> λ (S-v : Set l4) -> λ (l : list l4 S-v) -> rev-append l4 S-v l (nil l4 S-v)
reverse-single : (l6 : Level) -> (S-v : Set l6) -> (a : S-v) -> eq l6 (list l6 S-v) (reverse l6 S-v (cons l6 S-v a (nil l6 S-v))) (cons l6 S-v a (nil l6 S-v))
reverse-single = λ (l6 : Level) -> λ (S-v : Set l6) -> λ (a : S-v) -> refl l6 (list l6 S-v) (reverse l6 S-v (cons l6 S-v a (nil l6 S-v)))
rev-append-def : (l160 : Level) -> (S-v : Set l160) -> (l1 : list l160 S-v) -> (l2 : list l160 S-v) -> eq l160 (list l160 S-v) (rev-append l160 S-v l1 l2) (append l160 S-v (reverse l160 S-v l1) l2)
rev-append-def = λ (l160 : Level) -> λ (S-v : Set l160) -> λ (l1 : list l160 S-v) -> list-ind l160 l160 S-v (λ (X-x-716 : list l160 S-v) -> (l2 : list l160 S-v) -> eq l160 (list l160 S-v) (rev-append l160 S-v X-x-716 l2) (append l160 S-v (reverse l160 S-v X-x-716) l2)) (λ (l2 : list l160 S-v) -> refl l160 (list l160 S-v) l2) (λ (x-718 : S-v) -> λ (x-717 : list l160 S-v) -> λ (X-x-720 : (l2 : list l160 S-v) -> eq l160 (list l160 S-v) (rev-append l160 S-v x-717 l2) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) l2)) -> λ (l2 : list l160 S-v) -> rewrite-r l160 l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2)) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) X-- (append l160 S-v (rev-append l160 S-v x-717 (cons l160 S-v x-718 (nil l160 S-v))) l2)) (rewrite-r l160 l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 (nil l160 S-v))) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2)) (append l160 S-v X-- l2)) (rewrite-r l160 l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (append l160 S-v (cons l160 S-v x-718 (nil l160 S-v)) l2)) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2)) X--) (rewrite-l l160 l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2)) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2)) X--) (refl l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2))) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (append l160 S-v (cons l160 S-v x-718 (nil l160 S-v)) l2)) (rewrite-l l160 l160 (list l160 S-v) (append l160 S-v (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 (nil l160 S-v))) l2) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 l2)) X--) (append-cons l160 S-v x-718 (rev-append l160 S-v x-717 (nil l160 S-v)) l2) (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (append l160 S-v (cons l160 S-v x-718 (nil l160 S-v)) l2)) (associative-append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 (nil l160 S-v)) l2))) (append l160 S-v (append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 (nil l160 S-v))) l2) (associative-append l160 S-v (rev-append l160 S-v x-717 (nil l160 S-v)) (cons l160 S-v x-718 (nil l160 S-v)) l2)) (rev-append l160 S-v x-717 (cons l160 S-v x-718 (nil l160 S-v))) (X-x-720 (cons l160 S-v x-718 (nil l160 S-v)))) (rev-append l160 S-v x-717 (cons l160 S-v x-718 l2)) (X-x-720 (cons l160 S-v x-718 l2))) l1
reverse-cons : (l30 : Level) -> (S-v : Set l30) -> (a : S-v) -> (l : list l30 S-v) -> eq l30 (list l30 S-v) (reverse l30 S-v (cons l30 S-v a l)) (append l30 S-v (reverse l30 S-v l) (cons l30 S-v a (nil l30 S-v)))
reverse-cons = λ (l30 : Level) -> λ (S-v : Set l30) -> λ (a : S-v) -> λ (l : list l30 S-v) -> rewrite-r l30 l30 (list l30 S-v) (append l30 S-v (reverse l30 S-v l) (cons l30 S-v a (nil l30 S-v))) (λ (X-- : list l30 S-v) -> eq l30 (list l30 S-v) X-- (append l30 S-v (reverse l30 S-v l) (cons l30 S-v a (nil l30 S-v)))) (refl l30 (list l30 S-v) (append l30 S-v (reverse l30 S-v l) (cons l30 S-v a (nil l30 S-v)))) (rev-append l30 S-v l (cons l30 S-v a (nil l30 S-v))) (rev-append-def l30 S-v l (cons l30 S-v a (nil l30 S-v)))
reverse-append : (l235 : Level) -> (S-v : Set l235) -> (l1 : list l235 S-v) -> (l2 : list l235 S-v) -> eq l235 (list l235 S-v) (reverse l235 S-v (append l235 S-v l1 l2)) (append l235 S-v (reverse l235 S-v l2) (reverse l235 S-v l1))
reverse-append = λ (l235 : Level) -> λ (S-v : Set l235) -> λ (l1 : list l235 S-v) -> list-ind l235 l235 S-v (λ (X-x-716 : list l235 S-v) -> (l2 : list l235 S-v) -> eq l235 (list l235 S-v) (reverse l235 S-v (append l235 S-v X-x-716 l2)) (append l235 S-v (reverse l235 S-v l2) (reverse l235 S-v X-x-716))) (λ (l2 : list l235 S-v) -> rewrite-r l235 l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v l2) (nil l235 S-v)) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) X-- (append l235 S-v (rev-append l235 S-v l2 (nil l235 S-v)) (nil l235 S-v))) (rewrite-r l235 l235 (list l235 S-v) (reverse l235 S-v l2) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) X-- (append l235 S-v (rev-append l235 S-v l2 (nil l235 S-v)) (nil l235 S-v))) (rewrite-r l235 l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v l2) (nil l235 S-v)) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) (reverse l235 S-v l2) (append l235 S-v X-- (nil l235 S-v))) (rewrite-r l235 l235 (list l235 S-v) (reverse l235 S-v l2) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) (reverse l235 S-v l2) (append l235 S-v X-- (nil l235 S-v))) (rewrite-r l235 l235 (list l235 S-v) (reverse l235 S-v l2) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) (reverse l235 S-v l2) X--) (refl l235 (list l235 S-v) (reverse l235 S-v l2)) (append l235 S-v (reverse l235 S-v l2) (nil l235 S-v)) (append-nil l235 S-v (reverse l235 S-v l2))) (append l235 S-v (reverse l235 S-v l2) (nil l235 S-v)) (append-nil l235 S-v (reverse l235 S-v l2))) (rev-append l235 S-v l2 (nil l235 S-v)) (rev-append-def l235 S-v l2 (nil l235 S-v))) (append l235 S-v (reverse l235 S-v l2) (nil l235 S-v)) (append-nil l235 S-v (reverse l235 S-v l2))) (rev-append l235 S-v l2 (nil l235 S-v)) (rev-append-def l235 S-v l2 (nil l235 S-v))) (λ (a : S-v) -> λ (tl : list l235 S-v) -> λ (Hind : (l2 : list l235 S-v) -> eq l235 (list l235 S-v) (reverse l235 S-v (append l235 S-v tl l2)) (append l235 S-v (reverse l235 S-v l2) (reverse l235 S-v tl))) -> λ (l2 : list l235 S-v) -> eq-ind-r l235 l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v (append l235 S-v tl l2)) (cons l235 S-v a (nil l235 S-v))) (λ (x : list l235 S-v) -> λ (X-- : eq l235 (list l235 S-v) x (append l235 S-v (reverse l235 S-v (append l235 S-v tl l2)) (cons l235 S-v a (nil l235 S-v)))) -> eq l235 (list l235 S-v) x (append l235 S-v (reverse l235 S-v l2) (reverse l235 S-v (cons l235 S-v a tl)))) (eq-ind-r l235 l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v))) (λ (x : list l235 S-v) -> λ (X-- : eq l235 (list l235 S-v) x (append l235 S-v (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v)))) -> eq l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v (append l235 S-v tl l2)) (cons l235 S-v a (nil l235 S-v))) (append l235 S-v (reverse l235 S-v l2) x)) (rewrite-r l235 l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v l2) (append l235 S-v (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v)))) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) X-- (append l235 S-v (reverse l235 S-v l2) (append l235 S-v (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v))))) (refl l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v l2) (append l235 S-v (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v))))) (append l235 S-v (reverse l235 S-v (append l235 S-v tl l2)) (cons l235 S-v a (nil l235 S-v))) (rewrite-r l235 l235 (list l235 S-v) (append l235 S-v (reverse l235 S-v l2) (reverse l235 S-v tl)) (λ (X-- : list l235 S-v) -> eq l235 (list l235 S-v) (append l235 S-v X-- (cons l235 S-v a (nil l235 S-v))) (append l235 S-v (reverse l235 S-v l2) (append l235 S-v (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v))))) (associative-append l235 S-v (reverse l235 S-v l2) (reverse l235 S-v tl) (cons l235 S-v a (nil l235 S-v))) (reverse l235 S-v (append l235 S-v tl l2)) (Hind l2))) (reverse l235 S-v (cons l235 S-v a tl)) (reverse-cons l235 S-v a tl)) (reverse l235 S-v (cons l235 S-v a (append l235 S-v tl l2))) (reverse-cons l235 S-v a (append l235 S-v tl l2))) l1
reverse-reverse : (l160 : Level) -> (S-v : Set l160) -> (l : list l160 S-v) -> eq l160 (list l160 S-v) (reverse l160 S-v (reverse l160 S-v l)) l
reverse-reverse = λ (l160 : Level) -> λ (S-v : Set l160) -> λ (l : list l160 S-v) -> list-ind l160 l160 S-v (λ (X-x-716 : list l160 S-v) -> eq l160 (list l160 S-v) (reverse l160 S-v (reverse l160 S-v X-x-716)) X-x-716) (refl l160 (list l160 S-v) (reverse l160 S-v (reverse l160 S-v (nil l160 S-v)))) (λ (a : S-v) -> λ (tl : list l160 S-v) -> λ (Hind : eq l160 (list l160 S-v) (reverse l160 S-v (reverse l160 S-v tl)) tl) -> eq-ind-r l160 l160 (list l160 S-v) (append l160 S-v (reverse l160 S-v tl) (cons l160 S-v a (nil l160 S-v))) (λ (x : list l160 S-v) -> λ (X-- : eq l160 (list l160 S-v) x (append l160 S-v (reverse l160 S-v tl) (cons l160 S-v a (nil l160 S-v)))) -> eq l160 (list l160 S-v) (reverse l160 S-v x) (cons l160 S-v a tl)) (eq-ind-r l160 l160 (list l160 S-v) (append l160 S-v (reverse l160 S-v (cons l160 S-v a (nil l160 S-v))) (reverse l160 S-v (reverse l160 S-v tl))) (λ (x : list l160 S-v) -> λ (X-- : eq l160 (list l160 S-v) x (append l160 S-v (reverse l160 S-v (cons l160 S-v a (nil l160 S-v))) (reverse l160 S-v (reverse l160 S-v tl)))) -> eq l160 (list l160 S-v) x (cons l160 S-v a tl)) (rewrite-r l160 l160 (list l160 S-v) (append l160 S-v (reverse l160 S-v tl) (nil l160 S-v)) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (cons l160 S-v a (rev-append l160 S-v X-- (nil l160 S-v))) (cons l160 S-v a tl)) (rewrite-r l160 l160 (list l160 S-v) (reverse l160 S-v tl) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (cons l160 S-v a (rev-append l160 S-v X-- (nil l160 S-v))) (cons l160 S-v a tl)) (rewrite-r l160 l160 (list l160 S-v) (append l160 S-v (reverse l160 S-v (reverse l160 S-v tl)) (nil l160 S-v)) (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (cons l160 S-v a X--) (cons l160 S-v a tl)) (rewrite-r l160 l160 (list l160 S-v) tl (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (cons l160 S-v a (append l160 S-v X-- (nil l160 S-v))) (cons l160 S-v a tl)) (rewrite-r l160 l160 (list l160 S-v) tl (λ (X-- : list l160 S-v) -> eq l160 (list l160 S-v) (cons l160 S-v a X--) (cons l160 S-v a tl)) (refl l160 (list l160 S-v) (cons l160 S-v a tl)) (append l160 S-v tl (nil l160 S-v)) (append-nil l160 S-v tl)) (reverse l160 S-v (reverse l160 S-v tl)) Hind) (rev-append l160 S-v (reverse l160 S-v tl) (nil l160 S-v)) (rev-append-def l160 S-v (reverse l160 S-v tl) (nil l160 S-v))) (append l160 S-v (reverse l160 S-v tl) (nil l160 S-v)) (append-nil l160 S-v (reverse l160 S-v tl))) (rev-append l160 S-v tl (nil l160 S-v)) (rev-append-def l160 S-v tl (nil l160 S-v))) (reverse l160 S-v (append l160 S-v (reverse l160 S-v tl) (cons l160 S-v a (nil l160 S-v)))) (reverse-append l160 S-v (reverse l160 S-v tl) (cons l160 S-v a (nil l160 S-v)))) (reverse l160 S-v (cons l160 S-v a tl)) (reverse-cons l160 S-v a tl)) l
list-elim-left : (l59 l56 : Level) -> (S-v : Set l59) -> (P : (X-- : list l59 S-v) -> Set l56) -> (X-- : P (nil l59 S-v)) -> (X--1 : (a : S-v) -> (tl : list l59 S-v) -> (X--1 : P tl) -> P (append l59 S-v tl (cons l59 S-v a (nil l59 S-v)))) -> (l : list l59 S-v) -> P l
list-elim-left = λ (l59 l56 : Level) -> λ (S-v : Set l59) -> λ (P : (X-- : list l59 S-v) -> Set l56) -> λ (Pnil : P (nil l59 S-v)) -> λ (Pstep : (a : S-v) -> (tl : list l59 S-v) -> (X-- : P tl) -> P (append l59 S-v tl (cons l59 S-v a (nil l59 S-v)))) -> λ (l : list l59 S-v) -> eq-ind l59 l56 (list l59 S-v) (reverse l59 S-v (reverse l59 S-v l)) (λ (x-1 : list l59 S-v) -> λ (X-x-2 : eq l59 (list l59 S-v) (reverse l59 S-v (reverse l59 S-v l)) x-1) -> P x-1) (list-ind l59 l56 S-v (λ (X-x-716 : list l59 S-v) -> P (reverse l59 S-v X-x-716)) Pnil (λ (a : S-v) -> λ (tl : list l59 S-v) -> λ (H : P (reverse l59 S-v tl)) -> eq-ind-r l59 l56 (list l59 S-v) (append l59 S-v (reverse l59 S-v tl) (cons l59 S-v a (nil l59 S-v))) (λ (x : list l59 S-v) -> λ (X-- : eq l59 (list l59 S-v) x (append l59 S-v (reverse l59 S-v tl) (cons l59 S-v a (nil l59 S-v)))) -> P x) (Pstep a (reverse l59 S-v tl) H) (reverse l59 S-v (cons l59 S-v a tl)) (reverse-cons l59 S-v a tl)) (reverse l59 S-v l)) l (reverse-reverse l59 S-v l)
length : (l2-v : Level) -> (H-v : Set l2-v) -> (X---v : list l2-v H-v) -> nat
length l3-v H-v nil' = O
length l3-v H-v (cons' a-v tl-v) = S (length l3-v H-v tl-v)
length-tail : (l26 : Level) -> (A : Set l26) -> (l : list l26 A) -> eq lzero nat (length l26 A (tail l26 A l)) (pred (length l26 A l))
length-tail = λ (l26 : Level) -> λ (A : Set l26) -> λ (l : list l26 A) -> list-ind l26 lzero A (λ (X-x-716 : list l26 A) -> eq lzero nat (length l26 A (tail l26 A X-x-716)) (pred (length l26 A X-x-716))) (refl lzero nat (length l26 A (tail l26 A (nil l26 A)))) (λ (x-718 : A) -> λ (x-717 : list l26 A) -> λ (X-x-720 : eq lzero nat (length l26 A (tail l26 A x-717)) (pred (length l26 A x-717))) -> refl lzero nat (length l26 A (tail l26 A (cons l26 A x-718 x-717)))) l
length-tail1 : (l21 : Level) -> (A : Set l21) -> (l : list l21 A) -> (X-- : lt O (length l21 A l)) -> lt (length l21 A (tail l21 A l)) (length l21 A l)
length-tail1 = λ (l21 : Level) -> λ (A : Set l21) -> λ (X-clearme : list l21 A) -> match-list l21 A lzero (λ (X-- : list l21 A) -> (X--1 : lt O (length l21 A X--)) -> lt (length l21 A (tail l21 A X--)) (length l21 A X--)) (λ (auto : le (S O) O) -> auto) (λ (auto : A) -> λ (auto' : list l21 A) -> λ (auto'' : le (S O) (S (length l21 A auto'))) -> le-n (S (length l21 A auto'))) X-clearme
length-append : (l48 : Level) -> (A : Set l48) -> (l1 : list l48 A) -> (l2 : list l48 A) -> eq lzero nat (length l48 A (append l48 A l1 l2)) (plus (length l48 A l1) (length l48 A l2))
length-append = λ (l48 : Level) -> λ (A : Set l48) -> λ (l1 : list l48 A) -> list-ind l48 l48 A (λ (X-x-716 : list l48 A) -> (l2 : list l48 A) -> eq lzero nat (length l48 A (append l48 A X-x-716 l2)) (plus (length l48 A X-x-716) (length l48 A l2))) (λ (l2 : list l48 A) -> refl lzero nat (length l48 A (append l48 A (nil l48 A) l2))) (λ (X-x-718 : A) -> λ (x-717 : list l48 A) -> λ (X-x-720 : (l2 : list l48 A) -> eq lzero nat (length l48 A (append l48 A x-717 l2)) (plus (length l48 A x-717) (length l48 A l2))) -> λ (l2 : list l48 A) -> rewrite-l lzero lzero nat (length l48 A (append l48 A x-717 l2)) (λ (X-- : nat) -> eq lzero nat (S (length l48 A (append l48 A x-717 l2))) (S X--)) (refl lzero nat (S (length l48 A (append l48 A x-717 l2)))) (plus (length l48 A x-717) (length l48 A l2)) (X-x-720 l2)) l1
length-map : (l39 l38 : Level) -> (A : Set l39) -> (B-v : Set l38) -> (l : list l39 A) -> (f : (X-- : A) -> B-v) -> eq lzero nat (length l38 B-v (map l39 l38 A B-v f l)) (length l39 A l)
length-map = λ (l39 l38 : Level) -> λ (A : Set l39) -> λ (B-v : Set l38) -> λ (l : list l39 A) -> λ (f : (X-- : A) -> B-v) -> list-ind l39 lzero A (λ (X-x-716 : list l39 A) -> eq lzero nat (length l38 B-v (map l39 l38 A B-v f X-x-716)) (length l39 A X-x-716)) (refl lzero nat (length l38 B-v (map l39 l38 A B-v f (nil l39 A)))) (λ (a : A) -> λ (tl : list l39 A) -> λ (Hind : eq lzero nat (length l38 B-v (map l39 l38 A B-v f tl)) (length l39 A tl)) -> rewrite-r lzero lzero nat (length l39 A tl) (λ (X-- : nat) -> eq lzero nat (S X--) (S (length l39 A tl))) (refl lzero nat (S (length l39 A tl))) (length l38 B-v (map l39 l38 A B-v f tl)) Hind) l
length-reverse : (l127 : Level) -> (A : Set l127) -> (l : list l127 A) -> eq lzero nat (length l127 A (reverse l127 A l)) (length l127 A l)
length-reverse = λ (l127 : Level) -> λ (A : Set l127) -> λ (l : list l127 A) -> list-ind l127 lzero A (λ (X-x-716 : list l127 A) -> eq lzero nat (length l127 A (reverse l127 A X-x-716)) (length l127 A X-x-716)) (refl lzero nat (length l127 A (reverse l127 A (nil l127 A)))) (λ (a : A) -> λ (l0 : list l127 A) -> λ (IH : eq lzero nat (length l127 A (reverse l127 A l0)) (length l127 A l0)) -> eq-ind-r l127 lzero (list l127 A) (append l127 A (reverse l127 A l0) (cons l127 A a (nil l127 A))) (λ (x : list l127 A) -> λ (X-- : eq l127 (list l127 A) x (append l127 A (reverse l127 A l0) (cons l127 A a (nil l127 A)))) -> eq lzero nat (length l127 A x) (length l127 A (cons l127 A a l0))) (eq-ind-r lzero lzero nat (plus (length l127 A (reverse l127 A l0)) (length l127 A (cons l127 A a (nil l127 A)))) (λ (x : nat) -> λ (X-- : eq lzero nat x (plus (length l127 A (reverse l127 A l0)) (length l127 A (cons l127 A a (nil l127 A))))) -> eq lzero nat x (length l127 A (cons l127 A a l0))) (rewrite-r l127 lzero (list l127 A) (append l127 A (reverse l127 A l0) (nil l127 A)) (λ (X-- : list l127 A) -> eq lzero nat (plus (length l127 A X--) (S O)) (S (length l127 A l0))) (rewrite-r l127 lzero (list l127 A) (reverse l127 A l0) (λ (X-- : list l127 A) -> eq lzero nat (plus (length l127 A X--) (S O)) (S (length l127 A l0))) (rewrite-r lzero lzero nat (length l127 A l0) (λ (X-- : nat) -> eq lzero nat (plus X-- (S O)) (S (length l127 A l0))) (rewrite-l lzero lzero nat (S (length l127 A l0)) (λ (X-- : nat) -> eq lzero nat X-- (S (length l127 A l0))) (refl lzero nat (S (length l127 A l0))) (plus (length l127 A l0) (S O)) (rewrite-r lzero lzero nat (plus (length l127 A l0) O) (λ (X-- : nat) -> eq lzero nat (S X--) (plus (length l127 A l0) (S O))) (plus-n-Sm (length l127 A l0) O) (length l127 A l0) (plus-n-O (length l127 A l0)))) (length l127 A (reverse l127 A l0)) IH) (append l127 A (reverse l127 A l0) (nil l127 A)) (append-nil l127 A (reverse l127 A l0))) (rev-append l127 A l0 (nil l127 A)) (rev-append-def l127 A l0 (nil l127 A))) (length l127 A (append l127 A (reverse l127 A l0) (cons l127 A a (nil l127 A)))) (length-append l127 A (reverse l127 A l0) (cons l127 A a (nil l127 A)))) (reverse l127 A (cons l127 A a l0)) (reverse-cons l127 A a l0)) l
lenght-to-nil : (l35 : Level) -> (A : Set l35) -> (l : list l35 A) -> (X-- : eq lzero nat (length l35 A l) O) -> eq l35 (list l35 A) l (nil l35 A)
lenght-to-nil = λ (l35 : Level) -> λ (A : Set l35) -> λ (X-clearme : list l35 A) -> match-list l35 A l35 (λ (X-- : list l35 A) -> (X--1 : eq lzero nat (length l35 A X--) O) -> eq l35 (list l35 A) X-- (nil l35 A)) (λ (auto : eq lzero nat (length l35 A (nil l35 A)) O) -> refl l35 (list l35 A) (nil l35 A)) (λ (a : A) -> λ (tl : list l35 A) -> λ (H : eq lzero nat (S (length l35 A tl)) O) -> nat-discr l35 (S (length l35 A tl)) O H (eq l35 (list l35 A) (cons l35 A a tl) (nil l35 A))) X-clearme
lists-length-split : (l1018 : Level) -> (A : Set l1018) -> (l1 : list l1018 A) -> (l2 : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A l1)) (eq l1018 (list l1018 A) l2 (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A l2)) (eq l1018 (list l1018 A) l1 (append l1018 A la lb)))))
lists-length-split = λ (l1018 : Level) -> λ (A : Set l1018) -> λ (l1 : list l1018 A) -> list-ind l1018 l1018 A (λ (X-x-716 : list l1018 A) -> (l2 : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A X-x-716)) (eq l1018 (list l1018 A) l2 (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A l2)) (eq l1018 (list l1018 A) X-x-716 (append l1018 A la lb)))))) (λ (l2 : list l1018 A) -> ex-intro l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) l2 (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A l2)) (eq l1018 (list l1018 A) (nil l1018 A) (append l1018 A la lb))))) (nil l1018 A) (ex-intro l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) l2 (append l1018 A (nil l1018 A) lb))) (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A l2)) (eq l1018 (list l1018 A) (nil l1018 A) (append l1018 A (nil l1018 A) lb)))) l2 (or-introl l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) l2 (append l1018 A (nil l1018 A) l2))) (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A l2)) (eq l1018 (list l1018 A) (nil l1018 A) (append l1018 A (nil l1018 A) l2))) (conj lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) l2 (append l1018 A (nil l1018 A) l2)) (refl lzero nat (length l1018 A (nil l1018 A))) (refl l1018 (list l1018 A) l2))))) (λ (hd1 : A) -> λ (tl1 : list l1018 A) -> λ (IH : (l2 : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A tl1)) (eq l1018 (list l1018 A) l2 (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A l2)) (eq l1018 (list l1018 A) tl1 (append l1018 A la lb)))))) -> λ (X-clearme : list l1018 A) -> match-list l1018 A l1018 (λ (X-- : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) X-- (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A X--)) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb)))))) (ex-intro l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (nil l1018 A) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb))))) (nil l1018 A) (ex-intro l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (nil l1018 A) (append l1018 A (nil l1018 A) lb))) (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (nil l1018 A) lb)))) (cons l1018 A hd1 tl1) (or-intror l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (nil l1018 A) (append l1018 A (nil l1018 A) (cons l1018 A hd1 tl1)))) (And lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (nil l1018 A) (cons l1018 A hd1 tl1)))) (conj lzero l1018 (eq lzero nat (length l1018 A (nil l1018 A)) (length l1018 A (nil l1018 A))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (nil l1018 A) (cons l1018 A hd1 tl1))) (refl lzero nat (length l1018 A (nil l1018 A))) (refl l1018 (list l1018 A) (cons l1018 A hd1 tl1)))))) (λ (hd2 : A) -> λ (tl2 : list l1018 A) -> match-ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A la lb))))) l1018 (λ (X-- : ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A la lb)))))) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb)))))) (λ (x : list l1018 A) -> λ (X-clearme0 : ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x lb))) (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x lb))))) -> match-ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x lb))) (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x lb)))) l1018 (λ (X-- : ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x lb))) (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x lb))))) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb)))))) (λ (y : list l1018 A) -> λ (X-clearme1 : Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x y))) (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x y)))) -> match-Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x y))) (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x y))) l1018 (λ (X-- : Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x y))) (And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x y)))) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb)))))) (λ (X-clearme2 : And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x y))) -> match-And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x y)) l1018 (λ (X-- : And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl1)) (eq l1018 (list l1018 A) tl2 (append l1018 A x y))) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb)))))) (λ (IH1 : eq lzero nat (length l1018 A x) (length l1018 A tl1)) -> λ (IH2 : eq l1018 (list l1018 A) tl2 (append l1018 A x y)) -> ex-intro l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb))))) (cons l1018 A hd2 x) (ex-intro l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd2 x)) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A (cons l1018 A hd2 x) lb))) (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd2 x)) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (cons l1018 A hd2 x) lb)))) y (or-introl l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd2 x)) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A (cons l1018 A hd2 x) y))) (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd2 x)) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (cons l1018 A hd2 x) y))) (conj lzero l1018 (eq lzero nat (S (length l1018 A x)) (S (length l1018 A tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (cons l1018 A hd2 (append l1018 A x y))) (rewrite-r lzero lzero nat (length l1018 A tl1) (λ (X-- : nat) -> eq lzero nat (S X--) (S (length l1018 A tl1))) (refl lzero nat (S (length l1018 A tl1))) (length l1018 A x) IH1) (rewrite-l l1018 l1018 (list l1018 A) tl2 (λ (X-- : list l1018 A) -> eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (cons l1018 A hd2 X--)) (refl l1018 (list l1018 A) (cons l1018 A hd2 tl2)) (append l1018 A x y) IH2))))) X-clearme2) (λ (X-clearme2 : And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x y))) -> match-And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x y)) l1018 (λ (X-- : And lzero l1018 (eq lzero nat (length l1018 A x) (length l1018 A tl2)) (eq l1018 (list l1018 A) tl1 (append l1018 A x y))) -> ex l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb)))))) (λ (IH1 : eq lzero nat (length l1018 A x) (length l1018 A tl2)) -> λ (IH2 : eq l1018 (list l1018 A) tl1 (append l1018 A x y)) -> ex-intro l1018 l1018 (list l1018 A) (λ (la : list l1018 A) -> ex l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A la lb))) (And lzero l1018 (eq lzero nat (length l1018 A la) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A la lb))))) (cons l1018 A hd1 x) (ex-intro l1018 l1018 (list l1018 A) (λ (lb : list l1018 A) -> Or l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd1 x)) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A (cons l1018 A hd1 x) lb))) (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd1 x)) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (cons l1018 A hd1 x) lb)))) y (or-intror l1018 l1018 (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd1 x)) (length l1018 A (cons l1018 A hd1 tl1))) (eq l1018 (list l1018 A) (cons l1018 A hd2 tl2) (append l1018 A (cons l1018 A hd1 x) y))) (And lzero l1018 (eq lzero nat (length l1018 A (cons l1018 A hd1 x)) (length l1018 A (cons l1018 A hd2 tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (append l1018 A (cons l1018 A hd1 x) y))) (conj lzero l1018 (eq lzero nat (S (length l1018 A x)) (S (length l1018 A tl2))) (eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (cons l1018 A hd1 (append l1018 A x y))) (rewrite-r lzero lzero nat (length l1018 A tl2) (λ (X-- : nat) -> eq lzero nat (S X--) (S (length l1018 A tl2))) (refl lzero nat (S (length l1018 A tl2))) (length l1018 A x) IH1) (rewrite-l l1018 l1018 (list l1018 A) tl1 (λ (X-- : list l1018 A) -> eq l1018 (list l1018 A) (cons l1018 A hd1 tl1) (cons l1018 A hd1 X--)) (refl l1018 (list l1018 A) (cons l1018 A hd1 tl1)) (append l1018 A x y) IH2))))) X-clearme2) X-clearme1) X-clearme0) (IH tl2)) X-clearme) l1
list-ind2 : (l143 l142 l133 : Level) -> (T1 : Set l143) -> (T2 : Set l142) -> (l1 : list l143 T1) -> (l2 : list l142 T2) -> (P : (X-- : list l143 T1) -> (X--1 : list l142 T2) -> Set l133) -> (X-- : eq lzero nat (length l143 T1 l1) (length l142 T2 l2)) -> (X--1 : P (nil l143 T1) (nil l142 T2)) -> (X--2 : (tl1 : list l143 T1) -> (tl2 : list l142 T2) -> (hd1 : T1) -> (hd2 : T2) -> (X--2 : P tl1 tl2) -> P (cons l143 T1 hd1 tl1) (cons l142 T2 hd2 tl2)) -> P l1 l2
list-ind2 = λ (l143 l142 l133 : Level) -> λ (T1 : Set l143) -> λ (T2 : Set l142) -> λ (l1 : list l143 T1) -> λ (l2 : list l142 T2) -> λ (P : (X-- : list l143 T1) -> (X--1 : list l142 T2) -> Set l133) -> λ (Hl : eq lzero nat (length l143 T1 l1) (length l142 T2 l2)) -> λ (Pnil : P (nil l143 T1) (nil l142 T2)) -> λ (Pcons : (tl1 : list l143 T1) -> (tl2 : list l142 T2) -> (hd1 : T1) -> (hd2 : T2) -> (X-- : P tl1 tl2) -> P (cons l143 T1 hd1 tl1) (cons l142 T2 hd2 tl2)) -> list-ind l143 (l142 ⊔ l133) T1 (λ (X-x-716 : list l143 T1) -> (l : list l142 T2) -> (X-- : eq lzero nat (length l143 T1 X-x-716) (length l142 T2 l)) -> P X-x-716 l) (λ (l20 : list l142 T2) -> match-list l142 T2 l133 (λ (X-- : list l142 T2) -> (X--1 : eq lzero nat (length l143 T1 (nil l143 T1)) (length l142 T2 X--)) -> P (nil l143 T1) X--) (λ (auto : eq lzero nat (length l143 T1 (nil l143 T1)) (length l142 T2 (nil l142 T2))) -> Pnil) (λ (t2 : T2) -> λ (tl2 : list l142 T2) -> λ (H : eq lzero nat O (S (length l142 T2 tl2))) -> nat-discr l133 O (S (length l142 T2 tl2)) H (P (nil l143 T1) (cons l142 T2 t2 tl2))) l20) (λ (t1 : T1) -> λ (tl1 : list l143 T1) -> λ (IH : (l : list l142 T2) -> (X-- : eq lzero nat (length l143 T1 tl1) (length l142 T2 l)) -> P tl1 l) -> λ (l20 : list l142 T2) -> match-list l142 T2 l133 (λ (X-- : list l142 T2) -> (X--1 : eq lzero nat (length l143 T1 (cons l143 T1 t1 tl1)) (length l142 T2 X--)) -> P (cons l143 T1 t1 tl1) X--) (λ (H : eq lzero nat (S (length l143 T1 tl1)) O) -> nat-discr l133 (S (length l143 T1 tl1)) O H (P (cons l143 T1 t1 tl1) (nil l142 T2))) (λ (t2 : T2) -> λ (tl2 : list l142 T2) -> λ (H : eq lzero nat (length l143 T1 (cons l143 T1 t1 tl1)) (length l142 T2 (cons l142 T2 t2 tl2))) -> Pcons tl1 tl2 t1 t2 (IH tl2 (nat-discr lzero (S (length l143 T1 tl1)) (S (length l142 T2 tl2)) H (eq lzero nat (length l143 T1 tl1) (length l142 T2 tl2)) (λ (e0 : eq lzero nat (R0 lzero nat (length l143 T1 tl1)) (length l142 T2 tl2)) -> rewrite-l lzero lzero nat (length l143 T1 tl1) (λ (X-- : nat) -> eq lzero nat (length l143 T1 tl1) X--) (refl lzero nat (length l143 T1 tl1)) (length l142 T2 tl2) e0)))) l20) l1 l2 Hl
list-cases2 : (l196 l195 l190 : Level) -> (T1 : Set l196) -> (T2 : Set l195) -> (l1 : list l196 T1) -> (l2 : list l195 T2) -> (P : Set l190) -> (X-- : eq lzero nat (length l196 T1 l1) (length l195 T2 l2)) -> (X--1 : (X--1 : eq l196 (list l196 T1) l1 (nil l196 T1)) -> (X--2 : eq l195 (list l195 T2) l2 (nil l195 T2)) -> P) -> (X--2 : (hd1 : T1) -> (hd2 : T2) -> (tl1 : list l196 T1) -> (tl2 : list l195 T2) -> (X--2 : eq l196 (list l196 T1) l1 (cons l196 T1 hd1 tl1)) -> (X--3 : eq l195 (list l195 T2) l2 (cons l195 T2 hd2 tl2)) -> P) -> P
list-cases2 = λ (l196 l195 l190 : Level) -> λ (T1 : Set l196) -> λ (T2 : Set l195) -> λ (l1 : list l196 T1) -> λ (l2 : list l195 T2) -> λ (P : Set l190) -> λ (Hl : eq lzero nat (length l196 T1 l1) (length l195 T2 l2)) -> list-ind2 l196 l195 ((l196 ⊔ l195) ⊔ l190) T1 T2 l1 l2 (λ (X-- : list l196 T1) -> λ (X-0 : list l195 T2) -> (X--1 : (X--1 : eq l196 (list l196 T1) X-- (nil l196 T1)) -> (X--2 : eq l195 (list l195 T2) X-0 (nil l195 T2)) -> P) -> (X--2 : (hd1 : T1) -> (hd2 : T2) -> (tl1 : list l196 T1) -> (tl2 : list l195 T2) -> (X--2 : eq l196 (list l196 T1) X-- (cons l196 T1 hd1 tl1)) -> (X--3 : eq l195 (list l195 T2) X-0 (cons l195 T2 hd2 tl2)) -> P) -> P) Hl (λ (Pnil : (X-- : eq l196 (list l196 T1) (nil l196 T1) (nil l196 T1)) -> (X--1 : eq l195 (list l195 T2) (nil l195 T2) (nil l195 T2)) -> P) -> λ (Pcons : (hd1 : T1) -> (hd2 : T2) -> (tl1 : list l196 T1) -> (tl2 : list l195 T2) -> (X-- : eq l196 (list l196 T1) (nil l196 T1) (cons l196 T1 hd1 tl1)) -> (X--1 : eq l195 (list l195 T2) (nil l195 T2) (cons l195 T2 hd2 tl2)) -> P) -> Pnil (refl l196 (list l196 T1) (nil l196 T1)) (refl l195 (list l195 T2) (nil l195 T2))) (λ (tl1 : list l196 T1) -> λ (tl2 : list l195 T2) -> λ (hd1 : T1) -> λ (hd2 : T2) -> λ (IH1 : (X-- : (X-- : eq l196 (list l196 T1) tl1 (nil l196 T1)) -> (X--1 : eq l195 (list l195 T2) tl2 (nil l195 T2)) -> P) -> (X--1 : (hd10 : T1) -> (hd20 : T2) -> (tl10 : list l196 T1) -> (tl20 : list l195 T2) -> (X--1 : eq l196 (list l196 T1) tl1 (cons l196 T1 hd10 tl10)) -> (X--2 : eq l195 (list l195 T2) tl2 (cons l195 T2 hd20 tl20)) -> P) -> P) -> λ (IH2 : (X-- : eq l196 (list l196 T1) (cons l196 T1 hd1 tl1) (nil l196 T1)) -> (X--1 : eq l195 (list l195 T2) (cons l195 T2 hd2 tl2) (nil l195 T2)) -> P) -> λ (Hp : (hd10 : T1) -> (hd20 : T2) -> (tl10 : list l196 T1) -> (tl20 : list l195 T2) -> (X-- : eq l196 (list l196 T1) (cons l196 T1 hd1 tl1) (cons l196 T1 hd10 tl10)) -> (X--1 : eq l195 (list l195 T2) (cons l195 T2 hd2 tl2) (cons l195 T2 hd20 tl20)) -> P) -> Hp hd1 hd2 tl1 tl2 (refl l196 (list l196 T1) (cons l196 T1 hd1 tl1)) (refl l195 (list l195 T2) (cons l195 T2 hd2 tl2)))
append-l1-injective : (l125 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l125))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l125)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l125)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l125)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l125)) A) -> (X-- : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l125)) A l1) (length ((lsuc lzero) ⊔ (lsuc l125)) A l2)) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) A) (append ((lsuc lzero) ⊔ (lsuc l125)) A l1 l3) (append ((lsuc lzero) ⊔ (lsuc l125)) A l2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) A) l1 l2
append-l1-injective = λ (l125 : Level) -> λ (a : Set ((lsuc lzero) ⊔ (lsuc l125))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (l4 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (Hlen : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l125)) a l1) (length ((lsuc lzero) ⊔ (lsuc l125)) a l2)) -> list-ind2 ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) a a l1 l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (X-0 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a X-- l3) (append ((lsuc lzero) ⊔ (lsuc l125)) a X-0 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) X-- X-0) Hlen (λ (auto : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a (nil ((lsuc lzero) ⊔ (lsuc l125)) a) l3) (append ((lsuc lzero) ⊔ (lsuc l125)) a (nil ((lsuc lzero) ⊔ (lsuc l125)) a) l4)) -> refl ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (nil ((lsuc lzero) ⊔ (lsuc l125)) a)) (λ (tl1 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (tl2 : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> λ (hd1 : a) -> λ (hd2 : a) -> λ (IH : (X-- : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) tl1 tl2) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd1 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4))) -> list-discr l125 ((lsuc lzero) ⊔ (lsuc l125)) a (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd1 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4)) Heq (eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd1 tl1) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 tl2)) (λ (e0 : eq ((lsuc lzero) ⊔ (lsuc l125)) a (R0 ((lsuc lzero) ⊔ (lsuc l125)) a hd1) hd2) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (λ (x : a) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l125)) a x hd2) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (cons ((lsuc lzero) ⊔ (lsuc l125)) a x (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4))) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (R1 ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) a x (λ (x0 : a) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l125)) a x x0) -> list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3) hd2 X--) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (cons ((lsuc lzero) ⊔ (lsuc l125)) a x tl1) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 tl2)) (λ (Heq0 : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4))) -> λ (e00 : eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (R1 ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) a hd2 (λ (x0 : a) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l125)) a hd2 x0) -> list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3) hd2 (refl ((lsuc lzero) ⊔ (lsuc l125)) a hd2)) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4)) -> eq-f ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (cons ((lsuc lzero) ⊔ (lsuc l125)) a hd2) tl1 tl2 (IH (rewrite-l ((lsuc lzero) ⊔ (lsuc l125)) ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l125)) a) -> eq ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3) X--) (refl ((lsuc lzero) ⊔ (lsuc l125)) (list ((lsuc lzero) ⊔ (lsuc l125)) a) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl1 l3)) (append ((lsuc lzero) ⊔ (lsuc l125)) a tl2 l4) e00))) hd1 e0 Heq))
append-l2-injective : (l118 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l118))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (X-- : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) A l1) (length ((lsuc lzero) ⊔ (lsuc l118)) A l2)) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) A) (append ((lsuc lzero) ⊔ (lsuc l118)) A l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) A l2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) A) l3 l4
append-l2-injective = λ (l118 : Level) -> λ (a : Set ((lsuc lzero) ⊔ (lsuc l118))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l4 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (Hlen : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l1) (length ((lsuc lzero) ⊔ (lsuc l118)) a l2)) -> list-ind2 ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) a a l1 l2 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (X-0 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a X-- l3) (append ((lsuc lzero) ⊔ (lsuc l118)) a X-0 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) Hlen (λ (auto : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) -> rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 X--) (refl ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3) l4 auto) (λ (tl1 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (tl2 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (hd1 : a) -> λ (hd2 : a) -> λ (IH : (X-- : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd1 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4))) -> list-discr l118 ((lsuc lzero) ⊔ (lsuc l118)) a (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd1 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4)) Heq (eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) (λ (e0 : eq ((lsuc lzero) ⊔ (lsuc l118)) a (R0 ((lsuc lzero) ⊔ (lsuc l118)) a hd1) hd2) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (λ (x : a) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l118)) a x hd2) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (cons ((lsuc lzero) ⊔ (lsuc l118)) a x (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4))) -> (X-e1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (R1 ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) a x (λ (x0 : a) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l118)) a x x0) -> list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3) hd2 X--) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) (λ (Heq0 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3)) (cons ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4))) -> λ (e00 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (R1 ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) a hd2 (λ (x0 : a) -> λ (p0 : eq ((lsuc lzero) ⊔ (lsuc l118)) a hd2 x0) -> list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3) hd2 (refl ((lsuc lzero) ⊔ (lsuc l118)) a hd2)) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4)) -> IH (rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3) X--) (refl ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl1 l3)) (append ((lsuc lzero) ⊔ (lsuc l118)) a tl2 l4) e00)) hd1 e0 Heq))
append-l1-injective-r : (l118 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l118))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (X-- : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) A l3) (length ((lsuc lzero) ⊔ (lsuc l118)) A l4)) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) A) (append ((lsuc lzero) ⊔ (lsuc l118)) A l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) A l2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) A) l1 l2
append-l1-injective-r = λ (l118 : Level) -> λ (a : Set ((lsuc lzero) ⊔ (lsuc l118))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l4 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (Hlen : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) (length ((lsuc lzero) ⊔ (lsuc l118)) a l4)) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4)) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) (λ (x : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) x (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1))) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) x (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4))) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l1 l2) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2)) (λ (x : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) x (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2))) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) x) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l1 l2) (λ (Heq1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2))) -> rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l1 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l1 X--) (refl ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l1) l2 (rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2)) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l1 X--) (rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) X-- (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2))) (eq-f ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2) (append-l2-injective l118 a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2) (rewrite-r lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) (λ (X-- : nat) -> eq lzero nat X-- (length ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4))) (rewrite-r lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l4) (λ (X-- : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) X--) (rewrite-l lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) (λ (X-- : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) X--) (refl lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3)) (length ((lsuc lzero) ⊔ (lsuc l118)) a l4) Hlen) (length ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4)) (length-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4)) (length ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3)) (length-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3)) Heq1)) l1 (reverse-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) l2 (reverse-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2))) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4)) (reverse-append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4)) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3)) (reverse-append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3) (eq-f ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4) Heq)
append-l2-injective-r : (l118 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l118))) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l3 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (l4 : list ((lsuc lzero) ⊔ (lsuc l118)) A) -> (X-- : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) A l3) (length ((lsuc lzero) ⊔ (lsuc l118)) A l4)) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) A) (append ((lsuc lzero) ⊔ (lsuc l118)) A l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) A l2 l4)) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) A) l3 l4
append-l2-injective-r = λ (l118 : Level) -> λ (a : Set ((lsuc lzero) ⊔ (lsuc l118))) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l3 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (l4 : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (Hlen : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) (length ((lsuc lzero) ⊔ (lsuc l118)) a l4)) -> λ (Heq : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4)) -> eq-ind-r ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) (λ (x : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) x (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1))) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) x (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4))) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2)) (λ (x : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) x (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2))) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) x) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 l4) (λ (Heq1 : eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1)) (append ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2))) -> rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 X--) (refl ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3) l4 (rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4)) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) l3 X--) (rewrite-l ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3)) (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l118)) a) -> eq ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) X-- (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4))) (eq-f ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (append-l1-injective l118 a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l1) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l2) (rewrite-r lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) (λ (X-- : nat) -> eq lzero nat X-- (length ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4))) (rewrite-r lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l4) (λ (X-- : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) X--) (rewrite-l lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) (λ (X-- : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3) X--) (refl lzero nat (length ((lsuc lzero) ⊔ (lsuc l118)) a l3)) (length ((lsuc lzero) ⊔ (lsuc l118)) a l4) Hlen) (length ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4)) (length-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4)) (length ((lsuc lzero) ⊔ (lsuc l118)) a (reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3)) (length-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3)) Heq1)) l3 (reverse-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l3)) l4 (reverse-reverse ((lsuc lzero) ⊔ (lsuc l118)) a l4))) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4)) (reverse-append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4)) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a (append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3)) (reverse-append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3) (eq-f ((lsuc lzero) ⊔ (lsuc l118)) ((lsuc lzero) ⊔ (lsuc l118)) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (list ((lsuc lzero) ⊔ (lsuc l118)) a) (reverse ((lsuc lzero) ⊔ (lsuc l118)) a) (append ((lsuc lzero) ⊔ (lsuc l118)) a l1 l3) (append ((lsuc lzero) ⊔ (lsuc l118)) a l2 l4) Heq)
length-rev-append : (l68 : Level) -> (A : Set l68) -> (l : list l68 A) -> (acc : list l68 A) -> eq lzero nat (length l68 A (rev-append l68 A l acc)) (plus (length l68 A l) (length l68 A acc))
length-rev-append = λ (l68 : Level) -> λ (A : Set l68) -> λ (l : list l68 A) -> list-ind l68 l68 A (λ (X-x-716 : list l68 A) -> (acc : list l68 A) -> eq lzero nat (length l68 A (rev-append l68 A X-x-716 acc)) (plus (length l68 A X-x-716) (length l68 A acc))) (λ (acc : list l68 A) -> refl lzero nat (length l68 A (rev-append l68 A (nil l68 A) acc))) (λ (a : A) -> λ (tl : list l68 A) -> λ (Hind : (acc : list l68 A) -> eq lzero nat (length l68 A (rev-append l68 A tl acc)) (plus (length l68 A tl) (length l68 A acc))) -> λ (acc : list l68 A) -> eq-ind-r lzero lzero nat (plus (length l68 A tl) (length l68 A (cons l68 A a acc))) (λ (x : nat) -> λ (X-- : eq lzero nat x (plus (length l68 A tl) (length l68 A (cons l68 A a acc)))) -> eq lzero nat x (S (plus (length l68 A tl) (length l68 A acc)))) (rewrite-l lzero lzero nat (S (plus (length l68 A tl) (length l68 A acc))) (λ (X-- : nat) -> eq lzero nat X-- (S (plus (length l68 A tl) (length l68 A acc)))) (refl lzero nat (S (plus (length l68 A tl) (length l68 A acc)))) (plus (length l68 A tl) (S (length l68 A acc))) (plus-n-Sm (length l68 A tl) (length l68 A acc))) (length l68 A (rev-append l68 A tl (cons l68 A a acc))) (Hind (cons l68 A a acc))) l
mem : (l0-v : Level) -> (H-v : Set l0-v) -> (X---v : H-v) -> (X--1-v : list l0-v H-v) -> Set l0-v
mem ll0-v H-v X---v nil' = False ll0-v
mem ll0-v H-v X---v (cons' hd-v tl-v) = Or ll0-v ll0-v (eq ll0-v H-v X---v hd-v) (mem ll0-v H-v X---v tl-v)
mem-append : (l117 : Level) -> (A : Set l117) -> (a : A) -> (l1 : list l117 A) -> (l2 : list l117 A) -> (X-- : mem l117 A a (append l117 A l1 l2)) -> Or l117 l117 (mem l117 A a l1) (mem l117 A a l2)
mem-append = λ (l117 : Level) -> λ (A : Set l117) -> λ (a : A) -> λ (l1 : list l117 A) -> list-ind l117 l117 A (λ (X-x-716 : list l117 A) -> (l2 : list l117 A) -> (X-- : mem l117 A a (append l117 A X-x-716 l2)) -> Or l117 l117 (mem l117 A a X-x-716) (mem l117 A a l2)) (λ (l2 : list l117 A) -> λ (mema : mem l117 A a (append l117 A (nil l117 A) l2)) -> or-intror l117 l117 (mem l117 A a (nil l117 A)) (mem l117 A a l2) mema) (λ (b : A) -> λ (tl : list l117 A) -> λ (Hind : (l2 : list l117 A) -> (X-- : mem l117 A a (append l117 A tl l2)) -> Or l117 l117 (mem l117 A a tl) (mem l117 A a l2)) -> λ (l2 : list l117 A) -> λ (X-clearme : mem l117 A a (append l117 A (cons l117 A b tl) l2)) -> match-Or l117 l117 (eq l117 A a b) (mem l117 A a (append l117 A tl l2)) l117 (λ (X-- : Or l117 l117 (eq l117 A a b) (mem l117 A a (append l117 A tl l2))) -> Or l117 l117 (mem l117 A a (cons l117 A b tl)) (mem l117 A a l2)) (λ (eqab : eq l117 A a b) -> or-introl l117 l117 (mem l117 A a (cons l117 A b tl)) (mem l117 A a l2) (or-introl l117 l117 (eq l117 A a b) (mem l117 A a tl) eqab)) (λ (Hmema : mem l117 A a (append l117 A tl l2)) -> match-Or l117 l117 (mem l117 A a tl) (mem l117 A a l2) l117 (λ (X-- : Or l117 l117 (mem l117 A a tl) (mem l117 A a l2)) -> Or l117 l117 (mem l117 A a (cons l117 A b tl)) (mem l117 A a l2)) (λ (Hmema0 : mem l117 A a tl) -> or-introl l117 l117 (mem l117 A a (cons l117 A b tl)) (mem l117 A a l2) (or-intror l117 l117 (eq l117 A a b) (mem l117 A a tl) Hmema0)) (λ (Hmema0 : mem l117 A a l2) -> or-intror l117 l117 (mem l117 A a (cons l117 A b tl)) (mem l117 A a l2) Hmema0) (Hind l2 Hmema)) X-clearme) l1
mem-append-l1 : (l61 : Level) -> (A : Set l61) -> (a : A) -> (l1 : list l61 A) -> (l2 : list l61 A) -> (X-- : mem l61 A a l1) -> mem l61 A a (append l61 A l1 l2)
mem-append-l1 = λ (l61 : Level) -> λ (A : Set l61) -> λ (a : A) -> λ (l1 : list l61 A) -> λ (l2 : list l61 A) -> list-ind l61 l61 A (λ (X-x-716 : list l61 A) -> (X-- : mem l61 A a X-x-716) -> mem l61 A a (append l61 A X-x-716 l2)) (False-ind l61 l61 (λ (X-x-66 : False l61) -> mem l61 A a (append l61 A (nil l61 A) l2))) (λ (b : A) -> λ (tl : list l61 A) -> λ (Hind : (X-- : mem l61 A a tl) -> mem l61 A a (append l61 A tl l2)) -> λ (X-clearme : mem l61 A a (cons l61 A b tl)) -> match-Or l61 l61 (eq l61 A a b) (mem l61 A a tl) l61 (λ (X-- : Or l61 l61 (eq l61 A a b) (mem l61 A a tl)) -> mem l61 A a (append l61 A (cons l61 A b tl) l2)) (λ (eqab : eq l61 A a b) -> or-introl l61 l61 (eq l61 A a b) (mem l61 A a (append l61 A tl l2)) eqab) (λ (Hmema : mem l61 A a tl) -> or-intror l61 l61 (eq l61 A a b) (mem l61 A a (append l61 A tl l2)) (Hind Hmema)) X-clearme) l1
mem-append-l2 : (l33 : Level) -> (A : Set l33) -> (a : A) -> (l1 : list l33 A) -> (l2 : list l33 A) -> (X-- : mem l33 A a l2) -> mem l33 A a (append l33 A l1 l2)
mem-append-l2 = λ (l33 : Level) -> λ (A : Set l33) -> λ (a : A) -> λ (l1 : list l33 A) -> λ (l2 : list l33 A) -> list-ind l33 l33 A (λ (X-x-716 : list l33 A) -> (X-- : mem l33 A a l2) -> mem l33 A a (append l33 A X-x-716 l2)) (λ (auto : mem l33 A a l2) -> auto) (λ (b : A) -> λ (tl : list l33 A) -> λ (Hind : (X-- : mem l33 A a l2) -> mem l33 A a (append l33 A tl l2)) -> λ (Hmema : mem l33 A a l2) -> or-intror l33 l33 (eq l33 A a b) (mem l33 A a (append l33 A tl l2)) (Hind Hmema)) l1
mem-single : (l31 : Level) -> (A : Set l31) -> (a : A) -> (b : A) -> (X-- : mem l31 A a (cons l31 A b (nil l31 A))) -> eq l31 A a b
mem-single = λ (l31 : Level) -> λ (A : Set l31) -> λ (a : A) -> λ (b : A) -> λ (X-clearme : mem l31 A a (cons l31 A b (nil l31 A))) -> match-Or l31 l31 (eq l31 A a b) (mem l31 A a (nil l31 A)) l31 (λ (X-- : Or l31 l31 (eq l31 A a b) (mem l31 A a (nil l31 A))) -> eq l31 A a b) (λ (auto : eq l31 A a b) -> rewrite-l l31 l31 A a (λ (X-- : A) -> eq l31 A a X--) (refl l31 A a) b auto) (False-ind l31 l31 (λ (X-x-66 : False l31) -> eq l31 A a b)) X-clearme
mem-map : (l209 l202 : Level) -> (A : Set l209) -> (B-v : Set l202) -> (f : (X-- : A) -> B-v) -> (l : list l209 A) -> (b : B-v) -> (X-- : mem l202 B-v b (map l209 l202 A B-v f l)) -> ex l209 (l209 ⊔ l202) A (λ (a : A) -> And l209 l202 (mem l209 A a l) (eq l202 B-v (f a) b))
mem-map = λ (l209 l202 : Level) -> λ (A : Set l209) -> λ (B-v : Set l202) -> λ (f : (X-- : A) -> B-v) -> λ (l : list l209 A) -> list-ind l209 (l209 ⊔ l202) A (λ (X-x-716 : list l209 A) -> (b : B-v) -> (X-- : mem l202 B-v b (map l209 l202 A B-v f X-x-716)) -> ex l209 (l209 ⊔ l202) A (λ (a : A) -> And l209 l202 (mem l209 A a X-x-716) (eq l202 B-v (f a) b))) (λ (b : B-v) -> False-ind l202 (l209 ⊔ l202) (λ (X-x-66 : False l202) -> ex l209 (l209 ⊔ l202) A (λ (a : A) -> And l209 l202 (False l209) (eq l202 B-v (f a) b)))) (λ (a : A) -> λ (tl : list l209 A) -> λ (Hind : (b : B-v) -> (X-- : mem l202 B-v b (map l209 l202 A B-v f tl)) -> ex l209 (l209 ⊔ l202) A (λ (a0 : A) -> And l209 l202 (mem l209 A a0 tl) (eq l202 B-v (f a0) b))) -> λ (b : B-v) -> λ (X-clearme : Or l202 l202 (eq l202 B-v b (f a)) (mem l202 B-v b (map l209 l202 A B-v f tl))) -> match-Or l202 l202 (eq l202 B-v b (f a)) (mem l202 B-v b (map l209 l202 A B-v f tl)) (l209 ⊔ l202) (λ (X-- : Or l202 l202 (eq l202 B-v b (f a)) (mem l202 B-v b (map l209 l202 A B-v f tl))) -> ex l209 (l209 ⊔ l202) A (λ (a0 : A) -> And l209 l202 (Or l209 l209 (eq l209 A a0 a) (mem l209 A a0 tl)) (eq l202 B-v (f a0) b))) (λ (eqb-v : eq l202 B-v b (f a)) -> ex-intro l209 (l209 ⊔ l202) A (λ (a0 : A) -> And l209 l202 (Or l209 l209 (eq l209 A a0 a) (mem l209 A a0 tl)) (eq l202 B-v (f a0) b)) a (conj l209 l202 (Or l209 l209 (eq l209 A a a) (mem l209 A a tl)) (eq l202 B-v (f a) b) (or-introl l209 l209 (eq l209 A a a) (mem l209 A a tl) (refl l209 A a)) (rewrite-l l202 l202 B-v b (λ (X-- : B-v) -> eq l202 B-v X-- b) (refl l202 B-v b) (f a) eqb-v))) (λ (memb : mem l202 B-v b (map l209 l202 A B-v f tl)) -> match-ex l209 (l209 ⊔ l202) A (λ (a0 : A) -> And l209 l202 (mem l209 A a0 tl) (eq l202 B-v (f a0) b)) (l209 ⊔ l202) (λ (X-- : ex l209 (l209 ⊔ l202) A (λ (a0 : A) -> And l209 l202 (mem l209 A a0 tl) (eq l202 B-v (f a0) b))) -> ex l209 (l209 ⊔ l202) A (λ (a0 : A) -> And l209 l202 (Or l209 l209 (eq l209 A a0 a) (mem l209 A a0 tl)) (eq l202 B-v (f a0) b))) (λ (a0 : A) -> λ (X-clearme0 : And l209 l202 (mem l209 A a0 tl) (eq l202 B-v (f a0) b)) -> match-And l209 l202 (mem l209 A a0 tl) (eq l202 B-v (f a0) b) (l209 ⊔ l202) (λ (X-- : And l209 l202 (mem l209 A a0 tl) (eq l202 B-v (f a0) b)) -> ex l209 (l209 ⊔ l202) A (λ (a00 : A) -> And l209 l202 (Or l209 l209 (eq l209 A a00 a) (mem l209 A a00 tl)) (eq l202 B-v (f a00) b))) (λ (mema : mem l209 A a0 tl) -> λ (eqb-v : eq l202 B-v (f a0) b) -> ex-intro l209 (l209 ⊔ l202) A (λ (a00 : A) -> And l209 l202 (Or l209 l209 (eq l209 A a00 a) (mem l209 A a00 tl)) (eq l202 B-v (f a00) b)) a0 (conj l209 l202 (Or l209 l209 (eq l209 A a0 a) (mem l209 A a0 tl)) (eq l202 B-v (f a0) b) (or-intror l209 l209 (eq l209 A a0 a) (mem l209 A a0 tl) mema) (rewrite-r l202 l202 B-v b (λ (X-- : B-v) -> eq l202 B-v X-- b) (refl l202 B-v b) (f a0) eqb-v))) X-clearme0) (Hind b memb)) X-clearme) l
mem-map-forward : (l75 l74 : Level) -> (A : Set l75) -> (B-v : Set l74) -> (f : (X-- : A) -> B-v) -> (a : A) -> (l : list l75 A) -> (X-- : mem l75 A a l) -> mem l74 B-v (f a) (map l75 l74 A B-v f l)
mem-map-forward = λ (l75 l74 : Level) -> λ (A : Set l75) -> λ (B-v : Set l74) -> λ (f : (X-- : A) -> B-v) -> λ (a : A) -> λ (l : list l75 A) -> list-ind l75 (l75 ⊔ l74) A (λ (X-x-716 : list l75 A) -> (X-- : mem l75 A a X-x-716) -> mem l74 B-v (f a) (map l75 l74 A B-v f X-x-716)) (False-ind l75 l74 (λ (X-x-66 : False l75) -> False l74)) (λ (b : A) -> λ (tl : list l75 A) -> λ (Hind : (X-- : mem l75 A a tl) -> mem l74 B-v (f a) (map l75 l74 A B-v f tl)) -> λ (X-clearme : mem l75 A a (cons l75 A b tl)) -> match-Or l75 l75 (eq l75 A a b) (mem l75 A a tl) l74 (λ (X-- : Or l75 l75 (eq l75 A a b) (mem l75 A a tl)) -> mem l74 B-v (f a) (map l75 l74 A B-v f (cons l75 A b tl))) (λ (eqab : eq l75 A a b) -> eq-ind l75 l74 A a (λ (x-1 : A) -> λ (X-x-2 : eq l75 A a x-1) -> mem l74 B-v (f a) (map l75 l74 A B-v f (cons l75 A x-1 tl))) (or-introl l74 l74 (eq l74 B-v (f a) (f a)) (mem l74 B-v (f a) (map l75 l74 A B-v f tl)) (refl l74 B-v (f a))) b eqab) (λ (memtl : mem l75 A a tl) -> or-intror l74 l74 (eq l74 B-v (f a) (f b)) (mem l74 B-v (f a) (map l75 l74 A B-v f tl)) (Hind memtl)) X-clearme) l
mem-filter : (l182 : Level) -> (S-v : Set l182) -> (f : (X-- : S-v) -> bool) -> (a : S-v) -> (l : list l182 S-v) -> (X-- : mem l182 S-v a (filter' l182 S-v f l)) -> mem l182 S-v a l
mem-filter = λ (l182 : Level) -> λ (S-v : Set l182) -> λ (f : (X-- : S-v) -> bool) -> λ (a : S-v) -> λ (l : list l182 S-v) -> list-ind l182 l182 S-v (λ (X-x-716 : list l182 S-v) -> (X-- : mem l182 S-v a (filter' l182 S-v f X-x-716)) -> mem l182 S-v a X-x-716) (λ (auto : False l182) -> auto) (λ (b : S-v) -> λ (tl : list l182 S-v) -> λ (Hind : (X-- : mem l182 S-v a (filter' l182 S-v f tl)) -> mem l182 S-v a tl) -> match-bool l182 (λ (X-- : bool) -> (X--1 : mem l182 S-v a (match-bool l182 (λ (X-0 : bool) -> list l182 S-v) (cons l182 S-v b (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-0 : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl)) (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-0 : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl) X--)) -> Or l182 l182 (eq l182 S-v a b) (mem l182 S-v a tl)) (λ (X-clearme : Or l182 l182 (eq l182 S-v a b) (mem l182 S-v a (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-- : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl))) -> match-Or l182 l182 (eq l182 S-v a b) (mem l182 S-v a (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-- : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl)) l182 (λ (X-- : Or l182 l182 (eq l182 S-v a b) (mem l182 S-v a (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-- : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl))) -> Or l182 l182 (eq l182 S-v a b) (mem l182 S-v a tl)) (λ (eqab : eq l182 S-v a b) -> or-introl l182 l182 (eq l182 S-v a b) (mem l182 S-v a tl) eqab) (λ (H : mem l182 S-v a (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-- : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl)) -> or-intror l182 l182 (eq l182 S-v a b) (mem l182 S-v a tl) (Hind H)) X-clearme) (λ (H : mem l182 S-v a (foldr l182 l182 S-v (list l182 S-v) (λ (x : S-v) -> λ (l0 : list l182 S-v) -> match-bool l182 (λ (X-- : bool) -> list l182 S-v) (cons l182 S-v x l0) l0 (f x)) (nil l182 S-v) tl)) -> or-intror l182 l182 (eq l182 S-v a b) (mem l182 S-v a tl) (Hind H)) (f b)) l
mem-filter-true : (l240 : Level) -> (S-v : Set l240) -> (f : (X-- : S-v) -> bool) -> (a : S-v) -> (l : list l240 S-v) -> (X-- : mem l240 S-v a (filter' l240 S-v f l)) -> eq lzero bool (f a) true
mem-filter-true = λ (l240 : Level) -> λ (S-v : Set l240) -> λ (f : (X-- : S-v) -> bool) -> λ (a : S-v) -> λ (l : list l240 S-v) -> list-ind l240 l240 S-v (λ (X-x-716 : list l240 S-v) -> (X-- : mem l240 S-v a (filter' l240 S-v f X-x-716)) -> eq lzero bool (f a) true) (False-ind l240 lzero (λ (X-x-66 : False l240) -> eq lzero bool (f a) true)) (λ (b : S-v) -> λ (tl : list l240 S-v) -> λ (Hind : (X-- : mem l240 S-v a (filter' l240 S-v f tl)) -> eq lzero bool (f a) true) -> match-Or lzero lzero (eq lzero bool (f b) true) (eq lzero bool (f b) false) l240 (λ (X-- : Or lzero lzero (eq lzero bool (f b) true) (eq lzero bool (f b) false)) -> (X--1 : mem l240 S-v a (filter' l240 S-v f (cons l240 S-v b tl))) -> eq lzero bool (f a) true) (λ (H : eq lzero bool (f b) true) -> eq-ind-r lzero l240 bool true (λ (x : bool) -> λ (X-- : eq lzero bool x true) -> (X--1 : mem l240 S-v a (match-bool l240 (λ (X-0 : bool) -> list l240 S-v) (cons l240 S-v b (foldr l240 l240 S-v (list l240 S-v) (λ (x0 : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-0 : bool) -> list l240 S-v) (cons l240 S-v x0 l0) l0 (f x0)) (nil l240 S-v) tl)) (foldr l240 l240 S-v (list l240 S-v) (λ (x0 : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-0 : bool) -> list l240 S-v) (cons l240 S-v x0 l0) l0 (f x0)) (nil l240 S-v) tl) x)) -> eq lzero bool (f a) true) (λ (X-clearme : Or l240 l240 (eq l240 S-v a b) (mem l240 S-v a (foldr l240 l240 S-v (list l240 S-v) (λ (x : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-- : bool) -> list l240 S-v) (cons l240 S-v x l0) l0 (f x)) (nil l240 S-v) tl))) -> match-Or l240 l240 (eq l240 S-v a b) (mem l240 S-v a (foldr l240 l240 S-v (list l240 S-v) (λ (x : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-- : bool) -> list l240 S-v) (cons l240 S-v x l0) l0 (f x)) (nil l240 S-v) tl)) lzero (λ (X-- : Or l240 l240 (eq l240 S-v a b) (mem l240 S-v a (foldr l240 l240 S-v (list l240 S-v) (λ (x : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-- : bool) -> list l240 S-v) (cons l240 S-v x l0) l0 (f x)) (nil l240 S-v) tl))) -> eq lzero bool (f a) true) (λ (eqab : eq l240 S-v a b) -> rewrite-r lzero lzero bool true (λ (X-- : bool) -> eq lzero bool X-- true) (refl lzero bool true) (f a) (rewrite-r l240 lzero S-v b (λ (X-- : S-v) -> eq lzero bool (f X--) true) H a eqab)) Hind X-clearme) (f b) H) (λ (H : eq lzero bool (f b) false) -> eq-ind-r lzero l240 bool false (λ (x : bool) -> λ (X-- : eq lzero bool x false) -> (X--1 : mem l240 S-v a (match-bool l240 (λ (X-0 : bool) -> list l240 S-v) (cons l240 S-v b (foldr l240 l240 S-v (list l240 S-v) (λ (x0 : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-0 : bool) -> list l240 S-v) (cons l240 S-v x0 l0) l0 (f x0)) (nil l240 S-v) tl)) (foldr l240 l240 S-v (list l240 S-v) (λ (x0 : S-v) -> λ (l0 : list l240 S-v) -> match-bool l240 (λ (X-0 : bool) -> list l240 S-v) (cons l240 S-v x0 l0) l0 (f x0)) (nil l240 S-v) tl) x)) -> eq lzero bool (f a) true) Hind (f b) H) (true-or-false (f b))) l
mem-filter-l : (l135 : Level) -> (S-v : Set l135) -> (f : (X-- : S-v) -> bool) -> (x : S-v) -> (l : list l135 S-v) -> (X-- : eq lzero bool (f x) true) -> (X--1 : mem l135 S-v x l) -> mem l135 S-v x (filter' l135 S-v f l)
mem-filter-l = λ (l135 : Level) -> λ (S-v : Set l135) -> λ (f : (X-- : S-v) -> bool) -> λ (x : S-v) -> λ (l : list l135 S-v) -> λ (fx : eq lzero bool (f x) true) -> list-ind l135 l135 S-v (λ (X-x-716 : list l135 S-v) -> (X-- : mem l135 S-v x X-x-716) -> mem l135 S-v x (filter' l135 S-v f X-x-716)) (False-ind l135 l135 (λ (X-x-66 : False l135) -> mem l135 S-v x (filter' l135 S-v f (nil l135 S-v)))) (λ (b : S-v) -> λ (tl : list l135 S-v) -> λ (Hind : (X-- : mem l135 S-v x tl) -> mem l135 S-v x (filter' l135 S-v f tl)) -> λ (X-clearme : mem l135 S-v x (cons l135 S-v b tl)) -> match-Or l135 l135 (eq l135 S-v x b) (mem l135 S-v x tl) l135 (λ (X-- : Or l135 l135 (eq l135 S-v x b) (mem l135 S-v x tl)) -> mem l135 S-v x (filter' l135 S-v f (cons l135 S-v b tl))) (λ (eqxb : eq l135 S-v x b) -> eq-ind l135 l135 S-v x (λ (x-1 : S-v) -> λ (X-x-2 : eq l135 S-v x x-1) -> mem l135 S-v x (filter' l135 S-v f (cons l135 S-v x-1 tl))) (eq-ind-r l135 l135 (list l135 S-v) (cons l135 S-v x (filter' l135 S-v f tl)) (λ (x0 : list l135 S-v) -> λ (X-- : eq l135 (list l135 S-v) x0 (cons l135 S-v x (filter' l135 S-v f tl))) -> mem l135 S-v x x0) (or-introl l135 l135 (eq l135 S-v x x) (mem l135 S-v x (filter' l135 S-v f tl)) (refl l135 S-v x)) (filter' l135 S-v f (cons l135 S-v x tl)) (filter-true l135 S-v tl x f fx)) b eqxb) (λ (Htl : mem l135 S-v x tl) -> match-Or lzero lzero (eq lzero bool (f b) true) (eq lzero bool (f b) false) l135 (λ (X-- : Or lzero lzero (eq lzero bool (f b) true) (eq lzero bool (f b) false)) -> mem l135 S-v x (filter' l135 S-v f (cons l135 S-v b tl))) (λ (fb : eq lzero bool (f b) true) -> eq-ind-r l135 l135 (list l135 S-v) (cons l135 S-v b (filter' l135 S-v f tl)) (λ (x0 : list l135 S-v) -> λ (X-- : eq l135 (list l135 S-v) x0 (cons l135 S-v b (filter' l135 S-v f tl))) -> mem l135 S-v x x0) (or-intror l135 l135 (eq l135 S-v x b) (mem l135 S-v x (filter' l135 S-v f tl)) (Hind Htl)) (filter' l135 S-v f (cons l135 S-v b tl)) (filter-true l135 S-v tl b f fb)) (λ (fb : eq lzero bool (f b) false) -> eq-ind-r l135 l135 (list l135 S-v) (filter' l135 S-v f tl) (λ (x0 : list l135 S-v) -> λ (X-- : eq l135 (list l135 S-v) x0 (filter' l135 S-v f tl)) -> mem l135 S-v x x0) (Hind Htl) (filter' l135 S-v f (cons l135 S-v b tl)) (filter-false l135 S-v tl b f fb)) (true-or-false (f b))) X-clearme) l
filter-case : (l385 : Level) -> (A : Set l385) -> (p : (X-- : A) -> bool) -> (l : list l385 A) -> (x : A) -> (X-- : mem l385 A x l) -> Or l385 l385 (mem l385 A x (filter' l385 A p l)) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) l))
filter-case = λ (l385 : Level) -> λ (A : Set l385) -> λ (p : (X-- : A) -> bool) -> λ (l : list l385 A) -> list-ind l385 l385 A (λ (X-x-716 : list l385 A) -> (x : A) -> (X-- : mem l385 A x X-x-716) -> Or l385 l385 (mem l385 A x (filter' l385 A p X-x-716)) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) X-x-716))) (λ (x : A) -> False-ind l385 l385 (λ (X-x-66 : False l385) -> Or l385 l385 (mem l385 A x (filter' l385 A p (nil l385 A))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (nil l385 A))))) (λ (a : A) -> λ (tl : list l385 A) -> λ (Hind : (x : A) -> (X-- : mem l385 A x tl) -> Or l385 l385 (mem l385 A x (filter' l385 A p tl)) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl))) -> λ (x : A) -> λ (X-clearme : mem l385 A x (cons l385 A a tl)) -> match-Or l385 l385 (eq l385 A x a) (mem l385 A x tl) l385 (λ (X-- : Or l385 l385 (eq l385 A x a) (mem l385 A x tl)) -> Or l385 l385 (mem l385 A x (filter' l385 A p (cons l385 A a tl))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)))) (λ (eqxa : eq l385 A x a) -> eq-ind-r l385 l385 A a (λ (x0 : A) -> λ (X-- : eq l385 A x0 a) -> Or l385 l385 (mem l385 A x0 (filter' l385 A p (cons l385 A a tl))) (mem l385 A x0 (filter' l385 A (λ (x00 : A) -> notb (p x00)) (cons l385 A a tl)))) (match-Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false) l385 (λ (X-- : Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false)) -> Or l385 l385 (mem l385 A a (filter' l385 A p (cons l385 A a tl))) (mem l385 A a (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)))) (λ (Hcase : eq lzero bool (p a) true) -> or-introl l385 l385 (mem l385 A a (filter' l385 A p (cons l385 A a tl))) (mem l385 A a (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl))) (eq-ind-r l385 l385 (list l385 A) (cons l385 A a (filter' l385 A p tl)) (λ (x0 : list l385 A) -> λ (X-- : eq l385 (list l385 A) x0 (cons l385 A a (filter' l385 A p tl))) -> mem l385 A a x0) (or-introl l385 l385 (eq l385 A a a) (mem l385 A a (filter' l385 A p tl)) (refl l385 A a)) (filter' l385 A p (cons l385 A a tl)) (filter-true l385 A tl a p Hcase))) (λ (Hcase : eq lzero bool (p a) false) -> or-intror l385 l385 (mem l385 A a (filter' l385 A p (cons l385 A a tl))) (mem l385 A a (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl))) (eq-ind-r l385 l385 (list l385 A) (cons l385 A a (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl)) (λ (x0 : list l385 A) -> λ (X-- : eq l385 (list l385 A) x0 (cons l385 A a (filter' l385 A (λ (x00 : A) -> notb (p x00)) tl))) -> mem l385 A a x0) (or-introl l385 l385 (eq l385 A a a) (mem l385 A a (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl)) (refl l385 A a)) (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)) (filter-true l385 A tl a (λ (x0 : A) -> notb (p x0)) (eq-ind-r lzero lzero bool false (λ (x0 : bool) -> λ (X-- : eq lzero bool x0 false) -> eq lzero bool (notb x0) true) (refl lzero bool (notb false)) (p a) Hcase)))) (true-or-false (p a))) x eqxa) (λ (memx : mem l385 A x tl) -> match-Or l385 l385 (mem l385 A x (filter' l385 A p tl)) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl)) l385 (λ (X-- : Or l385 l385 (mem l385 A x (filter' l385 A p tl)) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl))) -> Or l385 l385 (mem l385 A x (filter' l385 A p (cons l385 A a tl))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)))) (λ (memx0 : mem l385 A x (filter' l385 A p tl)) -> or-introl l385 l385 (mem l385 A x (filter' l385 A p (cons l385 A a tl))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl))) (match-Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false) l385 (λ (X-- : Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false)) -> mem l385 A x (filter' l385 A p (cons l385 A a tl))) (λ (Hpa : eq lzero bool (p a) true) -> eq-ind-r l385 l385 (list l385 A) (cons l385 A a (filter' l385 A p tl)) (λ (x0 : list l385 A) -> λ (X-- : eq l385 (list l385 A) x0 (cons l385 A a (filter' l385 A p tl))) -> mem l385 A x x0) (or-intror l385 l385 (eq l385 A x a) (mem l385 A x (filter' l385 A p tl)) memx0) (filter' l385 A p (cons l385 A a tl)) (filter-true l385 A tl a p Hpa)) (λ (Hpa : eq lzero bool (p a) false) -> eq-ind-r l385 l385 (list l385 A) (filter' l385 A p tl) (λ (x0 : list l385 A) -> λ (X-- : eq l385 (list l385 A) x0 (filter' l385 A p tl)) -> mem l385 A x x0) memx0 (filter' l385 A p (cons l385 A a tl)) (filter-false l385 A tl a p Hpa)) (true-or-false (p a)))) (λ (memx0 : mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl)) -> match-Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false) l385 (λ (X-- : Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false)) -> Or l385 l385 (mem l385 A x (filter' l385 A p (cons l385 A a tl))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)))) (λ (Hcase : eq lzero bool (p a) true) -> or-intror l385 l385 (mem l385 A x (filter' l385 A p (cons l385 A a tl))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl))) (eq-ind-r l385 l385 (list l385 A) (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl) (λ (x0 : list l385 A) -> λ (X-- : eq l385 (list l385 A) x0 (filter' l385 A (λ (x00 : A) -> notb (p x00)) tl)) -> mem l385 A x x0) memx0 (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)) (filter-false l385 A tl a (λ (x0 : A) -> notb (p x0)) (eq-ind-r lzero lzero bool true (λ (x0 : bool) -> λ (X-- : eq lzero bool x0 true) -> eq lzero bool (notb x0) false) (refl lzero bool (notb true)) (p a) Hcase)))) (λ (Hcase : eq lzero bool (p a) false) -> or-intror l385 l385 (mem l385 A x (filter' l385 A p (cons l385 A a tl))) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl))) (eq-ind-r l385 l385 (list l385 A) (cons l385 A a (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl)) (λ (x0 : list l385 A) -> λ (X-- : eq l385 (list l385 A) x0 (cons l385 A a (filter' l385 A (λ (x00 : A) -> notb (p x00)) tl))) -> mem l385 A x x0) (or-intror l385 l385 (eq l385 A x a) (mem l385 A x (filter' l385 A (λ (x0 : A) -> notb (p x0)) tl)) memx0) (filter' l385 A (λ (x0 : A) -> notb (p x0)) (cons l385 A a tl)) (filter-true l385 A tl a (λ (x0 : A) -> notb (p x0)) (eq-ind-r lzero lzero bool false (λ (x0 : bool) -> λ (X-- : eq lzero bool x0 false) -> eq lzero bool (notb x0) true) (refl lzero bool (notb false)) (p a) Hcase)))) (true-or-false (p a))) (Hind x memx)) X-clearme) l
filter-length2 : (l210 : Level) -> (A : Set l210) -> (p : (X-- : A) -> bool) -> (l : list l210 A) -> eq lzero nat (plus (length l210 A (filter' l210 A p l)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) l))) (length l210 A l)
filter-length2 = λ (l210 : Level) -> λ (A : Set l210) -> λ (p : (X-- : A) -> bool) -> λ (l : list l210 A) -> list-ind l210 lzero A (λ (X-x-716 : list l210 A) -> eq lzero nat (plus (length l210 A (filter' l210 A p X-x-716)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) X-x-716))) (length l210 A X-x-716)) (refl lzero nat (plus (length l210 A (filter' l210 A p (nil l210 A))) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) (nil l210 A))))) (λ (a : A) -> λ (tl : list l210 A) -> λ (Hind : eq lzero nat (plus (length l210 A (filter' l210 A p tl)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl))) (length l210 A tl)) -> match-Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false) lzero (λ (X-- : Or lzero lzero (eq lzero bool (p a) true) (eq lzero bool (p a) false)) -> eq lzero nat (plus (length l210 A (filter' l210 A p (cons l210 A a tl))) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) (cons l210 A a tl)))) (length l210 A (cons l210 A a tl))) (λ (Hcase : eq lzero bool (p a) true) -> eq-ind-r l210 lzero (list l210 A) (cons l210 A a (filter' l210 A p tl)) (λ (x : list l210 A) -> λ (X-- : eq l210 (list l210 A) x (cons l210 A a (filter' l210 A p tl))) -> eq lzero nat (plus (length l210 A x) (length l210 A (filter' l210 A (λ (x0 : A) -> notb (p x0)) (cons l210 A a tl)))) (length l210 A (cons l210 A a tl))) (eq-ind-r l210 lzero (list l210 A) (filter' l210 A (λ (x : A) -> notb (p x)) tl) (λ (x : list l210 A) -> λ (X-- : eq l210 (list l210 A) x (filter' l210 A (λ (x0 : A) -> notb (p x0)) tl)) -> eq lzero nat (plus (length l210 A (cons l210 A a (filter' l210 A p tl))) (length l210 A x)) (length l210 A (cons l210 A a tl))) (eq-f lzero lzero nat nat S (plus (length l210 A (filter' l210 A p tl)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl))) (length l210 A tl) Hind) (filter' l210 A (λ (x : A) -> notb (p x)) (cons l210 A a tl)) (filter-false l210 A tl a (λ (x : A) -> notb (p x)) (eq-ind-r lzero lzero bool true (λ (x : bool) -> λ (X-- : eq lzero bool x true) -> eq lzero bool (notb x) false) (refl lzero bool (notb true)) (p a) Hcase))) (filter' l210 A p (cons l210 A a tl)) (filter-true l210 A tl a p Hcase)) (λ (Hcase : eq lzero bool (p a) false) -> eq-ind-r l210 lzero (list l210 A) (filter' l210 A p tl) (λ (x : list l210 A) -> λ (X-- : eq l210 (list l210 A) x (filter' l210 A p tl)) -> eq lzero nat (plus (length l210 A x) (length l210 A (filter' l210 A (λ (x0 : A) -> notb (p x0)) (cons l210 A a tl)))) (length l210 A (cons l210 A a tl))) (eq-ind-r l210 lzero (list l210 A) (cons l210 A a (filter' l210 A (λ (x : A) -> notb (p x)) tl)) (λ (x : list l210 A) -> λ (X-- : eq l210 (list l210 A) x (cons l210 A a (filter' l210 A (λ (x0 : A) -> notb (p x0)) tl))) -> eq lzero nat (plus (length l210 A (filter' l210 A p tl)) (length l210 A x)) (length l210 A (cons l210 A a tl))) (eq-ind lzero lzero nat (S (plus (length l210 A (filter' l210 A p tl)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl)))) (λ (x-1 : nat) -> λ (X-x-2 : eq lzero nat (S (plus (length l210 A (filter' l210 A p tl)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl)))) x-1) -> eq lzero nat x-1 (length l210 A (cons l210 A a tl))) (eq-f lzero lzero nat nat S (plus (length l210 A (filter' l210 A p tl)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl))) (length l210 A tl) Hind) (plus (length l210 A (filter' l210 A p tl)) (S (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl)))) (plus-n-Sm (length l210 A (filter' l210 A p tl)) (length l210 A (filter' l210 A (λ (x : A) -> notb (p x)) tl)))) (filter' l210 A (λ (x : A) -> notb (p x)) (cons l210 A a tl)) (filter-true l210 A tl a (λ (x : A) -> notb (p x)) (eq-ind-r lzero lzero bool false (λ (x : bool) -> λ (X-- : eq lzero bool x false) -> eq lzero bool (notb x) true) (refl lzero bool (notb false)) (p a) Hcase))) (filter' l210 A p (cons l210 A a tl)) (filter-false l210 A tl a p Hcase)) (true-or-false (p a))) l
unique : (l2-v : Level) -> (H-v : Set l2-v) -> (X---v : list l2-v H-v) -> Set l2-v
unique ll0-v H-v nil' = True ll0-v
unique ll0-v H-v (cons' a-v tl-v) = And ll0-v ll0-v (Not ll0-v (mem ll0-v H-v a-v tl-v)) (unique ll0-v H-v tl-v)
unique-filter : (l113 : Level) -> (S-v : Set l113) -> (l : list l113 S-v) -> (f : (X-- : S-v) -> bool) -> (X-- : unique l113 S-v l) -> unique l113 S-v (filter' l113 S-v f l)
unique-filter = λ (l113 : Level) -> λ (S-v : Set l113) -> λ (l : list l113 S-v) -> λ (f : (X-- : S-v) -> bool) -> list-ind l113 l113 S-v (λ (X-x-716 : list l113 S-v) -> (X-- : unique l113 S-v X-x-716) -> unique l113 S-v (filter' l113 S-v f X-x-716)) (λ (auto : unique l113 S-v (nil l113 S-v)) -> auto) (λ (a : S-v) -> λ (tl : list l113 S-v) -> λ (Hind : (X-- : unique l113 S-v tl) -> unique l113 S-v (filter' l113 S-v f tl)) -> λ (X-clearme : unique l113 S-v (cons l113 S-v a tl)) -> match-And l113 l113 (Not l113 (mem l113 S-v a tl)) (unique l113 S-v tl) l113 (λ (X-- : And l113 l113 (Not l113 (mem l113 S-v a tl)) (unique l113 S-v tl)) -> unique l113 S-v (filter' l113 S-v f (cons l113 S-v a tl))) (λ (memba : Not l113 (mem l113 S-v a tl)) -> λ (uniquetl : unique l113 S-v tl) -> match-Or lzero lzero (eq lzero bool (f a) true) (eq lzero bool (f a) false) l113 (λ (X-- : Or lzero lzero (eq lzero bool (f a) true) (eq lzero bool (f a) false)) -> unique l113 S-v (filter' l113 S-v f (cons l113 S-v a tl))) (λ (Hfa : eq lzero bool (f a) true) -> eq-ind-r l113 l113 (list l113 S-v) (cons l113 S-v a (filter' l113 S-v f tl)) (λ (x : list l113 S-v) -> λ (X-- : eq l113 (list l113 S-v) x (cons l113 S-v a (filter' l113 S-v f tl))) -> unique l113 S-v x) (conj l113 l113 (Not l113 (mem l113 S-v a (filter' l113 S-v f tl))) (unique l113 S-v (filter' l113 S-v f tl)) (not-to-not l113 (mem l113 S-v a (filter' l113 S-v f tl)) (mem l113 S-v a tl) (mem-filter l113 S-v f a tl) memba) (Hind uniquetl)) (filter' l113 S-v f (cons l113 S-v a tl)) (filter-true l113 S-v tl a f Hfa)) (λ (Hfa : eq lzero bool (f a) false) -> eq-ind-r l113 l113 (list l113 S-v) (filter' l113 S-v f tl) (λ (x : list l113 S-v) -> λ (X-- : eq l113 (list l113 S-v) x (filter' l113 S-v f tl)) -> unique l113 S-v x) (Hind uniquetl) (filter' l113 S-v f (cons l113 S-v a tl)) (filter-false l113 S-v tl a f (rewrite-r lzero lzero bool false (λ (X-- : bool) -> eq lzero bool X-- false) (refl lzero bool false) (f a) Hfa))) (true-or-false (f a))) X-clearme) l
filter-eqb : (m : nat) -> (l : list lzero nat) -> (X-- : unique lzero nat l) -> Or lzero lzero (And lzero lzero (mem lzero nat m l) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m l)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat)))
filter-eqb = λ (m : nat) -> λ (l : list lzero nat) -> list-ind lzero lzero nat (λ (X-x-716 : list lzero nat) -> (X-- : unique lzero nat X-x-716) -> Or lzero lzero (And lzero lzero (mem lzero nat m X-x-716) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) X-x-716) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m X-x-716)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) X-x-716) (nil lzero nat)))) (λ (X-- : unique lzero nat (nil lzero nat)) -> or-intror lzero lzero (And lzero lzero (mem lzero nat m (nil lzero nat)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (nil lzero nat)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (nil lzero nat))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (nil lzero nat)) (nil lzero nat))) (conj lzero lzero (Not lzero (mem lzero nat m (nil lzero nat))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (nil lzero nat)) (nil lzero nat)) (nmk lzero (mem lzero nat m (nil lzero nat)) (False-ind lzero lzero (λ (X-x-66 : False lzero) -> False lzero))) (refl lzero (list lzero nat) (filter' lzero nat (eqb m) (nil lzero nat))))) (λ (a : nat) -> λ (tl : list lzero nat) -> λ (Hind : (X-- : unique lzero nat tl) -> Or lzero lzero (And lzero lzero (mem lzero nat m tl) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat)))) -> λ (X-clearme : unique lzero nat (cons lzero nat a tl)) -> match-And lzero lzero (Not lzero (mem lzero nat a tl)) (unique lzero nat tl) lzero (λ (X-- : And lzero lzero (Not lzero (mem lzero nat a tl)) (unique lzero nat tl)) -> Or lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat)))) (λ (Hmema : Not lzero (mem lzero nat a tl)) -> λ (Hunique : unique lzero nat tl) -> match-Or lzero lzero (And lzero lzero (mem lzero nat m tl) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat))) lzero (λ (X-- : Or lzero lzero (And lzero lzero (mem lzero nat m tl) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat)))) -> Or lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat)))) (λ (X-clearme0 : And lzero lzero (mem lzero nat m tl) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat)))) -> match-And lzero lzero (mem lzero nat m tl) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat))) lzero (λ (X-- : And lzero lzero (mem lzero nat m tl) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat)))) -> Or lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat)))) (λ (Hmemm : mem lzero nat m tl) -> λ (Hind0 : eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (cons lzero nat m (nil lzero nat))) -> or-introl lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat))) (conj lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat))) (or-intror lzero lzero (eq lzero nat m a) (mem lzero nat m tl) Hmemm) (eq-ind-r lzero lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (λ (x : list lzero nat) -> λ (X-- : eq lzero (list lzero nat) x (filter' lzero nat (eqb m) tl)) -> eq lzero (list lzero nat) x (cons lzero nat m (nil lzero nat))) (rewrite-l lzero lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (λ (X-- : list lzero nat) -> eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) X--) (refl lzero (list lzero nat) (filter' lzero nat (eqb m) tl)) (cons lzero nat m (nil lzero nat)) Hind0) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (filter-false lzero nat tl a (eqb m) (not-eq-to-eqb-false m a (nmk lzero (eq lzero nat m a) (λ (eqma : eq lzero nat m a) -> absurd lzero (mem lzero nat m tl) Hmemm (eq-coerc lzero (Not lzero (mem lzero nat a tl)) (Not lzero (mem lzero nat m tl)) Hmema (rewrite-l lzero (lsuc lzero) nat m (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (Not lzero (mem lzero nat X-- tl)) (Not lzero (mem lzero nat m tl))) (refl (lsuc lzero) (Set (lzero)) (Not lzero (mem lzero nat m tl))) a eqma))))))))) X-clearme0) (λ (X-clearme0 : And lzero lzero (Not lzero (mem lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat))) -> match-And lzero lzero (Not lzero (mem lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat)) lzero (λ (X-- : And lzero lzero (Not lzero (mem lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat))) -> Or lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat)))) (λ (Hmemm : Not lzero (mem lzero nat m tl)) -> λ (Hind0 : eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (nil lzero nat)) -> match-Or lzero lzero (eq lzero nat m a) (Not lzero (eq lzero nat m a)) lzero (λ (X-- : Or lzero lzero (eq lzero nat m a) (Not lzero (eq lzero nat m a))) -> Or lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat)))) (λ (eqma : eq lzero nat m a) -> or-introl lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat))) (eq-ind lzero lzero nat m (λ (x-1 : nat) -> λ (X-x-2 : eq lzero nat m x-1) -> And lzero lzero (mem lzero nat m (cons lzero nat x-1 tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat x-1 tl)) (cons lzero nat m (nil lzero nat)))) (conj lzero lzero (mem lzero nat m (cons lzero nat m tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat m tl)) (cons lzero nat m (nil lzero nat))) (or-introl lzero lzero (eq lzero nat m m) (mem lzero nat m tl) (refl lzero nat m)) (eq-ind-r lzero lzero (list lzero nat) (cons lzero nat m (filter' lzero nat (eqb m) tl)) (λ (x : list lzero nat) -> λ (X-- : eq lzero (list lzero nat) x (cons lzero nat m (filter' lzero nat (eqb m) tl))) -> eq lzero (list lzero nat) x (cons lzero nat m (nil lzero nat))) (eq-ind-r lzero lzero (list lzero nat) (nil lzero nat) (λ (x : list lzero nat) -> λ (X-- : eq lzero (list lzero nat) x (nil lzero nat)) -> eq lzero (list lzero nat) (cons lzero nat m x) (cons lzero nat m (nil lzero nat))) (rewrite-l lzero lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (λ (X-- : list lzero nat) -> eq lzero (list lzero nat) (cons lzero nat m X--) (cons lzero nat m (nil lzero nat))) (rewrite-l lzero lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (λ (X-- : list lzero nat) -> eq lzero (list lzero nat) (cons lzero nat m (filter' lzero nat (eqb m) tl)) (cons lzero nat m X--)) (refl lzero (list lzero nat) (cons lzero nat m (filter' lzero nat (eqb m) tl))) (nil lzero nat) Hind0) (nil lzero nat) Hind0) (filter' lzero nat (eqb m) tl) Hind0) (filter' lzero nat (eqb m) (cons lzero nat m tl)) (filter-true lzero nat tl m (eqb m) (eq-to-eqb-true m m (refl lzero nat m))))) a eqma)) (λ (eqma : Not lzero (eq lzero nat m a)) -> or-intror lzero lzero (And lzero lzero (mem lzero nat m (cons lzero nat a tl)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat))) (conj lzero lzero (Not lzero (mem lzero nat m (cons lzero nat a tl))) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (nil lzero nat)) (not-to-not lzero (mem lzero nat m (cons lzero nat a tl)) (mem lzero nat m tl) (λ (X-clearme1 : mem lzero nat m (cons lzero nat a tl)) -> match-Or lzero lzero (eq lzero nat m a) (mem lzero nat m tl) lzero (λ (X-- : Or lzero lzero (eq lzero nat m a) (mem lzero nat m tl)) -> mem lzero nat m tl) (λ (H : eq lzero nat m a) -> False-ind lzero lzero (λ (X-x-66 : False lzero) -> mem lzero nat m tl) (absurd lzero (eq lzero nat m a) H eqma)) (λ (auto : mem lzero nat m tl) -> auto) X-clearme1) Hmemm) (eq-ind-r lzero lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (λ (x : list lzero nat) -> λ (X-- : eq lzero (list lzero nat) x (filter' lzero nat (eqb m) tl)) -> eq lzero (list lzero nat) x (nil lzero nat)) (rewrite-l lzero lzero (list lzero nat) (filter' lzero nat (eqb m) tl) (λ (X-- : list lzero nat) -> eq lzero (list lzero nat) (filter' lzero nat (eqb m) tl) X--) (refl lzero (list lzero nat) (filter' lzero nat (eqb m) tl)) (nil lzero nat) Hind0) (filter' lzero nat (eqb m) (cons lzero nat a tl)) (filter-false lzero nat tl a (eqb m) (not-eq-to-eqb-false m a eqma))))) (decidable-eq-nat m a)) X-clearme0) (Hind Hunique)) X-clearme) l
length-filter-eqb : (m : nat) -> (l : list lzero nat) -> (X-- : unique lzero nat l) -> le (length lzero nat (filter' lzero nat (eqb m) l)) (S O)
length-filter-eqb = λ (m : nat) -> λ (l : list lzero nat) -> λ (Huni : unique lzero nat l) -> match-Or lzero lzero (And lzero lzero (mem lzero nat m l) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m l)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat))) lzero (λ (X-- : Or lzero lzero (And lzero lzero (mem lzero nat m l) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat)))) (And lzero lzero (Not lzero (mem lzero nat m l)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat)))) -> le (length lzero nat (filter' lzero nat (eqb m) l)) (S O)) (λ (X-clearme : And lzero lzero (mem lzero nat m l) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat)))) -> match-And lzero lzero (mem lzero nat m l) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat))) lzero (λ (X-- : And lzero lzero (mem lzero nat m l) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat)))) -> le (length lzero nat (filter' lzero nat (eqb m) l)) (S O)) (λ (X-- : mem lzero nat m l) -> λ (H : eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (cons lzero nat m (nil lzero nat))) -> eq-ind-r lzero lzero (list lzero nat) (cons lzero nat m (nil lzero nat)) (λ (x : list lzero nat) -> λ (X-0 : eq lzero (list lzero nat) x (cons lzero nat m (nil lzero nat))) -> le (length lzero nat x) (S O)) (le-n (length lzero nat (cons lzero nat m (nil lzero nat)))) (filter' lzero nat (eqb m) l) H) X-clearme) (λ (X-clearme : And lzero lzero (Not lzero (mem lzero nat m l)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat))) -> match-And lzero lzero (Not lzero (mem lzero nat m l)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat)) lzero (λ (X-- : And lzero lzero (Not lzero (mem lzero nat m l)) (eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat))) -> le (length lzero nat (filter' lzero nat (eqb m) l)) (S O)) (λ (X-- : Not lzero (mem lzero nat m l)) -> λ (H : eq lzero (list lzero nat) (filter' lzero nat (eqb m) l) (nil lzero nat)) -> eq-ind-r lzero lzero (list lzero nat) (nil lzero nat) (λ (x : list lzero nat) -> λ (X-0 : eq lzero (list lzero nat) x (nil lzero nat)) -> le (length lzero nat x) (S O)) (le-n-Sn (length lzero nat (nil lzero nat))) (filter' lzero nat (eqb m) l) H) X-clearme) (filter-eqb m l Huni)
split-rev : (l9-v : Level) -> (H-v : Set l9-v) -> (X---v : list l9-v H-v) -> (X--1-v : list l9-v H-v) -> (X--2-v : nat) -> Prod l9-v l9-v (list l9-v H-v) (list l9-v H-v)
split-rev l16-v H-v X X--1-v O = mk-Prod l16-v l16-v (list l16-v H-v) (list l16-v H-v) X--1-v X
split-rev l16-v H-v nil' X--1-v (S m) = mk-Prod l16-v l16-v (list l16-v H-v) (list l16-v H-v) X--1-v (nil l16-v H-v)
split-rev l16-v H-v (cons' a-v tl-v) X--1-v (S m) = split-rev l16-v H-v tl-v (cons l16-v H-v a-v X--1-v) m
split : (l28 : Level) -> (A : Set l28) -> (X-l : list l28 A) -> (X-n : nat) -> Prod l28 l28 (list l28 A) (list l28 A)
split = λ (l28 : Level) -> λ (A : Set l28) -> λ (l : list l28 A) -> λ (n : nat) -> match-Prod l28 l28 (list l28 A) (list l28 A) l28 (λ (X-- : Prod l28 l28 (list l28 A) (list l28 A)) -> Prod l28 l28 (list l28 A) (list l28 A)) (λ (l1 : list l28 A) -> λ (l2 : list l28 A) -> mk-Prod l28 l28 (list l28 A) (list l28 A) (reverse l28 A l1) l2) (split-rev l28 A l (nil l28 A) n)
split-rev-len : (l128 : Level) -> (A : Set l128) -> (n : nat) -> (l : list l128 A) -> (acc : list l128 A) -> (X-- : le n (length l128 A l)) -> eq lzero nat (length l128 A (fst l128 l128 (list l128 A) (list l128 A) (split-rev l128 A l acc n))) (plus n (length l128 A acc))
split-rev-len = λ (l128 : Level) -> λ (A : Set l128) -> λ (n : nat) -> nat-ind l128 (λ (X-x-365 : nat) -> (l : list l128 A) -> (acc : list l128 A) -> (X-- : le X-x-365 (length l128 A l)) -> eq lzero nat (length l128 A (fst l128 l128 (list l128 A) (list l128 A) (split-rev l128 A l acc X-x-365))) (plus X-x-365 (length l128 A acc))) (λ (l : list l128 A) -> λ (acc : list l128 A) -> λ (auto : le O (length l128 A l)) -> refl lzero nat (length l128 A (fst l128 l128 (list l128 A) (list l128 A) (split-rev l128 A l acc O)))) (λ (m : nat) -> λ (Hind : (l : list l128 A) -> (acc : list l128 A) -> (X-- : le m (length l128 A l)) -> eq lzero nat (length l128 A (fst l128 l128 (list l128 A) (list l128 A) (split-rev l128 A l acc m))) (plus m (length l128 A acc))) -> λ (X-clearme : list l128 A) -> match-list l128 A l128 (λ (X-- : list l128 A) -> (acc : list l128 A) -> (X--1 : le (S m) (length l128 A X--)) -> eq lzero nat (length l128 A (fst l128 l128 (list l128 A) (list l128 A) (split-rev l128 A X-- acc (S m)))) (plus (S m) (length l128 A acc))) (λ (acc : list l128 A) -> λ (Hfalse : le (S m) O) -> False-ind lzero lzero (λ (X-x-66 : False lzero) -> eq lzero nat (length l128 A acc) (S (plus m (length l128 A acc)))) (absurd lzero (le (S m) O) Hfalse (not-le-Sn-O m))) (λ (a : A) -> λ (tl : list l128 A) -> λ (acc : list l128 A) -> λ (Hlen : le (S m) (length l128 A (cons l128 A a tl))) -> eq-ind-r lzero lzero nat (plus m (length l128 A (cons l128 A a acc))) (λ (x : nat) -> λ (X-- : eq lzero nat x (plus m (length l128 A (cons l128 A a acc)))) -> eq lzero nat x (S (plus m (length l128 A acc)))) (rewrite-r lzero lzero nat (plus m (S (length l128 A acc))) (λ (X-- : nat) -> eq lzero nat (plus m (S (length l128 A acc))) X--) (refl lzero nat (plus m (S (length l128 A acc)))) (S (plus m (length l128 A acc))) (plus-n-Sm m (length l128 A acc))) (length l128 A (fst l128 l128 (list l128 A) (list l128 A) (split-rev l128 A tl (cons l128 A a acc) m))) (Hind tl (cons l128 A a acc) (le-S-S-to-le m (length l128 A tl) Hlen))) X-clearme) n
split-len : (l151 : Level) -> (A : Set l151) -> (n : nat) -> (l : list l151 A) -> (X-- : le n (length l151 A l)) -> eq lzero nat (length l151 A (fst l151 l151 (list l151 A) (list l151 A) (split l151 A l n))) n
split-len = λ (l151 : Level) -> λ (A : Set l151) -> λ (n : nat) -> λ (l : list l151 A) -> λ (Hlen : le n (length l151 A l)) -> eq-ind-r l151 lzero (Prod l151 l151 (list l151 A) (list l151 A)) (mk-Prod l151 l151 (list l151 A) (list l151 A) (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n)) (snd l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n))) (λ (x : Prod l151 l151 (list l151 A) (list l151 A)) -> λ (X-- : eq l151 (Prod l151 l151 (list l151 A) (list l151 A)) x (mk-Prod l151 l151 (list l151 A) (list l151 A) (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n)) (snd l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n)))) -> eq lzero nat (length l151 A (fst l151 l151 (list l151 A) (list l151 A) (match-Prod l151 l151 (list l151 A) (list l151 A) l151 (λ (X-0 : Prod l151 l151 (list l151 A) (list l151 A)) -> Prod l151 l151 (list l151 A) (list l151 A)) (λ (l1 : list l151 A) -> λ (l2 : list l151 A) -> mk-Prod l151 l151 (list l151 A) (list l151 A) (rev-append l151 A l1 (nil l151 A)) l2) x))) n) (eq-ind-r lzero lzero nat (length l151 A (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n))) (λ (x : nat) -> λ (X-- : eq lzero nat x (length l151 A (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n)))) -> eq lzero nat x n) (eq-ind-r lzero lzero nat (plus n (length l151 A (nil l151 A))) (λ (x : nat) -> λ (X-- : eq lzero nat x (plus n (length l151 A (nil l151 A)))) -> eq lzero nat x n) (rewrite-l lzero lzero nat n (λ (X-- : nat) -> eq lzero nat X-- n) (refl lzero nat n) (plus n O) (plus-n-O n)) (length l151 A (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n))) (split-rev-len l151 A n l (nil l151 A) Hlen)) (length l151 A (reverse l151 A (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n)))) (length-reverse l151 A (fst l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n)))) (split-rev l151 A l (nil l151 A) n) (eq-pair-fst-snd l151 l151 (list l151 A) (list l151 A) (split-rev l151 A l (nil l151 A) n))
split-rev-eq : (l236 : Level) -> (A : Set l236) -> (n : nat) -> (l : list l236 A) -> (acc : list l236 A) -> (X-- : le n (length l236 A l)) -> eq l236 (list l236 A) (append l236 A (reverse l236 A acc) l) (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A l acc n))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A l acc n)))
split-rev-eq = λ (l236 : Level) -> λ (A : Set l236) -> λ (n : nat) -> nat-ind l236 (λ (X-x-365 : nat) -> (l : list l236 A) -> (acc : list l236 A) -> (X-- : le X-x-365 (length l236 A l)) -> eq l236 (list l236 A) (append l236 A (reverse l236 A acc) l) (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A l acc X-x-365))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A l acc X-x-365)))) (λ (l : list l236 A) -> λ (acc : list l236 A) -> λ (auto : le O (length l236 A l)) -> refl l236 (list l236 A) (append l236 A (reverse l236 A acc) l)) (λ (m : nat) -> λ (Hind : (l : list l236 A) -> (acc : list l236 A) -> (X-- : le m (length l236 A l)) -> eq l236 (list l236 A) (append l236 A (reverse l236 A acc) l) (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A l acc m))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A l acc m)))) -> λ (X-clearme : list l236 A) -> match-list l236 A l236 (λ (X-- : list l236 A) -> (acc : list l236 A) -> (X--1 : le (S m) (length l236 A X--)) -> eq l236 (list l236 A) (append l236 A (reverse l236 A acc) X--) (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A X-- acc (S m)))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A X-- acc (S m))))) (λ (acc : list l236 A) -> λ (False-ind-v : le (S m) O) -> refl l236 (list l236 A) (append l236 A (reverse l236 A acc) (nil l236 A))) (λ (a : A) -> λ (tl : list l236 A) -> λ (acc : list l236 A) -> λ (Hlen : le (S m) (length l236 A (cons l236 A a tl))) -> eq-ind-r l236 l236 (list l236 A) (append l236 A (append l236 A (reverse l236 A acc) (cons l236 A a (nil l236 A))) tl) (λ (x : list l236 A) -> λ (X-- : eq l236 (list l236 A) x (append l236 A (append l236 A (reverse l236 A acc) (cons l236 A a (nil l236 A))) tl)) -> eq l236 (list l236 A) x (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A (cons l236 A a tl) acc (S m)))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A (cons l236 A a tl) acc (S m))))) (eq-ind l236 l236 (list l236 A) (reverse l236 A (cons l236 A a (nil l236 A))) (λ (x-1 : list l236 A) -> λ (X-x-2 : eq l236 (list l236 A) (reverse l236 A (cons l236 A a (nil l236 A))) x-1) -> eq l236 (list l236 A) (append l236 A (append l236 A (reverse l236 A acc) x-1) tl) (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A (cons l236 A a tl) acc (S m)))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A (cons l236 A a tl) acc (S m))))) (eq-ind l236 l236 (list l236 A) (reverse l236 A (append l236 A (cons l236 A a (nil l236 A)) acc)) (λ (x-1 : list l236 A) -> λ (X-x-2 : eq l236 (list l236 A) (reverse l236 A (append l236 A (cons l236 A a (nil l236 A)) acc)) x-1) -> eq l236 (list l236 A) (append l236 A x-1 tl) (append l236 A (reverse l236 A (fst l236 l236 (list l236 A) (list l236 A) (split-rev l236 A (cons l236 A a tl) acc (S m)))) (snd l236 l236 (list l236 A) (list l236 A) (split-rev l236 A (cons l236 A a tl) acc (S m))))) (Hind tl (append l236 A (cons l236 A a (nil l236 A)) acc) (le-S-S-to-le m (length l236 A tl) Hlen)) (append l236 A (reverse l236 A acc) (reverse l236 A (cons l236 A a (nil l236 A)))) (reverse-append l236 A (cons l236 A a (nil l236 A)) acc)) (cons l236 A a (nil l236 A)) (reverse-single l236 A a)) (append l236 A (reverse l236 A acc) (cons l236 A a tl)) (append-cons l236 A a (reverse l236 A acc) tl)) X-clearme) n
split-eq : (l203 : Level) -> (A : Set l203) -> (n : nat) -> (l : list l203 A) -> (X-- : le n (length l203 A l)) -> eq l203 (list l203 A) l (append l203 A (fst l203 l203 (list l203 A) (list l203 A) (split l203 A l n)) (snd l203 l203 (list l203 A) (list l203 A) (split l203 A l n)))
split-eq = λ (l203 : Level) -> λ (A : Set l203) -> λ (n : nat) -> λ (l : list l203 A) -> λ (Hlen : le n (length l203 A l)) -> eq-ind-r l203 l203 (list l203 A) (append l203 A (reverse l203 A (fst l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n))) (snd l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n))) (λ (x : list l203 A) -> λ (X-- : eq l203 (list l203 A) x (append l203 A (reverse l203 A (fst l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n))) (snd l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n)))) -> eq l203 (list l203 A) x (append l203 A (fst l203 l203 (list l203 A) (list l203 A) (split l203 A l n)) (snd l203 l203 (list l203 A) (list l203 A) (split l203 A l n)))) (eq-ind-r l203 l203 (Prod l203 l203 (list l203 A) (list l203 A)) (mk-Prod l203 l203 (list l203 A) (list l203 A) (fst l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n)) (snd l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n))) (λ (x : Prod l203 l203 (list l203 A) (list l203 A)) -> λ (X-- : eq l203 (Prod l203 l203 (list l203 A) (list l203 A)) x (mk-Prod l203 l203 (list l203 A) (list l203 A) (fst l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n)) (snd l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n)))) -> eq l203 (list l203 A) (append l203 A (rev-append l203 A (fst l203 l203 (list l203 A) (list l203 A) x) (nil l203 A)) (snd l203 l203 (list l203 A) (list l203 A) x)) (append l203 A (fst l203 l203 (list l203 A) (list l203 A) (match-Prod l203 l203 (list l203 A) (list l203 A) l203 (λ (X-0 : Prod l203 l203 (list l203 A) (list l203 A)) -> Prod l203 l203 (list l203 A) (list l203 A)) (λ (l1 : list l203 A) -> λ (l2 : list l203 A) -> mk-Prod l203 l203 (list l203 A) (list l203 A) (rev-append l203 A l1 (nil l203 A)) l2) x)) (snd l203 l203 (list l203 A) (list l203 A) (match-Prod l203 l203 (list l203 A) (list l203 A) l203 (λ (X-0 : Prod l203 l203 (list l203 A) (list l203 A)) -> Prod l203 l203 (list l203 A) (list l203 A)) (λ (l1 : list l203 A) -> λ (l2 : list l203 A) -> mk-Prod l203 l203 (list l203 A) (list l203 A) (rev-append l203 A l1 (nil l203 A)) l2) x)))) (refl l203 (list l203 A) (append l203 A (rev-append l203 A (fst l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n)) (nil l203 A)) (snd l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n)))) (split-rev l203 A l (nil l203 A) n) (eq-pair-fst-snd l203 l203 (list l203 A) (list l203 A) (split-rev l203 A l (nil l203 A) n))) (append l203 A (reverse l203 A (nil l203 A)) l) (split-rev-eq l203 A n l (nil l203 A) Hlen)
split-exists : (l94 : Level) -> (A : Set l94) -> (n : nat) -> (l : list l94 A) -> (X-- : le n (length l94 A l)) -> ex l94 l94 (list l94 A) (λ (l1 : list l94 A) -> ex l94 l94 (list l94 A) (λ (l2 : list l94 A) -> And l94 lzero (eq l94 (list l94 A) l (append l94 A l1 l2)) (eq lzero nat (length l94 A l1) n)))
split-exists = λ (l94 : Level) -> λ (A : Set l94) -> λ (n : nat) -> λ (l : list l94 A) -> λ (Hlen : le n (length l94 A l)) -> ex-intro l94 l94 (list l94 A) (λ (l1 : list l94 A) -> ex l94 l94 (list l94 A) (λ (l2 : list l94 A) -> And l94 lzero (eq l94 (list l94 A) l (append l94 A l1 l2)) (eq lzero nat (length l94 A l1) n))) (fst l94 l94 (list l94 A) (list l94 A) (split l94 A l n)) (ex-intro l94 l94 (list l94 A) (λ (l2 : list l94 A) -> And l94 lzero (eq l94 (list l94 A) l (append l94 A (fst l94 l94 (list l94 A) (list l94 A) (split l94 A l n)) l2)) (eq lzero nat (length l94 A (fst l94 l94 (list l94 A) (list l94 A) (split l94 A l n))) n)) (snd l94 l94 (list l94 A) (list l94 A) (split l94 A l n)) (conj l94 lzero (eq l94 (list l94 A) l (append l94 A (fst l94 l94 (list l94 A) (list l94 A) (split l94 A l n)) (snd l94 l94 (list l94 A) (list l94 A) (split l94 A l n)))) (eq lzero nat (length l94 A (fst l94 l94 (list l94 A) (list l94 A) (split l94 A l n))) n) (split-eq l94 A n l Hlen) (split-len l94 A n l Hlen)))
flatten : (l6 : Level) -> (A : Set l6) -> (X-l : list l6 (list l6 A)) -> list l6 A
flatten = λ (l6 : Level) -> λ (A : Set l6) -> foldr l6 l6 (list l6 A) (list l6 A) (append l6 A) (nil l6 A)
let-clause-1227 : (l157 l143 : Level) -> (A : Set l157) -> (n : nat) -> (l : list l157 (list l157 A)) -> (l1 : list l157 A) -> (l2 : list l157 A) -> (a : list l157 A) -> (posn : le (S O) n) -> (Hlen : (x : list l157 A) -> (X-- : False l143) -> eq lzero nat (length l157 A x) n) -> (Ha : eq lzero nat (length l157 A a) n) -> (Hnil : eq l157 (list l157 A) (nil l157 A) (append l157 A l1 (append l157 A a l2))) -> eq lzero nat O n
let-clause-1227 = λ (l157 l143 : Level) -> λ (A : Set l157) -> λ (n : nat) -> λ (l : list l157 (list l157 A)) -> λ (l1 : list l157 A) -> λ (l2 : list l157 A) -> λ (a : list l157 A) -> λ (posn : le (S O) n) -> λ (Hlen : (x : list l157 A) -> (X-- : False l143) -> eq lzero nat (length l157 A x) n) -> λ (Ha : eq lzero nat (length l157 A a) n) -> λ (Hnil : eq l157 (list l157 A) (nil l157 A) (append l157 A l1 (append l157 A a l2))) -> rewrite-l lzero lzero nat (length l157 A a) (λ (X-- : nat) -> eq lzero nat X-- n) Ha O (sym-eq lzero nat O (length l157 A a) (le-n-O-to-eq (length l157 A a) (transitive-le (length l157 A a) (length l157 A (nil l157 A)) O (eq-ind-r l157 lzero (list l157 A) (append l157 A l1 (append l157 A a l2)) (λ (x : list l157 A) -> λ (X-- : eq l157 (list l157 A) x (append l157 A l1 (append l157 A a l2))) -> le (length l157 A a) (length l157 A x)) (eq-ind-r lzero lzero nat (plus (length l157 A l1) (length l157 A (append l157 A a l2))) (λ (x : nat) -> λ (X-- : eq lzero nat x (plus (length l157 A l1) (length l157 A (append l157 A a l2)))) -> le (length l157 A a) x) (eq-ind-r lzero lzero nat (plus (length l157 A a) (length l157 A l2)) (λ (x : nat) -> λ (X-- : eq lzero nat x (plus (length l157 A a) (length l157 A l2))) -> le (length l157 A a) (plus (length l157 A l1) x)) (eq-coerc lzero (le n (plus n (length l157 A (append l157 A l1 l2)))) (le (length l157 A a) (plus (length l157 A l1) (plus (length l157 A a) (length l157 A l2)))) (le-plus-n-r (length l157 A (append l157 A l1 l2)) n) (rewrite-r lzero (lsuc lzero) nat n (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le n (plus n (length l157 A (append l157 A l1 l2)))) (le X-- (plus (length l157 A l1) (plus (length l157 A a) (length l157 A l2))))) (rewrite-r lzero (lsuc lzero) nat n (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le n (plus n (length l157 A (append l157 A l1 l2)))) (le n (plus (length l157 A l1) (plus X-- (length l157 A l2))))) (rewrite-r lzero (lsuc lzero) nat (plus n (plus (length l157 A l1) (length l157 A l2))) (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le n (plus n (length l157 A (append l157 A l1 l2)))) (le n X--)) (rewrite-l lzero (lsuc lzero) nat (length l157 A (append l157 A l1 l2)) (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le n (plus n (length l157 A (append l157 A l1 l2)))) (le n (plus n X--))) (refl (lsuc lzero) (Set (lzero)) (le n (plus n (length l157 A (append l157 A l1 l2))))) (plus (length l157 A l1) (length l157 A l2)) (length-append l157 A l1 l2)) (plus (length l157 A l1) (plus n (length l157 A l2))) (rewrite-l lzero lzero nat (plus (plus n (length l157 A l1)) (length l157 A l2)) (λ (X-- : nat) -> eq lzero nat (plus (length l157 A l1) (plus n (length l157 A l2))) X--) (assoc-plus1 (length l157 A l2) n (length l157 A l1)) (plus n (plus (length l157 A l1) (length l157 A l2))) (associative-plus n (length l157 A l1) (length l157 A l2)))) (length l157 A a) Ha) (length l157 A a) Ha)) (length l157 A (append l157 A a l2)) (length-append l157 A a l2)) (length l157 A (append l157 A l1 (append l157 A a l2))) (length-append l157 A l1 (append l157 A a l2))) (nil l157 A) Hnil) (le-n (length l157 A (nil l157 A))))))
let-clause-1222 : (l153 : Level) -> (A : Set l153) -> (n : nat) -> (l : list l153 (list l153 A)) -> (hd-v : list l153 A) -> (tl : list l153 (list l153 A)) -> (Hind : (l1 : list l153 A) -> (l2 : list l153 A) -> (a : list l153 A) -> (X-- : lt O n) -> (X--1 : (x : list l153 A) -> (X--1 : mem l153 (list l153 A) x tl) -> eq lzero nat (length l153 A x) n) -> (X--2 : eq lzero nat (length l153 A a) n) -> (X--3 : eq l153 (list l153 A) (flatten l153 A tl) (append l153 A l1 (append l153 A a l2))) -> (X--4 : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length l153 A l1) (times n q))) -> mem l153 (list l153 A) a tl) -> (l1 : list l153 A) -> (l2 : list l153 A) -> (a : list l153 A) -> (posn : lt O n) -> (Hlen : (x : list l153 A) -> (X-- : mem l153 (list l153 A) x (cons l153 (list l153 A) hd-v tl)) -> eq lzero nat (length l153 A x) n) -> (Ha : eq lzero nat (length l153 A a) n) -> (Hflat : eq l153 (list l153 A) (append l153 A hd-v (foldr l153 l153 (list l153 A) (list l153 A) (append l153 A) (nil l153 A) tl)) (append l153 A l1 (append l153 A a l2))) -> (X-clearme : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length l153 A l1) (times n q))) -> (q : nat) -> (q1 : nat) -> (Hl1 : eq lzero nat (length l153 A l1) (times n (S q1))) -> (l11 : list l153 A) -> (X-clearme0 : ex l153 l153 (list l153 A) (λ (l20 : list l153 A) -> And l153 lzero (eq l153 (list l153 A) l1 (append l153 A l11 l20)) (eq lzero nat (length l153 A l11) n))) -> (l12 : list l153 A) -> (X-clearme1 : And l153 lzero (eq l153 (list l153 A) l1 (append l153 A l11 l12)) (eq lzero nat (length l153 A l11) n)) -> (Heql1 : eq l153 (list l153 A) l1 (append l153 A l11 l12)) -> (Hlenl11 : eq lzero nat (length l153 A l11) n) -> eq lzero nat (length l153 A l1) (plus n (times n q1))
let-clause-1222 = λ (l153 : Level) -> λ (A : Set l153) -> λ (n : nat) -> λ (l : list l153 (list l153 A)) -> λ (hd-v : list l153 A) -> λ (tl : list l153 (list l153 A)) -> λ (Hind : (l1 : list l153 A) -> (l2 : list l153 A) -> (a : list l153 A) -> (X-- : lt O n) -> (X--1 : (x : list l153 A) -> (X--1 : mem l153 (list l153 A) x tl) -> eq lzero nat (length l153 A x) n) -> (X--2 : eq lzero nat (length l153 A a) n) -> (X--3 : eq l153 (list l153 A) (flatten l153 A tl) (append l153 A l1 (append l153 A a l2))) -> (X--4 : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length l153 A l1) (times n q))) -> mem l153 (list l153 A) a tl) -> λ (l1 : list l153 A) -> λ (l2 : list l153 A) -> λ (a : list l153 A) -> λ (posn : lt O n) -> λ (Hlen : (x : list l153 A) -> (X-- : mem l153 (list l153 A) x (cons l153 (list l153 A) hd-v tl)) -> eq lzero nat (length l153 A x) n) -> λ (Ha : eq lzero nat (length l153 A a) n) -> λ (Hflat : eq l153 (list l153 A) (append l153 A hd-v (foldr l153 l153 (list l153 A) (list l153 A) (append l153 A) (nil l153 A) tl)) (append l153 A l1 (append l153 A a l2))) -> λ (X-clearme : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length l153 A l1) (times n q))) -> λ (q : nat) -> λ (q1 : nat) -> λ (Hl1 : eq lzero nat (length l153 A l1) (times n (S q1))) -> λ (l11 : list l153 A) -> λ (X-clearme0 : ex l153 l153 (list l153 A) (λ (l20 : list l153 A) -> And l153 lzero (eq l153 (list l153 A) l1 (append l153 A l11 l20)) (eq lzero nat (length l153 A l11) n))) -> λ (l12 : list l153 A) -> λ (X-clearme1 : And l153 lzero (eq l153 (list l153 A) l1 (append l153 A l11 l12)) (eq lzero nat (length l153 A l11) n)) -> λ (Heql1 : eq l153 (list l153 A) l1 (append l153 A l11 l12)) -> λ (Hlenl11 : eq lzero nat (length l153 A l11) n) -> rewrite-r lzero lzero nat (times n (S q1)) (λ (X-- : nat) -> eq lzero nat (length l153 A l1) X--) Hl1 (plus n (times n q1)) (times-n-Sm n q1)
flatten-to-mem : (l263 : Level) -> (A : Set ((lsuc lzero) ⊔ (lsuc l263))) -> (n : nat) -> (l : list ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A)) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (a : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X-- : lt O n) -> (X--1 : (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X--1 : mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x l) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A x) n) -> (X--2 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A a) n) -> (X--3 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (flatten ((lsuc lzero) ⊔ (lsuc l263)) A l) (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> (X--4 : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q))) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a l
flatten-to-mem = λ (l263 : Level) -> λ (A : Set ((lsuc lzero) ⊔ (lsuc l263))) -> λ (n : nat) -> λ (l : list ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A)) -> list-ind ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (X-x-716 : list ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A)) -> (l1 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (a : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X-- : lt O n) -> (X--1 : (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X--1 : mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x X-x-716) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A x) n) -> (X--2 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A a) n) -> (X--3 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (flatten ((lsuc lzero) ⊔ (lsuc l263)) A X-x-716) (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> (X--4 : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q))) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a X-x-716) (λ (l1 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (a : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (posn : le (S O) n) -> λ (Hlen : (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X-- : False ((lsuc lzero) ⊔ (lsuc l263))) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A x) n) -> λ (Ha : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A a) n) -> λ (Hnil : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> False-ind lzero ((lsuc lzero) ⊔ (lsuc l263)) (λ (X-x-66 : False lzero) -> (X-- : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q))) -> False ((lsuc lzero) ⊔ (lsuc l263))) (absurd lzero (le (S n) O) (eq-coerc lzero (le (S O) n) (le (S n) O) posn (rewrite-r lzero (lsuc lzero) nat n (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le (S X--) n) (le (S n) O)) (rewrite-r lzero (lsuc lzero) nat n (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le (S n) n) (le (S n) X--)) (refl (lsuc lzero) (Set (lzero)) (le (S n) n)) O (let-clause-1227 ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) A n l l1 l2 a posn Hlen Ha Hnil)) O (let-clause-1227 ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) A n l l1 l2 a posn Hlen Ha Hnil))) (not-le-Sn-O n))) (λ (hd-v : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (tl : list ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A)) -> λ (Hind : (l1 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (l2 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (a : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X-- : lt O n) -> (X--1 : (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X--1 : mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x tl) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A x) n) -> (X--2 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A a) n) -> (X--3 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (flatten ((lsuc lzero) ⊔ (lsuc l263)) A tl) (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> (X--4 : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q))) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a tl) -> λ (l1 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (l2 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (a : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (posn : lt O n) -> λ (Hlen : (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> (X-- : mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A x) n) -> λ (Ha : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A a) n) -> λ (Hflat : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A hd-v (foldr ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) tl)) (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> λ (X-clearme : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q))) -> match-ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q)) ((lsuc lzero) ⊔ (lsuc l263)) (λ (X-- : ex lzero lzero nat (λ (q : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n q))) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) (λ (q : nat) -> match-nat ((lsuc lzero) ⊔ (lsuc l263)) (λ (X-- : nat) -> (X--1 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n X--)) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) (eq-ind lzero ((lsuc lzero) ⊔ (lsuc l263)) nat O (λ (x-1 : nat) -> λ (X-x-2 : eq lzero nat O x-1) -> (X-- : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) x-1) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) (λ (Hl1 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) O) -> or-introl ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a hd-v) (mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a tl) (rewrite-r ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v (λ (X-- : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) X-- hd-v) (refl ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v) a (eq-ind-r ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (nil ((lsuc lzero) ⊔ (lsuc l263)) A)) -> (X--1 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A hd-v (foldr ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) tl)) (append ((lsuc lzero) ⊔ (lsuc l263)) A x (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a hd-v) (λ (Hflat0 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A hd-v (foldr ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) tl)) (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)) -> sym-eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v a (append-l1-injective l263 A hd-v a (foldr ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) tl) l2 (eq-ind-r lzero lzero nat n (λ (x : nat) -> λ (X-- : eq lzero nat x n) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A hd-v) x) (eq-ind-r lzero lzero nat n (λ (x : nat) -> λ (X-- : eq lzero nat x n) -> eq lzero nat x n) (refl lzero nat n) (length ((lsuc lzero) ⊔ (lsuc l263)) A hd-v) (Hlen hd-v (or-introl ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v hd-v) (mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl) (refl ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v)))) (length ((lsuc lzero) ⊔ (lsuc l263)) A a) Ha) Hflat0)) l1 (lenght-to-nil ((lsuc lzero) ⊔ (lsuc l263)) A l1 Hl1) Hflat))) (times n O) (times-n-O n)) (λ (q1 : nat) -> λ (Hl1 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (times n (S q1))) -> match-ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l11 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l21 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l21)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n))) ((lsuc lzero) ⊔ (lsuc l263)) (λ (X-- : ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l10 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l20 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l10 l20)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l10) n)))) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) (λ (l11 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-clearme0 : ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l20 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l20)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n))) -> match-ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l20 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l20)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n)) ((lsuc lzero) ⊔ (lsuc l263)) (λ (X-- : ex ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (λ (l20 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l20)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n))) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) (λ (l12 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-clearme1 : And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n)) -> match-And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n) ((lsuc lzero) ⊔ (lsuc l263)) (λ (X-- : And ((lsuc lzero) ⊔ (lsuc l263)) lzero (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) (eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n)) -> mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a (cons ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl)) (λ (Heql1 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) -> λ (Hlenl11 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) n) -> or-intror ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a hd-v) (mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) a tl) (Hind l12 l2 a posn (λ (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (memx : mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x tl) -> Hlen x (or-intror ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x hd-v) (mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x tl) memx)) Ha (append-l2-injective l263 A hd-v l11 (flatten ((lsuc lzero) ⊔ (lsuc l263)) A tl) (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)) (eq-ind-r lzero lzero nat n (λ (x : nat) -> λ (X-- : eq lzero nat x n) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A hd-v) x) (Hlen hd-v (or-introl ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v hd-v) (mem ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v tl) (refl ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) hd-v))) (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) Hlenl11) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)) (λ (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (append ((lsuc lzero) ⊔ (lsuc l263)) A l1 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) -> eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)))) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12) (λ (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) -> eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A x (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)) (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)))) (eq-ind-r ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) (λ (x : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-- : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)))) -> eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) x (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)))) (refl ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 (append ((lsuc lzero) ⊔ (lsuc l263)) A l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)))) (append ((lsuc lzero) ⊔ (lsuc l263)) A (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12) (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2)) (associative-append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12 (append ((lsuc lzero) ⊔ (lsuc l263)) A a l2))) l1 Heql1) (append ((lsuc lzero) ⊔ (lsuc l263)) A hd-v (foldr ((lsuc lzero) ⊔ (lsuc l263)) ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (list ((lsuc lzero) ⊔ (lsuc l263)) A) (append ((lsuc lzero) ⊔ (lsuc l263)) A) (nil ((lsuc lzero) ⊔ (lsuc l263)) A) tl)) Hflat)) (ex-intro lzero lzero nat (λ (q0 : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l12) (times n q0)) q1 (injective-plus-r n (length ((lsuc lzero) ⊔ (lsuc l263)) A l12) (times n q1) (eq-ind lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) (λ (x-1 : nat) -> λ (X-x-2 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) x-1) -> eq lzero nat (plus x-1 (length ((lsuc lzero) ⊔ (lsuc l263)) A l12)) (plus n (times n q1))) (eq-ind lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) (λ (x-1 : nat) -> λ (X-x-2 : eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) x-1) -> eq lzero nat x-1 (plus n (times n q1))) (eq-ind ((lsuc lzero) ⊔ (lsuc l263)) lzero (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 (λ (x-1 : list ((lsuc lzero) ⊔ (lsuc l263)) A) -> λ (X-x-2 : eq ((lsuc lzero) ⊔ (lsuc l263)) (list ((lsuc lzero) ⊔ (lsuc l263)) A) l1 x-1) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A x-1) (plus n (times n q1))) (eq-ind-r lzero lzero nat (times n (S q1)) (λ (x : nat) -> λ (X-- : eq lzero nat x (times n (S q1))) -> eq lzero nat x (plus n (times n q1))) (rewrite-l lzero lzero nat (plus n (times n q1)) (λ (X-- : nat) -> eq lzero nat X-- (plus n (times n q1))) (rewrite-l lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (λ (X-- : nat) -> eq lzero nat X-- (plus n (times n q1))) (rewrite-l lzero lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (λ (X-- : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) X--) (refl lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1)) (plus n (times n q1)) (let-clause-1222 ((lsuc lzero) ⊔ (lsuc l263)) A n l hd-v tl Hind l1 l2 a posn Hlen Ha Hflat X-clearme q q1 Hl1 l11 X-clearme0 l12 X-clearme1 Heql1 Hlenl11)) (plus n (times n q1)) (let-clause-1222 ((lsuc lzero) ⊔ (lsuc l263)) A n l hd-v tl Hind l1 l2 a posn Hlen Ha Hflat X-clearme q q1 Hl1 l11 X-clearme0 l12 X-clearme1 Heql1 Hlenl11)) (times n (S q1)) (times-n-Sm n q1)) (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) Hl1) (append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12) Heql1) (plus (length ((lsuc lzero) ⊔ (lsuc l263)) A l11) (length ((lsuc lzero) ⊔ (lsuc l263)) A l12)) (length-append ((lsuc lzero) ⊔ (lsuc l263)) A l11 l12)) n Hlenl11))))) X-clearme1) X-clearme0) (split-exists ((lsuc lzero) ⊔ (lsuc l263)) A n l1 (eq-coerc lzero (le (minus (plus n (times n q1)) (plus O (times n q1))) (plus n (times n q1))) (le n (length ((lsuc lzero) ⊔ (lsuc l263)) A l1)) (minus-le (plus n (times n q1)) (plus O (times n q1))) (rewrite-r lzero (lsuc lzero) nat (minus n O) (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le X-- (plus n (times n q1))) (le n (length ((lsuc lzero) ⊔ (lsuc l263)) A l1))) (rewrite-l lzero (lsuc lzero) nat n (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le X-- (plus n (times n q1))) (le n (length ((lsuc lzero) ⊔ (lsuc l263)) A l1))) (rewrite-l lzero (lsuc lzero) nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) (λ (X-- : nat) -> eq (lsuc lzero) (Set (lzero)) (le n X--) (le n (length ((lsuc lzero) ⊔ (lsuc l263)) A l1))) (refl (lsuc lzero) (Set (lzero)) (le n (length ((lsuc lzero) ⊔ (lsuc l263)) A l1))) (plus n (times n q1)) (rewrite-r lzero lzero nat (times n (S q1)) (λ (X-- : nat) -> eq lzero nat (length ((lsuc lzero) ⊔ (lsuc l263)) A l1) X--) Hl1 (plus n (times n q1)) (times-n-Sm n q1))) (minus n O) (minus-n-O n)) (minus (plus n (times n q1)) (plus O (times n q1))) (minus-plus-plus-l n O (times n q1)))))) q) X-clearme) l
nth : (l3-v : Level) -> (X---v : nat) -> (H-v : Set l3-v) -> (X--1-v : list l3-v H-v) -> (X--2-v : H-v) -> H-v
nth l10-v O A-v l-v d-v = hd l10-v A-v l-v d-v
nth l10-v (S m-v) A-v l-v d-v = nth l10-v m-v A-v (tail l10-v A-v l-v) d-v
nth-nil : (l20 : Level) -> (A : Set l20) -> (a : A) -> (i : nat) -> eq l20 A (nth l20 i A (nil l20 A) a) a
nth-nil = λ (l20 : Level) -> λ (A : Set l20) -> λ (a : A) -> λ (i : nat) -> nat-ind l20 (λ (X-x-365 : nat) -> eq l20 A (nth l20 X-x-365 A (nil l20 A) a) a) (refl l20 A a) (λ (x-366 : nat) -> λ (X-x-368 : eq l20 A (nth l20 x-366 A (nil l20 A) a) a) -> rewrite-r l20 l20 A a (λ (X-- : A) -> eq l20 A X-- a) (refl l20 A a) (nth l20 x-366 A (nil l20 A) a) X-x-368) i
nth-opt : (l3-v : Level) -> (A-v : Set l3-v) -> (X-n-v : nat) -> (X-l-v : list l3-v A-v) -> option l3-v A-v
nth-opt l4-v A-v X-n-v nil' = None l4-v A-v
nth-opt l4-v A-v X-n-v (cons' h-v t-v) = match-nat l4-v (λ (X---v : nat) -> option l4-v A-v) (Some l4-v A-v h-v) (λ (m-v : nat) -> nth-opt l4-v A-v m-v t-v) X-n-v
All : (l4-v l3-v : Level) -> (A-v : Set l4-v) -> (X-P-v : (X---v : A-v) -> Set l3-v) -> (X-l-v : list l4-v A-v) -> Set (lzero ⊔ (l4-v ⊔ l3-v))
All l5-v l10-v A-v X-P-v nil' = True (l10-v ⊔ l5-v)
All l5-v l10-v A-v X-P-v (cons' h-v t-v) = And l10-v (l10-v ⊔ l5-v) (X-P-v h-v) (All l5-v l10-v A-v X-P-v t-v)
All-mp : (l61 l59 l57 : Level) -> (A : Set l61) -> (P : (X-- : A) -> Set l59) -> (Q : (X-- : A) -> Set l57) -> (X-- : (a : A) -> (X-- : P a) -> Q a) -> (l : list l61 A) -> (X--1 : All l61 l59 A P l) -> All l61 l57 A Q l
All-mp = λ (l61 l59 l57 : Level) -> λ (A : Set l61) -> λ (P : (X-- : A) -> Set l59) -> λ (Q : (X-- : A) -> Set l57) -> λ (H : (a : A) -> (X-- : P a) -> Q a) -> λ (l : list l61 A) -> list-ind l61 ((l61 ⊔ l59) ⊔ l57) A (λ (X-x-716 : list l61 A) -> (X-- : All l61 l59 A P X-x-716) -> All l61 l57 A Q X-x-716) (λ (auto : True (l61 ⊔ l59)) -> I (l61 ⊔ l57)) (λ (h : A) -> λ (t : list l61 A) -> λ (IH : (X-- : All l61 l59 A P t) -> All l61 l57 A Q t) -> λ (X-clearme : And l59 (l61 ⊔ l59) (P h) (All l61 l59 A P t)) -> match-And l59 (l61 ⊔ l59) (P h) (All l61 l59 A P t) (l61 ⊔ l57) (λ (X-- : And l59 (l61 ⊔ l59) (P h) (All l61 l59 A P t)) -> And l57 (l61 ⊔ l57) (Q h) (All l61 l57 A Q t)) (λ (auto : P h) -> λ (auto' : All l61 l59 A P t) -> conj l57 (l61 ⊔ l57) (Q h) (All l61 l57 A Q t) (H h auto) (IH auto')) X-clearme) l
All-nth : (l242 : Level) -> (A : Set (lzero)) -> (P : (X-- : A) -> Set l242) -> (n : nat) -> (l : list lzero A) -> (X-- : All lzero l242 A P l) -> (a : A) -> (X--1 : eq lzero (option lzero A) (nth-opt lzero A n l) (Some lzero A a)) -> P a
All-nth = λ (l242 : Level) -> λ (A : Set (lzero)) -> λ (P : (X-- : A) -> Set l242) -> λ (n : nat) -> nat-ind l242 (λ (X-x-365 : nat) -> (l : list lzero A) -> (X-- : All lzero l242 A P l) -> (a : A) -> (X--1 : eq lzero (option lzero A) (nth-opt lzero A X-x-365 l) (Some lzero A a)) -> P a) (λ (X-clearme : list lzero A) -> match-list lzero A l242 (λ (X-- : list lzero A) -> (X--1 : All lzero l242 A P X--) -> (a : A) -> (X--2 : eq lzero (option lzero A) (nth-opt lzero A O X--) (Some lzero A a)) -> P a) (λ (X-- : All lzero l242 A P (nil lzero A)) -> λ (a : A) -> λ (E : eq lzero (option lzero A) (nth-opt lzero A O (nil lzero A)) (Some lzero A a)) -> option-discr l242 A (None lzero A) (Some lzero A a) E (P a)) (λ (hd-v : A) -> λ (tl : list lzero A) -> λ (X-clearme0 : All lzero l242 A P (cons lzero A hd-v tl)) -> match-And l242 l242 (P hd-v) (All lzero l242 A P tl) l242 (λ (X-- : And l242 l242 (P hd-v) (All lzero l242 A P tl)) -> (a : A) -> (X--1 : eq lzero (option lzero A) (nth-opt lzero A O (cons lzero A hd-v tl)) (Some lzero A a)) -> P a) (λ (H : P hd-v) -> λ (X-- : All lzero l242 A P tl) -> λ (a : A) -> λ (E : eq lzero (option lzero A) (nth-opt lzero A O (cons lzero A hd-v tl)) (Some lzero A a)) -> option-discr l242 A (Some lzero A hd-v) (Some lzero A a) E (P a) (λ (e0 : eq lzero A (R0 lzero A hd-v) a) -> eq-ind-r lzero l242 A a (λ (x : A) -> λ (X-0 : eq lzero A x a) -> (X--1 : P x) -> (X--2 : eq lzero (option lzero A) (Some lzero A x) (Some lzero A a)) -> P a) (λ (H0 : P a) -> λ (E0 : eq lzero (option lzero A) (Some lzero A a) (Some lzero A a)) -> streicherK lzero l242 (option lzero A) (Some lzero A a) (λ (X--1 : eq lzero (option lzero A) (Some lzero A a) (Some lzero A a)) -> P a) H0 E0) hd-v e0 H E)) X-clearme0) X-clearme) (λ (m : nat) -> λ (IH : (l : list lzero A) -> (X-- : All lzero l242 A P l) -> (a : A) -> (X--1 : eq lzero (option lzero A) (nth-opt lzero A m l) (Some lzero A a)) -> P a) -> λ (X-clearme : list lzero A) -> match-list lzero A l242 (λ (X-- : list lzero A) -> (X--1 : All lzero l242 A P X--) -> (a : A) -> (X--2 : eq lzero (option lzero A) (nth-opt lzero A (S m) X--) (Some lzero A a)) -> P a) (λ (X-- : All lzero l242 A P (nil lzero A)) -> λ (a : A) -> λ (E : eq lzero (option lzero A) (nth-opt lzero A (S m) (nil lzero A)) (Some lzero A a)) -> option-discr l242 A (None lzero A) (Some lzero A a) E (P a)) (λ (hd-v : A) -> λ (tl : list lzero A) -> λ (X-clearme0 : All lzero l242 A P (cons lzero A hd-v tl)) -> match-And l242 l242 (P hd-v) (All lzero l242 A P tl) l242 (λ (X-- : And l242 l242 (P hd-v) (All lzero l242 A P tl)) -> (a : A) -> (X--1 : eq lzero (option lzero A) (nth-opt lzero A (S m) (cons lzero A hd-v tl)) (Some lzero A a)) -> P a) (λ (X-- : P hd-v) -> IH tl) X-clearme0) X-clearme) n
All-append : (l93 l91 : Level) -> (A : Set l93) -> (P : (X-- : A) -> Set l91) -> (l1 : list l93 A) -> (l2 : list l93 A) -> (X-- : All l93 l91 A P l1) -> (X--1 : All l93 l91 A P l2) -> All l93 l91 A P (append l93 A l1 l2)
All-append = λ (l93 l91 : Level) -> λ (A : Set l93) -> λ (P : (X-- : A) -> Set l91) -> λ (l1 : list l93 A) -> list-ind l93 (l93 ⊔ l91) A (λ (X-x-716 : list l93 A) -> (l2 : list l93 A) -> (X-- : All l93 l91 A P X-x-716) -> (X--1 : All l93 l91 A P l2) -> All l93 l91 A P (append l93 A X-x-716 l2)) (λ (l2 : list l93 A) -> λ (auto : All l93 l91 A P (nil l93 A)) -> λ (auto' : All l93 l91 A P l2) -> auto') (λ (a : A) -> λ (l10 : list l93 A) -> λ (IHl1 : (l2 : list l93 A) -> (X-- : All l93 l91 A P l10) -> (X--1 : All l93 l91 A P l2) -> All l93 l91 A P (append l93 A l10 l2)) -> λ (l2 : list l93 A) -> λ (X-clearme : All l93 l91 A P (cons l93 A a l10)) -> match-And l91 (l93 ⊔ l91) (P a) (All l93 l91 A P l10) (l93 ⊔ l91) (λ (X-- : And l91 (l93 ⊔ l91) (P a) (All l93 l91 A P l10)) -> (X--1 : All l93 l91 A P l2) -> All l93 l91 A P (append l93 A (cons l93 A a l10) l2)) (λ (auto : P a) -> λ (auto' : All l93 l91 A P l10) -> λ (auto'' : All l93 l91 A P l2) -> conj l91 (l93 ⊔ l91) (P a) (All l93 l91 A P (append l93 A l10 l2)) auto (IHl1 l2 auto' auto'')) X-clearme) l1
All-inv-append : (l128 l126 : Level) -> (A : Set l128) -> (P : (X-- : A) -> Set l126) -> (l1 : list l128 A) -> (l2 : list l128 A) -> (X-- : All l128 l126 A P (append l128 A l1 l2)) -> And (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P l1) (All l128 l126 A P l2)
All-inv-append = λ (l128 l126 : Level) -> λ (A : Set l128) -> λ (P : (X-- : A) -> Set l126) -> λ (l1 : list l128 A) -> list-ind l128 (l128 ⊔ l126) A (λ (X-x-716 : list l128 A) -> (l2 : list l128 A) -> (X-- : All l128 l126 A P (append l128 A X-x-716 l2)) -> And (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P X-x-716) (All l128 l126 A P l2)) (λ (l2 : list l128 A) -> λ (auto : All l128 l126 A P (append l128 A (nil l128 A) l2)) -> conj (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P (nil l128 A)) (All l128 l126 A P l2) (I (l128 ⊔ l126)) auto) (λ (a : A) -> λ (l10 : list l128 A) -> λ (IHl1 : (l2 : list l128 A) -> (X-- : All l128 l126 A P (append l128 A l10 l2)) -> And (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P l10) (All l128 l126 A P l2)) -> λ (l2 : list l128 A) -> λ (X-clearme : All l128 l126 A P (append l128 A (cons l128 A a l10) l2)) -> match-And l126 (l128 ⊔ l126) (P a) (All l128 l126 A P (append l128 A l10 l2)) (l128 ⊔ l126) (λ (X-- : And l126 (l128 ⊔ l126) (P a) (All l128 l126 A P (append l128 A l10 l2))) -> And (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P (cons l128 A a l10)) (All l128 l126 A P l2)) (λ (Ha : P a) -> λ (Hl12 : All l128 l126 A P (append l128 A l10 l2)) -> And-ind (l128 ⊔ l126) (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P l10) (All l128 l126 A P l2) (λ (X-x-118 : And (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P l10) (All l128 l126 A P l2)) -> And (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P (cons l128 A a l10)) (All l128 l126 A P l2)) (λ (X-x-120 : All l128 l126 A P l10) -> λ (X-x-119 : All l128 l126 A P l2) -> conj (l128 ⊔ l126) (l128 ⊔ l126) (All l128 l126 A P (cons l128 A a l10)) (All l128 l126 A P l2) (conj l126 (l128 ⊔ l126) (P a) (All l128 l126 A P l10) Ha X-x-120) X-x-119) (IHl1 l2 Hl12)) X-clearme) l1
Allr : (l4-v l3-v : Level) -> (A-v : Set l4-v) -> (X-R-v : relation l4-v l3-v A-v) -> (X-l-v : list l4-v A-v) -> Set (lzero ⊔ (l4-v ⊔ l3-v))
Allr l5-v l15-v A-v X-R-v nil' = True (l15-v ⊔ l5-v)
Allr l5-v l15-v A-v X-R-v (cons' a1-v l0-v) = match-list l5-v A-v ((lsuc lzero) ⊔ ((lsuc l15-v) ⊔ (lsuc l5-v))) (λ (X---v : list l5-v A-v) -> Set (l15-v ⊔ l5-v)) (True (l15-v ⊔ l5-v)) (λ (a2-v : A-v) -> λ (X---v : list l5-v A-v) -> And l15-v (l15-v ⊔ l5-v) (X-R-v a1-v a2-v) (Allr l5-v l15-v A-v X-R-v l0-v)) l0-v
Allr-fwd-append-sn : (l157 l154 : Level) -> (A : Set l157) -> (R : relation l157 l154 A) -> (l1 : list l157 A) -> (l2 : list l157 A) -> (X-- : Allr l157 l154 A R (append l157 A l1 l2)) -> Allr l157 l154 A R l1
Allr-fwd-append-sn = λ (l157 l154 : Level) -> λ (A : Set l157) -> λ (R : relation l157 l154 A) -> λ (l1 : list l157 A) -> list-ind l157 (l157 ⊔ l154) A (λ (X-x-716 : list l157 A) -> (l2 : list l157 A) -> (X-- : Allr l157 l154 A R (append l157 A X-x-716 l2)) -> Allr l157 l154 A R X-x-716) (λ (l2 : list l157 A) -> λ (auto : Allr l157 l154 A R (append l157 A (nil l157 A) l2)) -> I (l157 ⊔ l154)) (λ (a1 : A) -> λ (X-clearme : list l157 A) -> match-list l157 A (l157 ⊔ l154) (λ (X-- : list l157 A) -> (X-x-720 : (l2 : list l157 A) -> (X--1 : Allr l157 l154 A R (append l157 A X-- l2)) -> Allr l157 l154 A R X--) -> (l2 : list l157 A) -> (X--1 : Allr l157 l154 A R (append l157 A (cons l157 A a1 X--) l2)) -> Allr l157 l154 A R (cons l157 A a1 X--)) (λ (X-x-720 : (l2 : list l157 A) -> (X-- : Allr l157 l154 A R (append l157 A (nil l157 A) l2)) -> Allr l157 l154 A R (nil l157 A)) -> λ (l2 : list l157 A) -> λ (auto : Allr l157 l154 A R (append l157 A (cons l157 A a1 (nil l157 A)) l2)) -> I (l157 ⊔ l154)) (λ (a2 : A) -> λ (l10 : list l157 A) -> λ (IHl1 : (l2 : list l157 A) -> (X-- : Allr l157 l154 A R (append l157 A (cons l157 A a2 l10) l2)) -> Allr l157 l154 A R (cons l157 A a2 l10)) -> λ (l2 : list l157 A) -> λ (X-clearme0 : Allr l157 l154 A R (append l157 A (cons l157 A a1 (cons l157 A a2 l10)) l2)) -> match-And l154 (l157 ⊔ l154) (R a1 a2) (Allr l157 l154 A R (append l157 A (cons l157 A a2 l10) l2)) (l157 ⊔ l154) (λ (X-- : And l154 (l157 ⊔ l154) (R a1 a2) (Allr l157 l154 A R (append l157 A (cons l157 A a2 l10) l2))) -> Allr l157 l154 A R (cons l157 A a1 (cons l157 A a2 l10))) (λ (auto : R a1 a2) -> λ (auto' : Allr l157 l154 A R (append l157 A (cons l157 A a2 l10) l2)) -> conj l154 (l157 ⊔ l154) (R a1 a2) (Allr l157 l154 A R (cons l157 A a2 l10)) auto (IHl1 l2 auto')) X-clearme0) X-clearme) l1
Allr-fwd-cons : (l54 l51 : Level) -> (A : Set l54) -> (R : relation l54 l51 A) -> (a : A) -> (l : list l54 A) -> (X-- : Allr l54 l51 A R (cons l54 A a l)) -> Allr l54 l51 A R l
Allr-fwd-cons = λ (l54 l51 : Level) -> λ (A : Set l54) -> λ (R : relation l54 l51 A) -> λ (a : A) -> λ (X-clearme : list l54 A) -> match-list l54 A (l54 ⊔ l51) (λ (X-- : list l54 A) -> (X--1 : Allr l54 l51 A R (cons l54 A a X--)) -> Allr l54 l51 A R X--) (λ (auto : Allr l54 l51 A R (cons l54 A a (nil l54 A))) -> auto) (λ (a0 : A) -> λ (l : list l54 A) -> λ (X-clearme0 : Allr l54 l51 A R (cons l54 A a (cons l54 A a0 l))) -> match-And l51 (l54 ⊔ l51) (R a a0) (Allr l54 l51 A R (cons l54 A a0 l)) (l54 ⊔ l51) (λ (X-- : And l51 (l54 ⊔ l51) (R a a0) (Allr l54 l51 A R (cons l54 A a0 l))) -> Allr l54 l51 A R (cons l54 A a0 l)) (λ (auto : R a a0) -> λ (auto' : Allr l54 l51 A R (cons l54 A a0 l)) -> auto') X-clearme0) X-clearme
Allr-fwd-append-dx : (l54 l51 : Level) -> (A : Set l54) -> (R : relation l54 l51 A) -> (l1 : list l54 A) -> (l2 : list l54 A) -> (X-- : Allr l54 l51 A R (append l54 A l1 l2)) -> Allr l54 l51 A R l2
Allr-fwd-append-dx = λ (l54 l51 : Level) -> λ (A : Set l54) -> λ (R : relation l54 l51 A) -> λ (l1 : list l54 A) -> list-ind l54 (l54 ⊔ l51) A (λ (X-x-716 : list l54 A) -> (l2 : list l54 A) -> (X-- : Allr l54 l51 A R (append l54 A X-x-716 l2)) -> Allr l54 l51 A R l2) (λ (l2 : list l54 A) -> λ (auto : Allr l54 l51 A R (append l54 A (nil l54 A) l2)) -> auto) (λ (a1 : A) -> λ (l10 : list l54 A) -> λ (IHl1 : (l2 : list l54 A) -> (X-- : Allr l54 l51 A R (append l54 A l10 l2)) -> Allr l54 l51 A R l2) -> λ (l2 : list l54 A) -> λ (H : Allr l54 l51 A R (append l54 A (cons l54 A a1 l10) l2)) -> IHl1 l2 (Allr-fwd-cons l54 l51 A R a1 (append l54 A l10 l2) H)) l1
Exists : (l4-v l3-v : Level) -> (A-v : Set l4-v) -> (X-P-v : (X---v : A-v) -> Set l3-v) -> (X-l-v : list l4-v A-v) -> Set (lzero ⊔ (l4-v ⊔ l3-v))
Exists l5-v l10-v A-v X-P-v nil' = False (l10-v ⊔ l5-v)
Exists l5-v l10-v A-v X-P-v (cons' h-v t-v) = Or l10-v (l10-v ⊔ l5-v) (X-P-v h-v) (Exists l5-v l10-v A-v X-P-v t-v)
Exists-append : (l141 l139 : Level) -> (A : Set l141) -> (P : (X-- : A) -> Set l139) -> (l1 : list l141 A) -> (l2 : list l141 A) -> (X-- : Exists l141 l139 A P (append l141 A l1 l2)) -> Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P l1) (Exists l141 l139 A P l2)
Exists-append = λ (l141 l139 : Level) -> λ (A : Set l141) -> λ (P : (X-- : A) -> Set l139) -> λ (l1 : list l141 A) -> list-ind l141 (l141 ⊔ l139) A (λ (X-x-716 : list l141 A) -> (l2 : list l141 A) -> (X-- : Exists l141 l139 A P (append l141 A X-x-716 l2)) -> Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P X-x-716) (Exists l141 l139 A P l2)) (λ (l2 : list l141 A) -> λ (auto : Exists l141 l139 A P l2) -> or-intror (l141 ⊔ l139) (l141 ⊔ l139) (False (l141 ⊔ l139)) (Exists l141 l139 A P l2) auto) (λ (h : A) -> λ (t : list l141 A) -> λ (IH : (l2 : list l141 A) -> (X-- : Exists l141 l139 A P (append l141 A t l2)) -> Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P t) (Exists l141 l139 A P l2)) -> λ (l2 : list l141 A) -> λ (X-clearme : Exists l141 l139 A P (append l141 A (cons l141 A h t) l2)) -> match-Or l139 (l141 ⊔ l139) (P h) (Exists l141 l139 A P (append l141 A t l2)) (l141 ⊔ l139) (λ (X-- : Or l139 (l141 ⊔ l139) (P h) (Exists l141 l139 A P (append l141 A t l2))) -> Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P (cons l141 A h t)) (Exists l141 l139 A P l2)) (λ (H : P h) -> or-introl (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P (cons l141 A h t)) (Exists l141 l139 A P l2) (or-introl l139 (l141 ⊔ l139) (P h) (Exists l141 l139 A P t) H)) (λ (H : Exists l141 l139 A P (append l141 A t l2)) -> match-Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P t) (Exists l141 l139 A P l2) (l141 ⊔ l139) (λ (X-- : Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P t) (Exists l141 l139 A P l2)) -> Or (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P (cons l141 A h t)) (Exists l141 l139 A P l2)) (λ (auto : Exists l141 l139 A P t) -> or-introl (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P (cons l141 A h t)) (Exists l141 l139 A P l2) (or-intror l139 (l141 ⊔ l139) (P h) (Exists l141 l139 A P t) auto)) (λ (auto : Exists l141 l139 A P l2) -> or-intror (l141 ⊔ l139) (l141 ⊔ l139) (Exists l141 l139 A P (cons l141 A h t)) (Exists l141 l139 A P l2) auto) (IH l2 H)) X-clearme) l1
Exists-append-l : (l74 l72 : Level) -> (A : Set l74) -> (P : (X-- : A) -> Set l72) -> (l1 : list l74 A) -> (l2 : list l74 A) -> (X-- : Exists l74 l72 A P l1) -> Exists l74 l72 A P (append l74 A l1 l2)
Exists-append-l = λ (l74 l72 : Level) -> λ (A : Set l74) -> λ (P : (X-- : A) -> Set l72) -> λ (l1 : list l74 A) -> λ (l2 : list l74 A) -> list-ind l74 (l74 ⊔ l72) A (λ (X-x-716 : list l74 A) -> (X-- : Exists l74 l72 A P X-x-716) -> Exists l74 l72 A P (append l74 A X-x-716 l2)) (λ (X-clearme : Exists l74 l72 A P (nil l74 A)) -> match-False (l74 ⊔ l72) (l74 ⊔ l72) (λ (X-- : False (l74 ⊔ l72)) -> Exists l74 l72 A P (append l74 A (nil l74 A) l2)) X-clearme) (λ (h : A) -> λ (t : list l74 A) -> λ (IH : (X-- : Exists l74 l72 A P t) -> Exists l74 l72 A P (append l74 A t l2)) -> λ (X-clearme : Exists l74 l72 A P (cons l74 A h t)) -> match-Or l72 (l74 ⊔ l72) (P h) (Exists l74 l72 A P t) (l74 ⊔ l72) (λ (X-- : Or l72 (l74 ⊔ l72) (P h) (Exists l74 l72 A P t)) -> Exists l74 l72 A P (append l74 A (cons l74 A h t) l2)) (λ (H : P h) -> or-introl l72 (l74 ⊔ l72) (P h) (Exists l74 l72 A P (append l74 A t l2)) H) (λ (H : Exists l74 l72 A P t) -> or-intror l72 (l74 ⊔ l72) (P h) (Exists l74 l72 A P (append l74 A t l2)) (IH H)) X-clearme) l1
Exists-append-r : (l41 l39 : Level) -> (A : Set l41) -> (P : (X-- : A) -> Set l39) -> (l1 : list l41 A) -> (l2 : list l41 A) -> (X-- : Exists l41 l39 A P l2) -> Exists l41 l39 A P (append l41 A l1 l2)
Exists-append-r = λ (l41 l39 : Level) -> λ (A : Set l41) -> λ (P : (X-- : A) -> Set l39) -> λ (l1 : list l41 A) -> λ (l2 : list l41 A) -> list-ind l41 (l41 ⊔ l39) A (λ (X-x-716 : list l41 A) -> (X-- : Exists l41 l39 A P l2) -> Exists l41 l39 A P (append l41 A X-x-716 l2)) (λ (H : Exists l41 l39 A P l2) -> H) (λ (h : A) -> λ (t : list l41 A) -> λ (IH : (X-- : Exists l41 l39 A P l2) -> Exists l41 l39 A P (append l41 A t l2)) -> λ (H : Exists l41 l39 A P l2) -> or-intror l39 (l41 ⊔ l39) (P h) (Exists l41 l39 A P (append l41 A t l2)) (IH H)) l1
Exists-add : (l84 l82 : Level) -> (A : Set l84) -> (P : (X-- : A) -> Set l82) -> (l1 : list l84 A) -> (x : A) -> (l2 : list l84 A) -> (X-- : Exists l84 l82 A P (append l84 A l1 l2)) -> Exists l84 l82 A P (append l84 A l1 (cons l84 A x l2))
Exists-add = λ (l84 l82 : Level) -> λ (A : Set l84) -> λ (P : (X-- : A) -> Set l82) -> λ (l1 : list l84 A) -> λ (x : A) -> λ (l2 : list l84 A) -> list-ind l84 (l84 ⊔ l82) A (λ (X-x-716 : list l84 A) -> (X-- : Exists l84 l82 A P (append l84 A X-x-716 l2)) -> Exists l84 l82 A P (append l84 A X-x-716 (cons l84 A x l2))) (λ (H : Exists l84 l82 A P l2) -> or-intror l82 (l84 ⊔ l82) (P x) (Exists l84 l82 A P l2) H) (λ (h : A) -> λ (t : list l84 A) -> λ (IH : (X-- : Exists l84 l82 A P (append l84 A t l2)) -> Exists l84 l82 A P (append l84 A t (cons l84 A x l2))) -> λ (X-clearme : Or l82 (l84 ⊔ l82) (P h) (Exists l84 l82 A P (append l84 A t l2))) -> match-Or l82 (l84 ⊔ l82) (P h) (Exists l84 l82 A P (append l84 A t l2)) (l84 ⊔ l82) (λ (X-- : Or l82 (l84 ⊔ l82) (P h) (Exists l84 l82 A P (append l84 A t l2))) -> Or l82 (l84 ⊔ l82) (P h) (Exists l84 l82 A P (append l84 A t (cons l84 A x l2)))) (λ (H : P h) -> or-introl l82 (l84 ⊔ l82) (P h) (Exists l84 l82 A P (append l84 A t (cons l84 A x l2))) H) (λ (H : Exists l84 l82 A P (append l84 A t l2)) -> or-intror l82 (l84 ⊔ l82) (P h) (Exists l84 l82 A P (append l84 A t (cons l84 A x l2))) (IH H)) X-clearme) l1
Exists-mid : (l34 l32 : Level) -> (A : Set l34) -> (P : (X-- : A) -> Set l32) -> (l1 : list l34 A) -> (x : A) -> (l2 : list l34 A) -> (X-- : P x) -> Exists l34 l32 A P (append l34 A l1 (cons l34 A x l2))
Exists-mid = λ (l34 l32 : Level) -> λ (A : Set l34) -> λ (P : (X-- : A) -> Set l32) -> λ (l1 : list l34 A) -> λ (x : A) -> λ (l2 : list l34 A) -> λ (H : P x) -> list-ind l34 (l34 ⊔ l32) A (λ (X-x-716 : list l34 A) -> Exists l34 l32 A P (append l34 A X-x-716 (cons l34 A x l2))) (or-introl l32 (l34 ⊔ l32) (P x) (Exists l34 l32 A P l2) H) (λ (h : A) -> λ (t : list l34 A) -> λ (IH : Exists l34 l32 A P (append l34 A t (cons l34 A x l2))) -> or-intror l32 (l34 ⊔ l32) (P h) (Exists l34 l32 A P (append l34 A t (cons l34 A x l2))) IH) l1
Exists-map : (l107 l103 : Level) -> (A : Set (lzero ⊔ (l107 ⊔ l103))) -> (B-v : Set l107) -> (P : (X-- : A) -> Set (lzero ⊔ (l107 ⊔ l103))) -> (Q : (X-- : B-v) -> Set l103) -> (f : (X-- : A) -> B-v) -> (l : list (l107 ⊔ l103) A) -> (X-- : Exists (l107 ⊔ l103) (l107 ⊔ l103) A P l) -> (X--1 : (a : A) -> (X--1 : P a) -> Q (f a)) -> Exists l107 l103 B-v Q (map (l107 ⊔ l103) l107 A B-v f l)
Exists-map = λ (l107 l103 : Level) -> λ (A : Set (lzero ⊔ (l107 ⊔ l103))) -> λ (B-v : Set l107) -> λ (P : (X-- : A) -> Set (lzero ⊔ (l107 ⊔ l103))) -> λ (Q : (X-- : B-v) -> Set l103) -> λ (f : (X-- : A) -> B-v) -> λ (l : list (l107 ⊔ l103) A) -> list-ind (l107 ⊔ l103) (l107 ⊔ l103) A (λ (X-x-716 : list (l107 ⊔ l103) A) -> (X-- : Exists (l107 ⊔ l103) (l107 ⊔ l103) A P X-x-716) -> (X--1 : (a : A) -> (X--1 : P a) -> Q (f a)) -> Exists l107 l103 B-v Q (map (l107 ⊔ l103) l107 A B-v f X-x-716)) (λ (auto : Exists (l107 ⊔ l103) (l107 ⊔ l103) A P (nil (l107 ⊔ l103) A)) -> λ (auto' : (a : A) -> (X-- : P a) -> Q (f a)) -> auto) (λ (h : A) -> λ (t : list (l107 ⊔ l103) A) -> λ (IH : (X-- : Exists (l107 ⊔ l103) (l107 ⊔ l103) A P t) -> (X--1 : (a : A) -> (X--1 : P a) -> Q (f a)) -> Exists l107 l103 B-v Q (map (l107 ⊔ l103) l107 A B-v f t)) -> λ (X-clearme : Exists (l107 ⊔ l103) (l107 ⊔ l103) A P (cons (l107 ⊔ l103) A h t)) -> match-Or (l107 ⊔ l103) (l107 ⊔ l103) (P h) (Exists (l107 ⊔ l103) (l107 ⊔ l103) A P t) (l107 ⊔ l103) (λ (X-- : Or (l107 ⊔ l103) (l107 ⊔ l103) (P h) (Exists (l107 ⊔ l103) (l107 ⊔ l103) A P t)) -> (X--1 : (a : A) -> (X--1 : P a) -> Q (f a)) -> Exists l107 l103 B-v Q (map (l107 ⊔ l103) l107 A B-v f (cons (l107 ⊔ l103) A h t))) (λ (H : P h) -> λ (F : (a : A) -> (X-- : P a) -> Q (f a)) -> or-introl l103 (l107 ⊔ l103) (Q (f h)) (Exists l107 l103 B-v Q (map (l107 ⊔ l103) l107 A B-v f t)) (F h H)) (λ (H : Exists (l107 ⊔ l103) (l107 ⊔ l103) A P t) -> λ (F : (a : A) -> (X-- : P a) -> Q (f a)) -> or-intror l103 (l107 ⊔ l103) (Q (f h)) (Exists l107 l103 B-v Q (map (l107 ⊔ l103) l107 A B-v f t)) (IH H F)) X-clearme) l
Exists-All : (l155 l149 l147 : Level) -> (A : Set l155) -> (P : (X-- : A) -> Set l149) -> (Q : (X-- : A) -> Set l147) -> (l : list l155 A) -> (X-- : Exists l155 l149 A P l) -> (X--1 : All l155 l147 A Q l) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))
Exists-All = λ (l155 l149 l147 : Level) -> λ (A : Set l155) -> λ (P : (X-- : A) -> Set l149) -> λ (Q : (X-- : A) -> Set l147) -> λ (l : list l155 A) -> list-ind l155 ((l155 ⊔ l149) ⊔ l147) A (λ (X-x-716 : list l155 A) -> (X-- : Exists l155 l149 A P X-x-716) -> (X--1 : All l155 l147 A Q X-x-716) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))) (λ (X-clearme : Exists l155 l149 A P (nil l155 A)) -> match-False (l155 ⊔ l149) ((l155 ⊔ l149) ⊔ l147) (λ (X-- : False (l155 ⊔ l149)) -> (X--1 : All l155 l147 A Q (nil l155 A)) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))) X-clearme) (λ (hd-v : A) -> λ (tl : list l155 A) -> λ (IH : (X-- : Exists l155 l149 A P tl) -> (X--1 : All l155 l147 A Q tl) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))) -> λ (X-clearme : Exists l155 l149 A P (cons l155 A hd-v tl)) -> match-Or l149 (l155 ⊔ l149) (P hd-v) (Exists l155 l149 A P tl) ((l155 ⊔ l149) ⊔ l147) (λ (X-- : Or l149 (l155 ⊔ l149) (P hd-v) (Exists l155 l149 A P tl)) -> (X--1 : All l155 l147 A Q (cons l155 A hd-v tl)) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))) (λ (H1 : P hd-v) -> λ (X-clearme0 : All l155 l147 A Q (cons l155 A hd-v tl)) -> match-And l147 (l155 ⊔ l147) (Q hd-v) (All l155 l147 A Q tl) ((l155 ⊔ l149) ⊔ l147) (λ (X-- : And l147 (l155 ⊔ l147) (Q hd-v) (All l155 l147 A Q tl)) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))) (λ (H2 : Q hd-v) -> λ (X-- : All l155 l147 A Q tl) -> ex-intro l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x)) hd-v (conj l149 l147 (P hd-v) (Q hd-v) H1 H2)) X-clearme0) (λ (H1 : Exists l155 l149 A P tl) -> λ (X-clearme0 : All l155 l147 A Q (cons l155 A hd-v tl)) -> match-And l147 (l155 ⊔ l147) (Q hd-v) (All l155 l147 A Q tl) ((l155 ⊔ l149) ⊔ l147) (λ (X-- : And l147 (l155 ⊔ l147) (Q hd-v) (All l155 l147 A Q tl)) -> ex l155 (l149 ⊔ l147) A (λ (x : A) -> And l149 l147 (P x) (Q x))) (λ (X-- : Q hd-v) -> λ (H2 : All l155 l147 A Q tl) -> IH H1 H2) X-clearme0) X-clearme) l
fold : (l6-v l10-v : Level) -> (A-v : Set l6-v) -> (B-v : Set l10-v) -> (X-op-v : (X---v : B-v) -> (X--1-v : B-v) -> B-v) -> (X-b-v : B-v) -> (X-p-v : (X---v : A-v) -> bool) -> (X-f-v : (X---v : A-v) -> B-v) -> (X-l-v : list l6-v A-v) -> B-v
fold l4-v l0-v A-v B-v X-op-v X-b-v X-p-v X-f-v nil' = X-b-v
fold l4-v l0-v A-v B-v X-op-v X-b-v X-p-v X-f-v (cons' a-v l-v) = match-bool l0-v (λ (X---v : bool) -> B-v) (X-op-v (X-f-v a-v) (fold l4-v l0-v A-v B-v X-op-v X-b-v X-p-v X-f-v l-v)) (fold l4-v l0-v A-v B-v X-op-v X-b-v X-p-v X-f-v l-v) (X-p-v a-v)
fold-true : (l47 l44 : Level) -> (A : Set l47) -> (B-v : Set l44) -> (a : A) -> (l : list l47 A) -> (p : (X-- : A) -> bool) -> (op-v : (X-- : B-v) -> (X--1 : B-v) -> B-v) -> (nil-v : B-v) -> (f : (X-- : A) -> B-v) -> (X-- : eq lzero bool (p a) true) -> eq l44 B-v (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l47 A a l)) (op-v (f a) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l))
fold-true = λ (l47 l44 : Level) -> λ (A : Set l47) -> λ (B-v : Set l44) -> λ (a : A) -> λ (l : list l47 A) -> λ (p : (X-- : A) -> bool) -> λ (op-v : (X-- : B-v) -> (X--1 : B-v) -> B-v) -> λ (nil-v : B-v) -> λ (f : (X-- : A) -> B-v) -> λ (pa : eq lzero bool (p a) true) -> eq-ind-r lzero l44 bool true (λ (x : bool) -> λ (X-- : eq lzero bool x true) -> eq l44 B-v (match-bool l44 (λ (X-0 : bool) -> B-v) (op-v (f a) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l)) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l) x) (op-v (f a) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l))) (refl l44 B-v (match-bool l44 (λ (X-- : bool) -> B-v) (op-v (f a) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l)) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l) true)) (p a) pa
fold-false : (l47 l44 : Level) -> (A : Set l47) -> (B-v : Set l44) -> (a : A) -> (l : list l47 A) -> (p : (X-- : A) -> bool) -> (op-v : (X-- : B-v) -> (X--1 : B-v) -> B-v) -> (nil-v : B-v) -> (f : (X-- : A) -> B-v) -> (X-- : eq lzero bool (p a) false) -> eq l44 B-v (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l47 A a l)) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l)
fold-false = λ (l47 l44 : Level) -> λ (A : Set l47) -> λ (B-v : Set l44) -> λ (a : A) -> λ (l : list l47 A) -> λ (p : (X-- : A) -> bool) -> λ (op-v : (X-- : B-v) -> (X--1 : B-v) -> B-v) -> λ (nil-v : B-v) -> λ (f : (X-- : A) -> B-v) -> λ (pa : eq lzero bool (p a) false) -> eq-ind-r lzero l44 bool false (λ (x : bool) -> λ (X-- : eq lzero bool x false) -> eq l44 B-v (match-bool l44 (λ (X-0 : bool) -> B-v) (op-v (f a) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l)) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l) x) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l)) (refl l44 B-v (match-bool l44 (λ (X-- : bool) -> B-v) (op-v (f a) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l)) (fold l47 l44 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l) false)) (p a) pa
fold-filter : (l270 l267 : Level) -> (A : Set l270) -> (B-v : Set l267) -> (X-a : A) -> (l : list l270 A) -> (p : (X-- : A) -> bool) -> (op-v : (X-- : B-v) -> (X--1 : B-v) -> B-v) -> (nil-v : B-v) -> (f : (X-- : A) -> B-v) -> eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) l) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p l))
fold-filter = λ (l270 l267 : Level) -> λ (A : Set l270) -> λ (B-v : Set l267) -> λ (a : A) -> λ (l : list l270 A) -> λ (p : (X-- : A) -> bool) -> λ (op-v : (X-- : B-v) -> (X--1 : B-v) -> B-v) -> λ (nil-v : B-v) -> λ (f : (X-- : A) -> B-v) -> list-ind l270 l267 A (λ (X-x-716 : list l270 A) -> eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) X-x-716) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p X-x-716))) (refl l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (nil l270 A))) (λ (a0 : A) -> λ (tl : list l270 A) -> λ (Hind : eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p tl))) -> match-Or lzero lzero (eq lzero bool (p a0) true) (eq lzero bool (p a0) false) l267 (λ (X-- : Or lzero lzero (eq lzero bool (p a0) true) (eq lzero bool (p a0) false)) -> eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l270 A a0 tl)) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p (cons l270 A a0 tl)))) (λ (pa : eq lzero bool (p a0) true) -> eq-ind-r l270 l267 (list l270 A) (cons l270 A a0 (filter' l270 A p tl)) (λ (x : list l270 A) -> λ (X-- : eq l270 (list l270 A) x (cons l270 A a0 (filter' l270 A p tl))) -> eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l270 A a0 tl)) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) x)) (eq-ind-r l267 l267 B-v (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl)) (λ (x : B-v) -> λ (X-- : eq l267 B-v x (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl))) -> eq l267 B-v x (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (cons l270 A a0 (filter' l270 A p tl)))) (eq-ind-r l267 l267 B-v (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p tl))) (λ (x : B-v) -> λ (X-- : eq l267 B-v x (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p tl)))) -> eq l267 B-v (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl)) x) (rewrite-l l267 l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl) (λ (X-- : B-v) -> eq l267 B-v (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl)) (op-v (f a0) X--)) (refl l267 B-v (op-v (f a0) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl))) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p tl)) Hind) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (cons l270 A a0 (filter' l270 A p tl))) (fold-true l270 l267 A B-v a0 (filter' l270 A p tl) (λ (X-- : A) -> true) op-v nil-v f (refl lzero bool true))) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l270 A a0 tl)) (fold-true l270 l267 A B-v a0 tl p op-v nil-v f (rewrite-r lzero lzero bool true (λ (X-- : bool) -> eq lzero bool X-- true) (refl lzero bool true) (p a0) pa))) (filter' l270 A p (cons l270 A a0 tl)) (filter-true l270 A tl a0 p (rewrite-r lzero lzero bool true (λ (X-- : bool) -> eq lzero bool X-- true) (refl lzero bool true) (p a0) pa))) (λ (pa : eq lzero bool (p a0) false) -> eq-ind-r l270 l267 (list l270 A) (filter' l270 A p tl) (λ (x : list l270 A) -> λ (X-- : eq l270 (list l270 A) x (filter' l270 A p tl)) -> eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l270 A a0 tl)) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) x)) (eq-ind-r l267 l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl) (λ (x : B-v) -> λ (X-- : eq l267 B-v x (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl)) -> eq l267 B-v x (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p tl))) (rewrite-l l267 l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl) (λ (X-- : B-v) -> eq l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl) X--) (refl l267 B-v (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) tl)) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (filter' l270 A p tl)) Hind) (fold l270 l267 A B-v op-v nil-v (λ (i : A) -> p i) (λ (i : A) -> f i) (cons l270 A a0 tl)) (fold-false l270 l267 A B-v a0 tl p op-v nil-v f (rewrite-r lzero lzero bool false (λ (X-- : bool) -> eq lzero bool X-- false) (refl lzero bool false) (p a0) pa))) (filter' l270 A p (cons l270 A a0 tl)) (filter-false l270 A tl a0 p (rewrite-r lzero lzero bool false (λ (X-- : bool) -> eq lzero bool X-- false) (refl lzero bool false) (p a0) pa))) (true-or-false (p a0))) l
data Aop' (l11-v : Level) (A-v : Set l11-v) (nil-v : A-v) : Set l11-v where
mk-Aop'' : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l11-v A-v (op-v nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l11-v A-v (op-v a-v nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l11-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Aop' l11-v A-v nil-v
mk-Aop' : (l11-v : Level) -> (A-v : Set l11-v) -> (nil-v : A-v) -> (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l11-v A-v (op-v nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l11-v A-v (op-v a-v nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l11-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Aop' l11-v A-v nil-v
mk-Aop' _ _ _ = mk-Aop''
match-Aop' : (l18-v : Level) -> (A-v : Set l18-v) -> (X-nil-v : A-v) -> (return-sort-v : Level) -> (return-type-v : (z-v : Aop' l18-v A-v X-nil-v) -> Set return-sort-v) -> (case-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l18-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l18-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l18-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> return-type-v (mk-Aop' l18-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (z-v : Aop' l18-v A-v X-nil-v) -> return-type-v z-v
match-Aop' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-ind' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-781-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-781-v : Aop' l21-v A-v X-nil-v) -> Q--v x-781-v
Aop-ind' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-rect-Type5' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-783-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-783-v : Aop' l21-v A-v X-nil-v) -> Q--v x-783-v
Aop-rect-Type5' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-rect-Type4' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-783-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-783-v : Aop' l21-v A-v X-nil-v) -> Q--v x-783-v
Aop-rect-Type4' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-rect-Type3' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-783-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-783-v : Aop' l21-v A-v X-nil-v) -> Q--v x-783-v
Aop-rect-Type3' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-rect-Type2' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-783-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-783-v : Aop' l21-v A-v X-nil-v) -> Q--v x-783-v
Aop-rect-Type2' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-rect-Type1' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-783-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-783-v : Aop' l21-v A-v X-nil-v) -> Q--v x-783-v
Aop-rect-Type1' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
Aop-rect-Type0' : (l21-v l4-v : Level) -> (A-v : Set l21-v) -> (X-nil-v : A-v) -> (Q--v : (X-x-783-v : Aop' l21-v A-v X-nil-v) -> Set l4-v) -> (X-H-mk-Aop-v : (op-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> (X-nill-v : (a-v : A-v) -> eq l21-v A-v (op-v X-nil-v a-v) a-v) -> (X-nilr-v : (a-v : A-v) -> eq l21-v A-v (op-v a-v X-nil-v) a-v) -> (X-assoc-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l21-v A-v (op-v a-v (op-v b-v c-v)) (op-v (op-v a-v b-v) c-v)) -> Q--v (mk-Aop' l21-v A-v X-nil-v op-v X-nill-v X-nilr-v X-assoc-v)) -> (x-783-v : Aop' l21-v A-v X-nil-v) -> Q--v x-783-v
Aop-rect-Type0' _ _ _ _ _ casemk (mk-Aop'' x1 x2 x3 x4) = casemk x1 x2 x3 x4
op' : (l4-v : Level) -> (A-v : Set l4-v) -> (nil-v : A-v) -> (X-xxx-v : Aop' l4-v A-v nil-v) -> (X-x-807-v : A-v) -> (X-x-808-v : A-v) -> A-v
op' l9-v A-v nil-v X-xxx-v = match-Aop' l9-v A-v nil-v l9-v (λ (xxx0-v : Aop' l9-v A-v nil-v) -> (X-x-807-v : A-v) -> (X-x-808-v : A-v) -> A-v) (λ (yyy-v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> λ (X---v : (a-v : A-v) -> eq l9-v A-v (yyy-v nil-v a-v) a-v) -> λ (X-0-v : (a-v : A-v) -> eq l9-v A-v (yyy-v a-v nil-v) a-v) -> λ (X-1-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l9-v A-v (yyy-v a-v (yyy-v b-v c-v)) (yyy-v (yyy-v a-v b-v) c-v)) -> yyy-v) X-xxx-v
nill' : (l2-v : Level) -> (A-v : Set l2-v) -> (nil-v : A-v) -> (xxx-v : Aop' l2-v A-v nil-v) -> (a-v : A-v) -> eq l2-v A-v (op' l2-v A-v nil-v xxx-v nil-v a-v) a-v
nill' l8-v A-v nil-v xxx-v = match-Aop' l8-v A-v nil-v l8-v (λ (xxx0-v : Aop' l8-v A-v nil-v) -> (a-v : A-v) -> eq l8-v A-v (op' l8-v A-v nil-v xxx0-v nil-v a-v) a-v) (λ (X---v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> λ (yyy-v : (a-v : A-v) -> eq l8-v A-v (X---v nil-v a-v) a-v) -> λ (X-0-v : (a-v : A-v) -> eq l8-v A-v (X---v a-v nil-v) a-v) -> λ (X-1-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l8-v A-v (X---v a-v (X---v b-v c-v)) (X---v (X---v a-v b-v) c-v)) -> yyy-v) xxx-v
nilr' : (l2-v : Level) -> (A-v : Set l2-v) -> (nil-v : A-v) -> (xxx-v : Aop' l2-v A-v nil-v) -> (a-v : A-v) -> eq l2-v A-v (op' l2-v A-v nil-v xxx-v a-v nil-v) a-v
nilr' l8-v A-v nil-v xxx-v = match-Aop' l8-v A-v nil-v l8-v (λ (xxx0-v : Aop' l8-v A-v nil-v) -> (a-v : A-v) -> eq l8-v A-v (op' l8-v A-v nil-v xxx0-v a-v nil-v) a-v) (λ (X---v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> λ (X-0-v : (a-v : A-v) -> eq l8-v A-v (X---v nil-v a-v) a-v) -> λ (yyy-v : (a-v : A-v) -> eq l8-v A-v (X---v a-v nil-v) a-v) -> λ (X-1-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l8-v A-v (X---v a-v (X---v b-v c-v)) (X---v (X---v a-v b-v) c-v)) -> yyy-v) xxx-v
assoc' : (l5-v : Level) -> (A-v : Set l5-v) -> (nil-v : A-v) -> (xxx-v : Aop' l5-v A-v nil-v) -> (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l5-v A-v (op' l5-v A-v nil-v xxx-v a-v (op' l5-v A-v nil-v xxx-v b-v c-v)) (op' l5-v A-v nil-v xxx-v (op' l5-v A-v nil-v xxx-v a-v b-v) c-v)
assoc' l17-v A-v nil-v xxx-v = match-Aop' l17-v A-v nil-v l17-v (λ (xxx0-v : Aop' l17-v A-v nil-v) -> (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l17-v A-v (op' l17-v A-v nil-v xxx0-v a-v (op' l17-v A-v nil-v xxx0-v b-v c-v)) (op' l17-v A-v nil-v xxx0-v (op' l17-v A-v nil-v xxx0-v a-v b-v) c-v)) (λ (X---v : (X---v : A-v) -> (X--1-v : A-v) -> A-v) -> λ (X-0-v : (a-v : A-v) -> eq l17-v A-v (X---v nil-v a-v) a-v) -> λ (X-1-v : (a-v : A-v) -> eq l17-v A-v (X---v a-v nil-v) a-v) -> λ (yyy-v : (a-v : A-v) -> (b-v : A-v) -> (c-v : A-v) -> eq l17-v A-v (X---v a-v (X---v b-v c-v)) (X---v (X---v a-v b-v) c-v)) -> yyy-v) xxx-v
Aop-inv-ind' : (l39 l33 : Level) -> (x1 : Set l39) -> (x2 : x1) -> (Hterm : Aop' l39 x1 x2) -> (P : (X-z1368 : Aop' l39 x1 x2) -> Set l33) -> (X-H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1369 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P Hterm
Aop-inv-ind' = λ (l39 l33 : Level) -> λ (x1 : Set l39) -> λ (x2 : x1) -> λ (Hterm : Aop' l39 x1 x2) -> λ (P : (X-z1368 : Aop' l39 x1 x2) -> Set l33) -> λ (H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1369 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> Aop-ind' l39 (l39 ⊔ l33) x1 x2 (λ (X-x-781 : Aop' l39 x1 x2) -> (X-z1369 : eq l39 (Aop' l39 x1 x2) Hterm X-x-781) -> P X-x-781) H1 Hterm (refl l39 (Aop' l39 x1 x2) Hterm)
Aop-inv-rect-Type4' : (l39 l33 : Level) -> (x1 : Set l39) -> (x2 : x1) -> (Hterm : Aop' l39 x1 x2) -> (P : (X-z1374 : Aop' l39 x1 x2) -> Set l33) -> (X-H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1375 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P Hterm
Aop-inv-rect-Type4' = λ (l39 l33 : Level) -> λ (x1 : Set l39) -> λ (x2 : x1) -> λ (Hterm : Aop' l39 x1 x2) -> λ (P : (X-z1374 : Aop' l39 x1 x2) -> Set l33) -> λ (H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1375 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> Aop-rect-Type4' l39 (l39 ⊔ l33) x1 x2 (λ (X-x-783 : Aop' l39 x1 x2) -> (X-z1375 : eq l39 (Aop' l39 x1 x2) Hterm X-x-783) -> P X-x-783) H1 Hterm (refl l39 (Aop' l39 x1 x2) Hterm)
Aop-inv-rect-Type3' : (l39 l33 : Level) -> (x1 : Set l39) -> (x2 : x1) -> (Hterm : Aop' l39 x1 x2) -> (P : (X-z1380 : Aop' l39 x1 x2) -> Set l33) -> (X-H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1381 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P Hterm
Aop-inv-rect-Type3' = λ (l39 l33 : Level) -> λ (x1 : Set l39) -> λ (x2 : x1) -> λ (Hterm : Aop' l39 x1 x2) -> λ (P : (X-z1380 : Aop' l39 x1 x2) -> Set l33) -> λ (H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1381 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> Aop-rect-Type3' l39 (l39 ⊔ l33) x1 x2 (λ (X-x-787 : Aop' l39 x1 x2) -> (X-z1381 : eq l39 (Aop' l39 x1 x2) Hterm X-x-787) -> P X-x-787) H1 Hterm (refl l39 (Aop' l39 x1 x2) Hterm)
Aop-inv-rect-Type2' : (l39 l33 : Level) -> (x1 : Set l39) -> (x2 : x1) -> (Hterm : Aop' l39 x1 x2) -> (P : (X-z1386 : Aop' l39 x1 x2) -> Set l33) -> (X-H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1387 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P Hterm
Aop-inv-rect-Type2' = λ (l39 l33 : Level) -> λ (x1 : Set l39) -> λ (x2 : x1) -> λ (Hterm : Aop' l39 x1 x2) -> λ (P : (X-z1386 : Aop' l39 x1 x2) -> Set l33) -> λ (H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1387 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> Aop-rect-Type2' l39 (l39 ⊔ l33) x1 x2 (λ (X-x-789 : Aop' l39 x1 x2) -> (X-z1387 : eq l39 (Aop' l39 x1 x2) Hterm X-x-789) -> P X-x-789) H1 Hterm (refl l39 (Aop' l39 x1 x2) Hterm)
Aop-inv-rect-Type1' : (l39 l33 : Level) -> (x1 : Set l39) -> (x2 : x1) -> (Hterm : Aop' l39 x1 x2) -> (P : (X-z1392 : Aop' l39 x1 x2) -> Set l33) -> (X-H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1393 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P Hterm
Aop-inv-rect-Type1' = λ (l39 l33 : Level) -> λ (x1 : Set l39) -> λ (x2 : x1) -> λ (Hterm : Aop' l39 x1 x2) -> λ (P : (X-z1392 : Aop' l39 x1 x2) -> Set l33) -> λ (H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1393 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> Aop-rect-Type1' l39 (l39 ⊔ l33) x1 x2 (λ (X-x-791 : Aop' l39 x1 x2) -> (X-z1393 : eq l39 (Aop' l39 x1 x2) Hterm X-x-791) -> P X-x-791) H1 Hterm (refl l39 (Aop' l39 x1 x2) Hterm)
Aop-inv-rect-Type0' : (l39 l33 : Level) -> (x1 : Set l39) -> (x2 : x1) -> (Hterm : Aop' l39 x1 x2) -> (P : (X-z1398 : Aop' l39 x1 x2) -> Set l33) -> (X-H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1399 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P Hterm
Aop-inv-rect-Type0' = λ (l39 l33 : Level) -> λ (x1 : Set l39) -> λ (x2 : x1) -> λ (Hterm : Aop' l39 x1 x2) -> λ (P : (X-z1398 : Aop' l39 x1 x2) -> Set l33) -> λ (H1 : (op-v : (X-- : x1) -> (X--1 : x1) -> x1) -> (X-nill : (a : x1) -> eq l39 x1 (op-v x2 a) a) -> (X-nilr : (a : x1) -> eq l39 x1 (op-v a x2) a) -> (X-assoc : (a : x1) -> (b : x1) -> (c : x1) -> eq l39 x1 (op-v a (op-v b c)) (op-v (op-v a b) c)) -> (X-z1399 : eq l39 (Aop' l39 x1 x2) Hterm (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> P (mk-Aop' l39 x1 x2 op-v X-nill X-nilr X-assoc)) -> Aop-rect-Type0' l39 (l39 ⊔ l33) x1 x2 (λ (X-x-793 : Aop' l39 x1 x2) -> (X-z1399 : eq l39 (Aop' l39 x1 x2) Hterm X-x-793) -> P X-x-793) H1 Hterm (refl l39 (Aop' l39 x1 x2) Hterm)
Aop-discr' : (l3178 l4236 : Level) -> (a1 : Set l3178) -> (a2 : a1) -> (x : Aop' l3178 a1 a2) -> (y : Aop' l3178 a1 a2) -> (X-e : eq l3178 (Aop' l3178 a1 a2) x y) -> match-Aop' l3178 a1 a2 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l4236)) ⊔ (lsuc l3178))) (λ (X-- : Aop' l3178 a1 a2) -> Set ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178))) (λ (t0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (t1 : (a : a1) -> eq l3178 a1 (t0 a2 a) a) -> λ (t2 : (a : a1) -> eq l3178 a1 (t0 a a2) a) -> λ (t3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (t0 a (t0 b c)) (t0 (t0 a b) c)) -> match-Aop' l3178 a1 a2 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l4236)) ⊔ (lsuc l3178))) (λ (X-- : Aop' l3178 a1 a2) -> Set ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178))) (λ (u0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (u1 : (a : a1) -> eq l3178 a1 (u0 a2 a) a) -> λ (u2 : (a : a1) -> eq l3178 a1 (u0 a a2) a) -> λ (u3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (u0 a (u0 b c)) (u0 (u0 a b) c)) -> (P : Set l4236) -> (X-z51 : (e0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0) u0) -> (e1 : eq l3178 ((a : a1) -> eq l3178 a1 (u0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 u0 e0) u1) -> (e2 : eq l3178 ((a : a1) -> eq l3178 a1 (u0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) t1 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) t2 u0 e0 u1 e1) u2) -> (X-e3 : eq l3178 ((a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (u0 a (u0 b c)) (u0 (u0 a b) c)) (R3 l3178 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) t1 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) t2 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (p1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> λ (x2 : (a : a1) -> eq l3178 a1 (x0 a a2) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x01) -> (a : a1) -> eq l3178 a1 (x01 a2 a) a) t1 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p01 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x01) -> λ (x11 : (a : a1) -> eq l3178 a1 (x01 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x01 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x01 p01) x11) -> (a : a1) -> eq l3178 a1 (x01 a a2) a) t2 x0 p0 x1 p1) x2) -> (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (x0 a (x0 b c)) (x0 (x0 a b) c)) t3 u0 e0 u1 e1 u2 e2) u3) -> P) -> P) y) x
Aop-discr' = λ (l3178 l4236 : Level) -> λ (a1 : Set l3178) -> λ (a2 : a1) -> λ (x : Aop' l3178 a1 a2) -> λ (y : Aop' l3178 a1 a2) -> λ (Deq : eq l3178 (Aop' l3178 a1 a2) x y) -> eq-rect-Type2 l3178 ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178)) (Aop' l3178 a1 a2) x (λ (x-13 : Aop' l3178 a1 a2) -> λ (X-x-14 : eq l3178 (Aop' l3178 a1 a2) x x-13) -> match-Aop' l3178 a1 a2 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l4236)) ⊔ (lsuc l3178))) (λ (X-- : Aop' l3178 a1 a2) -> Set ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178))) (λ (t0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (t1 : (a : a1) -> eq l3178 a1 (t0 a2 a) a) -> λ (t2 : (a : a1) -> eq l3178 a1 (t0 a a2) a) -> λ (t3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (t0 a (t0 b c)) (t0 (t0 a b) c)) -> match-Aop' l3178 a1 a2 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l4236)) ⊔ (lsuc l3178))) (λ (X-- : Aop' l3178 a1 a2) -> Set ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178))) (λ (u0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (u1 : (a : a1) -> eq l3178 a1 (u0 a2 a) a) -> λ (u2 : (a : a1) -> eq l3178 a1 (u0 a a2) a) -> λ (u3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (u0 a (u0 b c)) (u0 (u0 a b) c)) -> (P : Set l4236) -> (X-z51 : (e0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0) u0) -> (e1 : eq l3178 ((a : a1) -> eq l3178 a1 (u0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 u0 e0) u1) -> (e2 : eq l3178 ((a : a1) -> eq l3178 a1 (u0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) t1 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) t2 u0 e0 u1 e1) u2) -> (X-e3 : eq l3178 ((a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (u0 a (u0 b c)) (u0 (u0 a b) c)) (R3 l3178 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) t1 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) t2 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (p1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> λ (x2 : (a : a1) -> eq l3178 a1 (x0 a a2) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x01) -> (a : a1) -> eq l3178 a1 (x01 a2 a) a) t1 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p01 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x01) -> λ (x11 : (a : a1) -> eq l3178 a1 (x01 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x01 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x01 p01) x11) -> (a : a1) -> eq l3178 a1 (x01 a a2) a) t2 x0 p0 x1 p1) x2) -> (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (x0 a (x0 b c)) (x0 (x0 a b) c)) t3 u0 e0 u1 e1 u2 e2) u3) -> P) -> P) x-13) x) (match-Aop' l3178 a1 a2 ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178)) (λ (X-- : Aop' l3178 a1 a2) -> match-Aop' l3178 a1 a2 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l4236)) ⊔ (lsuc l3178))) (λ (X-0 : Aop' l3178 a1 a2) -> Set ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178))) (λ (t0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (t1 : (a : a1) -> eq l3178 a1 (t0 a2 a) a) -> λ (t2 : (a : a1) -> eq l3178 a1 (t0 a a2) a) -> λ (t3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (t0 a (t0 b c)) (t0 (t0 a b) c)) -> match-Aop' l3178 a1 a2 ((lsuc (lsuc lzero)) ⊔ ((lsuc (lsuc l4236)) ⊔ (lsuc l3178))) (λ (X-0 : Aop' l3178 a1 a2) -> Set ((lsuc lzero) ⊔ ((lsuc l4236) ⊔ l3178))) (λ (u0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (u1 : (a : a1) -> eq l3178 a1 (u0 a2 a) a) -> λ (u2 : (a : a1) -> eq l3178 a1 (u0 a a2) a) -> λ (u3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (u0 a (u0 b c)) (u0 (u0 a b) c)) -> (P : Set l4236) -> (X-z51 : (e0 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) (R0 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0) u0) -> (e1 : eq l3178 ((a : a1) -> eq l3178 a1 (u0 a2 a) a) (R1 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x-19 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 u0 e0) u1) -> (e2 : eq l3178 ((a : a1) -> eq l3178 a1 (u0 a a2) a) (R2 l3178 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X--1 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) t1 (λ (x0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (p0 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X--1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x-19 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) t2 u0 e0 u1 e1) u2) -> (X-e3 : eq l3178 ((a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (u0 a (u0 b c)) (u0 (u0 a b) c)) (R3 l3178 l3178 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X--1 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) t1 (λ (x0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (p0 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X--1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x-19 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) t2 (λ (x0 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (p0 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (p1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x-19 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x0 p0) x1) -> λ (x2 : (a : a1) -> eq l3178 a1 (x0 a a2) a) -> λ (X--1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a a2) a) (R2 l3178 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x01 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X--1 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x01) -> (a : a1) -> eq l3178 a1 (x01 a2 a) a) t1 (λ (x01 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (p01 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x01) -> λ (x11 : (a : a1) -> eq l3178 a1 (x01 a2 a) a) -> λ (X--1 : eq l3178 ((a : a1) -> eq l3178 a1 (x01 a2 a) a) (R1 l3178 l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 (λ (x-19 : (X--1 : a1) -> (X--2 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X--1 : a1) -> (X--2 : a1) -> a1) t0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) t1 x01 p01) x11) -> (a : a1) -> eq l3178 a1 (x01 a a2) a) t2 x0 p0 x1 p1) x2) -> (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (x0 a (x0 b c)) (x0 (x0 a b) c)) t3 u0 e0 u1 e1 u2 e2) u3) -> P) -> P) X--) X--) (λ (a0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (a10 : (a : a1) -> eq l3178 a1 (a0 a2 a) a) -> λ (a20 : (a : a1) -> eq l3178 a1 (a0 a a2) a) -> λ (a3 : (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (a0 a (a0 b c)) (a0 (a0 a b) c)) -> λ (P : Set l4236) -> λ (DH : (e0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0) a0) -> (e1 : eq l3178 ((a : a1) -> eq l3178 a1 (a0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 a0 e0) a10) -> (e2 : eq l3178 ((a : a1) -> eq l3178 a1 (a0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) a10 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) a20 a0 e0 a10 e1) a20) -> (X-e3 : eq l3178 ((a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (a0 a (a0 b c)) (a0 (a0 a b) c)) (R3 l3178 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) a10 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) a20 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (p1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> λ (x2 : (a : a1) -> eq l3178 a1 (x0 a a2) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x01) -> (a : a1) -> eq l3178 a1 (x01 a2 a) a) a10 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p01 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x01) -> λ (x11 : (a : a1) -> eq l3178 a1 (x01 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x01 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x01 p01) x11) -> (a : a1) -> eq l3178 a1 (x01 a a2) a) a20 x0 p0 x1 p1) x2) -> (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (x0 a (x0 b c)) (x0 (x0 a b) c)) a3 a0 e0 a10 e1 a20 e2) a3) -> P) -> DH (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)) (refl l3178 ((a : a1) -> eq l3178 a1 (a0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)))) (refl l3178 ((a : a1) -> eq l3178 a1 (a0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) a10 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) a20 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)) a10 (refl l3178 ((a : a1) -> eq l3178 a1 (a0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)))))) (refl l3178 ((a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (a0 a (a0 b c)) (a0 (a0 a b) c)) (R3 l3178 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) a10 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) a20 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (p1 : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> λ (x2 : (a : a1) -> eq l3178 a1 (x0 a a2) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x01) -> (a : a1) -> eq l3178 a1 (x01 a2 a) a) a10 (λ (x01 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p01 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x01) -> λ (x11 : (a : a1) -> eq l3178 a1 (x01 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x01 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x01 p01) x11) -> (a : a1) -> eq l3178 a1 (x01 a a2) a) a20 x0 p0 x1 p1) x2) -> (a : a1) -> (b : a1) -> (c : a1) -> eq l3178 a1 (x0 a (x0 b c)) (x0 (x0 a b) c)) a3 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)) a10 (refl l3178 ((a : a1) -> eq l3178 a1 (a0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)))) a20 (refl l3178 ((a : a1) -> eq l3178 a1 (a0 a a2) a) (R2 l3178 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-- : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> (a : a1) -> eq l3178 a1 (x0 a2 a) a) a10 (λ (x0 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (p0 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x0) -> λ (x1 : (a : a1) -> eq l3178 a1 (x0 a2 a) a) -> λ (X-- : eq l3178 ((a : a1) -> eq l3178 a1 (x0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 x0 p0) x1) -> (a : a1) -> eq l3178 a1 (x0 a a2) a) a20 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0)) a10 (refl l3178 ((a : a1) -> eq l3178 a1 (a0 a2 a) a) (R1 l3178 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 (λ (x-19 : (X-- : a1) -> (X--1 : a1) -> a1) -> λ (X-x-20 : eq l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0 x-19) -> (a : a1) -> eq l3178 a1 (x-19 a2 a) a) a10 a0 (refl l3178 ((X-- : a1) -> (X--1 : a1) -> a1) (R0 l3178 ((X-- : a1) -> (X--1 : a1) -> a1) a0))))))))) x) y Deq
dpi1--o--op' : (l12 l8 : Level) -> (x0 : Set l12) -> (x1 : x0) -> (x2 : (X-- : Aop' l12 x0 x1) -> Set l8) -> (x3 : DPair l12 l8 (Aop' l12 x0 x1) x2) -> (X-x-807 : x0) -> (X-x-808 : x0) -> x0
dpi1--o--op' = λ (l12 l8 : Level) -> λ (x0 : Set l12) -> λ (x1 : x0) -> λ (x2 : (X-- : Aop' l12 x0 x1) -> Set l8) -> λ (x3 : DPair l12 l8 (Aop' l12 x0 x1) x2) -> op' l12 x0 x1 (dpi1 l12 l8 (Aop' l12 x0 x1) x2 x3)
fold-sum : (l203 l199 : Level) -> (A : Set l203) -> (B-v : Set l199) -> (I-v : list l203 A) -> (J : list l203 A) -> (nil-v : B-v) -> (op-v : Aop' l199 B-v nil-v) -> (f : (X-- : A) -> B-v) -> eq l199 B-v (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) I-v) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (append l203 A I-v J))
fold-sum = λ (l203 l199 : Level) -> λ (A : Set l203) -> λ (B-v : Set l199) -> λ (I-v : list l203 A) -> λ (J : list l203 A) -> λ (nil-v : B-v) -> λ (op-v : Aop' l199 B-v nil-v) -> λ (f : (X-- : A) -> B-v) -> list-ind l203 l199 A (λ (X-x-716 : list l203 A) -> eq l199 B-v (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) X-x-716) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (append l203 A X-x-716 J))) (eq-ind-r l199 l199 B-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J) (λ (x : B-v) -> λ (X-- : eq l199 B-v x (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) -> eq l199 B-v x (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (refl l199 B-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (op' l199 B-v nil-v op-v nil-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (nill' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J))) (λ (a : A) -> λ (tl : list l203 A) -> λ (Hind : eq l199 B-v (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (append l203 A tl J))) -> eq-ind l199 l199 B-v (op' l199 B-v nil-v op-v (f a) (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J))) (λ (x-1 : B-v) -> λ (X-x-2 : eq l199 B-v (op' l199 B-v nil-v op-v (f a) (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J))) x-1) -> eq l199 B-v x-1 (op' l199 B-v nil-v op-v (f a) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (append l203 A tl J)))) (rewrite-l l199 l199 B-v (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (λ (X-- : B-v) -> eq l199 B-v (op' l199 B-v nil-v op-v (f a) (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J))) (op' l199 B-v nil-v op-v (f a) X--)) (refl l199 B-v (op' l199 B-v nil-v op-v (f a) (op' l199 B-v nil-v op-v (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)))) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) (append l203 A tl J)) Hind) (op' l199 B-v nil-v op-v (op' l199 B-v nil-v op-v (f a) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl)) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J)) (assoc' l199 B-v nil-v op-v (f a) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) tl) (fold l203 l199 A B-v (op' l199 B-v nil-v op-v) nil-v (λ (i : A) -> true) (λ (i : A) -> f i) J))) I-v
lhd : (l4-v : Level) -> (H-v : Set l4-v) -> (X---v : list l4-v H-v) -> (X--1-v : nat) -> list l4-v H-v
lhd l7-v H-v X---v O = nil l7-v H-v
lhd l7-v H-v X---v (S n0-v) = match-list l7-v H-v l7-v (λ (X--2-v : list l7-v H-v) -> list l7-v H-v) (nil l7-v H-v) (λ (a-v : H-v) -> λ (l0-v : list l7-v H-v) -> cons l7-v H-v a-v (lhd l7-v H-v l0-v n0-v)) X---v
ltl : (l4-v : Level) -> (H-v : Set l4-v) -> (X---v : list l4-v H-v) -> (X--1-v : nat) -> list l4-v H-v
ltl l0-v H-v X---v O = X---v
ltl l0-v H-v X---v (S n0-v) = ltl l0-v H-v (tail l0-v H-v X---v) n0-v
lhd-nil : (l23 : Level) -> (A : Set l23) -> (n : nat) -> eq l23 (list l23 A) (lhd l23 A (nil l23 A) n) (nil l23 A)
lhd-nil = λ (l23 : Level) -> λ (A : Set l23) -> λ (n : nat) -> nat-ind l23 (λ (X-x-365 : nat) -> eq l23 (list l23 A) (lhd l23 A (nil l23 A) X-x-365) (nil l23 A)) (refl l23 (list l23 A) (lhd l23 A (nil l23 A) O)) (λ (x-366 : nat) -> λ (X-x-368 : eq l23 (list l23 A) (lhd l23 A (nil l23 A) x-366) (nil l23 A)) -> refl l23 (list l23 A) (lhd l23 A (nil l23 A) (S x-366))) n
ltl-nil : (l32 : Level) -> (A : Set l32) -> (n : nat) -> eq l32 (list l32 A) (ltl l32 A (nil l32 A) n) (nil l32 A)
ltl-nil = λ (l32 : Level) -> λ (A : Set l32) -> λ (n : nat) -> nat-ind l32 (λ (X-x-365 : nat) -> eq l32 (list l32 A) (ltl l32 A (nil l32 A) X-x-365) (nil l32 A)) (refl l32 (list l32 A) (nil l32 A)) (λ (x-366 : nat) -> λ (X-x-368 : eq l32 (list l32 A) (ltl l32 A (nil l32 A) x-366) (nil l32 A)) -> rewrite-r l32 l32 (list l32 A) (nil l32 A) (λ (X-- : list l32 A) -> eq l32 (list l32 A) X-- (nil l32 A)) (refl l32 (list l32 A) (nil l32 A)) (ltl l32 A (nil l32 A) x-366) X-x-368) n
lhd-cons-ltl : (l98 : Level) -> (A : Set l98) -> (n : nat) -> (l : list l98 A) -> eq l98 (list l98 A) (append l98 A (lhd l98 A l n) (ltl l98 A l n)) l
lhd-cons-ltl = λ (l98 : Level) -> λ (A : Set l98) -> λ (n : nat) -> nat-ind l98 (λ (X-x-365 : nat) -> (l : list l98 A) -> eq l98 (list l98 A) (append l98 A (lhd l98 A l X-x-365) (ltl l98 A l X-x-365)) l) (λ (l : list l98 A) -> refl l98 (list l98 A) (append l98 A (lhd l98 A l O) (ltl l98 A l O))) (λ (n0 : nat) -> λ (IHn : (l : list l98 A) -> eq l98 (list l98 A) (append l98 A (lhd l98 A l n0) (ltl l98 A l n0)) l) -> λ (l : list l98 A) -> list-ind l98 l98 A (λ (X-x-716 : list l98 A) -> eq l98 (list l98 A) (append l98 A (lhd l98 A X-x-716 (S n0)) (ltl l98 A X-x-716 (S n0))) X-x-716) (rewrite-r l98 l98 (list l98 A) (nil l98 A) (λ (X-- : list l98 A) -> eq l98 (list l98 A) X-- (nil l98 A)) (refl l98 (list l98 A) (nil l98 A)) (ltl l98 A (nil l98 A) n0) (ltl-nil l98 A n0)) (λ (x-718 : A) -> λ (x-717 : list l98 A) -> λ (X-x-720 : eq l98 (list l98 A) (append l98 A (match-list l98 A l98 (λ (X-- : list l98 A) -> list l98 A) (nil l98 A) (λ (a : A) -> λ (l0 : list l98 A) -> cons l98 A a (lhd l98 A l0 n0)) x-717) (ltl l98 A (match-list l98 A l98 (λ (X-- : list l98 A) -> list l98 A) (nil l98 A) (λ (hd-v : A) -> λ (tl : list l98 A) -> tl) x-717) n0)) x-717) -> rewrite-r l98 l98 (list l98 A) x-717 (λ (X-- : list l98 A) -> eq l98 (list l98 A) (cons l98 A x-718 X--) (cons l98 A x-718 x-717)) (refl l98 (list l98 A) (cons l98 A x-718 x-717)) (append l98 A (lhd l98 A x-717 n0) (ltl l98 A x-717 n0)) (IHn x-717)) l) n
length-ltl : (l84 : Level) -> (A : Set l84) -> (n : nat) -> (l : list l84 A) -> eq lzero nat (length l84 A (ltl l84 A l n)) (minus (length l84 A l) n)
length-ltl = λ (l84 : Level) -> λ (A : Set l84) -> λ (n : nat) -> nat-ind l84 (λ (X-x-365 : nat) -> (l : list l84 A) -> eq lzero nat (length l84 A (ltl l84 A l X-x-365)) (minus (length l84 A l) X-x-365)) (λ (l : list l84 A) -> minus-n-O (length l84 A (ltl l84 A l O))) (λ (n0 : nat) -> λ (IHn : (l : list l84 A) -> eq lzero nat (length l84 A (ltl l84 A l n0)) (minus (length l84 A l) n0)) -> λ (X-clearme : list l84 A) -> match-list l84 A lzero (λ (X-- : list l84 A) -> eq lzero nat (length l84 A (ltl l84 A X-- (S n0))) (minus (length l84 A X--) (S n0))) (sym-eq lzero nat O (length l84 A (ltl l84 A (nil l84 A) n0)) (eq-coerc lzero (eq lzero nat O (length l84 A (nil l84 A))) (eq lzero nat O (length l84 A (ltl l84 A (nil l84 A) n0))) (le-n-O-to-eq (length l84 A (nil l84 A)) (le-n (length l84 A (nil l84 A)))) (rewrite-r l84 (lsuc lzero) (list l84 A) (nil l84 A) (λ (X-- : list l84 A) -> eq (lsuc lzero) (Set (lzero)) (eq lzero nat O (length l84 A (nil l84 A))) (eq lzero nat O (length l84 A X--))) (refl (lsuc lzero) (Set (lzero)) (eq lzero nat O (length l84 A (nil l84 A)))) (ltl l84 A (nil l84 A) n0) (ltl-nil l84 A n0)))) (λ (auto : A) -> λ (auto' : list l84 A) -> rewrite-r lzero lzero nat (minus (length l84 A auto') n0) (λ (X-- : nat) -> eq lzero nat X-- (minus (length l84 A auto') n0)) (refl lzero nat (minus (length l84 A auto') n0)) (length l84 A (ltl l84 A auto' n0)) (IHn auto')) X-clearme) n
find : (l6-v l5-v : Level) -> (A-v : Set l6-v) -> (B-v : Set l5-v) -> (X-f-v : (X---v : A-v) -> option l5-v B-v) -> (X-l-v : list l6-v A-v) -> option l5-v B-v
find l5-v l10-v A-v B-v X-f-v nil' = None l10-v B-v
find l5-v l10-v A-v B-v X-f-v (cons' h-v t-v) = match-option l10-v B-v l10-v (λ (X---v : option l10-v B-v) -> option l10-v B-v) (find l5-v l10-v A-v B-v X-f-v t-v) (λ (b-v : B-v) -> Some l10-v B-v b-v) (X-f-v h-v)
position-of-aux : (l6-v : Level) -> (A-v : Set l6-v) -> (X-found-v : (X---v : A-v) -> bool) -> (X-l-v : list l6-v A-v) -> (X-acc-v : nat) -> option lzero nat
position-of-aux l4-v A-v X-found-v nil' acc-v = None lzero nat
position-of-aux l4-v A-v X-found-v (cons' h-v t-v) acc-v = match-bool lzero (λ (X---v : bool) -> option lzero nat) (Some lzero nat acc-v) (position-of-aux l4-v A-v X-found-v t-v (S acc-v)) (X-found-v h-v)
position-of : (l5 : Level) -> (A : Set l5) -> (X-- : (X-- : A) -> bool) -> (X--1 : list l5 A) -> option lzero nat
position-of = λ (l5 : Level) -> λ (A : Set l5) -> λ (found : (X-- : A) -> bool) -> λ (l : list l5 A) -> position-of-aux l5 A found l O
make-list : (l3-v : Level) -> (A-v : Set l3-v) -> (X-a-v : A-v) -> (X-n-v : nat) -> list l3-v A-v
make-list l0-v A-v X-a-v O = nil l0-v A-v
make-list l0-v A-v X-a-v (S m-v) = cons l0-v A-v X-a-v (make-list l0-v A-v X-a-v m-v)