From 30300931770211efb6bf03785f98b4ff21353c40 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Mon, 12 Mar 2012 17:05:13 +0000 Subject: [PATCH] - Properties S3 and S5 of context-sensitive strongly normalizing terms proved! - more properties of context-sensitive computation --- .../contribs/lambda_delta/basic_2/basic_1.txt | 8 -- .../basic_2/computation/cprs_tstc_vector.ma | 100 +++++++++++++----- .../lambda_delta/basic_2/computation/csn.ma | 5 +- .../basic_2/computation/csn_lcpr.ma | 1 - .../basic_2/computation/csn_lcpr_vector.ma | 22 +++- 5 files changed, 99 insertions(+), 37 deletions(-) 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 42357fb88..b360bb20d 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt +++ b/matita/matita/contribs/lambda_delta/basic_2/basic_1.txt @@ -254,8 +254,6 @@ pr2/subst1 pr2_gen_cabbr 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_appls_beta pr3/pr1 pr3_pr1 pr3/pr3 pr3_strip pr3/props pr3_thin_dx @@ -274,14 +272,8 @@ sn3/props sn3_gen_def sn3/props sn3_cdelta sn3/props sn3_appl_lref sn3/props sn3_appl_abbr -sn3/props sn3_appl_cast -sn3/props sn3_appl_beta sn3/props sn3_appl_appls sn3/props sn3_appls_lref -sn3/props sn3_appls_cast -sn3/props sn3_appls_bind -sn3/props sn3_appls_beta -sn3/props sn3_appls_abbr sn3/props sns3_lifts sty0/fwd sty0_gen_sort diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma index 2d6362045..4b65a08df 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/cprs_tstc_vector.ma @@ -19,27 +19,79 @@ include "basic_2/computation/cprs_tstc.ma". (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) (* Vector form of forward lemmas involving same top term constructor ********) -(* -lemma cpr_fwd_beta_vector: ∀L,V,W,T,U,Vs. L ⊢ ⒶVs. ⓐV. ⓛW. T ➡ U → - ⒶVs. ⓐV. ⓛW. T ≃ U ∨ L ⊢ ⒶVs. ⓓV. T ➡* U. -#L #V #W #T #U * /2 width=1 by cpr_fwd_beta/ -#V0 #Vs #H -elim (cpr_inv_appl1_simple … H ?) -H -[ #V1 #T1 #_ #_ #H destruct /2 width=1/ -| elim Vs -Vs // + +(* Basic_1: was: pr3_iso_appls_beta *) +lemma cprs_fwd_beta_vector: ∀L,Vs,V,W,T,U. L ⊢ ⒶVs. ⓐV. ⓛW. T ➡* U → + ⒶVs. ⓐV. ⓛW. T ≃ U ∨ L ⊢ ⒶVs. ⓓV. T ➡* U. +#L #Vs elim Vs -Vs /2 width=1 by cprs_fwd_beta/ +#V0 #Vs #IHVs #V #W #T #U #H +elim (cprs_inv_appl1 … H) -H * +[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1/ +| #V1 #W1 #T1 #HV01 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tstc_inv_bind_appls_simple … HT1 ?) // + | @or_intror -W (**) (* explicit constructor *) + @(cprs_trans … HU) -U + @(cprs_strap1 … (ⓐV1.ⓛW1.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=1/ + ] +| #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tstc_inv_bind_appls_simple … HT1 ?) // + | @or_intror -W (**) (* explicit constructor *) + @(cprs_trans … HU) -U + @(cprs_strap1 … (ⓐV1.ⓓV3.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=3/ + ] ] qed-. -lemma cpr_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s → - ∀V,T,U. L ⊢ ⒶV1s. ⓓV. T ➡ U → - ⒶV1s. ⓓV. T ≃ U ∨ L ⊢ ⓓV. ⒶV2s. T ➡* U. +(* Basic_1: was: pr3_iso_appls_abbr *) +lemma cprs_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s → + ∀V,T,U. L ⊢ ⒶV1s. ⓓV. T ➡* U → + ⒶV1s. ⓓV. T ≃ U ∨ L ⊢ ⓓV. ⒶV2s. T ➡* U. #L #V1s #V2s * -V1s -V2s /3 width=1/ -#V1s #V2s #V1a #V2a #HV12a * -V1s -V2s /2 width=1 by cpr_fwd_theta/ -HV12a -#V1s #V2s #V1b #V2b #_ #_ #V #U #T #H -elim (cpr_inv_appl1_simple … H ?) -H // -#V0 #T0 #_ #_ #H destruct /2 width=1/ +#V1s #V2s #V1a #V2a #HV12a #HV12s +generalize in match HV12a; -HV12a +generalize in match V2a; -V2a +generalize in match V1a; -V1a +elim HV12s -V1s -V2s /2 width=1 by cprs_fwd_theta/ +#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H +elim (cprs_inv_appl1 … H) -H * +[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1/ +| #V0a #W0 #T0 #HV10a #HT0 #HU + elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0 + [ -HV12a -HV12b -HV10a -HU + elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct + | @or_intror -V1s (**) (* explicit constructor *) + @(cprs_trans … HU) -U + elim (cprs_inv_abbr1 … HT0) -HT0 * + [ -HV12a -HV12b -HV10a #V1 #T1 #_ #_ #H destruct + | -V1b #X #H #HT1 + elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct + @(cprs_trans … (ⓓV.ⓐV2a.ⓛW1.T1)) [ /3 width=1/ ] -T -V2b -V2s + @(cprs_strap2 … (ⓐV1a.ⓛW0.T0)) [ /5 width=3/ ] -V -V2a -W1 -T1 + @(cprs_strap2 … (ⓓV1a.T0)) [ /3 width=1/ ] -W0 /2 width=1/ + ] + ] +| #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU + elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0 + [ -HV12a -HV10a -HV0a -HU + elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct + | @or_intror -V1s -V1b (**) (* explicit constructor *) + @(cprs_trans … HU) -U + elim (cprs_inv_abbr1 … HT0) -HT0 * + [ #V1 #T1 #HV1 #HT1 #H destruct + lapply (cprs_lift (L.ⓓV) … HV12a … HV10a … HV0a) -V1a -V0a [ /2 width=1/ ] #HV2a + @(cprs_trans … (ⓓV.ⓐV2a.T1)) [ /3 width=1/ ] -T -V2b -V2s /3 width=1/ + | #X #H #HT1 + elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct + lapply (cprs_lift (L.ⓓV0) … HV12a … HV10a … HV0a) -V0a [ /2 width=1/ ] #HV2a + @(cprs_trans … (ⓓV.ⓐV2a.ⓓV1.T1)) [ /3 width=1/ ] -T -V2b -V2s + @(cprs_strap2 … (ⓐV1a.ⓓV0.T0)) [ /5 width=3/ ] -V -V1 -T1 + @(cprs_strap2 … (ⓓV0.ⓐV2a.T0)) [ /3 width=3/ ] -V1a /3 width=1/ + ] + ] +] qed-. -*) (* Basic_1: was: pr3_iso_appls_cast *) lemma cprs_fwd_tau_vector: ∀L,Vs,W,T,U. L ⊢ ⒶVs. ⓣW. T ➡* U → @@ -51,19 +103,15 @@ elim (cprs_inv_appl1 … H) -H * | #V0 #W0 #T0 #HV0 #HT0 #HU elim (IHVs … HT0) -IHVs -HT0 #HT0 [ elim (tstc_inv_bind_appls_simple … HT0 ?) // - | @or_intror - @(cprs_trans … HU) -HU - @(cprs_strap1 … (ⓐV0.ⓛW0.T0)) /2 width=1/ -HV0 -HT0 /3 width=1/ + | @or_intror -W (**) (* explicit constructor *) + @(cprs_trans … HU) -U + @(cprs_strap1 … (ⓐV0.ⓛW0.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=1/ ] | #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU elim (IHVs … HT0) -IHVs -HT0 #HT0 [ elim (tstc_inv_bind_appls_simple … HT0 ?) // - | @or_intror - @(cprs_trans … HU) -HU - @(cprs_strap1 … (ⓐV0.ⓓV2.T0)) /2 width=1/ -HV0 -HT0 /3 width=3/ + | @or_intror -W (**) (* explicit constructor *) + @(cprs_trans … HU) -U + @(cprs_strap1 … (ⓐV0.ⓓV2.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=3/ ] qed-. - -axiom cprs_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s → - ∀V,T,U. L ⊢ ⒶV1s. ⓓV. T ➡* U → - ⒶV1s. ⓓV. T ≃ U ∨ L ⊢ ⓓV. ⒶV2s. T ➡* U. diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma index 868e8c1d2..2890fb9b1 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/csn.ma @@ -82,4 +82,7 @@ qed. lemma csn_fwd_flat_dx: ∀I,L,V,T. L ⊢ ⬇* ⓕ{I} V. T → L ⊢ ⬇* T. /2 width=5/ qed-. -(* Basic_1: removed theorems 3: sn3_gen_cflat sn3_cflat sn3_bind *) +(* Basic_1: removed theorems 7: + sn3_gen_cflat sn3_cflat sn3_appl_cast sn3_appl_beta + sn3_bind sn3_appl_bind sn3_appls_bind +*) diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr.ma index 28b9245ca..c6024fce8 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr.ma @@ -113,7 +113,6 @@ elim (cpr_inv_appl1 … HL) -HL * ] qed. -(* Basic_1: was: sn3_appl_bind *) lemma csn_appl_theta: ∀V1,V2. ⇧[0, 1] V1 ≡ V2 → ∀L,V,T. L ⊢ ⬇* ⓓV. ⓐV2. T → L ⊢ ⬇* ⓐV1. ⓓV. T. /2 width=5/ qed. diff --git a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr_vector.ma b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr_vector.ma index fc8901950..c185ef2c6 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr_vector.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr_vector.ma @@ -34,6 +34,25 @@ lemma csn_appl_appls_simple_tstc: ∀L,Vs,V,T1. L ⊢ ⬇* V → L ⊢ ⬇* T1 ] qed. *) +(* Basic_1: was: sn3_appls_beta *) +lemma csn_applv_beta: ∀L,W. L ⊢ ⬇* W → + ∀Vs,V,T. L ⊢ ⬇* ⒶVs.ⓓV.T → + L ⊢ ⬇* ⒶVs. ⓐV.ⓛW. T. +#L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW +#V0 #Vs #IHV #V #T #H1T +lapply (csn_fwd_pair_sn … H1T) #HV0 +lapply (csn_fwd_flat_dx … H1T) #H2T +@csn_appl_simple_tstc // -HV0 /2 width=1/ -IHV -H2T +[ #X #H #H0 + elim (cprs_fwd_beta_vector … H) -H #H + [ -H1T elim (H0 ?) -H0 // + | -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/ + ] +| -H1T elim Vs -Vs // +] +qed. + +(* Basic_1: was: sn3_appls_abbr *) lemma csn_applv_theta: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s → ∀V,T. L ⊢ ⬇* ⓓV. ⒶV2s. T → L ⊢ ⬇* V → L ⊢ ⬇* ⒶV1s. ⓓV. T. @@ -52,6 +71,7 @@ elim (cprs_fwd_theta_vector … (V2::V2s) … H1) -H1 /2 width=1/ -HV12s -HV12 ] qed. +(* Basic_1: was: sn3_appls_cast *) lemma csn_applv_tau: ∀L,W. L ⊢ ⬇* W → ∀Vs,T. L ⊢ ⬇* ⒶVs. T → L ⊢ ⬇* ⒶVs. ⓣW. T. @@ -72,7 +92,7 @@ qed. theorem csn_acr: acr cpr (eq …) (csn …) (λL,T. L ⊢ ⬇* T). @mk_acr // [ -| +| /2 width=1/ | | #L #V1 #V2 #HV12 #V #T #H #HVT @(csn_applv_theta … HV12) -HV12 // -- 2.39.2