From: Ferruccio Guidi Date: Fri, 11 May 2018 14:40:36 +0000 (+0200) Subject: update in basic_2 X-Git-Tag: make_still_working~323 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=58ddc56896384e0a1e8a7d331aae9eded8510c70;p=helm.git update in basic_2 + cprs.ma completely ported --- diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms.ma index edb931591..8c73990c8 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms.ma @@ -71,6 +71,60 @@ lemma cpms_bind_dx (n) (h) (G) (L): #n #h #G #L #V1 #V2 #HV12 #I #T1 #T2 #H #a @(cpms_ind_sn … H) -T1 /3 width=3 by cpms_step_sn, cpm_cpms, cpm_bind/ qed. +lemma cpms_appl_dx (n) (h) (G) (L): + ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → + ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → + ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[n, h] ⓐV2.T2. +#n #h #G #L #V1 #V2 #HV12 #T1 #T2 #H @(cpms_ind_sn … H) -T1 +/3 width=3 by cpms_step_sn, cpm_cpms, cpm_appl/ +qed. + +(* Basic_2A1: uses: cprs_zeta *) +lemma cpms_zeta (n) (h) (G) (L): + ∀T2,T. ⬆*[1] T2 ≘ T → + ∀V,T1. ⦃G, L.ⓓV⦄ ⊢ T1 ➡*[n, h] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡*[n, h] T2. +#n #h #G #L #T2 #T #HT2 #V #T1 #H @(cpms_ind_sn … H) -T1 +/3 width=3 by cpms_step_sn, cpm_cpms, cpm_bind, cpm_zeta/ +qed. + +(* Basic_2A1: uses: cprs_eps *) +lemma cpms_eps (n) (h) (G) (L): + ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n, h] T2 → + ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡*[n, h] T2. +#n #h #G #L #T1 #T2 #H @(cpms_ind_sn … H) -T1 +/3 width=3 by cpms_step_sn, cpm_cpms, cpm_eps/ +qed. + +(* Basic_2A1: uses: cprs_beta_dx *) +lemma cpms_beta_dx (n) (h) (G) (L): + ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 → + ∀W1,W2. ⦃G, L⦄ ⊢ W1 ➡[h] W2 → + ∀T1,T2. ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[n, h] T2 → + ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓛ{p}W1.T1 ➡*[n, h] ⓓ{p}ⓝW2.V2.T2. +#n #h #G #L #V1 #V2 #HV12 #W1 #W2 #HW12 #T1 #T2 #H @(cpms_ind_dx … H) -T2 +/4 width=7 by cpms_step_dx, cpm_cpms, cpms_bind_dx, cpms_appl_dx, cpm_beta/ +qed. + +(* Basic_2A1: uses: cprs_theta_dx *) +lemma cpms_theta_dx (n) (h) (G) (L): + ∀V1,V. ⦃G, L⦄ ⊢ V1 ➡[h] V → + ∀V2. ⬆*[1] V ≘ V2 → + ∀W1,W2. ⦃G, L⦄ ⊢ W1 ➡[h] W2 → + ∀T1,T2. ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[n, h] T2 → + ∀p. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ➡*[n, h] ⓓ{p}W2.ⓐV2.T2. +#n #h #G #L #V1 #V #HV1 #V2 #HV2 #W1 #W2 #HW12 #T1 #T2 #H @(cpms_ind_dx … H) -T2 +/4 width=9 by cpms_step_dx, cpm_cpms, cpms_bind_dx, cpms_appl_dx, cpm_theta/ +qed. + +(* Basic inversion lemmas ***************************************************) + +lemma cpms_inv_sort1 (n) (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[n, h] X2 → X2 = ⋆(((next h)^n) s). +#n #h #G #L #X2 #s #H @(cpms_ind_dx … H) -X2 // +#n1 #n2 #X #X2 #_ #IH #HX2 destruct +elim (cpm_inv_sort1 … HX2) -HX2 * // #H1 #H2 destruct +/2 width=3 by refl, trans_eq/ +qed-. + (* Basic properties with r-transition ***************************************) (* Basic_1: was: pr3_refl *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs.ma index af0618bc5..e26838e19 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs.ma @@ -68,57 +68,34 @@ lemma cprs_flat_dx (h) (I) (G) (L): #h #I #G #L #V1 #V2 #HV12 #T1 #T2 #H @(cprs_ind_sn … H) -T1 /3 width=3 by cprs_step_sn, cpm_cpms, cpr_flat/ qed. -(* -lemma cprs_flat_sn: ∀I,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 → - ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡*[h] ⓕ{I} V2. T2. -#I #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind … H) -V2 -/3 width=3 by cprs_strap1, cpr_cprs, cpr_pair_sn, cpr_flat/ -qed. - -lemma cprs_zeta: ∀G,L,V,T1,T,T2. ⬆[0, 1] T2 ≘ T → - ⦃G, L.ⓓV⦄ ⊢ T1 ➡*[h] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡*[h] T2. -#G #L #V #T1 #T #T2 #HT2 #H @(cprs_ind_dx … H) -T1 -/3 width=3 by cprs_strap2, cpr_cprs, cpr_bind, cpr_zeta/ -qed. -lemma cprs_eps: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 → ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡*[h] T2. -#G #L #T1 #T2 #H @(cprs_ind … H) -T2 -/3 width=3 by cprs_strap1, cpr_cprs, cpr_eps/ -qed. - -lemma cprs_beta_dx: ∀a,G,L,V1,V2,W1,W2,T1,T2. - ⦃G, L⦄ ⊢ V1 ➡[h] V2 → ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[h] T2 → - ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[h] ⓓ{a}ⓝW2.V2.T2. -#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 * -T2 -/4 width=7 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_beta/ -qed. - -lemma cprs_theta_dx: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. - ⦃G, L⦄ ⊢ V1 ➡[h] V → ⬆[0, 1] V ≘ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h] T2 → - ⦃G, L⦄ ⊢ W1 ➡[h] W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h] ⓓ{a}W2.ⓐV2.T2. -#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2 -/4 width=9 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_theta/ +lemma cprs_flat_sn (h) (I) (G) (L): + ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h] V2 → + ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡*[h] ⓕ{I} V2. T2. +#h #I #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind_sn … H) -V1 +/3 width=3 by cprs_step_sn, cpm_cpms, cpr_flat/ qed. (* Basic inversion lemmas ***************************************************) (* Basic_1: was: pr3_gen_sort *) -lemma cprs_inv_sort1: ∀G,L,U2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[h] U2 → U2 = ⋆s. -#G #L #U2 #s #H @(cprs_ind … H) -U2 // -#U2 #U #_ #HU2 #IHU2 destruct ->(cpr_inv_sort1 … HU2) -HU2 // -qed-. +lemma cprs_inv_sort1 (h) (G) (L): ∀X2,s. ⦃G, L⦄ ⊢ ⋆s ➡*[h] X2 → X2 = ⋆s. +/2 width=4 by cpms_inv_sort1/ qed-. (* Basic_1: was: pr3_gen_cast *) -lemma cprs_inv_cast1: ∀G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[h] U2 → ⦃G, L⦄ ⊢ T1 ➡*[h] U2 ∨ - ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h] T2 & U2 = ⓝW2.T2. -#G #L #W1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_intror/ -#U2 #U #_ #HU2 * /3 width=3 by cprs_strap1, or_introl/ * -#W #T #HW1 #HT1 #H destruct -elim (cpr_inv_cast1 … HU2) -HU2 /3 width=3 by cprs_strap1, or_introl/ * -#W2 #T2 #HW2 #HT2 #H destruct /4 width=5 by cprs_strap1, ex3_2_intro, or_intror/ +lemma cprs_inv_cast1 (h) (G) (L): ∀W1,T1,X2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[h] X2 → + ∨∨ ⦃G, L⦄ ⊢ T1 ➡*[h] X2 + | ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h] T2 & X2 = ⓝW2.T2. +#h #G #L #W1 #T1 #X2 #H @(cprs_ind_dx … H) -X2 +[ /3 width=5 by ex3_2_intro, or_intror/ +| #X #X2 #_ #HX2 * /3 width=3 by cprs_step_dx, or_introl/ * + #W #T #HW1 #HT1 #H destruct + elim (cpr_inv_cast1 … HX2) -HX2 /3 width=3 by cprs_step_dx, or_introl/ * + #W2 #T2 #HW2 #HT2 #H destruct + /4 width=5 by cprs_step_dx, ex3_2_intro, or_intror/ +] qed-. -*) + (* Basic_1: removed theorems 13: pr1_head_1 pr1_head_2 pr1_comp clear_pr3_trans pr3_cflat pr3_gen_bind diff --git a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl index ff9b21627..eb146dd0b 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl +++ b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl @@ -78,12 +78,14 @@ table { [ [ "" ] "scpds ( ⦃?,?⦄ ⊢ ? •*➡*[?,?,?] ? )" "scpds_lift" + "scpds_aaa" + "scpds_scpds" * ] } ] - [ { "context-sensitive computation" * } { +*) + [ { "context-sensitive parallel r-computation" * } { +(* [ [ "" ] "lprs ( ⦃?,?⦄ ⊢ ➡* ? )" "lprs_drop" + "lprs_cprs" + "lprs_lprs" * ] - [ [ "" ] "cprs ( ⦃?,?⦄ ⊢ ? ➡* ?)" "cprs_lift" + "cprs_cprs" * ] +*) + [ [ "for terms" ] "cprs" + "( ⦃?,?⦄ ⊢ ? ➡*[?] ?)" (* "cprs_lift" + "cprs_cprs" *) * ] } ] -*) [ { "t-bound context-sensitive parallel rt-computation" * } { [ [ "for terms" ] "cpms" + "( ⦃?,?⦄ ⊢ ? ➡*[?,?] ? )" * ] }