From: Ferruccio Guidi Date: Sun, 11 Mar 2012 19:30:07 +0000 (+0000) Subject: - context-sensitive computation: more properties X-Git-Tag: make_still_working~1861 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=11a20b624a4b5ed18008678cf6cd46dd9a32634d;p=helm.git - context-sensitive computation: more properties - context-sensitive reduction: bug fix in a lemma's name - some annotations added --- diff --git a/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt b/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt index 633e77f54..42357fb88 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt +++ b/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt @@ -255,10 +255,6 @@ pr3/fwd pr3_gen_lref pr3/fwd pr3_gen_void pr3/fwd pr3_gen_bind pr3/iso pr3_iso_appls_abbr -pr3/iso pr3_iso_appl_bind -pr3/iso pr3_iso_appls_appl_bind -pr3/iso pr3_iso_appls_bind -pr3/iso pr3_iso_beta pr3/iso pr3_iso_appls_beta pr3/pr1 pr3_pr1 pr3/pr3 pr3_strip @@ -267,7 +263,6 @@ pr3/props pr3_head_1 pr3/props pr3_head_2 pr3/props pr3_head_21 pr3/props pr3_head_12 -pr3/props pr3_flat pr3/props pr3_eta pr3/subst1 pr3_subst1 pr3/subst1 pr3_gen_cabbr diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma index e01515313..ed6ee27e3 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs.ma @@ -82,4 +82,7 @@ elim (cpr_inv_cast1 … HU2) -HU2 /3 width=3/ * #W2 #T2 #HW2 #HT2 #H destruct /4 width=5/ qed-. -(* Basic_1: removed theorems 2: clear_pr3_trans pr3_cflat *) +(* Basic_1: removed theorems 5: + clear_pr3_trans pr3_cflat + pr3_iso_appl_bind pr3_iso_appls_appl_bind pr3_iso_appls_bind +*) diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma index 47ec400c8..ca3fe09da 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_cprs.ma @@ -75,6 +75,7 @@ theorem cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡* T2 → theorem cprs_trans: ∀L,T1,T. L ⊢ T1 ➡* T → ∀T2. L ⊢ T ➡* T2 → L ⊢ T1 ➡* T2. /2 width=3/ qed. +(* Basic_1: was: pr3_flat *) lemma cprs_flat: ∀I,L,T1,T2. L ⊢ T1 ➡* T2 → ∀V1,V2. L ⊢ V1 ➡* V2 → L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2. #I #L #T1 #T2 #HT12 #V1 #V2 #HV12 @(cprs_ind … HV12) -V2 /2 width=1/ @@ -82,6 +83,13 @@ lemma cprs_flat: ∀I,L,T1,T2. L ⊢ T1 ➡* T2 → ∀V1,V2. L ⊢ V1 ➡* V2 @(cprs_trans … IHV1) -IHV1 /2 width=1/ qed. +lemma cprs_abbr: ∀L,V1,T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 → ∀V2. L ⊢ V1 ➡* V2 → + L ⊢ ⓓV1. T1 ➡* ⓓV2. T2. +#L #V1 #T1 #T2 #HT12 #V2 #HV12 @(cprs_ind … HV12) -V2 /2 width=1/ +#V #V2 #_ #HV2 #IHV1 +@(cprs_trans … IHV1) -IHV1 /2 width=1/ +qed. + (* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *) lemma lcpr_cprs_trans: ∀L1,L2. L1 ⊢ ➡ L2 → ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2. diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma index cbbf170f9..6969f7c60 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc.ma @@ -13,41 +13,60 @@ (**************************************************************************) include "basic_2/grammar/tstc.ma". -(* -include "basic_2/reducibility/cpr_lift.ma". -include "basic_2/reducibility/lcpr_cpr.ma". -*) -include "basic_2/computation/cprs_cprs.ma". +include "basic_2/computation/cprs_lift.ma". +include "basic_2/computation/cprs_lcprs.ma". (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) (* Forward lemmas involving same top term constructor ***********************) -(* -lemma cpr_fwd_beta: ∀L,V,W,T,U. L ⊢ ⓐV. ⓛW. T ➡ U → - ⓐV. ⓛW. T ≃ U ∨ L ⊢ ⓓV. T ➡* U. + +(* Basic_1: was: pr3_iso_beta *) +lemma cprs_fwd_beta: ∀L,V,W,T,U. L ⊢ ⓐV. ⓛW. T ➡* U → + ⓐV. ⓛW. T ≃ U ∨ L ⊢ ⓓV. T ➡* U. #L #V #W #T #U #H -elim (cpr_inv_appl1 … H) -H * -[ #V0 #X #_ #_ #H destruct /2 width=1/ -| #V0 #W0 #T1 #T2 #HV0 #HT12 #H1 #H2 destruct - lapply (lcpr_cpr_trans (L. ⓓV) … HT12) -HT12 /2 width=1/ /3 width=1/ -| #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #H destruct +elim (cprs_inv_appl1 … H) -H * +[ #V0 #T0 #_ #_ #H destruct /2 width=1/ +| #V0 #W0 #T0 #HV0 #HT0 #HU + elim (cprs_inv_abst1 Abbr V … HT0) -HT0 #W1 #T1 #_ #HT1 #H destruct -W1 + @or_intror -W + @(cprs_trans … HU) -U /2 width=1/ (**) (* explicit constructor *) +| #V1 #V2 #V0 #T1 #_ #_ #HT1 #_ + elim (cprs_inv_abst1 Abbr V … HT1) -HT1 #W2 #T2 #_ #_ #H destruct ] qed-. -lemma cpr_fwd_theta: ∀L,V1,V,T,U. L ⊢ ⓐV1. ⓓV. T ➡ U → - ∀V2. ⇧[0, 1] V1 ≡ V2 → ⓐV1. ⓓV. T ≃ U ∨ - L ⊢ ⓓV. ⓐV2. T ➡* U. +lemma cprs_fwd_theta: ∀L,V1,V,T,U. L ⊢ ⓐV1. ⓓV. T ➡* U → + ∀V2. ⇧[0, 1] V1 ≡ V2 → ⓐV1. ⓓV. T ≃ U ∨ + L ⊢ ⓓV. ⓐV2. T ➡* U. #L #V1 #V #T #U #H #V2 #HV12 -elim (cpr_inv_appl1 … H) -H * -[ -HV12 #V0 #X #_ #_ #H destruct /2 width=1/ -| -HV12 #V0 #W #T1 #T2 #_ #_ #H destruct -| #V0 #V3 #W1 #W2 #T1 #T2 #HV10 #HW12 #HT12 #HV03 #H1 #H2 destruct - lapply (cpr_lift (L.ⓓW1) … HV12 … HV03 … HV10) -V0 -HV12 /2 width=1/ #HV23 - lapply (lcpr_cpr_trans (L. ⓓW1) … HT12) -HT12 /2 width=1/ #HT12 - /4 width=1/ +elim (cprs_inv_appl1 … H) -H * +[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1/ +| #V0 #W #T0 #HV10 #HT0 #HU + elim (cprs_inv_abbr1 … HT0) -HT0 * + [ #V3 #T3 #_ #_ #H destruct + | #X #H #HT2 + elim (lift_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct + @or_intror @(cprs_trans … HU) -U (**) (* explicit constructor *) + @(cprs_trans … (ⓓV.ⓐV2.ⓛW2.T2)) [ /3 width=1/ ] -T + @(cprs_strap2 … (ⓐV1.ⓛW.T0)) [ /5 width=3/ ] -V -V2 -W2 -T2 + @(cprs_strap2 … (ⓓV1.T0)) [ /3 width=1/ ] -W /2 width=1/ + ] +| #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU + @or_intror @(cprs_trans … HU) -U (**) (* explicit constructor *) + elim (cprs_inv_abbr1 … HT0) -HT0 * + [ #V5 #T5 #HV5 #HT5 #H destruct + lapply (cprs_lift (L.ⓓV) … HV12 … HV13 … HV34) -V1 -V3 /2 width=1/ + /3 width=1/ + | #X #H #HT1 + elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct + lapply (cprs_lift (L.ⓓV0) … HV12 … HV13 … HV34) -V3 /2 width=1/ #HV24 + @(cprs_trans … (ⓓV.ⓐV2.ⓓV5.T5)) [ /3 width=1/ ] -T + @(cprs_strap2 … (ⓐV1.ⓓV0.T0)) [ /5 width=3/ ] -V -V5 -T5 + @(cprs_strap2 … (ⓓV0.ⓐV2.T0)) [ /3 width=3/ ] -V1 /3 width=9/ + ] ] qed-. -*) + lemma cprs_fwd_tau: ∀L,W,T,U. L ⊢ ⓣW. T ➡* U → ⓣW. T ≃ U ∨ L ⊢ T ➡* U. #L #W #T #U #H diff --git a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma index 220f8a648..fdbc9458f 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/reducibility/cpr.ma @@ -32,7 +32,7 @@ lemma cpr_intro: ∀L,T1,T,T2,d,e. T1 ➡ T → L ⊢ T [d, e] ▶* T2 → L ⊢ /4 width=3/ qed-. (* Basic_1: was by definition: pr2_free *) -lemma cpr_pr: ∀T1,T2. T1 ➡ T2 → ∀L. L ⊢ T1 ➡ T2. +lemma cpr_tpr: ∀T1,T2. T1 ➡ T2 → ∀L. L ⊢ T1 ➡ T2. /2 width=3/ qed. lemma cpr_tpss: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ▶* T2 → L ⊢ T1 ➡ T2.