X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fcomputation%2Flsx_csx.ma;h=7cb1fb56ab3f35bfef80c51b94355bda25bcd61f;hb=33f8507cadd3b36dc9afa227d8968dda66fe2034;hp=883e32d0bcb80b0c81b1682f5b93e5b5973d50ea;hpb=0733a61e7b3a0f6173b403e3bfc2257b725b44f2;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma index 883e32d0b..7cb1fb56a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/lsx_csx.ma @@ -12,85 +12,48 @@ (* *) (**************************************************************************) -include "basic_2/computation/lpxs_lleq.ma". -include "basic_2/computation/csx_alt.ma". -include "basic_2/computation/lsx_lpxs.ma". +include "basic_2/computation/csx_lpxs.ma". +include "basic_2/computation/lcosx_cpx.ma". (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) -(* Advanced forward lemmas **************************************************) - -include "basic_2/computation/cpxs_lleq.ma". - -(* -lemma lsx_cpxs_conf: ∀h,g,G,L1,T1,T2. G ⊢ ⋕⬊*[h, g, T1] L1 → - ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2 → - G ⊢ ⋕⬊*[h, g, T2] L2. -#h #g #G #L1 #T1 #T2 #H @(lsx_ind … H) -L1 -#L1 #HL1 #IHL1 #L2 #HL12 #HT12 @lsx_intro -#L3 #HL23 #HnL23 elim (lleq_dec T2 L1 L2 0) [| -HnL23 ] -[ #HT2 @(IHL1 L3) /2 width=3 by lpxs_trans/ - - @(lsx_lpxs_trans … HL23) -| #HnT2 @(lsx_lpxs_trans … HL23) @(IHL1 … L2) // - #HT1 @HnT2 @(lleq_cpxs_conf_dx … HT12) // +(* Advanced properties ******************************************************) + +lemma lsx_lref_be_lpxs: ∀h,g,I,G,K1,V,i,d. d ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, g] V → + ∀K2. G ⊢ ⬊*[h, g, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → + ∀L2. ⇩[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, d] L2. +#h #g #I #G #K1 #V #i #d #Hdi #H @(csx_ind_alt … H) -V +#V0 #_ #IHV0 #K2 #H @(lsx_ind … H) -K2 +#K0 #HK0 #IHK0 #HK10 #L0 #HLK0 @lsx_intro +#L2 #HL02 #HnL02 elim (lpx_drop_conf … HLK0 … HL02) -HL02 +#Y #H #HLK2 elim (lpx_inv_pair1 … H) -H +#K2 #V2 #HK02 #HV02 #H destruct +elim (eq_term_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnL02 -HLK0 ] +[ /4 width=8 by lpxs_strap1, lleq_lref/ +| @(IHV0 … HnV02 … HLK2) -IHV0 -HnV02 -HLK2 + /3 width=4 by lsx_cpx_trans_O, lsx_lpx_trans, lpxs_cpx_trans, lpxs_strap1/ (**) (* full auto too slow *) ] -*) - -lemma lsx_fwd_bind_dx_lpxs: ∀h,g,a,I,G,L1,V1. ⦃G, L1⦄ ⊢ ⬊*[h, g] V1 → - ∀L2,T. G ⊢ ⋕⬊*[h, g, ⓑ{a,I}V1.T] L2 → - ∀V2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L2⦄ ⊢ V1 ➡*[h, g] V2 → - G ⊢ ⋕⬊*[h, g, T] L2.ⓑ{I}V2. -#h #g #a #I #G #L1 #V1 #H @(csx_ind_alt … H) -V1 -#V1 #_ #IHV1 #L2 #T #H @(lsx_ind … H) -L2 -#L2 #HL2 #IHL2 #V2 #HL12 #HV12 @lsx_intro -#Y #H #HnT elim (lpxs_inv_pair1 … H) -H -#L3 #V3 #HL23 #HV23 #H destruct -lapply (lpxs_trans … HL12 … HL23) #HL13 -elim (eq_term_dec V2 V3) -[ (* -HV13 -HL2 -IHV1 -HL12 *) #H destruct - @IHL2 -IHL2 // -HL23 -HL13 /3 width=2 by lleq_fwd_bind_O/ -| -IHL2 -HnT #HnV23 elim (eq_term_dec V1 V2) - [ #H -HV12 destruct - (* @(lsx_lpxs_trans … (L2.ⓑ{I}V2)) /2 width=1 by lpxs_pair/ *) - @(IHV1 … HnV23) -IHV1 -HnV23 /2 width=3 by lpxs_cpxs_trans/ -HL12 -HL13 - @(lsx_lpxs_trans … HL23) - - -lemma lsx_fwd_bind_dx_lpxs: ∀h,g,a,I,G,L1,V. ⦃G, L1⦄ ⊢ ⬊*[h, g] V → - ∀L2,T. G ⊢ ⋕⬊*[h, g, ⓑ{a,I}V.T] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → - G ⊢ ⋕⬊*[h, g, T] L2.ⓑ{I}V. -#h #g #a #I #G #L1 #V #H @(csx_ind_alt … H) -V -#V1 #_ #IHV1 #L2 #T #H @(lsx_ind … H) -L2 -#L2 #HL2 #IHL2 #HL12 @lsx_intro -#Y #H #HnT elim (lpxs_inv_pair1 … H) -H -#L3 #V3 #HL23 #HV13 #H destruct -lapply (lpxs_trans … HL12 … HL23) #HL13 -elim (eq_term_dec V1 V3) -[ -HV13 -HL2 -IHV1 -HL12 #H destruct - @IHL2 -IHL2 // -HL23 -HL13 /3 width=2 by lleq_fwd_bind_O/ -| -IHL2 -HnT #HnV13 - @(IHV1 … HnV13) -IHV1 -HnV13 /2 width=3 by lpxs_cpxs_trans/ -HL12 -HL13 - @(lsx_lpxs_trans … HL23) - - -(* Advanced inversion lemmas ************************************************) - +qed. +lemma lsx_lref_be: ∀h,g,I,G,K,V,i,d. d ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, g] V → + G ⊢ ⬊*[h, g, V, 0] K → + ∀L. ⇩[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, d] L. +/2 width=8 by lsx_lref_be_lpxs/ qed. (* Main properties **********************************************************) -axiom csx_lsx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → G ⊢ ⋕⬊*[h, g, T] L. -(* +theorem csx_lsx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀d. G ⊢ ⬊*[h, g, T, d] L. #h #g #G #L #T @(fqup_wf_ind_eq … G L T) -G -L -T -#G1 #L1 #T1 #IH #G2 #L2 * * -[ #k #HG #HL #HT destruct // -| #i #HG #HL #HT destruct - #H -| #p #HG #HL #HT destruct // -| #a #I #V2 #T2 #HG #HL #HT #H destruct - elim (csx_fwd_bind … H) -H - #HV2 #HT2 -| #I #V2 #T2 #HG #HL #HT #H destruct +#Z #Y #X #IH #G #L * * // +[ #i #HG #HL #HT #H #d destruct + elim (lt_or_ge i (|L|)) /2 width=1 by lsx_lref_free/ + elim (ylt_split i d) /2 width=1 by lsx_lref_skip/ + #Hdi #Hi elim (drop_O1_lt (Ⓕ) … Hi) -Hi + #I #K #V #HLK lapply (csx_inv_lref_bind … HLK … H) -H + /4 width=6 by lsx_lref_be, fqup_lref/ +| #a #I #V #T #HG #HL #HT #H #d destruct + elim (csx_fwd_bind … H) -H /3 width=1 by lsx_bind/ +| #I #V #T #HG #HL #HT #H #d destruct elim (csx_fwd_flat … H) -H /3 width=1 by lsx_flat/ -*) +] +qed.