1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/substitution/ldrop_ldrop.ma".
16 include "basic_2/static/aaa.ma".
18 (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
20 (* Properties concerning basic relocation ***********************************)
22 lemma aaa_lift: ∀L1,T1,A. L1 ⊢ T1 ⁝ A → ∀L2,d,e. ⇩[d, e] L2 ≡ L1 →
23 ∀T2. ⇧[d, e] T1 ≡ T2 → L2 ⊢ T2 ⁝ A.
24 #L1 #T1 #A #H elim H -L1 -T1 -A
25 [ #L1 #k #L2 #d #e #_ #T2 #H
26 >(lift_inv_sort1 … H) -H //
27 | #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHB #L2 #d #e #HL21 #T2 #H
28 elim (lift_inv_lref1 … H) -H * #Hid #H destruct
29 [ elim (ldrop_trans_le … HL21 … HLK1 ?) -L1 /2 width=2/ #X #HLK2 #H
30 elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K2 #V2 #HK21 #HV12 #H destruct
32 | lapply (ldrop_trans_ge … HL21 … HLK1 ?) -L1 // -Hid /3 width=8/
34 | #a #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
35 elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
37 | #a #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
38 elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
40 | #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #d #e #HL21 #X #H
41 elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
43 | #L1 #V1 #T1 #A #_ #_ #IH1 #IH2 #L2 #d #e #HL21 #X #H
44 elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
49 lemma aaa_inv_lift: ∀L2,T2,A. L2 ⊢ T2 ⁝ A → ∀L1,d,e. ⇩[d, e] L2 ≡ L1 →
50 ∀T1. ⇧[d, e] T1 ≡ T2 → L1 ⊢ T1 ⁝ A.
51 #L2 #T2 #A #H elim H -L2 -T2 -A
52 [ #L2 #k #L1 #d #e #_ #T1 #H
53 >(lift_inv_sort2 … H) -H //
54 | #I #L2 #K2 #V2 #B #i #HLK2 #_ #IHB #L1 #d #e #HL21 #T1 #H
55 elim (lift_inv_lref2 … H) -H * #Hid #H destruct
56 [ elim (ldrop_conf_lt … HL21 … HLK2 ?) -L2 // -Hid /3 width=8/
57 | lapply (ldrop_conf_ge … HL21 … HLK2 ?) -L2 // -Hid /3 width=8/
59 | #a #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
60 elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
62 | #a #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
63 elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
65 | #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #d #e #HL21 #X #H
66 elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
68 | #L2 #V2 #T2 #A #_ #_ #IH1 #IH2 #L1 #d #e #HL21 #X #H
69 elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct