-
Notifications
You must be signed in to change notification settings - Fork 0
/
ind.lagda
1603 lines (1428 loc) · 143 KB
/
ind.lagda
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
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\begin{code}
{-# OPTIONS --rewriting #-}
{-# OPTIONS --guardedness #-}
open import Level using (Level ; 0ℓ ; Lift ; lift ; lower) renaming (suc to lsuc)
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
open import Agda.Builtin.Sigma
open import Relation.Nullary
open import Relation.Unary using (Pred; Decidable)
open import Relation.Binary.PropositionalEquality using (sym ; subst)
open import Data.Product
open import Data.Product.Properties
open import Data.Sum
open import Data.Empty
open import Data.Maybe
open import Data.Unit using (⊤ ; tt)
open import Data.Nat using (ℕ ; _<_ ; _≤_ ; _≥_ ; _≤?_ ; suc ; _+_ ; pred)
open import Data.Nat.Properties
open import Agda.Builtin.String
open import Agda.Builtin.String.Properties
open import Data.List
open import Data.List.Properties
open import Data.List.Relation.Unary.Any
open import Data.List.Membership.Propositional
open import Data.List.Membership.Propositional.Properties
open import Function.Bundles
open import Induction.WellFounded
open import Axiom.Extensionality.Propositional
open import util
open import name
open import calculus
open import terms
open import world
open import choice
open import compatible
open import progress
open import getChoice
open import choiceExt
open import newChoice
open import mod
open import encode
module ind {L : Level}
(W : PossibleWorlds {L})
(M : Mod W)
(C : Choice)
(K : Compatible {L} W C)
-- (P : Progress {L} W C K)
(G : GetChoice {L} W C K)
(X : ChoiceExt W C)
(N : NewChoice W C K G)
-- (E : Extensionality 0ℓ (lsuc(lsuc(L))))
(EC : Encode)
where
open import worldDef(W)
open import computation(W)(C)(K)(G)(X)(N)(EC)
open import bar(W)
open import barI(W)(M)--(C)(K)(P)
open import forcing(W)(M)(C)(K)(G)(X)(N)(EC)
open import props0(W)(M)(C)(K)(G)(X)(N)(EC)
\end{code}
\begin{code}[hide]
-- add the missing cases & make it transitive
data <TypeStep : {u1 : univs} {w1 : 𝕎·} {T1 U1 : CTerm} (eqt1 : eqTypes u1 w1 T1 U1)
{u2 : univs} {w2 : 𝕎·} {T2 U2 : CTerm} (eqt2 : eqTypes u2 w2 T2 U2) → Set(lsuc(lsuc(L)))
data <TypeStep where
<TypePIa : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#PI A1 B1) at w)
(c₂ : T2 #⇛ (#PI A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A1} {A2} (eqta w' e') {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypePIb : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#PI A1 B1) at w)
(c₂ : T2 #⇛ (#PI A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w') (a1 a2 : CTerm) (eqa : eqInType u w' (eqta w' e') a1 a2)
→ <TypeStep {u} {w'} {sub0 a1 B1} {sub0 a2 B2} (eqtb w' e' a1 a2 eqa) {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeSUMa : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#SUM A1 B1) at w)
(c₂ : T2 #⇛ (#SUM A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A1} {A2} (eqta w' e') {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeSUMb : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#SUM A1 B1) at w)
(c₂ : T2 #⇛ (#SUM A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w') (a1 a2 : CTerm) (eqa : eqInType u w' (eqta w' e') a1 a2)
→ <TypeStep {u} (eqtb w' e' a1 a2 eqa) {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeWa : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (C1 : CTerm) (A2 : CTerm) (B2 : CTerm0) (C2 : CTerm)
(c₁ : T1 #⇛ (#WT A1 B1 C1) at w)
(c₂ : T2 #⇛ (#WT A2 B2 C2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A1} {A2} (eqta w' e') {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 c₁ c₂ eqta eqtb eqtc exta extb extc)
<TypeWb : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (C1 : CTerm) (A2 : CTerm) (B2 : CTerm0) (C2 : CTerm)
(c₁ : T1 #⇛ (#WT A1 B1 C1) at w)
(c₂ : T2 #⇛ (#WT A2 B2 C2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
(w' : 𝕎·) (e' : w ⊑· w') (a1 a2 : CTerm) (eqa : eqInType u w' (eqta w' e') a1 a2)
→ <TypeStep {u} (eqtb w' e' a1 a2 eqa) {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 c₁ c₂ eqta eqtb eqtc exta extb extc)
<TypeWc : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (C1 : CTerm) (A2 : CTerm) (B2 : CTerm0) (C2 : CTerm)
(c₁ : T1 #⇛ (#WT A1 B1 C1) at w)
(c₂ : T2 #⇛ (#WT A2 B2 C2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {C1} {C2} (eqtc w' e') {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 c₁ c₂ eqta eqtb eqtc exta extb extc)
<TypeMa : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (C1 : CTerm) (A2 : CTerm) (B2 : CTerm0) (C2 : CTerm)
(c₁ : T1 #⇛ (#MT A1 B1 C1) at w)
(c₂ : T2 #⇛ (#MT A2 B2 C2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A1} {A2} (eqta w' e') {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 c₁ c₂ eqta eqtb eqtc exta extb extc)
<TypeMb : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (C1 : CTerm) (A2 : CTerm) (B2 : CTerm0) (C2 : CTerm)
(c₁ : T1 #⇛ (#MT A1 B1 C1) at w)
(c₂ : T2 #⇛ (#MT A2 B2 C2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
(w' : 𝕎·) (e' : w ⊑· w') (a1 a2 : CTerm) (eqa : eqInType u w' (eqta w' e') a1 a2)
→ <TypeStep {u} (eqtb w' e' a1 a2 eqa) {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 c₁ c₂ eqta eqtb eqtc exta extb extc)
<TypeMc : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (C1 : CTerm) (A2 : CTerm) (B2 : CTerm0) (C2 : CTerm)
(c₁ : T1 #⇛ (#MT A1 B1 C1) at w)
(c₂ : T2 #⇛ (#MT A2 B2 C2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {C1} {C2} (eqtc w' e') {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 c₁ c₂ eqta eqtb eqtc exta extb extc)
<TypeSETa : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#SET A1 B1) at w)
(c₂ : T2 #⇛ (#SET A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A1} {A2} (eqta w' e') {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeSETb : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#SET A1 B1) at w)
(c₂ : T2 #⇛ (#SET A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w') (a1 a2 : CTerm) (eqa : eqInType u w' (eqta w' e') a1 a2)
→ <TypeStep {u} (eqtb w' e' a1 a2 eqa) {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeISECTl : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 B1 A2 B2 : CTerm)
(c₁ : T1 #⇛ (#ISECT A1 B1) at w)
(c₂ : T2 #⇛ (#ISECT A2 B2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtB : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtB w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 c₁ c₂ eqtA eqtB exta extb)
<TypeISECTr : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 B1 A2 B2 : CTerm)
(c₁ : T1 #⇛ (#ISECT A1 B1) at w)
(c₂ : T2 #⇛ (#ISECT A2 B2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtB : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtB w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtB w' e') {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 c₁ c₂ eqtA eqtB exta extb)
<TypeTUNIONa : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#TUNION A1 B1) at w)
(c₂ : T2 #⇛ (#TUNION A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A1} {A2} (eqta w' e') {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeTUNIONb : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 : CTerm) (B1 : CTerm0) (A2 : CTerm) (B2 : CTerm0)
(c₁ : T1 #⇛ (#TUNION A1 B1) at w)
(c₂ : T2 #⇛ (#TUNION A2 B2) at w)
(eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtb : ∀𝕎 w (λ w' e → ∀ a1 a2 → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2)))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(w' : 𝕎·) (e' : w ⊑· w') (a1 a2 : CTerm) (eqa : eqInType u w' (eqta w' e') a1 a2)
→ <TypeStep {u} (eqtb w' e' a1 a2 eqa) {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 c₁ c₂ eqta eqtb exta extb)
<TypeEQ : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (a1 b1 a2 b2 A B : CTerm)
(c₁ : T1 #⇛ (#EQ a1 a2 A) at w)
(c₂ : T2 #⇛ (#EQ b1 b2 B) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A B))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(eqt1 : ∀𝕎 w (λ w' e → eqInType u w' (eqtA w' e) a1 b1))
(eqt2 : ∀𝕎 w (λ w' e → eqInType u w' (eqtA w' e) a2 b2))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} {w'} {A} {B} (eqtA w' e') {u} {w} {T1} {T2} (EQTEQ a1 b1 a2 b2 A B c₁ c₂ eqtA exta eqt1 eqt2)
<TypeUNIONl : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 B1 A2 B2 : CTerm)
(c₁ : T1 #⇛ (#UNION A1 B1) at w)
(c₂ : T2 #⇛ (#UNION A2 B2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtB : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtB w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 c₁ c₂ eqtA eqtB exta extb)
<TypeUNIONr : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 B1 A2 B2 : CTerm)
(c₁ : T1 #⇛ (#UNION A1 B1) at w)
(c₂ : T2 #⇛ (#UNION A2 B2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtB : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtB w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtB w' e') {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 c₁ c₂ eqtA eqtB exta extb)
{- <TypeQTUNIONl : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 B1 A2 B2 : CTerm)
(c₁ : T1 #⇛ (#QTUNION A1 B1) at w)
(c₂ : T2 #⇛ (#QTUNION A2 B2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtB : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtB w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTQTUNION A1 B1 A2 B2 c₁ c₂ eqtA eqtB exta extb)
<TypeQTUNIONr : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 B1 A2 B2 : CTerm)
(c₁ : T1 #⇛ (#QTUNION A1 B1) at w)
(c₂ : T2 #⇛ (#QTUNION A2 B2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(eqtB : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtB w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtB w' e') {u} {w} {T1} {T2} (EQTQTUNION A1 B1 A2 B2 c₁ c₂ eqtA eqtB exta extb)-}
{-- <TypeSQUASH : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#TSQUASH A1) at w)
(c₂ : T2 #⇛ (#TSQUASH A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTSQUASH A1 A2 c₁ c₂ eqtA exta)--}
{- <TypeTTRUNC : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#TTRUNC A1) at w)
(c₂ : T2 #⇛ (#TTRUNC A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTTRUNC A1 A2 c₁ c₂ eqtA exta)-}
{- <TypeNOWRITE : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#NOWRITE A1) at w)
(c₂ : T2 #⇛ (#NOWRITE A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTNOWRITE A1 A2 c₁ c₂ eqtA exta)-}
{- <TypeNOREAD : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#NOREAD A1) at w)
(c₂ : T2 #⇛ (#NOREAD A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTNOREAD A1 A2 c₁ c₂ eqtA exta)-}
<TypeSUBSING : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#SUBSING A1) at w)
(c₂ : T2 #⇛ (#SUBSING A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTSUBSING A1 A2 c₁ c₂ eqtA exta)
<TypePARTIAL : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#PARTIAL A1) at w)
(c₂ : T2 #⇛ (#PARTIAL A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQTPARTIAL A1 A2 c₁ c₂ eqtA exta)
{-- <TypeDUM : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#DUM A1) at w)
(c₂ : T2 #⇛ (#DUM A2) at w)
(eqtA : eqTypes u w A1 A2)
→ <TypeStep {u} eqtA {u} {w} {T1} {T2} (EQTDUM A1 A2 c₁ c₂)--}
<TypeFFDEFS : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 x1 x2 : CTerm)
(c₁ : T1 #⇛ (#FFDEFS A1 x1) at w)
(c₂ : T2 #⇛ (#FFDEFS A2 x2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtA w e) a b))
(eqx : ∀𝕎 w (λ w' e → eqInType u w' (eqtA w' e) x1 x2))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {u} (eqtA w' e') {u} {w} {T1} {T2} (EQFFDEFS A1 A2 x1 x2 c₁ c₂ eqtA exta eqx)
{-- <TypeLIFT : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (A1 A2 : CTerm)
(c₁ : T1 #⇛ (#LIFT A1) at w)
(c₂ : T2 #⇛ (#LIFT A2) at w)
(eqtA : ∀𝕎 w (λ w' _ → eqTypes (↓U u) w' A1 A2))
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType (↓U u) w (eqtA w e) a b))
(w' : 𝕎·) (e' : w ⊑· w')
→ <TypeStep {↓U u} (eqtA w' e') {u} {w} {T1} {T2} (EQTLIFT A1 A2 c₁ c₂ eqtA exta)--}
<TypeBAR : (u : univs) (w : 𝕎·) (T1 T2 : CTerm) (i : □· w (λ w' _ → eqTypes u w' T1 T2))
(w' : 𝕎·) (e' : w ⊑· w') (p : eqTypes u w' T1 T2) (a : at□· i w' e' p)
→ <TypeStep {u} p {u} (EQTBAR i)
data <Type : {u1 : univs} {w1 : 𝕎·} {T1 U1 : CTerm} (eqt1 : eqTypes u1 w1 T1 U1)
{u2 : univs} {w2 : 𝕎·} {T2 U2 : CTerm} (eqt2 : eqTypes u2 w2 T2 U2) → Set(lsuc(lsuc(L)))
data <Type where
<Type1 : {u1 : univs} {w1 : 𝕎·} {T1 U1 : CTerm} (eqt1 : eqTypes u1 w1 T1 U1)
{u2 : univs} {w2 : 𝕎·} {T2 U2 : CTerm} (eqt2 : eqTypes u2 w2 T2 U2)
→ <TypeStep {u1} eqt1 {u2} eqt2 → <Type {u1} eqt1 {u2} eqt2
<TypeS : {u1 : univs} {w1 : 𝕎·} {T1 U1 : CTerm} (eqt1 : eqTypes u1 w1 T1 U1)
{u2 : univs} {w2 : 𝕎·} {T2 U2 : CTerm} (eqt2 : eqTypes u2 w2 T2 U2)
{u3 : univs} {w3 : 𝕎·} {T3 U3 : CTerm} (eqt3 : eqTypes u3 w3 T3 U3)
→ <Type {u1} eqt1 {u2} eqt2 → <TypeStep {u2} eqt2 {u3} eqt3 → <Type {u1} eqt1 {u3} eqt3
data ≤Type : {u1 : univs} {w1 : 𝕎·} {T1 U1 : CTerm} (eqt1 : eqTypes u1 w1 T1 U1)
{u2 : univs} {w2 : 𝕎·} {T2 U2 : CTerm} (eqt2 : eqTypes u2 w2 T2 U2) → Set(lsuc(lsuc(L)))
data ≤Type where
≤Type0 : {u : univs} {w : 𝕎·} {T U : CTerm} (eqt : eqTypes u w T U) → ≤Type {u} eqt {u} eqt
≤TypeS : {u1 : univs} {w1 : 𝕎·} {T1 U1 : CTerm} (eqt1 : eqTypes u1 w1 T1 U1)
{u2 : univs} {w2 : 𝕎·} {T2 U2 : CTerm} (eqt2 : eqTypes u2 w2 T2 U2)
→ <Type {u1} eqt1 {u2} eqt2 → ≤Type {u1} eqt1 {u2} eqt2
{-
<Type-NAT : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #NAT at w'} {x₂ : U2 #⇛ #NAT at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTNAT x₁ x₂) → ⊥
<Type-NAT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTNAT x₁ x₂) ())
<Type-NAT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTNAT x₁ x₂) ltt ())
-}
<Type-QNAT : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #QNAT at w'} {x₂ : U2 #⇛ #QNAT at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTQNAT x₁ x₂) → ⊥
<Type-QNAT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTQNAT x₁ x₂) ())
<Type-QNAT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTQNAT x₁ x₂) ltt ())
{-
<Type-TNAT : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #TNAT at w'} {x₂ : U2 #⇛ #TNAT at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTTNAT x₁ x₂) → ⊥
<Type-TNAT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTTNAT x₁ x₂) ())
<Type-TNAT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTTNAT x₁ x₂) ltt ())
-}
<Type-LT : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 a1 b1 a2 b2 : CTerm} {x₁ : U1 #⇛ #LT a1 b1 at w'} {x₂ : U2 #⇛ #LT a2 b2 at w'}
{s₁ : #strongMonEq w' a1 a2} {s₂ : #strongMonEq w' b1 b2}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTLT a1 a2 b1 b2 x₁ x₂ s₁ s₂) → ⊥
<Type-LT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {a1} {b1} {a2} {b2} {x₁} {x₂} {s₁} {s₂} (<Type1 .eqt .(EQTLT a1 a2 b1 b2 x₁ x₂ s₁ s₂) ())
<Type-LT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {a1} {b1} {a2} {b2} {x₁} {x₂} {s₁} {s₂} (<TypeS .eqt eqt2 .(EQTLT a1 a2 b1 b2 x₁ x₂ s₁ s₂) ltt ())
<Type-QLT : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 a1 b1 a2 b2 : CTerm} {x₁ : U1 #⇛ #QLT a1 b1 at w'} {x₂ : U2 #⇛ #QLT a2 b2 at w'}
{s₁ : #weakMonEq w' a1 a2} {s₂ : #weakMonEq w' b1 b2}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTQLT a1 a2 b1 b2 x₁ x₂ s₁ s₂) → ⊥
<Type-QLT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {a1} {b1} {a2} {b2} {x₁} {x₂} {s₁} {s₂} (<Type1 .eqt .(EQTQLT a1 a2 b1 b2 x₁ x₂ s₁ s₂) ())
<Type-QLT {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {a1} {b1} {a2} {b2} {x₁} {x₂} {s₁} {s₂} (<TypeS .eqt eqt2 .(EQTQLT a1 a2 b1 b2 x₁ x₂ s₁ s₂) ltt ())
<Type-FREE : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #FREE at w'} {x₂ : U2 #⇛ #FREE at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTFREE x₁ x₂) → ⊥
<Type-FREE {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTFREE x₁ x₂) ())
<Type-FREE {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTFREE x₁ x₂) ltt ())
<Type-PURE : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #PURE at w'} {x₂ : U2 #⇛ #PURE at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTPURE x₁ x₂) → ⊥
<Type-PURE {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTPURE x₁ x₂) ())
<Type-PURE {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTPURE x₁ x₂) ltt ())
<Type-NOWRITE : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #NOWRITE at w'} {x₂ : U2 #⇛ #NOWRITE at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTNOWRITE x₁ x₂) → ⊥
<Type-NOWRITE {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTNOWRITE x₁ x₂) ())
<Type-NOWRITE {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTNOWRITE x₁ x₂) ltt ())
<Type-NOREAD : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #NOREAD at w'} {x₂ : U2 #⇛ #NOREAD at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTNOREAD x₁ x₂) → ⊥
<Type-NOREAD {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTNOREAD x₁ x₂) ())
<Type-NOREAD {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTNOREAD x₁ x₂) ltt ())
<Type-NOSEQ : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #NOSEQ at w'} {x₂ : U2 #⇛ #NOSEQ at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTNOSEQ x₁ x₂) → ⊥
<Type-NOSEQ {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTNOSEQ x₁ x₂) ())
<Type-NOSEQ {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTNOSEQ x₁ x₂) ltt ())
<Type-NOENC : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm} {x₁ : U1 #⇛ #NOENC at w'} {x₂ : U2 #⇛ #NOENC at w'}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTNOENC x₁ x₂) → ⊥
<Type-NOENC {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<Type1 .eqt .(EQTNOENC x₁ x₂) ())
<Type-NOENC {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {x₁} {x₂} (<TypeS .eqt eqt2 .(EQTNOENC x₁ x₂) ltt ())
<Type-TERM : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm}
{t1 t2 : CTerm}
{x₁ : U1 #⇛ #TERM t1 at w'} {x₂ : U2 #⇛ #TERM t2 at w'}
{x : □· w' (λ w' _ → #strongMonEq w' t1 t2)}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTTERM t1 t2 x₁ x₂ x) → ⊥
<Type-TERM {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {t1} {t2} {x₁} {x₂} {x} (<Type1 .eqt .(EQTTERM t1 t2 x₁ x₂ x) ())
<Type-TERM {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {t1} {t2} {x₁} {x₂} {x} (<TypeS .eqt eqt2 .(EQTTERM t1 t2 x₁ x₂ x) ltt ())
<Type-UNIV : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} {eqt : eqTypes u w T1 T2}
{u' : univs} {w' : 𝕎·} {U1 U2 : CTerm}
{i : ℕ} {p : i < fst u'} {c₁ : U1 #⇛ #UNIV i at w'} {c₂ : U2 #⇛ #UNIV i at w'}
--{x : proj₁ (proj₂ u) w' U1 U2}
→ <Type {u} {w} {T1} {T2} eqt {u'} {w'} {U1} {U2} (EQTUNIV i p c₁ c₂) → ⊥
<Type-UNIV {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {i} {p} {c₁} {c₂} (<Type1 .eqt .(EQTUNIV i p c₁ c₂) ())
<Type-UNIV {u} {w} {T1} {T2} {eqt} {u'} {w'} {U1} {U2} {i} {p} {c₁} {c₂} (<TypeS .eqt eqt2 .(EQTUNIV i p c₁ c₂) ltt ())
PIeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {B1 B2 : CTerm0}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' e → (a1 a2 : CTerm) → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2))}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
→ PIeq (eqInType u w' (eqta w' e1)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)) a b
→ PIeq (eqInType u w' (eqta w' e2)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)) a b
PIeq-ext {u} {w} {A1} {A2} {B1} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb h a₁ a₂ eqa =
extb a₁ a₂ (#APPLY a a₁) (#APPLY b a₂) w' e1 e2 eqa1 eqa (h a₁ a₂ eqa1)
where
eqa1 : eqInType u w' (eqta w' e1) a₁ a₂
eqa1 = exta a₁ a₂ w' e2 e1 eqa
Weq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {B1 B2 : CTerm0} {C1 C2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' e → (a1 a2 : CTerm) → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2))}
{eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
→ weq (eqInType u w' (eqta w' e1)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)) (eqInType u w' (eqtc w' e1)) w' a b
→ weq (eqInType u w' (eqta w' e2)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)) (eqInType u w' (eqtc w' e2)) w' a b
Weq-ext {u} {w} {A1} {A2} {B1} {B2} {C1} {C2} {eqta} {eqtb} {eqtc} {w'} {e1} {e2} {a} {b} exta extb extc h =
weq-ext-eq
{eqInType u w' (eqta w' e1)}
{eqInType u w' (eqta w' e2)}
{λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)}
{λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)}
{eqInType u w' (eqtc w' e1)}
{eqInType u w' (eqtc w' e2)}
{w'} {a} {b}
(λ a b e → exta a b w' e1 e2 e)
(λ f1 f2 a1 a2 ex ey e → extb a1 a2 f1 f2 w' e2 e1 ey ex e)
(λ a b e → extc a b w' e1 e2 e)
h
Meq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {B1 B2 : CTerm0} {C1 C2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' e → (a1 a2 : CTerm) → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2))}
{eqtc : ∀𝕎 w (λ w' _ → eqTypes u w' C1 C2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
(extc : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtc w e) a b))
→ meq (eqInType u w' (eqta w' e1)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)) (eqInType u w' (eqtc w' e1)) w' a b
→ meq (eqInType u w' (eqta w' e2)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)) (eqInType u w' (eqtc w' e2)) w' a b
Meq-ext {u} {w} {A1} {A2} {B1} {B2} {C1} {C2} {eqta} {eqtb} {eqtc} {w'} {e1} {e2} {a} {b} exta extb extc h =
meq-ext-eq
{eqInType u w' (eqta w' e1)}
{eqInType u w' (eqta w' e2)}
{λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)}
{λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)}
{eqInType u w' (eqtc w' e1)}
{eqInType u w' (eqtc w' e2)}
{w'} {a} {b}
(λ a b e → exta a b w' e1 e2 e)
(λ f1 f2 a1 a2 ex ey e → extb a1 a2 f1 f2 w' e2 e1 ey ex e)
(λ a b e → extc a b w' e1 e2 e)
h
SUMeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {B1 B2 : CTerm0}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' e → (a1 a2 : CTerm) → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2))}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
→ SUMeq (eqInType u w' (eqta w' e1)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)) w' a b
→ SUMeq (eqInType u w' (eqta w' e2)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)) w' a b
SUMeq-ext {u} {w} {A1} {A2} {B1} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (a₁ , a₂ , b₁ , b₂ , ea , c₁ , c₂ , eb) =
a₁ , a₂ , b₁ , b₂ , exta a₁ a₂ w' e1 e2 ea , c₁ , c₂ , extb a₁ a₂ b₁ b₂ w' e1 e2 ea (exta a₁ a₂ w' e1 e2 ea) eb
SETeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {B1 B2 : CTerm0}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' e → (a1 a2 : CTerm) → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2))}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
→ SETeq (eqInType u w' (eqta w' e1)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)) a b
→ SETeq (eqInType u w' (eqta w' e2)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)) a b
SETeq-ext {u} {w} {A1} {A2} {B1} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (t , ea , eb) =
t , exta a b w' e1 e2 ea , extb a b t t w' e1 e2 ea (exta a b w' e1 e2 ea) eb
TUNIONeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {B1 B2 : CTerm0}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' e → (a1 a2 : CTerm) → eqInType u w' (eqta w' e) a1 a2
→ eqTypes u w' (sub0 a1 B1) (sub0 a2 B2))}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b c d : CTerm) → wPredDepExtIrr (λ w e x → eqInType u w (eqtb w e a b x) c d))
→ TUNIONeq (eqInType u w' (eqta w' e1)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e1 a₁ a₂ eqa)) a b
→ TUNIONeq (eqInType u w' (eqta w' e2)) (λ a₁ a₂ eqa → eqInType u w' (eqtb w' e2 a₁ a₂ eqa)) a b
TUNIONeq-ext {u} {w} {A1} {A2} {B1} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb h =
irr-TUNIONeq {u} {w} {w'} {A1} {B1} {A2} {B2} eqta eqtb exta extb e1 e2 h
--irr-fam-tunion (u ·ᵤ) w A1 B1 A2 B2 eqta eqtb exta extb a b w (⊑-refl· _) w' {!e!} {!!} {!!}
{--(t , ea , eb) =
t , exta a b w' e1 e2 ea , extb a b t t w' e1 e2 ea (exta a b w' e1 e2 ea) eb--}
EQeq-ext : {u : univs} {w : 𝕎·} {A B a1 a2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A B)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ EQeq a1 a2 (eqInType u w' (eqta w' e1)) w' a b
→ EQeq a1 a2 (eqInType u w' (eqta w' e2)) w' a b
EQeq-ext {u} {w} {A} {B} {a1} {a2} {eqta} {w'} {e1} {e2} {a} {b} exta h = exta a1 a2 w' e1 e2 h
ISECTeq-ext : {u : univs} {w : 𝕎·} {A1 B1 A2 B2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtb w e) a b))
→ ISECTeq (eqInType u w' (eqta w' e1)) (eqInType u w' (eqtb w' e1)) a b
→ ISECTeq (eqInType u w' (eqta w' e2)) (eqInType u w' (eqtb w' e2)) a b
ISECTeq-ext {u} {w} {A1} {B1} {A2} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (h₁ , h₂) =
(exta a b w' e1 e2 h₁) , (extb a b w' e1 e2 h₂)
UNIONeq-ext : {u : univs} {w : 𝕎·} {A1 B1 A2 B2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtb w e) a b))
→ UNIONeq (eqInType u w' (eqta w' e1)) (eqInType u w' (eqtb w' e1)) w' a b
→ UNIONeq (eqInType u w' (eqta w' e2)) (eqInType u w' (eqtb w' e2)) w' a b
UNIONeq-ext {u} {w} {A1} {B1} {A2} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (a1 , a2 , inj₁ (c₁ , c₂ , h)) =
a1 , a2 , inj₁ (c₁ , c₂ , exta a1 a2 w' e1 e2 h)
UNIONeq-ext {u} {w} {A1} {B1} {A2} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (a1 , a2 , inj₂ (c₁ , c₂ , h)) =
a1 , a2 , inj₂ (c₁ , c₂ , extb a1 a2 w' e1 e2 h)
{-
QTUNIONeq-ext : {u : univs} {w : 𝕎·} {A1 B1 A2 B2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{eqtb : ∀𝕎 w (λ w' _ → eqTypes u w' B1 B2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
(extb : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqtb w e) a b))
→ QTUNIONeq (eqInType u w' (eqta w' e1)) (eqInType u w' (eqtb w' e1)) w' a b
→ QTUNIONeq (eqInType u w' (eqta w' e2)) (eqInType u w' (eqtb w' e2)) w' a b
QTUNIONeq-ext {u} {w} {A1} {B1} {A2} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (a1 , a2 , inj₁ (c₁ , c₂ , h)) =
a1 , a2 , inj₁ (c₁ , c₂ , exta a1 a2 w' e1 e2 h)
QTUNIONeq-ext {u} {w} {A1} {B1} {A2} {B2} {eqta} {eqtb} {w'} {e1} {e2} {a} {b} exta extb (a1 , a2 , inj₂ (c₁ , c₂ , h)) =
a1 , a2 , inj₂ (c₁ , c₂ , extb a1 a2 w' e1 e2 h)
-}
TSQUASHeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ TSQUASHeq (eqInType u w' (eqta w' e1)) w' a b
→ TSQUASHeq (eqInType u w' (eqta w' e2)) w' a b
TSQUASHeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
irr-TSQUASHeq eqta exta e1 e2 h
{-
TTRUNCeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ TTRUNCeq (eqInType u w' (eqta w' e1)) w' a b
→ TTRUNCeq (eqInType u w' (eqta w' e2)) w' a b
TTRUNCeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
irr-TTRUNCeq eqta exta e1 e2 h
-}
{-
NOWRITEeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ NOWRITEeq (eqInType u w' (eqta w' e1)) w' a b
→ NOWRITEeq (eqInType u w' (eqta w' e2)) w' a b
NOWRITEeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
irr-NOWRITEeq eqta exta e1 e2 h
-}
{-
NOREADeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ NOREADeq (eqInType u w' (eqta w' e1)) w' a b
→ NOREADeq (eqInType u w' (eqta w' e2)) w' a b
NOREADeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
irr-NOREADeq eqta exta e1 e2 h
-}
SUBSINGeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ SUBSINGeq (eqInType u w' (eqta w' e1)) a b
→ SUBSINGeq (eqInType u w' (eqta w' e2)) a b
SUBSINGeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
irr-SUBSINGeq eqta exta e1 e2 h
PARTIALeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ PARTIALeq (eqInType u w' (eqta w' e1)) w' a b
→ PARTIALeq (eqInType u w' (eqta w' e2)) w' a b
PARTIALeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
irr-PARTIALeq eqta exta e1 e2 h
-- where u will be (↓univs u)
LIFTeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ eqInType u w' (eqta w' e1) a b
→ eqInType u w' (eqta w' e2) a b
LIFTeq-ext {u} {w} {A1} {A2} {eqta} {w'} {e1} {e2} {a} {b} exta h =
exta a b w' e1 e2 h
FFDEFSeq-ext : {u : univs} {w : 𝕎·} {A1 A2 : CTerm} {x1 : CTerm}
{eqta : ∀𝕎 w (λ w' _ → eqTypes u w' A1 A2)}
{w' : 𝕎·} {e1 e2 : w ⊑· w'} {a b : CTerm}
(exta : (a b : CTerm) → wPredExtIrr (λ w e → eqInType u w (eqta w e) a b))
→ FFDEFSeq x1 (eqInType u w' (eqta w' e1)) w' a b
→ FFDEFSeq x1 (eqInType u w' (eqta w' e2)) w' a b
FFDEFSeq-ext {u} {w} {A1} {A2} {x1} {eqta} {w'} {e1} {e2} {a} {b} exta (x , h , nd) =
(x , exta x1 x w' e1 e2 h , nd)
ind<Type-aux : {L : Level} (P : {u : univs} {w : 𝕎·} {T1 T2 : CTerm} → eqTypes u w T1 T2 → Set(L))
→ ({u : univs} {w : 𝕎·} {T1 T2 : CTerm} (eqt : eqTypes u w T1 T2)
→ ({u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2') → <Type {u'} eqt' {u} eqt → P {u'} eqt')
→ P {u} eqt)
→ {u : univs} {w : 𝕎·} {T1 T2 : CTerm} (eqt : eqTypes u w T1 T2)
{u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ ≤Type {u'} eqt' {u} eqt → P eqt'
{-# TERMINATING #-}
-- NAT
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTNAT x x₁) {.u} {.w} {.T1} {.T2} .(EQTNAT x x₁) (≤Type0 .(EQTNAT x x₁)) = ind (EQTNAT x x₁) λ eqt' ltt' → ⊥-elim (<Type-NAT ltt')
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTNAT x x₁) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTNAT x x₁) x₂) = ⊥-elim (<Type-NAT x₂)
-- QNAT
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTQNAT x x₁) {.u} {.w} {.T1} {.T2} .(EQTQNAT x x₁) (≤Type0 .(EQTQNAT x x₁)) = ind (EQTQNAT x x₁) λ eqt' ltt' → ⊥-elim (<Type-QNAT ltt')
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTQNAT x x₁) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTQNAT x x₁) x₂) = ⊥-elim (<Type-QNAT x₂)
-- TNAT
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTNAT x x₁) {.u} {.w} {.T1} {.T2} .(EQTTNAT x x₁) (≤Type0 .(EQTTNAT x x₁)) = ind (EQTTNAT x x₁) λ eqt' ltt' → ⊥-elim (<Type-TNAT ltt')
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTNAT x x₁) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTTNAT x x₁) x₂) = ⊥-elim (<Type-TNAT x₂)
-- LT
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTLT a1 a2 b1 b2 x x₁ x₂ x₃) {.u} {.w} {.T1} {.T2} .(EQTLT a1 a2 b1 b2 x x₁ x₂ x₃) (≤Type0 .(EQTLT a1 a2 b1 b2 x x₁ x₂ x₃)) = ind (EQTLT a1 a2 b1 b2 x x₁ x₂ x₃) λ eqt' ltt' → ⊥-elim (<Type-LT ltt')
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTLT a1 a2 b1 b2 x x₁ x₂ x₃) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTLT a1 a2 b1 b2 x x₁ x₂ x₃) x₄) = ⊥-elim (<Type-LT x₄)
-- QLT
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTQLT a1 a2 b1 b2 x x₁ x₂ x₃) {.u} {.w} {.T1} {.T2} .(EQTQLT a1 a2 b1 b2 x x₁ x₂ x₃) (≤Type0 .(EQTQLT a1 a2 b1 b2 x x₁ x₂ x₃)) = ind (EQTQLT a1 a2 b1 b2 x x₁ x₂ x₃) λ eqt' ltt' → ⊥-elim (<Type-QLT ltt')
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTQLT a1 a2 b1 b2 x x₁ x₂ x₃) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTQLT a1 a2 b1 b2 x x₁ x₂ x₃) x₄) = ⊥-elim (<Type-QLT x₄)
-- FREE
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTFREE x x₁) {.u} {.w} {.T1} {.T2} .(EQTFREE x x₁) (≤Type0 .(EQTFREE x x₁)) = ind (EQTFREE x x₁) λ eqt' ltt' → ⊥-elim (<Type-FREE ltt')
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTFREE x x₁) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTFREE x x₁) x₂) = ⊥-elim (<Type-FREE x₂)
-- PI
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTPI T1' B1 T2' B2 x x₁ eqta eqtb exta extb) (<TypePIa .u' .w .T1 .T2 .T1' .B1 .T2' .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypePIb .u' .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta _ e') .(EQTPI _ B1 _ B2 x x₁ eqta eqtb exta extb) ltt (<TypePIa _ .w .T1 .T2 _ .B1 _ .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ltt (<TypePIb _ .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqta w' e') .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypePIa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (≤TypeS .(eqtb w' e' a1 a2 eqa) .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypePIb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqta _ e') .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypePIa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTPI A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypePIb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) x₂)
-- W
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {.w} {.T1} {.T2} .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (≤Type0 .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc)) =
ind (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTW T1' B1 C1 T2' B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeWa .u' .w .T1 .T2 .T1' .B1 .C1 .T2' .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeWb .u' .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind' {u'} {w'} {T1'} {T2'} .(eqtc w' e') (<Type1 .(eqtc w' e') .(EQTW A1 B1 T1' A2 B2 T2' x x₁ eqta eqtb eqtc exta extb extc) (<TypeWc .u' .w .T1 .T2 .A1 .B1 .T1' .A2 .B2 .T2' .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e')) =
ind<Type-aux P ind (eqtc w' e') (eqtc w' e') (≤Type0 (eqtc w' e'))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta _ e') .(EQTW _ B1 C1 _ B2 C2 x x₁ eqta eqtb eqtc exta extb extc) ltt (<TypeWa _ .w .T1 .T2 _ .B1 .C1 _ .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) ltt (<TypeWb _ .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtc _ e') .(EQTW A1 B1 _ A2 B2 _ x x₁ eqta eqtb eqtc exta extb extc) ltt (<TypeWc _ .w .T1 .T2 .A1 .B1 _ .A2 .B2 _ .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e')) =
ind<Type-aux P ind (eqtc w2 e') eqt' (≤TypeS eqt' (eqtc w2 e') ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<Type1 .(eqta w' e') .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeWa .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (≤TypeS .(eqtb w' e' a1 a2 eqa) .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeWb .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {w'} {.C1} {.C2} .(eqtc w' e') (≤TypeS .(eqtc w' e') .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<Type1 .(eqtc w' e') .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeWc .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e'))) =
ind<Type-aux P ind (eqtc w' e') (eqtc w' e') (≤Type0 (eqtc w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeS .eqt' .(eqta _ e') .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) x₂ (<TypeWa .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) x₂ (<TypeWb .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeS .eqt' .(eqtc _ e') .(EQTW A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) x₂ (<TypeWc .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e'))) =
ind<Type-aux P ind (eqtc w2 e') eqt' (≤TypeS eqt' (eqtc w2 e') x₂)
-- M
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {.w} {.T1} {.T2} .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (≤Type0 .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc)) =
ind (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTM T1' B1 C1 T2' B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeMa .u' .w .T1 .T2 .T1' .B1 .C1 .T2' .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeMb .u' .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind' {u'} {w'} {T1'} {T2'} .(eqtc w' e') (<Type1 .(eqtc w' e') .(EQTM A1 B1 T1' A2 B2 T2' x x₁ eqta eqtb eqtc exta extb extc) (<TypeMc .u' .w .T1 .T2 .A1 .B1 .T1' .A2 .B2 .T2' .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e')) =
ind<Type-aux P ind (eqtc w' e') (eqtc w' e') (≤Type0 (eqtc w' e'))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta _ e') .(EQTM _ B1 C1 _ B2 C2 x x₁ eqta eqtb eqtc exta extb extc) ltt (<TypeMa _ .w .T1 .T2 _ .B1 .C1 _ .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) ltt (<TypeMb _ .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtc _ e') .(EQTM A1 B1 _ A2 B2 _ x x₁ eqta eqtb eqtc exta extb extc) ltt (<TypeMc _ .w .T1 .T2 .A1 .B1 _ .A2 .B2 _ .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e')) =
ind<Type-aux P ind (eqtc w2 e') eqt' (≤TypeS eqt' (eqtc w2 e') ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<Type1 .(eqta w' e') .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeMa .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (≤TypeS .(eqtb w' e' a1 a2 eqa) .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeMb .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {.u} {w'} {.C1} {.C2} .(eqtc w' e') (≤TypeS .(eqtc w' e') .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<Type1 .(eqtc w' e') .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeMc .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc .w' e'))) =
ind<Type-aux P ind (eqtc w' e') (eqtc w' e') (≤Type0 (eqtc w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeS .eqt' .(eqta _ e') .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) x₂ (<TypeMa .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) x₂ (<TypeMb .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) (<TypeS .eqt' .(eqtc _ e') .(EQTM A1 B1 C1 A2 B2 C2 x x₁ eqta eqtb eqtc exta extb extc) x₂ (<TypeMc .u .w .T1 .T2 .A1 .B1 .C1 .A2 .B2 .C2 .x .x₁ .eqta .eqtb .eqtc .exta .extb .extc w2 e'))) =
ind<Type-aux P ind (eqtc w2 e') eqt' (≤TypeS eqt' (eqtc w2 e') x₂)
-- SUM
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTSUM T1' B1 T2' B2 x x₁ eqta eqtb exta extb) (<TypeSUMa .u' .w .T1 .T2 .T1' .B1 .T2' .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeSUMb .u' .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta _ e') .(EQTSUM _ B1 _ B2 x x₁ eqta eqtb exta extb) ltt (<TypeSUMa _ .w .T1 .T2 _ .B1 _ .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ltt (<TypeSUMb _ .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqta w' e') .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeSUMa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (≤TypeS .(eqtb w' e' a1 a2 eqa) .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeSUMb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqta _ e') .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeSUMa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTSUM A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeSUMb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) x₂)
-- SET
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTSET T1' B1 T2' B2 x x₁ eqta eqtb exta extb) (<TypeSETa .u' .w .T1 .T2 .T1' .B1 .T2' .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeSETb .u' .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta _ e') .(EQTSET _ B1 _ B2 x x₁ eqta eqtb exta extb) ltt (<TypeSETa _ .w .T1 .T2 _ .B1 _ .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ltt (<TypeSETb _ .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqta w' e') .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeSETa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (≤TypeS .(eqtb w' e' a1 a2 eqa) .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeSETb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqta _ e') .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeSETa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTSET A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeSETb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) x₂)
-- ISECT
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 x x₁ eqtA eqtB exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTISECT T1' B1 T2' B2 x x₁ eqta eqtb exta extb) (<TypeISECTl .u' .w .T1 .T2 .T1' .B1 .T2' .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {T1'} {T2'} .(eqtb w' e') (<Type1 .(eqtb w' e') .(EQTISECT A1 T1' A2 T2' x x₁ eqta eqtb exta extb) (<TypeISECTr .u' .w .T1 .T2 .A1 .T1' .A2 .T2' .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqtb w' e') (eqtb w' e') (≤Type0 (eqtb w' e'))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta w2 e') .(EQTISECT _ B1 _ B2 x x₁ eqta eqtb exta extb) ltt (<TypeISECTl _ .w .T1 .T2 _ .B1 _ .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb w2 e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ltt (<TypeISECTr _ .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqtb w2 e') eqt' (≤TypeS eqt' (eqtb w2 e') ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqta w' e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeISECTl .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.B1} {.B2} .(eqtb w' e') (≤TypeS .(eqtb w' e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqtb w' e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeISECTr .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqtb w' e') (eqtb w' e') (≤Type0 (eqtb w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqta w2 e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeISECTl .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqtb w2 e') .(EQTISECT A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeISECTr .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqtb w2 e') eqt' (≤TypeS eqt' (eqtb w2 e') x₂)
-- TUNION
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTTUNION T1' B1 T2' B2 x x₁ eqta eqtb exta extb) (<TypeTUNIONa .u' .w .T1 .T2 .T1' .B1 .T2' .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeTUNIONb .u' .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta _ e') .(EQTTUNION _ B1 _ B2 x x₁ eqta eqtb exta extb) ltt (<TypeTUNIONa _ .w .T1 .T2 _ .B1 _ .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ltt (<TypeTUNIONb _ .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa)) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqta w' e') .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeTUNIONa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.(sub0 a1 B1)} {.(sub0 a2 B2)} .(eqtb w' e' a1 a2 eqa) (≤TypeS .(eqtb w' e' a1 a2 eqa) .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqtb w' e' a1 a2 eqa) .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeTUNIONb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w' e' a1 a2 eqa) (eqtb w' e' a1 a2 eqa) (≤Type0 (eqtb w' e' a1 a2 eqa))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqta _ e') .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeTUNIONa .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqtb _ e' a1 a2 eqa) .(EQTTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeTUNIONb .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e' a1 a2 eqa))) =
ind<Type-aux P ind (eqtb w2 e' a1 a2 eqa) eqt' (≤TypeS eqt' (eqtb w2 e' a1 a2 eqa) x₂)
-- EQ
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTEQ a1 b1 a2 b2 A B x x₁ eqtA exta eqt1 eqt2) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) {.u} {.w} {.T1} {.T2} .(EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) (≤Type0 .(EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2)) =
ind (EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} {T1'} {T2'} eqt' {u} {w} {T1} {T2} (EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqtA w' e') (<Type1 .(eqtA w' e') .(EQTEQ a1 b1 a2 b2 T1' T2' x x₁ eqtA exta eqt1 eqt2) (<TypeEQ .u' .w .T1 .T2 .a1 .b1 .a2 .b2 .T1' .T2' .x .x₁ .eqtA .exta .eqt1 .eqt2 .w' e')) =
ind<Type-aux P ind (eqtA w' e') (eqtA w' e') (≤Type0 (eqtA w' e'))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtA w2 e') .(EQTEQ a1 b1 a2 b2 _ _ x x₁ eqtA exta eqt1 eqt2) ltt (<TypeEQ _ .w .T1 .T2 .a1 .b1 .a2 .b2 _ _ .x .x₁ .eqtA .exta .eqt1 .eqt2 w2 e')) =
ind<Type-aux P ind (eqtA w2 e') eqt' (≤TypeS eqt' (eqtA w2 e') ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) {.u} {w'} {.A1} {.A2} .(eqtA w' e') (≤TypeS .(eqtA w' e') .(EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) (<Type1 .(eqtA w' e') .(EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) (<TypeEQ .u .w .T1 .T2 .a1 .b1 .a2 .b2 .A1 .A2 .x .x₁ .eqtA .exta .eqt1 .eqt2 .w' e'))) =
ind<Type-aux P ind (eqtA w' e') (eqtA w' e') (≤Type0 (eqtA w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) (<TypeS .eqt' .(eqtA w2 e') .(EQTEQ a1 b1 a2 b2 A1 A2 x x₁ eqtA exta eqt1 eqt2) x₂ (<TypeEQ .u .w .T1 .T2 .a1 .b1 .a2 .b2 .A1 .A2 .x .x₁ .eqtA .exta .eqt1 .eqt2 w2 e'))) =
ind<Type-aux P ind (eqtA w2 e') eqt' (≤TypeS eqt' (eqtA w2 e') x₂)
-- UNION
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 x x₁ eqtA eqtB exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where
ind' : {u' : univs} {w' : 𝕎·} {T1' T2' : CTerm} (eqt' : eqTypes u' w' T1' T2')
→ <Type {u'} {w'} eqt' {u} {w} (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) → P eqt'
ind' {u'} {w'} {T1'} {T2'} .(eqta w' e') (<Type1 .(eqta w' e') .(EQTUNION T1' B1 T2' B2 x x₁ eqta eqtb exta extb) (<TypeUNIONl .u' .w .T1 .T2 .T1' .B1 .T2' .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind' {u'} {w'} {T1'} {T2'} .(eqtb w' e') (<Type1 .(eqtb w' e') .(EQTUNION A1 T1' A2 T2' x x₁ eqta eqtb exta extb) (<TypeUNIONr .u' .w .T1 .T2 .A1 .T1' .A2 .T2' .x .x₁ .eqta .eqtb .exta .extb .w' e')) =
ind<Type-aux P ind (eqtb w' e') (eqtb w' e') (≤Type0 (eqtb w' e'))
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqta w2 e') .(EQTUNION _ B1 _ B2 x x₁ eqta eqtb exta extb) ltt (<TypeUNIONl _ .w .T1 .T2 _ .B1 _ .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') ltt)
ind' {u'} {w'} {T1'} {T2'} eqt' (<TypeS .eqt' .(eqtb w2 e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ltt (<TypeUNIONr _ .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e')) =
ind<Type-aux P ind (eqtb w2 e') eqt' (≤TypeS eqt' (eqtb w2 e') ltt)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.A1} {.A2} .(eqta w' e') (≤TypeS .(eqta w' e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqta w' e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeUNIONl .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqta w' e') (eqta w' e') (≤Type0 (eqta w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {w'} {.B1} {.B2} .(eqtb w' e') (≤TypeS .(eqtb w' e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<Type1 .(eqtb w' e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeUNIONr .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb .w' e'))) =
ind<Type-aux P ind (eqtb w' e') (eqtb w' e') (≤Type0 (eqtb w' e'))
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqta w2 e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeUNIONl .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqta w2 e') eqt' (≤TypeS eqt' (eqta w2 e') x₂)
ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {u'} {w'} {T1'} {T2'} eqt' (≤TypeS .eqt' .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (<TypeS .eqt' .(eqtb w2 e') .(EQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) x₂ (<TypeUNIONr .u .w .T1 .T2 .A1 .B1 .A2 .B2 .x .x₁ .eqta .eqtb .exta .extb w2 e'))) =
ind<Type-aux P ind (eqtb w2 e') eqt' (≤TypeS eqt' (eqtb w2 e') x₂)
-- QTUNION
--ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTQTUNION A1 B1 A2 B2 x x₁ eqtA eqtB exta extb) {u'} {w'} {T1'} {T2'} eqt' ltt = {!!}
{-ind<Type-aux {L} P ind {u} {w} {T1} {T2} (EQTQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) {.u} {.w} {.T1} {.T2} .(EQTQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) (≤Type0 .(EQTQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb)) =
ind (EQTQTUNION A1 B1 A2 B2 x x₁ eqta eqtb exta extb) ind'
where