]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/da_lift.ma
notational change of lift, drop, and gget
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / da_lift.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/substitution/drop_drop.ma".
16 include "basic_2/static/da.ma".
17
18 (* DEGREE ASSIGNMENT FOR TERMS **********************************************)
19
20 (* Properties on relocation *************************************************)
21
22 lemma da_lift: ∀h,g,G,L1,T1,l. ⦃G, L1⦄ ⊢ T1 ▪[h, g] l →
23                ∀L2,s,d,e. ⬇[s, d, e] L2 ≡ L1 → ∀T2. ⬆[d, e] T1 ≡ T2 →
24                ⦃G, L2⦄ ⊢ T2 ▪[h, g] l.
25 #h #g #G #L1 #T1 #l #H elim H -G -L1 -T1 -l
26 [ #G #L1 #k #l #Hkl #L2 #s #d #e #_ #X #H
27   >(lift_inv_sort1 … H) -X /2 width=1 by da_sort/
28 | #G #L1 #K1 #V1 #i #l #HLK1 #_ #IHV1 #L2 #s #d #e #HL21 #X #H
29   elim (lift_inv_lref1 … H) * #Hid #H destruct
30   [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H
31     elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
32     /3 width=9 by da_ldef/
33   | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1
34     /3 width=8 by da_ldef, drop_inv_gen/
35   ]
36 | #G #L1 #K1 #W1 #i #l #HLK1 #_ #IHW1 #L2 #s #d #e #HL21 #X #H
37   elim (lift_inv_lref1 … H) * #Hid #H destruct
38   [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H
39     elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hid #K2 #W2 #HK21 #HW12 #H destruct
40     /3 width=8 by da_ldec/
41   | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1
42     /3 width=8 by da_ldec, drop_inv_gen/
43   ]
44 | #a #I #G #L1 #V1 #T1 #l #_ #IHT1 #L2 #s #d #e #HL21 #X #H
45   elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct
46   /4 width=5 by da_bind, drop_skip/
47 | #I #G #L1 #V1 #T1 #l #_ #IHT1 #L2 #s #d #e #HL21 #X #H
48   elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct
49   /3 width=5 by da_flat/
50 ]
51 qed.
52
53 (* Inversion lemmas on relocation *******************************************)
54
55 lemma da_inv_lift: ∀h,g,G,L2,T2,l. ⦃G, L2⦄ ⊢ T2 ▪[h, g] l →
56                    ∀L1,s,d,e. ⬇[s, d, e] L2 ≡ L1 → ∀T1. ⬆[d, e] T1 ≡ T2 →
57                    ⦃G, L1⦄ ⊢ T1 ▪[h, g] l.
58 #h #g #G #L2 #T2 #l #H elim H -G -L2 -T2 -l
59 [ #G #L2 #k #l #Hkl #L1 #s #d #e #_ #X #H
60   >(lift_inv_sort2 … H) -X /2 width=1 by da_sort/
61 | #G #L2 #K2 #V2 #i #l #HLK2 #HV2 #IHV2 #L1 #s #d #e #HL21 #X #H
62   elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HV2 | -IHV2 ]
63   [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldef/
64   | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldef/
65   ]
66 | #G #L2 #K2 #W2 #i #l #HLK2 #HW2 #IHW2 #L1 #s #d #e #HL21 #X #H
67   elim (lift_inv_lref2 … H) * #Hid #H destruct [ -HW2 | -IHW2 ]
68   [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldec/
69   | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldec/
70   ]
71 | #a #I #G #L2 #V2 #T2 #l #_ #IHT2 #L1 #s #d #e #HL21 #X #H
72   elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
73   /4 width=5 by da_bind, drop_skip/
74 | #I #G #L2 #V2 #T2 #l #_ #IHT2 #L1 #s #d #e #HL21 #X #H
75   elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
76   /3 width=5 by da_flat/
77 ]
78 qed-.