]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/etc/da/da_lift.etc
still more additions and corrections for the article
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / da / da_lift.etc
index ad6503f483de6e517d13427b4275aa8111c17f04..2f1a41554d8785a1fd2027dd17577487c5893100 100644 (file)
@@ -1,23 +1,78 @@
-(* Advanced properties ******************************************************)
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
 
-lemma sta_da_conf: ∀h,g,G,L,T,U. ⦃G, L⦄ ⊢ T •[h] U →
-                   ∀l. ⦃G, L⦄ ⊢ T ▪[h, g] l → ⦃G, L⦄ ⊢ U ▪[h, g] l-1.
-#h #g #G #L #T #U #H elim H -G -L -T -U
-[ #G #L #k #l #H
-  lapply (da_inv_sort … H) -H /3 width=1/
-| #G #L #K #V #W #W0 #i #HLK #_ #HW0 #IHVW #l #H
-  elim (da_inv_lref … H) -H * #K0 #V0 [2: #l0] #HLK0 #HV0 [ #H0 ]
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK /3 width=7/
-| #G #L #K #W #V #W0 #i #HLK #HWV #HW0 #_ #l #H
-  elim (da_inv_lref … H) -H * #K0 #V0 [2: #l0] #HLK0 #HV0 [ #H0 ]
-  lapply (ldrop_mono … HLK0 … HLK) -HLK0 #H destruct
-  lapply (ldrop_fwd_ldrop2 … HLK) -HLK /3 width=7/
-| #a #I #G #L #V #T #U #_ #IHTU #l #H
-  lapply (da_inv_bind … H) -H /3 width=1/
-| #G #L #V #T #U #_ #IHTU #l #H
-  lapply (da_inv_flat … H) -H /3 width=1/
-| #G #L #W #T #U #_ #IHTU #l #H
-  lapply (da_inv_flat … H) -H /2 width=1/
+include "basic_2/substitution/drop_drop.ma".
+include "basic_2/static/da.ma".
+
+(* DEGREE ASSIGNMENT FOR TERMS **********************************************)
+
+(* Properties on relocation *************************************************)
+
+lemma da_lift: ∀h,o,G,L1,T1,d. ⦃G, L1⦄ ⊢ T1 ▪[h, o] d →
+               ∀L2,c,l,k. ⬇[c, l, k] L2 ≡ L1 → ∀T2. ⬆[l, k] T1 ≡ T2 →
+               ⦃G, L2⦄ ⊢ T2 ▪[h, o] d.
+#h #o #G #L1 #T1 #d #H elim H -G -L1 -T1 -d
+[ #G #L1 #s #d #Hkd #L2 #c #l #k #_ #X #H
+  >(lift_inv_sort1 … H) -X /2 width=1 by da_sort/
+| #G #L1 #K1 #V1 #i #d #HLK1 #_ #IHV1 #L2 #c #l #k #HL21 #X #H
+  elim (lift_inv_lref1 … H) * #Hil #H destruct
+  [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by ylt_fwd_le/ #X #HLK2 #H
+    elim (drop_inv_skip2 … H) -H /2 width=1 by ylt_to_minus/ -Hil #K2 #V2 #HK21 #HV12 #H destruct
+    /3 width=9 by da_ldef/
+  | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1
+    /3 width=8 by da_ldef, drop_inv_gen/
+  ]
+| #G #L1 #K1 #W1 #i #d #HLK1 #_ #IHW1 #L2 #c #l #k #HL21 #X #H
+  elim (lift_inv_lref1 … H) * #Hil #H destruct
+  [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by ylt_fwd_le/ #X #HLK2 #H
+    elim (drop_inv_skip2 … H) -H /2 width=1 by ylt_to_minus/ -Hil #K2 #W2 #HK21 #HW12 #H destruct
+    /3 width=8 by da_ldec/
+  | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1
+    /3 width=8 by da_ldec, drop_inv_gen/
+  ]
+| #a #I #G #L1 #V1 #T1 #d #_ #IHT1 #L2 #c #l #k #HL21 #X #H
+  elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct
+  /4 width=5 by da_bind, drop_skip/
+| #I #G #L1 #V1 #T1 #d #_ #IHT1 #L2 #c #l #k #HL21 #X #H
+  elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct
+  /3 width=5 by da_flat/
+]
+qed.
+
+(* Inversion lemmas on relocation *******************************************)
+
+lemma da_inv_lift: ∀h,o,G,L2,T2,d. ⦃G, L2⦄ ⊢ T2 ▪[h, o] d →
+                   ∀L1,c,l,k. ⬇[c, l, k] L2 ≡ L1 → ∀T1. ⬆[l, k] T1 ≡ T2 →
+                   ⦃G, L1⦄ ⊢ T1 ▪[h, o] d.
+#h #o #G #L2 #T2 #d #H elim H -G -L2 -T2 -d
+[ #G #L2 #s #d #Hkd #L1 #c #l #k #_ #X #H
+  >(lift_inv_sort2 … H) -X /2 width=1 by da_sort/
+| #G #L2 #K2 #V2 #i #d #HLK2 #HV2 #IHV2 #L1 #c #l #k #HL21 #X #H
+  elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HV2 | -IHV2 ]
+  [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldef/
+  | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldef/
+  ]
+| #G #L2 #K2 #W2 #i #d #HLK2 #HW2 #IHW2 #L1 #c #l #k #HL21 #X #H
+  elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HW2 | -IHW2 ]
+  [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldec/
+  | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldec/
+  ]
+| #a #I #G #L2 #V2 #T2 #d #_ #IHT2 #L1 #c #l #k #HL21 #X #H
+  elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  /4 width=5 by da_bind, drop_skip/
+| #I #G #L2 #V2 #T2 #d #_ #IHT2 #L1 #c #l #k #HL21 #X #H
+  elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct
+  /3 width=5 by da_flat/
 ]
 qed-.