X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Frt_transition%2Fcpm.ma;h=31dad2da9f9b8bc9daa951985bd94787d4ec0bd1;hb=8f5533bd34e93eee2a14cdcfd0595be65651bfa7;hp=81f381bf5583aaae38adc52c48c19dd16a0269d9;hpb=397413c4196f84c81d61ba7dd79b54ab1c428ebb;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma index 81f381bf5..31dad2da9 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma @@ -19,16 +19,16 @@ include "basic_2/rt_transition/cpg.ma". (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************) (* Basic_2A1: includes: cpr *) -definition cpm (n) (h): relation4 genv lenv term term ≝ - λG,L,T1,T2. ∃∃c. 𝐑𝐓⦃n, c⦄ & ⦃G, L⦄ ⊢ T1 ⬈[eq_t, c, h] T2. +definition cpm (h) (G) (L) (n): relation2 term term ≝ + λT1,T2. ∃∃c. 𝐑𝐓⦃n, c⦄ & ⦃G, L⦄ ⊢ T1 ⬈[eq_t, c, h] T2. interpretation - "semi-counted context-sensitive parallel rt-transition (term)" - 'PRed n h G L T1 T2 = (cpm n h G L T1 T2). + "t-bound context-sensitive parallel rt-transition (term)" + 'PRed n h G L T1 T2 = (cpm h G L n T1 T2). interpretation "context-sensitive parallel r-transition (term)" - 'PRed h G L T1 T2 = (cpm O h G L T1 T2). + 'PRed h G L T1 T2 = (cpm h G L O T1 T2). (* Basic properties *********************************************************) @@ -110,11 +110,12 @@ lemma cpm_theta: ∀n,h,p,G,L,V1,V,V2,W1,W2,T1,T2. /6 width=9 by cpg_theta, isrt_plus_O2, isrt_max, isr_shift, ex2_intro/ qed. -(* Basic properties on r-transition *****************************************) +(* Basic properties with r-transition ***************************************) +(* Note: this is needed by cpms_ind_sn and cpms_ind_dx *) (* Basic_1: includes by definition: pr0_refl *) (* Basic_2A1: includes: cpr_atom *) -lemma cpr_refl: ∀h,G,L. reflexive … (cpm 0 h G L). +lemma cpr_refl: ∀h,G,L. reflexive … (cpm h G L 0). /3 width=3 by cpg_refl, ex2_intro/ qed. (* Basic inversion lemmas ***************************************************) @@ -285,3 +286,92 @@ lemma cpm_fwd_bind1_minus: ∀n,h,I,G,L,V1,T1,T. ⦃G, L⦄ ⊢ -ⓑ{I}V1.T1 ➡ #n #h #I #G #L #V1 #T1 #T * #c #Hc #H #p elim (cpg_fwd_bind1_minus … H p) -H /3 width=4 by ex2_2_intro, ex2_intro/ qed-. + +(* Basic eliminators ********************************************************) + +lemma isrt_inv_max_shift_sn: ∀n,c1,c2. 𝐑𝐓⦃n, ↕*c1 ∨ c2⦄ → + ∧∧ 𝐑𝐓⦃0, c1⦄ & 𝐑𝐓⦃n, c2⦄. +#n #c1 #c2 #H +elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct +elim (isrt_inv_shift … Hc1) -Hc1 #Hc1 * -n1 +/2 width=1 by conj/ +qed-. + +lemma isrt_inv_max_eq_t: ∀n,c1,c2. 𝐑𝐓⦃n, c1 ∨ c2⦄ → eq_t c1 c2 → + ∧∧ 𝐑𝐓⦃n, c1⦄ & 𝐑𝐓⦃n, c2⦄. +#n #c1 #c2 #H #Hc12 +elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct +lapply (isrt_eq_t_trans … Hc1 … Hc12) -Hc12 #H +<(isrt_inj … H … Hc2) -Hc2 +max_shift #H + elim (isrt_inv_max_shift_sn … H) -H #H #HcT + elim (isrt_O_inv_max … H) -H #HcV #HcW + /3 width=3 by ex2_intro/ +| #cV #cW #cT #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HW12 #HT12 #IHV #IHW #IHT #n #H + lapply (isrt_inv_plus_O_dx … H ?) -H // >max_shift #H + elim (isrt_inv_max_shift_sn … H) -H #H #HcT + elim (isrt_O_inv_max … H) -H #HcV #HcW + /3 width=4 by ex2_intro/ +] +qed-.