X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fcomputation%2Fcpxs_lift.ma;h=0c9cfe1e7b3e864b04fc17aea7e659cd987af06b;hb=32bdf7f107be22a121fab8225c5fae4eb6b33633;hp=47d66618b99b61074c06bbd0e07ed96ea836369a;hpb=80178d6cf86b78bb9fc47f397f4bcfb1fd15a24f;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_lift.ma index 47d66618b..0c9cfe1e7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_lift.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_lift.ma @@ -12,6 +12,8 @@ (* *) (**************************************************************************) +include "basic_2/substitution/fqus_fqus.ma". +include "basic_2/unfold/lsstas_lift.ma". include "basic_2/reduction/cpx_lift.ma". include "basic_2/computation/cpxs.ma". @@ -19,69 +21,98 @@ include "basic_2/computation/cpxs.ma". (* Advanced properties ******************************************************) -lemma cpxs_delta: ∀h,g,I,L,K,V,V2,i. - ⇩[0, i] L ≡ K. ⓑ{I}V → ⦃h, K⦄ ⊢ V ➡*[g] V2 → - ∀W2. ⇧[0, i + 1] V2 ≡ W2 → ⦃h, L⦄ ⊢ #i ➡*[g] W2. -#h #g #I #L #K #V #V2 #i #HLK #H elim H -V2 [ /3 width=9/ ] -#V1 #V2 #_ #HV12 #IHV1 #W2 #HVW2 -lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK -elim (lift_total V1 0 (i+1)) /4 width=11 by cpx_lift, cpxs_strap1/ +lemma lsstas_cpxs: ∀h,g,G,L,T1,T2,l1. ⦃G, L⦄ ⊢ T1 •* [h, g, l1] T2 → + ∀l2. ⦃G, L⦄ ⊢ T1 ▪ [h, g] l2 → l1 ≤ l2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #l1 #H @(lsstas_ind_dx … H) -T2 -l1 // +#l1 #T #T2 #HT1 #HT2 #IHT1 #l2 #Hl2 #Hl12 +lapply (lsstas_da_conf … HT1 … Hl2) -HT1 +>(plus_minus_m_m (l2-l1) 1 ?) +[ /4 width=5 by cpxs_strap1, ssta_cpx, lt_to_le/ +| /2 width=1 by monotonic_le_minus_r/ +] +qed. + +lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i. + ⇩[0, i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 → + ∀W2. ⇧[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2. +#h #g #I #G #L #K #V #V2 #i #HLK #H elim H -V2 +[ /3 width=9 by cpx_cpxs, cpx_delta/ +| #V1 lapply (ldrop_fwd_ldrop2 … HLK) -HLK + elim (lift_total V1 0 (i+1)) /4 width=11 by cpx_lift, cpxs_strap1/ +] qed. (* Advanced inversion lemmas ************************************************) -lemma cpxs_inv_lref1: ∀h,g,L,T2,i. ⦃h, L⦄ ⊢ #i ➡*[g] T2 → +lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 → T2 = #i ∨ - ∃∃I,K,V1,T1. ⇩[0, i] L ≡ K.ⓑ{I}V1 & ⦃h, K⦄ ⊢ V1 ➡*[g] T1 & + ∃∃I,K,V1,T1. ⇩[0, i] L ≡ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ➡*[h, g] T1 & ⇧[0, i + 1] T1 ≡ T2. -#h #g #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1/ +#h #g #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/ #T #T2 #_ #HT2 * [ #H destruct - elim (cpx_inv_lref1 … HT2) -HT2 /2 width=1/ - * /4 width=7/ + elim (cpx_inv_lref1 … HT2) -HT2 /2 width=1 by or_introl/ + * /4 width=7 by cpx_cpxs, ex3_4_intro, or_intror/ | * #I #K #V1 #T1 #HLK #HVT1 #HT1 lapply (ldrop_fwd_ldrop2 … HLK) #H0LK - elim (cpx_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T /4 width=7/ + elim (cpx_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T + /4 width=7 by cpxs_strap1, ex3_4_intro, or_intror/ ] qed-. (* Relocation properties ****************************************************) -(* Basic_1: was: pr3_lift *) -lemma cpxs_lift: ∀h,g. l_liftable (cpxs h g). -/3 width=9/ qed. +lemma cpxs_lift: ∀h,g,G. l_liftable (cpxs h g G). +/3 width=9 by cpx_lift, cpxs_strap1, l_liftable_LTC/ qed. -(* Basic_1: was: pr3_gen_lift *) -lemma cpxs_inv_lift1: ∀h,g. l_deliftable_sn (cpxs h g). +lemma cpxs_inv_lift1: ∀h,g,G. l_deliftable_sn (cpxs h g G). /3 width=5 by l_deliftable_sn_LTC, cpx_inv_lift1/ qed-. (* Properties on supclosure *************************************************) -include "basic_2/substitution/fsups.ma". - -lemma fsupq_cpxs_trans: ∀h,g,L1,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 ➡*[g] U2 → - ∀T1. ⦃L1, T1⦄ ⊃⸮ ⦃L2, T2⦄ → - ∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡*[g] U1 & ⦃L1, U1⦄ ⊃* ⦃L2, U2⦄. -#h #g #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 [ (* /3 width=3/ *) | -#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 -elim (fsupq_cpx_trans … HT1 … HT2) -T #T #HT1 #HT2 -elim (IHTU2 … HT2) -T2 /3 width=3/ - - -(* - elim H -L1 -L2 -T1 -T2 [2,3,4,5: /3 width=5/ ] -[ #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2 - elim (IHT12 … HTU2) -IHT12 -HTU2 #T #HT1 #HT2 - elim (lift_total T d e) #U #HTU - lapply (cpx_lift … HT1 … HLK1 … HTU1 … HTU) -HT1 -HTU1 /3 width=11/ -| #I #L1 #V2 #U2 #HVU2 - elim (lift_total U2 0 1) /4 width=9/ +lemma fqu_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqu_cpx_trans … HT1 … HT2) -T +#T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +lemma fquq_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpxs_trans … HTU2 … HT12) /3 width=3 by fqu_fquq, ex2_intro/ +| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ ] qed-. - -lemma fsup_ssta_trans: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → - ∀U2,l. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l+1, U2⦄ → - ∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡[g] U1 & ⦃L1, U1⦄ ⊃⸮ ⦃L2, U2⦄. -/3 width=4 by fsup_cpx_trans, ssta_cpx/ qed-. -*) \ No newline at end of file + +lemma fquq_lsstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ → + ∀U2,l1. ⦃G2, L2⦄ ⊢ T2 •*[h, g, l1] U2 → + ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪ [h, g] l2 → l1 ≤ l2 → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄. +/3 width=5 by fquq_cpxs_trans, lsstas_cpxs/ qed-. + +lemma fqup_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊃+ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃+ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqup_cpx_trans … HT1 … HT2) -T +#U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +lemma fqus_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊃* ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃* ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fqus_inv_gen … H) -H +[ #HT12 elim (fqup_cpxs_trans … HTU2 … HT12) /3 width=3 by fqup_fqus, ex2_intro/ +| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma fqus_lsstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃* ⦃G2, L2, T2⦄ → + ∀U2,l1. ⦃G2, L2⦄ ⊢ T2 •*[h, g, l1] U2 → + ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪ [h, g] l2 → l1 ≤ l2 → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃* ⦃G2, L2, U2⦄. +/3 width=7 by fqus_cpxs_trans, lsstas_cpxs/ qed-.