X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2A%2Freduction%2Fcpx_lift.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2A%2Freduction%2Fcpx_lift.ma;h=6cc63f40dd868e2bf6afa82f9d47e561f48ac1c2;hb=d2545ffd201b1aa49887313791386add78fa8603;hp=0000000000000000000000000000000000000000;hpb=57ae1762497a5f3ea75740e2908e04adb8642cc2;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma new file mode 100644 index 000000000..6cc63f40d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma @@ -0,0 +1,264 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/static/da.ma". +include "basic_2A/reduction/cpx.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION FOR TERMS ******************) + +(* Advanced properties ******************************************************) + +fact sta_cpx_aux: ∀h,g,G,L,T1,T2,d2,d1. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → d2 = 1 → + ⦃G, L⦄ ⊢ T1 ▪[h, g] d1+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2. +#h #g #G #L #T1 #T2 #d2 #d1 #H elim H -G -L -T1 -T2 -d2 +[ #G #L #d2 #k #H0 destruct normalize + /3 width=4 by cpx_st, da_inv_sort/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #H0 #H destruct + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpx_delta/ +| #G #L #K #V1 #V2 #i #_ #_ #_ #H destruct +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #HV12 #HVW2 #_ #H0 #H + lapply (discr_plus_xy_y … H0) -H0 #H0 destruct + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct + /4 width=7 by cpx_delta, cpr_cpx, lstas_cpr/ +| /4 width=2 by cpx_bind, da_inv_bind/ +| /4 width=3 by cpx_flat, da_inv_flat/ +| /4 width=3 by cpx_eps, da_inv_flat/ +] +qed-. + +lemma sta_cpx: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → + ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2. +/2 width=3 by sta_cpx_aux/ qed. + +(* Relocation properties ****************************************************) + +lemma cpx_lift: ∀h,g,G. d_liftable (cpx h g G). +#h #g #G #K #T1 #T2 #H elim H -G -K -T1 -T2 +[ #I #G #K #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_mono … H1 … H2) -H1 -H2 // +| #G #K #k #d #Hkd #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_inv_sort1 … H1) -U1 + >(lift_inv_sort1 … H2) -U2 /2 width=2 by cpx_st/ +| #I #G #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #s #l #m #HLK #U1 #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K /3 width=7 by cpx_delta, drop_inv_gen/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /4 width=6 by cpx_bind, drop_skip/ +| #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6 by cpx_flat/ +| #G #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct + elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpx_zeta, drop_skip/ +| #G #K #V #T1 #T2 #_ #IHT12 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_eps/ +| #G #K #V1 #V2 #T #_ #IHV12 #L #s #l #m #HLK #U1 #H #U2 #HVU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_ct/ +| #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #X #T3 #HX #HT23 #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #W3 #V3 #HW23 #HV23 #HX destruct /4 width=6 by cpx_beta, drop_skip/ +| #a #G #K #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #W3 #X #HW23 #HX #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #V3 #T3 #HV3 #HT23 #HX destruct + elim (lift_trans_ge … HV2 … HV3) -V2 /4 width=6 by cpx_theta, drop_skip/ +] +qed. + +lemma cpx_inv_lift1: ∀h,g,G. d_deliftable_sn (cpx h g G). +#h #g #G #L #U1 #U2 #H elim H -G -L -U1 -U2 +[ * #i #G #L #K #s #l #m #_ #T1 #H + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_sort, ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by cpx_atom, lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_gref, ex2_intro/ + ] +| #G #L #k #d #Hkd #K #s #l #m #_ #T1 #H + lapply (lift_inv_sort2 … H) -H #H destruct /3 width=3 by cpx_st, lift_sort, ex2_intro/ +| #I #G #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #s #l #m #HLK #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HLV) -L // #L #U #HKL #HLV #HUV + elim (IHV2 … HLV … HUV) -V #U2 #HUV2 #HU2 + elim (lift_trans_le … HUV2 … HVW2) -V2 // >minus_plus plus_minus //