From 0fc60a39857b0225b4888d5bd991c7790231eb44 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Mon, 18 Feb 2013 19:40:13 +0000 Subject: [PATCH] substitution lemma for stratified native validity! --- .../lambdadelta/basic_2/computation/cprs.ma | 5 ++ .../basic_2/computation/cprs_lfpr.ma | 2 +- .../basic_2/computation/cprs_ltpss_dx.ma | 52 +++++++++++ .../basic_2/computation/cprs_ltpss_sn.ma | 34 ++++++++ .../basic_2/computation/cprs_tpss.ma | 38 ++++++++ .../basic_2/computation/dxprs_ltpss_dx.ma | 50 +++++++++++ .../basic_2/computation/dxprs_ltpss_sn.ma | 34 ++++++++ .../dynamic/{snv_ltpr_2.ma => snv_fpr.ma} | 4 +- .../{snv_ltpr_1.ma => snv_fpr_ssta.ma} | 57 +++++++++++- .../lambdadelta/basic_2/dynamic/snv_fprs.ma | 48 ++++++++++ .../basic_2/dynamic/snv_ltpss_dx.ma | 87 +++++++++++++++++++ .../basic_2/dynamic/snv_ltpss_sn.ma | 28 ++++++ .../lambdadelta/basic_2/equivalence/cpcs.ma | 15 +++- .../basic_2/equivalence/cpcs_ltpss_dx.ma | 50 +++++++++++ .../{cpcs_ltpss.ma => cpcs_ltpss_sn.ma} | 32 ++----- .../basic_2/reducibility/cfpr_cpr.ma | 3 +- .../basic_2/reducibility/cfpr_ltpss.ma | 2 +- .../basic_2/reducibility/cpr_ltpss_dx.ma | 28 ++++++ .../{cpr_ltpss.ma => cpr_ltpss_sn.ma} | 12 ++- .../basic_2/reducibility/cpr_tpss.ma | 19 ++-- 20 files changed, 561 insertions(+), 39 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma rename matita/matita/contribs/lambdadelta/basic_2/dynamic/{snv_ltpr_2.ma => snv_fpr.ma} (97%) rename matita/matita/contribs/lambdadelta/basic_2/dynamic/{snv_ltpr_1.ma => snv_fpr_ssta.ma} (69%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma rename matita/matita/contribs/lambdadelta/basic_2/equivalence/{cpcs_ltpss.ma => cpcs_ltpss_sn.ma} (55%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_dx.ma rename matita/matita/contribs/lambdadelta/basic_2/reducibility/{cpr_ltpss.ma => cpr_ltpss_sn.ma} (73%) diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma index ae0c1ae62..40608cf5c 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs.ma @@ -69,6 +69,11 @@ lemma cprs_flat_dx: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L ⊢ T1 ➡* T2 @(cprs_strap1 … IHT2) -IHT2 /2 width=1/ qed. +lemma tpss_cprs: ∀L,T1,T2,d,e. L ⊢ T1 ▶*[d, e] T2 → L ⊢ T1 ➡* T2. +#L #T1 #T2 #d #e #HT12 +lapply (cpr_intro … T1 … HT12) // /2 width=1/ +qed. + (* Basic_1: was: pr3_pr1 *) lemma tprs_cprs: ∀T1,T2. T1 ➡* T2 → ∀L. L ⊢ T1 ➡* T2. #T1 #T2 #H @(tprs_ind … H) -T2 /2 width=1/ /3 width=3/ diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma index 1ba4cadd8..799ec7bc6 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfpr.ma @@ -13,7 +13,7 @@ (**************************************************************************) include "basic_2/reducibility/ltpr_tps.ma". -include "basic_2/reducibility/cpr_ltpss.ma". +include "basic_2/reducibility/cpr_ltpss_sn.ma". include "basic_2/reducibility/lfpr.ma". include "basic_2/computation/cprs.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma new file mode 100644 index 000000000..7f8618007 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_dx.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/reducibility/cpr_ltpss_dx.ma". +include "basic_2/computation/cprs_tpss.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Properties concerning dx partial unfold on local environments ************) + +lemma cprs_ltpss_dx_conf: ∀L1,T,U1. L1 ⊢ T ➡* U1 → + ∀L2,d,e. L1 ▶* [d, e] L2 → + ∃∃U2. L2 ⊢ T ➡* U2 & L2 ⊢ U1 ▶* [d, e] U2. +#L1 #T #U1 #H @(cprs_ind … H) -U1 /2 width=3/ +#T1 #U1 #_ #HTU1 #IHT1 #L2 #d #e #HL12 +elim (IHT1 … HL12) -IHT1 #U #HTU #HT1U +elim (ltpss_dx_cpr_conf … HTU1 … HL12) -L1 #U0 #HT1U0 #HU10 +elim (cpr_tpss_conf … HT1U0 … HT1U) -T1 #U2 #HU02 #HU2 +lapply (tpss_trans_eq … HU10 HU02) -U0 /3 width=3/ +qed-. + +lemma cprs_ltpss_dx_tpss_conf: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → + ∀L2,d,e. L1 ▶* [d, e] L2 → + ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → + ∃∃U2. L2 ⊢ T2 ➡* U2 & L2 ⊢ U1 ▶* [d, e] U2. +#L1 #T1 #U1 #HTU1 #L2 #d #e #HL12 #T2 #HT12 +elim (cprs_ltpss_dx_conf … HTU1 … HL12) -L1 #U #HT1U #HU1 +elim (cprs_tpss_conf … HT1U … HT12) -T1 #T #HUT #HT2 +lapply (tpss_trans_eq … HU1 HUT) -U /2 width=3/ +qed-. + +lemma cprs_ltpss_dx_tpss2_conf: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → + ∀L2,d,e. L1 ▶* [d, e] L2 → + ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → + ∀U2. L2 ⊢ U1 ▶* [d, e] U2 → + ∃∃U. L2 ⊢ T2 ➡* U & L2 ⊢ U2 ▶* [d, e] U. +#L1 #T1 #U1 #HTU1 #L2 #d #e #HL12 #T2 #HT12 #U2 #HU12 +elim (cprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -L1 -T1 #U #HT2U #HU1 +elim (tpss_conf_eq … HU12 … HU1) -U1 #U0 #HU20 #HU0 +lapply (cprs_tpss_trans … HT2U … HU0) -U /2 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma new file mode 100644 index 000000000..32009d11d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_ltpss_sn.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/unfold/ltpss_sn_alt.ma". +include "basic_2/computation/cprs_ltpss_dx.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Properties concerning sn partial unfold on local environments ************) + +lemma cprs_ltpss_sn_conf: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → + ∀T,U1. L1 ⊢ T ➡* U1 → + ∃∃U2. L2 ⊢ T ➡* U2 & L1 ⊢ U1 ▶* [d, e] U2. +#L1 #L2 #d #e #H +lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 /2 width=3/ +#L #L2 #HL1 #HL2 #IHL1 #T #U1 #HTU1 +lapply (ltpssa_ltpss_sn … HL1) -HL1 #HL1 +lapply (ltpss_sn_dx_trans_eq … HL1 … HL2) -HL1 #HL12 +elim (IHL1 … HTU1) -IHL1 -HTU1 #U #HTU #HU1 +elim (cprs_ltpss_dx_conf … HTU … HL2) -HTU -HL2 #U2 #HTU2 #HU2 +lapply (ltpss_sn_tpss_trans_eq … HU2 … HL12) -HU2 -HL12 #HU2 +lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma new file mode 100644 index 000000000..0c575ae02 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/cprs_tpss.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/reducibility/cpr_tpss.ma". +include "basic_2/computation/cprs.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Properties on partial unfold for terms ***********************************) + +lemma cprs_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡* T → + ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡* T2. +#L #T1 #T #H @(cprs_ind … H) -T /2 width=3/ /3 width=5/ +qed. + +lemma cprs_tps_trans: ∀L,T1,T. L ⊢ T1 ➡* T → + ∀T2,d,e. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ➡* T2. +/3 width=5 by inj, cprs_tpss_trans/ qed. (**) (* auto too slow without trace *) + +lemma cprs_tpss_conf: ∀L,T0,T1. L ⊢ T0 ➡* T1 → + ∀T2,d,e. L ⊢ T0 ▶* [d, e] T2 → + ∃∃T. L ⊢ T1 ▶* [d, e] T & L ⊢ T2 ➡* T. +#L #T0 #T1 #H @(cprs_ind … H) -T1 /2 width=3/ +#T #T1 #_ #HT1 #IHT0 #T2 #d #e #HT02 +elim (IHT0 … HT02) -T0 #T0 #HT0 #HT20 +elim (cpr_tpss_conf … HT1 … HT0) -T /3 width=5/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma new file mode 100644 index 000000000..8e3260dd4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_dx.ma @@ -0,0 +1,50 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/unwind/sstas_ltpss_dx.ma". +include "basic_2/computation/cprs_ltpss_dx.ma". +include "basic_2/computation/dxprs.ma". + +(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************) + +(* Properties about dx parallel unfold **************************************) + +lemma dxprs_ltpss_dx_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*➡*[g] U1 → + ∀L2,d,e. L1 ▶* [d, e] L2 → + ∃∃U2. ⦃h, L2⦄ ⊢ T •*➡*[g] U2 & L2 ⊢ U1 ▶* [d, e] U2. +#h #g #L1 #T #U1 * #U #HTU #HU1 #L2 #d #e #HL12 +elim (sstas_ltpss_dx_conf … HTU … HL12) -HTU #U0 #HTU0 #HU0 +elim (cprs_ltpss_dx_conf … HU1 … HL12) -L1 #U2 #HU2 #HU12 +elim (cprs_tpss_conf … HU2 … HU0) -U #U #HU2 #HU0 +lapply (tpss_trans_eq … HU12 HU2) -U2 /3 width=3/ +qed-. + +lemma dxprs_tpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*➡*[g] U1 → + ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → + ∃∃U2. ⦃h, L⦄ ⊢ T2 •*➡*[g] U2 & L ⊢ U1 ▶* [d, e] U2. +#h #g #L #T1 #U1 * #W1 #HTW1 #HWU1 #T2 #d #e #HT12 +elim (sstas_tpss_conf … HTW1 … HT12) -T1 #W2 #HTW2 #HW12 +elim (cprs_tpss_conf … HWU1 … HW12) -W1 /3 width=3/ +qed-. + +lemma dxprs_ltpss_dx_tpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 → + ∀L2,d,e. L1 ▶* [d, e] L2 → + ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 & + L2 ⊢ U1 ▶* [d, e] U2. +#h #g #L1 #T1 #U1 #HTU1 #L2 #d #e #HL12 #T2 #HT12 +elim (dxprs_ltpss_dx_conf … HTU1 … HL12) -L1 #U #HT1U #HU1 +elim (dxprs_tpss_conf … HT1U … HT12) -T1 #U2 #HTU2 #HU2 +lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma new file mode 100644 index 000000000..553e4658b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/computation/dxprs_ltpss_sn.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/unfold/ltpss_sn_alt.ma". +include "basic_2/computation/dxprs_ltpss_dx.ma". + +(* DECOMPOSED EXTENDED PARALLEL COMPUTATION ON TERMS ************************) + +(* Properties about sn parallel unfold **************************************) + +lemma dxprs_ltpss_sn_conf: ∀h,g,L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → + ∀T,U1. ⦃h, L1⦄ ⊢ T •*➡*[g] U1 → + ∃∃U2. ⦃h, L2⦄ ⊢ T •*➡*[g] U2 & L1 ⊢ U1 ▶* [d, e] U2. +#h #g #L1 #L2 #d #e #H +lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 [ /2 width=3/ ] +#L #L2 #HL1 #HL2 #IHL1 #T #U1 #HTU1 +lapply (ltpssa_ltpss_sn … HL1) -HL1 #HL1 +lapply (ltpss_sn_dx_trans_eq … HL1 … HL2) -HL1 #HL12 +elim (IHL1 … HTU1) -IHL1 -HTU1 #U #HTU #HU1 +elim (dxprs_ltpss_dx_conf … HTU … HL2) -HTU -HL2 #U2 #HTU2 #HU2 +lapply (ltpss_sn_tpss_trans_eq … HU2 … HL12) -HU2 -HL12 #HU2 +lapply (tpss_trans_eq … HU1 HU2) -U /2 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_2.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr.ma similarity index 97% rename from matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_2.ma rename to matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr.ma index 3a6ee2e96..a4aca4b61 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_2.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr.ma @@ -12,12 +12,12 @@ (* *) (**************************************************************************) -include "basic_2/dynamic/snv_ltpr_1.ma". include "basic_2/dynamic/snv_lift.ma". +include "basic_2/dynamic/snv_fpr_ssta.ma". (* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) -(* Properties on context-free parallel reduction for local environments *****) +(* Properties on context-free parallel reduction for closures ***************) fact snv_ltpr_tpr_aux: ∀h,g,n. ( ∀L1,T1. ♯{L1, T1} < n → diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_1.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr_ssta.ma similarity index 69% rename from matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_1.ma rename to matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr_ssta.ma index 4beecd835..028ca6292 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpr_1.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fpr_ssta.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/static/ssta_ltpss_dx.ma". +include "basic_2/static/ssta_ltpss_sn.ma". include "basic_2/computation/dxprs_lift.ma". include "basic_2/equivalence/lsubse_ssta.ma". include "basic_2/equivalence/fpcs_cpcs.ma". @@ -21,7 +21,7 @@ include "basic_2/dynamic/snv_ssta.ma". (* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) -(* Properties on context-free parallel reduction for local environments *****) +(* Properties on context-free parallel reduction for closures ***************) fact ssta_ltpr_tpr_aux: ∀h,g,n. ( ∀L,T2. ♯{L,T2} < n → @@ -134,3 +134,56 @@ fact ssta_ltpr_tpr_aux: ∀h,g,n. ( ] ] qed-. + +fact ssta_ltpr_cpr_aux: ∀h,g,n. ( + ∀L,T2. ♯{L,T2} < n → + ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] → + ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 → + ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 → + L ⊢ U1 ⬌* U2 ∧ l1 = l2 + ) → ( + ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] → + ∀U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U → ⦃h, L⦄ ⊩ U :[g] + ) → ( + ∀L1,T1. ♯{L1,T1} < n → + ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 → + ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄ + ) → + ∀L1,T1. ♯{L1,T1} = n → + ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 → + ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡ T2 → ⦃h, L1⦄ ⊩ T1 :[g] → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄. +#h #g #n #IH3 #IH2 #IH1 #L1 #T1 #Hn #U1 #l #HTU1 #L2 #HL12 #T2 * #T0 #HT10 #HT02 #HT1 +elim (ssta_ltpr_tpr_aux … IH3 IH2 … Hn … HTU1 … HL12 … HT10 HT1) +-T1 -IH3 -IH2 -HL12 [2: /3 width=5/ ] -n #U0 #HTU0 #HU10 +elim (ssta_tpss_conf … HTU0 … HT02) -T0 #U2 #HTU2 #HU02 +lapply (fpcs_fpr_strap1 … HU10 L2 U2 ?) -HU10 /2 width=3/ -HTU2 /3 width=3/ +qed-. + +fact ssta_fpr_aux: ∀h,g,n. ( + ∀L,T2. ♯{L,T2} < n → + ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] → + ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 → + ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 → + L ⊢ U1 ⬌* U2 ∧ l1 = l2 + ) → ( + ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] → + ∀U,l. ⦃h, L⦄ ⊢ T •[g, l + 1] U → ⦃h, L⦄ ⊩ U :[g] + ) → ( + ∀L1,T1. ♯{L1,T1} < n → + ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 → + ∀L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃h, L1⦄ ⊩ T1 :[g] → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄ + ) → + ∀L1,T1. ♯{L1,T1} = n → + ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 → + ∀L2,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃h, L1⦄ ⊩ T1 :[g] → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄. +#h #g #n #IH3 #IH2 #IH1 #L1 #T1 #Hn #U1 #l #HTU1 #L2 #T2 #H12 #HT1 +elim (fpr_inv_all … H12) -H12 #L #HL1 #HT12 #HL2 +elim (ssta_ltpr_cpr_aux … IH3 IH2 … Hn … HTU1 … HL1 … HT12 HT1) +-T1 -IH3 -IH2 -HL1 [2: /3 width=5/ ] -n #U #HTU #HU1 +elim (ssta_ltpss_sn_conf … HTU … HL2) -HTU #U2 #HTU2 #HU2 +lapply (fpcs_fpr_strap1 … HU1 L2 U2 ?) -HU1 /2 width=3/ -HTU2 /3 width=4/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma new file mode 100644 index 000000000..f0e0bb8f7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_fprs.ma @@ -0,0 +1,48 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/dynamic/snv_fpr.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on context-free parallel computation for closures *************) + +fact ssta_fprs_aux: ∀h,g,n. ( + ∀L,T2. ♯{L,T2} < n → + ∀T1. L ⊢ T1 ⬌* T2 → ⦃h, L⦄ ⊩ T1 :[g] → ⦃h, L⦄ ⊩ T2 :[g] → + ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g, l1] U1 → + ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g, l2] U2 → + L ⊢ U1 ⬌* U2 ∧ l1 = l2 + ) → ( + ∀L,T. ♯{L,T} < n → ⦃h, L⦄ ⊩ T :[g] → + ∀U. ⦃h, L⦄ ⊢ T •*➡*[g] U → ⦃h, L⦄ ⊩ U :[g] + ) → ( + ∀L1,T1. ♯{L1,T1} < n → + ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 → + ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → ⦃h, L1⦄ ⊩ T1 :[g] → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄ + ) → + ∀L1,T1. ♯{L1,T1} = n → + ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g, l] U1 → + ∀L2,T2. ⦃L1, T1⦄ ➡* ⦃L2, T2⦄ → ⦃h, L1⦄ ⊩ T1 :[g] → + ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g, l] U2 & ⦃L1, U1⦄ ⬌* ⦃L2, U2⦄. +#h #g #n #IH3 #IH2 #IH1 #L1 #T1 #Hn #U1 #l #HTU1 #L2 #T2 #H12 #HT1 +@(fprs_ind … H12) -L2 -T2 [-IH1 /2 width=3/ ] (**) (* auto fails without -IH1 *) +#L #L2 #T #T2 #HT1 #HT2 * #U #HTU #HU1 +(* +lapply (IH2 … + +elim (ssta_fpr_aux … IH3 … Hn … HTU1 … HT2 HT1) +-T1 -IH3 -IH2 -HL1 [2: /3 width=5/ ] -n #U #HTU #HU1 +*) \ No newline at end of file diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma new file mode 100644 index 000000000..7a31a714d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_dx.ma @@ -0,0 +1,87 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/computation/dxprs_ltpss_dx.ma". +include "basic_2/equivalence/cpcs_ltpss_dx.ma". +include "basic_2/dynamic/snv_lift.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties about dx parallel unfold **************************************) + +lemma snv_ltpss_dx_tpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊩ T1 :[g] → + ∀L2,d,e. L1 ▶* [d, e] L2 → + ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊩ T2 :[g]. +#h #g #L1 #T1 #H elim H -L1 -T1 +[ #L1 #k #L2 #d #e #_ #X #H + >(tpss_inv_sort1 … H) -X // +| #I #L1 #K1 #V1 #i #HLK1 #HV1 #IHV1 #L2 #d #e #HL12 #X #H + elim (tpss_inv_lref1 … H) -H + [ #H destruct + elim (lt_or_ge i d) #Hdi [ | elim (lt_or_ge i (d + e)) #Hide ] + [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 …) -L1 /2 width=2/ #X #H #HLK2 + elim (ltpss_dx_inv_tpss11 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct + lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/ + | elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H #HLK2 + elim (ltpss_dx_inv_tpss21 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct + lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/ + | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=5/ + ] + | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2 + elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H1 #H2 + elim (ltpss_dx_inv_tpss21 … H1 …) -H1 /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct + lapply (ldrop_mono … H2 … HLK2) -H2 #H destruct + lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2 + lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2 + lapply (IHV1 … HK12 … HV1W2) -IHV1 -HK12 -HV1W2 /2 width=7/ + ] +| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H + elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + lapply (IHV1 … HL12 … HV12) -IHV1 #HV2 + lapply (IHT1 … HT12) -IHT1 -HT12 /2 width=1/ +| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #L2 #d #e #HL12 #X #H + elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + lapply (IHV1 … HL12 … HV12) -IHV1 #HV2 + lapply (IHT1 … HT12) -IHT1 /2 width=1/ #HT2 + elim (ssta_ltpss_dx_tpss_conf … HVW1 … HL12 … HV12) -V1 #W2 #HVW2 #HW12 + elim (dxprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #X #HTU2 #H + elim (tpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct + elim (cprs_ltpss_dx_tpss2_conf … HW10 … HL12 … HW12 … HW0) -L1 -W1 -W0 #W0 #HW20 #HW0 + lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/ +| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #L2 #d #e #HL12 #X #H + elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct + lapply (IHW1 … HL12 … HW12) -IHW1 #HW2 + lapply (IHT1 … HL12 … HT12) -IHT1 #HT2 + elim (ssta_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #U2 #HTU2 #HU12 + lapply (cpcs_ltpss_dx_tpss2_conf … HL12 … HUW1 … HU12 … HW12) -L1 -W1 -U1 /2 width=4/ +] +qed-. + +lemma snv_ltpss_dx_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊩ T :[g] → + ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊩ T :[g]. +#h #g #L1 #T #HT #L2 #d #e #HL12 +@(snv_ltpss_dx_tpss_conf … HT … HL12) // +qed-. + +lemma snv_tpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊩ T1 :[g] → + ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊩ T2 :[g]. +#h #g #L #T1 #HT1 #T2 #d #e #HT12 +@(snv_ltpss_dx_tpss_conf … HT1 … HT12) // +qed-. + +lemma snv_tps_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊩ T1 :[g] → + ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊩ T2 :[g]. +#h #g #L #T1 #HT1 #T2 #d #e #HT12 +@(snv_tpss_conf … HT1 T2) /2 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma new file mode 100644 index 000000000..8c4c81c34 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_ltpss_sn.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/dynamic/snv_ltpss_dx.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties about sn parallel unfold **************************************) + +lemma snv_ltpss_sn_conf: ∀h,g,L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → + ∀T. ⦃h, L1⦄ ⊩ T :[g] → ⦃h, L2⦄ ⊩ T :[g]. +#h #g #L1 #L2 #d #e #H +lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 // +#L #L2 #_ #HL2 #IHL1 #T1 #HT1 +lapply (IHL1 … HT1) -IHL1 -HT1 #HT1 +lapply (snv_ltpss_dx_conf … HT1 … HL2) -HT1 -HL2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma index 9d9ceb942..a979b7bae 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma @@ -84,11 +84,24 @@ lemma cpr_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 lemma cpcs_cpr_conf: ∀L,T1,T. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2. /3 width=3/ qed. +lemma cpcs_tpss_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → + ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ⬌* T2. +#L #T1 #T #HT1 #T2 #d #e #HT2 +@(cpcs_cpr_strap1 … HT1) -T1 /2 width=3/ +qed-. + +lemma cpcs_tpss_conf: ∀L,T,T1,d,e. L ⊢ T ▶* [d, e] T1 → + ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2. +#L #T #T1 #d #e #HT1 #T2 #HT2 +@(cpcs_cpr_conf … HT2) -T2 /2 width=3/ +qed-. + (* Basic_1: removed theorems 9: clear_pc3_trans pc3_ind_left pc3_head_1 pc3_head_2 pc3_head_12 pc3_head_21 pc3_pr2_fsubst0 pc3_pr2_fsubst0_back pc3_fsubst0 - Basic_1: removed local theorems 6: +*) +(* Basic_1: removed local theorems 6: pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left pc3_wcpr0_t_aux *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma new file mode 100644 index 000000000..80f418b08 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_dx.ma @@ -0,0 +1,50 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/computation/cprs_ltpss_dx.ma". +include "basic_2/equivalence/cpcs_cpcs.ma". + +(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************) + +(* Properties concerning dx partial unfold on local environments ************) + +lemma cpcs_ltpss_dx_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → + ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2. +#L1 #L2 #d #e #HL12 #T1 #T2 #H +elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2 +elim (cprs_ltpss_dx_conf … HT1 … HL12) -HT1 #U1 #HTU1 #H1 +elim (cprs_ltpss_dx_conf … HT2 … HL12) -L1 #U2 #HTU2 #H2 +elim (tpss_conf_eq … H1 … H2) -T #U #HU1 #HU2 +lapply (cprs_tpss_trans … HTU1 … HU1) -U1 +lapply (cprs_tpss_trans … HTU2 … HU2) -U2 /2 width=3/ +qed-. + +lemma cpcs_ltpss_dx_tpss_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → + ∀T,T2. L1 ⊢ T ⬌* T2 → + ∀T1. L2 ⊢ T ▶* [d, e] T1 → + L2 ⊢ T1 ⬌* T2. +#L1 #L2 #d #e #HL12 #T #T2 #HT2 #T1 #HT1 +lapply (cpcs_ltpss_dx_conf … HL12 … HT2) -L1 #HT2 +lapply (cpcs_tpss_conf … HT1 … HT2) -T // +qed-. + +lemma cpcs_ltpss_dx_tpss2_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → + ∀T1,T2. L1 ⊢ T1 ⬌* T2 → + ∀T3. L2 ⊢ T1 ▶* [d, e] T3 → + ∀T4. L2 ⊢ T2 ▶* [d, e] T4 → + L2 ⊢ T3 ⬌* T4. +#L1 #L2 #d #e #HL12 #T1 #T2 #HT12 #T3 #HT13 #T4 #HT24 +lapply (cpcs_ltpss_dx_tpss_conf … HL12 … HT12 … HT13) -L1 -T1 #HT32 +lapply (cpcs_tpss_strap1 … HT32 … HT24) -T2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_sn.ma similarity index 55% rename from matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma rename to matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_sn.ma index 43385668b..5bf1ed57f 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs_ltpss_sn.ma @@ -12,31 +12,17 @@ (* *) (**************************************************************************) -include "basic_2/equivalence/cpcs_cpcs.ma". +include "basic_2/equivalence/cpcs_ltpss_dx.ma". (* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************) -(* Properties concerning partial unfold on local environments ***************) +(* Properties concerning sn partial unfold on local environments ************) -lemma ltpss_dx_cpr_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → - ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2. -#L1 #L2 #d #e #HL12 #T1 #T2 * -lapply (ltpss_dx_weak_all … HL12) ->(ltpss_dx_fwd_length … HL12) -HL12 #HL12 #T #HT1 #HT2 -elim (ltpss_dx_tpss_conf … HT2 … HL12) -L1 #T0 #HT0 #HT20 -@(cprs_div … T0) /3 width=3/ (**) (* /4/ is too slow *) -qed. - -lemma ltpss_dx_cprs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → - ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2. -#L1 #L2 #d #e #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 // -#T #T2 #_ #HT2 #IHT1 -@(cpcs_trans … IHT1) -T1 /2 width=5/ -qed. - -lemma ltpss_dx_cpcs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 → +lemma cpcs_ltpss_sn_conf: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2. -#L1 #L2 #d #e #HL12 #T1 #T2 #H -elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2 -@(cpcs_canc_dx … T) /2 width=5/ -qed. +#L1 #L2 #d #e #H +lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 // +#L #L2 #_ #HL2 #IHL1 #T1 #U1 #HTU1 +lapply (IHL1 … HTU1) -IHL1 -HTU1 #HTU1 +lapply (cpcs_ltpss_dx_conf … HL2 … HTU1) -HTU1 -HL2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma index b5ea1b77e..a1e20a025 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr_cpr.ma @@ -12,7 +12,6 @@ (* *) (**************************************************************************) -include "basic_2/unfold/ltpss_sn_alt.ma". include "basic_2/reducibility/cpr_tpss.ma". include "basic_2/reducibility/cpr_cpr.ma". include "basic_2/reducibility/cfpr_ltpss.ma". @@ -30,7 +29,7 @@ lemma fpr_all: ∀L1,L. L1 ➡ L → ∀L2,T1,T2. L ⊢ T1 ➡ T2 → | #I #L1 #L #V1 #V #_ #HV1 #IH #X #T1 #T2 #HT12 #H elim (ltpss_sn_inv_tpss21 … H ?) -H // H in HU1; -H #HU1 +elim (ltpss_dx_tpss_conf … HU1 … HL12) -L1 /3 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_sn.ma similarity index 73% rename from matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma rename to matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_sn.ma index b728d9dc2..49ec47f77 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_ltpss_sn.ma @@ -12,12 +12,12 @@ (* *) (**************************************************************************) -include "basic_2/unfold/ltpss_sn_ltpss_sn.ma". +include "basic_2/unfold/ltpss_sn_alt.ma". include "basic_2/reducibility/cpr.ma". (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************) -(* Properties concerning partial unfold on local environments ***************) +(* Properties concerning sn partial unfold on local environments ************) lemma ltpss_sn_cpr_trans: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡ T2. @@ -25,3 +25,11 @@ lemma ltpss_sn_cpr_trans: ∀L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 → lapply (ltpss_sn_weak_all … HL12) <(ltpss_sn_fwd_length … HL12) -HL12 /3 width=5/ qed. + +lemma ltpss_sn_cpr_conf: ∀L1,T,U1. L1 ⊢ T ➡ U1 → + ∀L2,d,e. L1 ⊢ ▶* [d, e] L2 → + ∃∃U2. L2 ⊢ T ➡ U2 & L1 ⊢ U1 ▶* [d, e] U2. +#L1 #T #U1 * #U #HTU #HU1 #L2 #d #e #HL12 +lapply (ltpss_sn_fwd_length … HL12) #H >H in HU1; -H #HU1 +elim (ltpss_sn_tpss_conf … HU1 … HL12) -HU1 -HL12 /3 width=3/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma index e5afe8737..fc4f2b8c5 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/reducibility/cpr_tpss.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "basic_2/unfold/tpss_tpss.ma". +include "basic_2/reducibility/tpr_tpss.ma". include "basic_2/reducibility/cpr.ma". (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************) @@ -20,11 +20,20 @@ include "basic_2/reducibility/cpr.ma". (* Properties on partial unfold for terms ***********************************) lemma cpr_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡ T → - ∀T2. L ⊢ T ▶* [O, |L|] T2 → L ⊢ T1 ➡ T2. -#L #T1 #T * #T0 #HT10 #HT0 #T2 #HT2 + ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡ T2. +#L #T1 #T * #T0 #HT10 #HT0 #T2 #d #e #HT2 +lapply (tpss_weak_all … HT2) -HT2 #HT2 lapply (tpss_trans_eq … HT0 HT2) -T /2 width=3/ qed. lemma cpr_tps_trans: ∀L,T1,T. L ⊢ T1 ➡ T → - ∀T2. L ⊢ T ▶ [O, |L|] T2 → L ⊢ T1 ➡ T2. -/3 width=3/ qed. + ∀T2,d,e. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ➡ T2. +/3 width=5/ qed. + +lemma cpr_tpss_conf: ∀L,T0,T1. L ⊢ T0 ➡ T1 → + ∀T2,d,e. L ⊢ T0 ▶* [d, e] T2 → + ∃∃T. L ⊢ T1 ▶* [d, e] T & L ⊢ T2 ➡ T. +#L #T0 #T1 * #U0 #HTU0 #HU0T1 #T2 #d #e #HT02 +elim (tpr_tpss_conf … HTU0 … HT02) -T0 #T0 #HT20 #HUT0 +elim (tpss_conf_eq … HU0T1 … HUT0) -U0 /3 width=5/ +qed-. -- 2.39.2