-
Notifications
You must be signed in to change notification settings - Fork 0
/
resoudPC_SL.v
1226 lines (1075 loc) · 36 KB
/
resoudPC_SL.v
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
(* Contribution to the Coq Library V6.3 (July 1999) *)
(****************************************************************************)
(* The Calculus of Inductive Constructions *)
(* *)
(* Projet Coq *)
(* *)
(* INRIA ENS-CNRS *)
(* Rocquencourt Lyon *)
(* *)
(* Coq V5.10 *)
(* Nov 25th 1994 *)
(* *)
(****************************************************************************)
(* resoudPC_SL.v *)
(****************************************************************************)
(* confluence locale de sigma_lift: resolution des paires critiques *)
Require Import TS.
Require Import sur_les_relations.
Require Import sigma_lift.
Require Import determinePC_SL.
(*** app ***)
Goal
forall a b : terms,
exists u : terms,
e_relSLstar _ (app (env a id) (env b id)) u /\ e_relSLstar _ (app a b) u.
intros; exists (app a b); split; red in |- *.
apply star_trans1 with (app a (env b id)); auto.
auto.
Save PC_app_id.
Hint Resolve PC_app_id.
Goal
forall (a a' b : terms) (s : sub_explicits),
e_relSL _ a a' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\
e_relSLstar _ (env (app a' b) s) u.
intros; exists (app (env a' s) (env b s)); auto 6.
Save PC1_app_ctxt_l.
Hint Resolve PC1_app_ctxt_l.
Goal
forall (a b b' : terms) (s : sub_explicits),
e_relSL _ b b' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\
e_relSLstar _ (env (app a b') s) u.
intros; exists (app (env a s) (env b' s)); auto 6.
Save PC2_app_ctxt_l.
Hint Resolve PC2_app_ctxt_l.
Goal
forall (a b : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\
e_relSLstar _ (env (app a b) s') u.
intros; exists (app (env a s') (env b s')); split; red in |- *.
apply star_trans1 with (app (env a s') (env b s)); auto.
auto.
Save PC_app_ctxt_r.
Hint Resolve PC_app_ctxt_r.
Goal
forall (a b x' : terms) (s : sub_explicits),
e_relSL _ (app a b) x' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\ e_relSLstar _ (env x' s) u.
intros a b x' s H; pattern x' in |- *; apply case_SLapp with a b; auto.
Save PC_app_ctxt_l.
Hint Resolve PC_app_ctxt_l.
(*** lambda ***)
Goal
forall a : terms,
exists u : terms,
e_relSLstar _ (lambda (env a (lift id))) u /\ e_relSLstar _ (lambda a) u.
intro; exists (lambda a); split; red in |- *.
apply star_trans1 with (lambda (env a id)); auto.
auto.
Save PC_lambda_id.
Hint Resolve PC_lambda_id.
Goal
forall (a x' : terms) (s : sub_explicits),
e_relSL _ (lambda a) x' ->
exists u : terms,
e_relSLstar _ (lambda (env a (lift s))) u /\ e_relSLstar _ (env x' s) u.
intros a x' s H; pattern x' in |- *; apply case_SLlambda with a; intros.
2: assumption.
exists (lambda (env a' (lift s))); auto 6.
Save PC_lambda_ctxt_l.
Hint Resolve PC_lambda_ctxt_l.
Goal
forall (a : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (lambda (env a (lift s))) u /\
e_relSLstar _ (env (lambda a) s') u.
intros; exists (lambda (env a (lift s'))); auto 8.
Save PC_lambda_ctxt_r.
Hint Resolve PC_lambda_ctxt_r.
(*** Clos ***)
Goal
forall (a : terms) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env a (comp s id)) u /\ e_relSLstar _ (env a s) u.
intros; exists (env a s); split; red in |- *; auto.
Save PC1_clos_id.
Hint Resolve PC1_clos_id.
Goal
forall (a b : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (app a b) (comp s t)) u /\
e_relSLstar _ (env (app (env a s) (env b s)) t) u.
intros; exists (app (env a (comp s t)) (env b (comp s t))); split;
red in |- *.
auto.
apply star_trans1 with (app (env (env a s) t) (env (env b s) t)).
auto.
apply star_trans1 with (app (env a (comp s t)) (env (env b s) t)); auto.
Save PC_clos_app.
Hint Resolve PC_clos_app.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (lambda a) (comp s t)) u /\
e_relSLstar _ (env (lambda (env a (lift s))) t) u.
intros; exists (lambda (env a (lift (comp s t)))); split; red in |- *.
auto.
apply star_trans1 with (lambda (env (env a (lift s)) (lift t))).
auto.
apply star_trans1 with (lambda (env a (comp (lift s) (lift t)))); auto 6.
Save PC_clos_lambda.
Hint Resolve PC_clos_lambda.
Goal
forall (a : terms) (s s1 t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (env a s1) (comp s t)) u /\
e_relSLstar _ (env (env a (comp s1 s)) t) u.
intros; exists (env a (comp s1 (comp s t))); split; red in |- *.
auto.
apply star_trans1 with (env a (comp (comp s1 s) t)); auto.
Save PC_clos_clos.
Hint Resolve PC_clos_clos.
Goal
forall (n : nat) (t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp shift t)) u /\
e_relSLstar _ (env (var (S n)) t) u.
intros; exists (env (var (S n)) t); auto 6.
Save PC_clos_varshift1.
Hint Resolve PC_clos_varshift1.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp (comp shift s) t)) u /\
e_relSLstar _ (env (env (var (S n)) s) t) u.
intros; exists (env (var (S n)) (comp s t)); split; red in |- *.
apply star_trans1 with (env (var n) (comp shift (comp s t))); auto.
auto.
Save PC_clos_varshift2.
Hint Resolve PC_clos_varshift2.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var 0) (comp (cons a s) t)) u /\
e_relSLstar _ (env a t) u.
intros; exists (env a t); split; red in |- *.
apply star_trans1 with (env (var 0) (cons (env a t) (comp s t))); auto.
auto.
Save PC_clos_fvarcons.
Hint Resolve PC_clos_fvarcons.
Goal
forall s t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (comp (lift s) t)) u /\
e_relSLstar _ (env (var 0) t) u.
intros; exists (env (var 0) t); auto 6.
Save PC_clos_fvarlift1.
Hint Resolve PC_clos_fvarlift1.
Goal
forall s1 s2 t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (comp (comp (lift s1) s2) t)) u /\
e_relSLstar _ (env (env (var 0) s2) t) u.
intros; exists (env (var 0) (comp s2 t)); split; red in |- *.
apply star_trans1 with (env (var 0) (comp (lift s1) (comp s2 t))); auto.
auto.
Save PC_clos_fvarlift2.
Hint Resolve PC_clos_fvarlift2.
Goal
forall (n : nat) (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (cons a s) t)) u /\
e_relSLstar _ (env (env (var n) s) t) u.
intros; exists (env (var n) (comp s t)); split; red in |- *.
apply star_trans1 with (env (var (S n)) (cons (env a t) (comp s t))); auto.
auto.
Save PC_clos_rvarcons.
Hint Resolve PC_clos_rvarcons.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (lift s) t)) u /\
e_relSLstar _ (env (env (var n) (comp s shift)) t) u.
intros; exists (env (var n) (comp s (comp shift t))); split; red in |- *.
auto.
apply star_trans1 with (env (var n) (comp (comp s shift) t)); auto.
Save PC_clos_rvarlift1.
Hint Resolve PC_clos_rvarlift1.
Goal
forall (n : nat) (s1 s2 t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (comp (lift s1) s2) t)) u /\
e_relSLstar _ (env (env (var n) (comp s1 (comp shift s2))) t) u.
intros; exists (env (var n) (comp s1 (comp shift (comp s2 t)))); split;
red in |- *.
apply star_trans1 with (env (var (S n)) (comp (lift s1) (comp s2 t))); auto.
apply star_trans1 with (env (var n) (comp (comp s1 (comp shift s2)) t)).
auto.
apply star_trans1 with (env (var n) (comp s1 (comp (comp shift s2) t)));
auto 6.
Save PC_clos_rvarlift2.
Hint Resolve PC_clos_rvarlift2.
Goal
forall (a : terms) (t : sub_explicits),
exists u : terms,
e_relSLstar _ (env a (comp id t)) u /\ e_relSLstar _ (env a t) u.
intros; exists (env a t); auto 8.
Save PC2_clos_id.
Hint Resolve PC2_clos_id.
Goal
forall (a a' : terms) (s t : sub_explicits),
e_relSL _ a a' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env (env a' s) t) u.
intros; exists (env a' (comp s t)); auto 8.
Save PC1_clos_ctxt_l.
Hint Resolve PC1_clos_ctxt_l.
Goal
forall (a : terms) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env (env a s') t) u.
intros; exists (env a (comp s' t)); auto 6.
Save PC2_clos_ctxt_l.
Hint Resolve PC2_clos_ctxt_l.
Goal
forall (a : terms) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env (env a s) t') u.
intros; exists (env a (comp s t')); auto 6.
Save PC_clos_ctxt_r.
Hint Resolve PC_clos_ctxt_r.
Goal
forall (a x' : terms) (s t : sub_explicits),
e_relSL _ (env a s) x' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env x' t) u.
intros a x' s t H; pattern a, s, x' in |- *; apply case_SLenv; auto.
Save PC_clos_ctxt_l.
Hint Resolve PC_clos_ctxt_l.
(*** varshift1 ***)
(* aucune PC *)
(*** varshift2 ***)
Goal
forall (n : nat) (a : terms) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (cons a s)) u /\
e_relSLstar _ (env (var n) s) u.
intros; exists (env (var n) s); auto 6.
Save PC_varshift2_shiftcons.
Hint Resolve PC_varshift2_shiftcons.
Goal
forall (n : nat) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (lift s)) u /\
e_relSLstar _ (env (var n) (comp s shift)) u.
intros; exists (env (var n) (comp s shift)); auto 6.
Save PC_varshift2_shiftlift1.
Hint Resolve PC_varshift2_shiftlift1.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (lift s) t)) u /\
e_relSLstar _ (env (var n) (comp s (comp shift t))) u.
intros; exists (env (var n) (comp s (comp shift t))); auto 6.
Save PC_varshift2_shiftlift2.
Hint Resolve PC_varshift2_shiftlift2.
Goal
forall n : nat,
exists u : terms,
e_relSLstar _ (env (var (S n)) id) u /\ e_relSLstar _ (env (var n) shift) u.
intros; exists (var (S n)); auto 6.
Save PC_varshift2_idr.
Hint Resolve PC_varshift2_idr.
Goal
forall (n : nat) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var (S n)) s) u /\
e_relSLstar _ (env (var n) (comp shift s')) u.
intros; exists (env (var (S n)) s'); auto 6.
Save PC_varshift2_ctxt_r.
Hint Resolve PC_varshift2_ctxt_r.
Goal
forall (n : nat) (s x' : sub_explicits),
e_relSL _ (comp shift s) x' ->
exists u : terms,
e_relSLstar _ (env (var (S n)) s) u /\ e_relSLstar _ (env (var n) x') u.
intros n s x' H; pattern s, x' in |- *; apply case_SLcomp1; auto.
Save PC_varshift2_ctxt_r'.
Hint Resolve PC_varshift2_ctxt_r'.
(*** fvarcons ***)
Goal
forall (a a' : terms) (s : sub_explicits),
e_relSL _ a a' ->
exists u : terms,
e_relSLstar _ a u /\ e_relSLstar _ (env (var 0) (cons a' s)) u.
intros; exists a'; auto 6.
Save PC1_fvarcons_ctxt_r.
Hint Resolve PC1_fvarcons_ctxt_r.
Goal
forall (a : terms) (s' : sub_explicits),
exists u : terms,
e_relSLstar _ a u /\ e_relSLstar _ (env (var 0) (cons a s')) u.
intros; exists a; auto 6.
Save PC2_fvarcons_ctxt_r.
Hint Resolve PC2_fvarcons_ctxt_r.
Goal
forall (a : terms) (s x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : terms, e_relSLstar _ a u /\ e_relSLstar _ (env (var 0) x') u.
intros a s x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_fvarcons_ctxt_r.
(*** fvarlift1 ***)
Goal
exists u : terms, e_relSLstar _ (var 0) u /\ e_relSLstar _ (env (var 0) id) u.
intros; exists (var 0); auto 6.
Save PC_fvarlift1_liftid.
Hint Resolve PC_fvarlift1_liftid.
Goal
forall s' : sub_explicits,
exists u : terms,
e_relSLstar _ (var 0) u /\ e_relSLstar _ (env (var 0) (lift s')) u.
intros; exists (var 0); auto 6.
Save PC_fvarlift1_ctxt_r.
Hint Resolve PC_fvarlift1_ctxt_r.
Goal
forall s x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : terms, e_relSLstar _ (var 0) u /\ e_relSLstar _ (env (var 0) x') u.
intros s x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_fvarlift1_ctxt_r'.
(*** fvarlift2 ***)
Goal
forall s t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (lift t)) u /\
e_relSLstar _ (env (var 0) (lift (comp s t))) u.
intros; exists (var 0); auto 6.
Save PC_fvarlift2_lift1.
Hint Resolve PC_fvarlift2_lift1.
Goal
forall s t v : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (comp (lift t) v)) u /\
e_relSLstar _ (env (var 0) (comp (lift (comp s t)) v)) u.
intros; exists (env (var 0) v); auto 6.
Save PC_fvarlift2_lift2.
Hint Resolve PC_fvarlift2_lift2.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var 0) (cons a t)) u /\
e_relSLstar _ (env (var 0) (cons a (comp s t))) u.
intros; exists a; auto 6.
Save PC_fvarlift2_liftenv.
Hint Resolve PC_fvarlift2_liftenv.
Goal
forall s : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) id) u /\ e_relSLstar _ (env (var 0) (lift s)) u.
exists (var 0); auto 6.
Save PC_fvarlift2_idr.
Hint Resolve PC_fvarlift2_idr.
Goal
forall t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\
e_relSLstar _ (env (var 0) (comp id t)) u.
intros; exists (env (var 0) t); auto 7.
Save PC_fvarlift2_liftid.
Hint Resolve PC_fvarlift2_liftid.
Goal
forall s' t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\
e_relSLstar _ (env (var 0) (comp (lift s') t)) u.
intros; exists (env (var 0) t); auto 6.
Save PC1_fvarlift2_ctxt_r.
Hint Resolve PC1_fvarlift2_ctxt_r.
Goal
forall s t t' : sub_explicits,
e_relSL _ t t' ->
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\
e_relSLstar _ (env (var 0) (comp (lift s) t')) u.
intros; exists (env (var 0) t'); auto 6.
Save PC2_fvarlift2_ctxt_r.
Hint Resolve PC2_fvarlift2_ctxt_r.
Goal
forall s t x' : sub_explicits,
e_relSL _ (comp (lift s) t) x' ->
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\ e_relSLstar _ (env (var 0) x') u.
intros s t x' H; pattern t, x' in |- *; apply case_SLcomp2 with s; auto.
intros; pattern s, x'0 in |- *; apply case_SLlift; auto.
Save PC_fvarlift2_ctxt_r.
(*** rvarcons ***)
Goal
forall (n : nat) (a' : terms) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) s) u /\
e_relSLstar _ (env (var (S n)) (cons a' s)) u.
intros; exists (env (var n) s); auto 6.
Save PC1_rvarcons_ctxt_r.
Hint Resolve PC1_rvarcons_ctxt_r.
Goal
forall (n : nat) (a : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var n) s) u /\
e_relSLstar _ (env (var (S n)) (cons a s')) u.
intros; exists (env (var n) s'); auto 6.
Save PC2_rvarcons_ctxt_r.
Hint Resolve PC2_rvarcons_ctxt_r.
Goal
forall (n : nat) (a : terms) (s x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : terms,
e_relSLstar _ (env (var n) s) u /\ e_relSLstar _ (env (var (S n)) x') u.
intros n a s x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_rvarcons_ctxt_r.
(*** rvarlift1 ***)
Goal
forall n : nat,
exists u : terms,
e_relSLstar _ (env (var n) (comp id shift)) u /\
e_relSLstar _ (env (var (S n)) id) u.
intros; exists (var (S n)); split; red in |- *.
apply star_trans1 with (env (var n) shift); auto.
auto.
Save PC_rvarlift1_id.
Hint Resolve PC_rvarlift1_id.
Goal
forall (n : nat) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s shift)) u /\
e_relSLstar _ (env (var (S n)) (lift s')) u.
intros; exists (env (var n) (comp s' shift)); auto 6.
Save PC_rvarlift1_ctxt_r.
Hint Resolve PC_rvarlift1_ctxt_r.
Goal
forall (n : nat) (s x' : sub_explicits),
e_relSL _ (lift s) x' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s shift)) u /\
e_relSLstar _ (env (var (S n)) x') u.
intros n s x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_rvarlift1_ctxt_r'.
Hint Resolve PC_rvarlift1_ctxt_r'.
(*** rvarlift2 ***)
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift (lift t)))) u /\
e_relSLstar _ (env (var (S n)) (lift (comp s t))) u.
intros; exists (env (var n) (comp s (comp t shift))); split; red in |- *.
auto 6.
apply star_trans1 with (env (var n) (comp (comp s t) shift)); auto.
Save PC_rvarlift2_lift1.
Hint Resolve PC_rvarlift2_lift1.
Goal
forall (n : nat) (s t v : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift (comp (lift t) v)))) u /\
e_relSLstar _ (env (var (S n)) (comp (lift (comp s t)) v)) u.
intros; exists (env (var n) (comp s (comp t (comp shift v)))); split;
red in |- *.
auto 6.
apply star_trans1 with (env (var n) (comp (comp s t) (comp shift v))); auto.
Save PC_rvarlift2_lift2.
Hint Resolve PC_rvarlift2_lift2.
Goal
forall (n : nat) (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift (cons a t)))) u /\
e_relSLstar _ (env (var (S n)) (cons a (comp s t))) u.
intros; exists (env (var n) (comp s t)); auto 8.
Save PC_rvarlift2_liftenv.
Hint Resolve PC_rvarlift2_liftenv.
Goal
forall (n : nat) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift id))) u /\
e_relSLstar _ (env (var (S n)) (lift s)) u.
intros; exists (env (var n) (comp s shift)); auto 8.
Save PC_rvarlift2_idr.
Hint Resolve PC_rvarlift2_idr.
Goal
forall (n : nat) (t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp id (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) (comp id t)) u.
intros; exists (env (var (S n)) t); split; red in |- *.
apply star_trans1 with (env (var n) (comp shift t)); auto.
auto.
Save PC_rvarlift2_liftid.
Hint Resolve PC_rvarlift2_liftid.
Goal
forall (n : nat) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) (comp (lift s') t)) u.
intros; exists (env (var n) (comp s' (comp shift t))); auto 6.
Save PC1_rvarlift2_ctxt_r.
Hint Resolve PC1_rvarlift2_ctxt_r.
Goal
forall (n : nat) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) (comp (lift s) t')) u.
intros; exists (env (var n) (comp s (comp shift t'))); auto 7.
Save PC2_rvarlift2_ctxt_r.
Hint Resolve PC2_rvarlift2_ctxt_r.
Goal
forall (n : nat) (s t x' : sub_explicits),
e_relSL _ (comp (lift s) t) x' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) x') u.
intros n s t x' H; pattern t, x' in |- *; apply case_SLcomp2 with s; auto.
intros; pattern s, x'0 in |- *; apply case_SLlift; auto.
Save PC_rvarlift2_ctxt_r.
Hint Resolve PC_rvarlift2_ctxt_r.
(*** assenv ***)
Goal
forall s1 s2 t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (comp s1 s2) (comp t v)) u /\
e_relSLstar _ (comp (comp s1 (comp s2 t)) v) u.
intros; exists (comp s1 (comp s2 (comp t v))); split; red in |- *.
auto.
apply star_trans1 with (comp s1 (comp (comp s2 t) v)); auto.
Save PC_assenv_assenv.
Hint Resolve PC_assenv_assenv.
Goal
forall (a : terms) (s t v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp (cons a s) (comp t v)) u /\
e_relSLstar _ (comp (cons (env a t) (comp s t)) v) u.
intros; exists (cons (env a (comp t v)) (comp s (comp t v))); split;
red in |- *.
auto.
apply star_trans1 with (cons (env (env a t) v) (comp (comp s t) v)).
auto.
apply star_trans1 with (cons (env a (comp t v)) (comp (comp s t) v)); auto.
Save PC_assenv_mapenv.
Hint Resolve PC_assenv_mapenv.
Goal
forall (a : terms) (s v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp shift (comp (cons a s) v)) u /\
e_relSLstar _ (comp s v) u.
intros; exists (comp s v); split; red in |- *.
apply star_trans1 with (comp shift (cons (env a v) (comp s v))); auto.
auto.
Save PC_assenv_shiftcons.
Hint Resolve PC_assenv_shiftcons.
Goal
forall s v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp shift (comp (lift s) v)) u /\
e_relSLstar _ (comp (comp s shift) v) u.
intros; exists (comp s (comp shift v)); auto 6.
Save PC_assenv_shiftlift1.
Hint Resolve PC_assenv_shiftlift1.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp shift (comp (comp (lift s) t) v)) u /\
e_relSLstar _ (comp (comp s (comp shift t)) v) u.
intros; exists (comp s (comp shift (comp t v))); split; red in |- *.
apply star_trans1 with (comp shift (comp (lift s) (comp t v))); auto.
apply star_trans1 with (comp s (comp (comp shift t) v)); auto.
Save PC_assenv_shiftlift2.
Hint Resolve PC_assenv_shiftlift2.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift s) (comp (lift t) v)) u /\
e_relSLstar _ (comp (lift (comp s t)) v) u.
intros; exists (comp (lift (comp s t)) v); auto 6.
Save PC_assenv_lift1.
Hint Resolve PC_assenv_lift1.
Goal
forall s t1 t2 v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift s) (comp (comp (lift t1) t2) v)) u /\
e_relSLstar _ (comp (comp (lift (comp s t1)) t2) v) u.
intros; exists (comp (lift (comp s t1)) (comp t2 v)); split; red in |- *.
apply star_trans1 with (comp (lift s) (comp (lift t1) (comp t2 v))); auto.
auto.
Save PC_assenv_lift2.
Hint Resolve PC_assenv_lift2.
Goal
forall (a : terms) (s t v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp (lift s) (comp (cons a t) v)) u /\
e_relSLstar _ (comp (cons a (comp s t)) v) u.
intros; exists (cons (env a v) (comp s (comp t v))); split; red in |- *.
apply star_trans1 with (comp (lift s) (cons (env a v) (comp t v))); auto.
apply star_trans1 with (cons (env a v) (comp (comp s t) v)); auto.
Save PC_assenv_liftenv.
Hint Resolve PC_assenv_liftenv.
Goal
forall t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp id (comp t v)) u /\ e_relSLstar _ (comp t v) u.
intros; exists (comp t v); auto 6.
Save PC_assenv_idl.
Hint Resolve PC_assenv_idl.
Goal
forall s v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp id v)) u /\ e_relSLstar _ (comp s v) u.
intros; exists (comp s v); auto 7.
Save PC1_assenv_idr.
Hint Resolve PC1_assenv_idr.
Goal
forall s t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t id)) u /\ e_relSLstar _ (comp s t) u.
intros; exists (comp s t); auto 7.
Save PC2_assenv_idr.
Hint Resolve PC2_assenv_idr.
Goal
forall s s' t v : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp (comp s' t) v) u.
intros; exists (comp s' (comp t v)); auto 6.
Save PC_assenv_ctxt_l.
Hint Resolve PC_assenv_ctxt_l.
Goal
forall s t t' v : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp (comp s t') v) u.
intros; exists (comp s (comp t' v)); auto 6.
Save PC1_assenv_ctxt_r.
Hint Resolve PC1_assenv_ctxt_r.
Goal
forall s t v v' : sub_explicits,
e_relSL _ v v' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp (comp s t) v') u.
intros; exists (comp s (comp t v')); auto 6.
Save PC2_assenv_ctxt_r.
Hint Resolve PC2_assenv_ctxt_r.
Goal
forall s t v x' : sub_explicits,
e_relSL _ (comp s t) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp x' v) u.
intros s t v x' H; pattern s, t, x' in |- *; apply case_SLcomp; auto.
Save PC_assenv_ctxt_r.
Hint Resolve PC_assenv_ctxt_r.
(*** mapenv ***)
Goal
forall (a : terms) (s : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (cons (env a id) (comp s id)) u /\ e_relSLstar _ (cons a s) u.
intros; exists (cons a s); split; red in |- *.
apply star_trans1 with (cons a (comp s id)); auto.
auto.
Save PC_mapenv_idr.
Hint Resolve PC_mapenv_idr.
Goal
forall (a a' : terms) (s t : sub_explicits),
e_relSL _ a a' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\
e_relSLstar _ (comp (cons a' s) t) u.
intros; exists (cons (env a' t) (comp s t)); auto 6.
Save PC1_mapenv_ctxt_l.
Hint Resolve PC1_mapenv_ctxt_l.
Goal
forall (a : terms) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\
e_relSLstar _ (comp (cons a s') t) u.
intros; exists (cons (env a t) (comp s' t)); auto 6.
Save PC2_mapenv_ctxt_l.
Hint Resolve PC2_mapenv_ctxt_l.
Goal
forall (a : terms) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\
e_relSLstar _ (comp (cons a s) t') u.
intros; exists (cons (env a t') (comp s t')); split; red in |- *.
apply star_trans1 with (cons (env a t') (comp s t)); auto.
auto.
Save PC_mapenv_ctxt_r.
Hint Resolve PC_mapenv_ctxt_r.
Goal
forall (a : terms) (s t x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\ e_relSLstar _ (comp x' t) u.
intros a s t x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_mapenv_ctxt_l.
Hint Resolve PC_mapenv_ctxt_l.
(*** shiftcons ***)
Goal
forall (a' : terms) (s : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ s u /\ e_relSLstar _ (comp shift (cons a' s)) u.
intros; exists s; auto 6.
Save PC1_shiftcons_ctxt_r.
Hint Resolve PC1_shiftcons_ctxt_r.
Goal
forall (a : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ s u /\ e_relSLstar _ (comp shift (cons a s')) u.
intros; exists s'; auto 6.
Save PC2_shiftcons_ctxt_r.
Hint Resolve PC2_shiftcons_ctxt_r.
Goal
forall (a : terms) (s x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : sub_explicits,
e_relSLstar _ s u /\ e_relSLstar _ (comp shift x') u.
intros a s x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_shiftcons_ctxt_r.
(*** shiftlift1 ***)
Goal
exists u : sub_explicits,
e_relSLstar _ (comp id shift) u /\ e_relSLstar _ (comp shift id) u.
intros; exists shift; auto 6.
Save PC_shiftlift1_liftid.
Hint Resolve PC_shiftlift1_liftid.
Goal
forall s s' : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp s shift) u /\ e_relSLstar _ (comp shift (lift s')) u.
intros; exists (comp s' shift); auto 6.
Save PC_shiftlift1_ctxt_r.
Hint Resolve PC_shiftlift1_ctxt_r.
Goal
forall s x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp s shift) u /\ e_relSLstar _ (comp shift x') u.
intros s x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_shiftlift1_ctxt_r'.
Hint Resolve PC_shiftlift1_ctxt_r'.
(*** shiftlift2 ***)
Goal
forall s t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift (lift t))) u /\
e_relSLstar _ (comp shift (lift (comp s t))) u.
intros; exists (comp s (comp t shift)); split; red in |- *.
auto.
apply star_trans1 with (comp (comp s t) shift); auto.
Save PC_shiftlift2_lift1.
Hint Resolve PC_shiftlift2_lift1.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift (comp (lift t) v))) u /\
e_relSLstar _ (comp shift (comp (lift (comp s t)) v)) u.
intros; exists (comp s (comp t (comp shift v))); split; red in |- *.
auto.
apply star_trans1 with (comp (comp s t) (comp shift v)); auto.
Save PC_shiftlift2_lift2.
Hint Resolve PC_shiftlift2_lift2.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift (cons a t))) u /\
e_relSLstar _ (comp shift (cons a (comp s t))) u.
intros; exists (comp s t); auto 7.
Save PC_shiftlift2_liftenv.
Hint Resolve PC_shiftlift2_liftenv.
Goal
forall t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp id (comp shift t)) u /\
e_relSLstar _ (comp shift (comp id t)) u.
intros; exists (comp shift t); auto 7.
Save PC_shiftlift2_liftid.
Hint Resolve PC_shiftlift2_liftid.
Goal
forall s : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift id)) u /\
e_relSLstar _ (comp shift (lift s)) u.
intros; exists (comp s shift); auto 7.
Save PC_shiftlift2_idr.
Hint Resolve PC_shiftlift2_idr.
Goal
forall s s' t : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift t)) u /\
e_relSLstar _ (comp shift (comp (lift s') t)) u.
intros; exists (comp s' (comp shift t)); auto 6.
Save PC1_shiftlift2_ctxt_r.
Hint Resolve PC1_shiftlift2_ctxt_r.
Goal
forall s t t' : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift t)) u /\
e_relSLstar _ (comp shift (comp (lift s) t')) u.
intros; exists (comp s (comp shift t')); auto 6.
Save PC2_shiftlift2_ctxt_r.
Hint Resolve PC2_shiftlift2_ctxt_r.
Goal
forall s t x' : sub_explicits,
e_relSL _ (comp (lift s) t) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift t)) u /\ e_relSLstar _ (comp shift x') u.
intros s t x' H; pattern t, x' in |- *; apply case_SLcomp2 with s; auto.
intros; pattern s, x'0 in |- *; apply case_SLlift; auto.
Save PC_shiftlift2_ctxt_r.
Hint Resolve PC_shiftlift2_ctxt_r.
(*** lift1 ***)
Goal
forall t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (lift (comp id t)) u /\ e_relSLstar _ (comp id (lift t)) u.
intros; exists (lift t); auto 7.
Save PC1_lift1_liftid.
Hint Resolve PC1_lift1_liftid.
Goal
forall s : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (lift (comp s id)) u /\ e_relSLstar _ (comp (lift s) id) u.
intros; exists (lift s); auto 7.
Save PC2_lift1_liftid.
Hint Resolve PC2_lift1_liftid.
Goal
forall s s' t : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (lift (comp s t)) u /\
e_relSLstar _ (comp (lift s') (lift t)) u.
intros; exists (lift (comp s' t)); auto 6.
Save PC_lift1_ctxt_l.
Hint Resolve PC_lift1_ctxt_l.
Goal
forall s t t' : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (lift (comp s t)) u /\
e_relSLstar _ (comp (lift s) (lift t')) u.
intros; exists (lift (comp s t')); auto 6.
Save PC_lift1_ctxt_r.
Hint Resolve PC_lift1_ctxt_r.
Goal
forall s t x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : sub_explicits,