From b634a816745cf8a9a7ad14650d088232c8ee1a1a Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Thu, 26 Jul 2018 23:17:45 +0200 Subject: [PATCH] update in basic_2 and ground_2 + auxiliary lemmas for preservation begin + one addition in the arith library + some typos in names fixed --- .../lambdadelta/basic_2/dynamic/cnv_drops.ma | 2 +- .../lambdadelta/basic_2/dynamic/cnv_etc.ma | 74 +++++++++ .../lambdadelta/basic_2/dynamic/cnv_lpr.ma | 142 ++++++++++++++++++ .../lambdadelta/basic_2/dynamic/partial.txt | 1 + .../lambdadelta/basic_2/dynamic/snv_lpr.ma | 119 --------------- .../basic_2/etc/fpbs/fpbs_lfprs.etc | 3 - .../basic_2/rt_computation/cpms_fpbg.ma | 24 +++ .../basic_2/rt_computation/cpms_fpbs.ma | 24 +++ .../lambdadelta/basic_2/rt_transition/cpm.ma | 16 +- .../lambdadelta/basic_2/web/basic_2_src.tbl | 2 +- .../lambdadelta/ground_2/lib/arith.ma | 10 +- 11 files changed, 282 insertions(+), 135 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma delete mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lpr.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_drops.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_drops.ma index cebadeb67..c979465c3 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_drops.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_drops.ma @@ -52,7 +52,7 @@ qed-. (* Properties with generic slicing for local environments *******************) (* Basic_2A1: uses: snv_lift *) -lemma csv_lifts (a) (h): ∀G. d_liftable1 (cnv a h G). +lemma cnv_lifts (a) (h): ∀G. d_liftable1 (cnv a h G). #a #h #G #K #T @(fqup_wf_ind_eq (Ⓣ) … G K T) -G -K -T #G0 #K0 #T0 #IH #G #K * * [|||| * ] [ #s #HG #HK #HT #_ #b #f #L #_ #X #H2 destruct diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma new file mode 100644 index 000000000..c2e0809f8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_etc.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||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/rt_computation/fpbg.ma". +include "basic_2/rt_computation/cpms_fpbs.ma". +include "basic_2/dynamic/cnv.ma". + +(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) + +(* Inductive premises for the preservation results **************************) + +definition IH_cnv_cpm_trans_lpr (a) (h): relation3 genv lenv term ≝ + λG,L1,T1. ⦃G, L1⦄ ⊢ T1 ![a,h] → + ∀n,T2. ⦃G, L1⦄ ⊢ T1 ➡[n,h] T2 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L2⦄ ⊢ T2 ![a,h]. + +definition IH_cnv_cpms_trans_lpr (a) (h): relation3 genv lenv term ≝ + λG,L1,T1. ⦃G, L1⦄ ⊢ T1 ![a,h] → + ∀n,T2. ⦃G, L1⦄ ⊢ T1 ➡*[n,h] T2 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h] L2 → ⦃G, L2⦄ ⊢ T2 ![a,h]. + +definition IH_cnv_cpm_conf_lpr (a) (h): relation3 genv lenv term ≝ + λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] → + ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T. + +definition IH_cnv_cpms_strip_lpr (a) (h): relation3 genv lenv term ≝ + λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] → + ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡[n2,h] T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T. + +definition IH_cnv_cpms_conf_lpr (a) (h): relation3 genv lenv term ≝ + λG,L0,T0. ⦃G, L0⦄ ⊢ T0 ![a,h] → + ∀n1,T1. ⦃G, L0⦄ ⊢ T0 ➡*[n1,h] T1 → ∀n2,T2. ⦃G, L0⦄ ⊢ T0 ➡*[n2,h] T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h] L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[n2-n1,h] T & ⦃G, L2⦄ ⊢ T2 ➡*[n1-n2,h] T. + +(* Auxiliary properties for preservation ************************************) + +fact cnv_cpms_trans_lpr_aux (a) (h) (o): + ∀G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) → + ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_trans_lpr a h G1 L1 T1. +#a #h #o #G0 #L0 #T0 #IH #G1 #L1 #T1 #H01 #HT1 #n #T2 #H +@(cpms_ind_dx … H) -n -T2 +/4 width=7 by cpms_fwd_fpbs, fpbg_fpbs_trans/ +qed-. +(* +fact cnv_cpms_strip_lpr_aux (a) (h) (o): + ∀G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_conf_lpr a h G1 L1 T1) → + ∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_strip_lpr a h G1 L1 T1. +#a #h #o #G0 #L0 #T0 #IH0 #G #L #T #H0 #HT #n1 #T1 #H +generalize in match HT; generalize in match H0; -H0 -HT +@(cpms_ind_sn … H) -n1 -T [ /2 width=8 by/ ] +#n1 #n2 #T #X #HTX #HXT1 #IH #H0 #HT #n2 #T2 #HT2 #L1 #HL1 #L2 #HL2 +elim (IH0 … HTX … HT2 … HL1 … HL2) // -L -T #T0 #HXT0 #HT20 + + @(IH … 0 T … HT2 … HL1 … HL2) // -L -IH + #T0 #HT20 #HT0 +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma new file mode 100644 index 000000000..4a87a4c3d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpr.ma @@ -0,0 +1,142 @@ +(**************************************************************************) +(* ___ *) +(* ||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/rt_computation/cpms_fpbg.ma". +include "basic_2/rt_computation/cprs_cprs.ma". +include "basic_2/rt_computation/lprs_cpms.ma". +include "basic_2/dynamic/cnv_drops.ma". +(* +include "basic_2/dynamic/snv_aaa.ma". +*) +include "basic_2/dynamic/cnv_etc.ma". +(* +include "basic_2/dynamic/lsubsv_snv.ma". +*) +(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) + +(* Properties with context-free parallel reduction for local environments *****) + +fact cnv_cpm_trans_lpr_aux (a) (h) (o): a = Ⓕ → + ∀G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpms_conf_lpr a h G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, o] ⦃G1, L1, T1⦄ → IH_cnv_cpm_trans_lpr a h G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_cnv_cpm_trans_lpr a h G1 L1 T1. +#a #h #o #Ha #G0 #L0 #T0 (* #IH4 #IH3 *) #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #s #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #_ destruct (* -IH4 -IH3 *) -IH2 -IH1 -H1 + elim (cpm_inv_sort1 … H2) -H2 * #H1 #H2 destruct // +| #i #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 -IH3 *) -IH2 + elim (cnv_inv_lref_drops … H1) -H1 #I #K1 #V1 #HLK1 #HV1 + elim (lpr_drops_conf … HLK1 … HL12) -HL12 // #Y #H #HLK2 + elim (lpr_inv_pair_sn … H) -H #K2 #V2 #HK12 #HV12 #H destruct + lapply (fqup_lref (Ⓣ) … G1 … HLK1) #HKL + elim (cpm_inv_lref1_drops … H2) -H2 * + [ #H1 #H2 destruct -HLK1 /4 width=7 by fqup_fpbg, cnv_lref_drops/ + | #K0 #V0 #W0 #H #HVW0 #W0 -HV12 + lapply (drops_mono … H … HLK1) -HLK1 -H #H destruct + lapply (drops_isuni_fwd_drop2 … HLK2) -HLK2 /4 width=7 by fqup_fpbg, cnv_lifts/ + | #n #K0 #V0 #W0 #H #HVW0 #W0 #H destruct -HV12 + lapply (drops_mono … H … HLK1) -HLK1 -H #H destruct + lapply (drops_isuni_fwd_drop2 … HLK2) -HLK2 /4 width=7 by fqup_fpbg, cnv_lifts/ + ] +| #l #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 -IH3 *) -IH2 -IH1 + elim (cnv_inv_gref … H1) +| #p #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct (* -IH4 -IH3 *) -IH2 + elim (cnv_inv_bind … H1) -H1 #HV1 #HT1 + elim (cpm_inv_bind1 … H2) -H2 * + [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=9 by fqup_fpbg, cnv_bind, lpr_pair/ + | #T2 #HT12 #HXT2 #H1 #H2 destruct -HV1 + /4 width=11 by fqup_fpbg, cnv_inv_lifts, lpr_pair, drops_refl, drops_drop/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #x #X #H2 #L2 #HL12 destruct + elim (cnv_inv_appl … H1) -H1 #n #p #W1 #U1 #Hn #HV1 #HT1 #HVW1 #HTU1 + elim (cpm_inv_appl1 … H2) -H2 * + [ #V2 #T2 #HV12 #HT12 #H destruct (* -IH4 *) + lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2 + elim (IH2 … HVW1 … V2 … L2 … L2) [|*: /2 width=2 by fqup_fpbg, cpm_cpms/ ] -HVW1 -HV12 + eq_minus_O // #W0 #H1 #H2 + lapply (cprs_trans … HXW21 … H1) -XW1 #H1 + lapply (cpms_trans … HXT21 … H2) -XT1 ≛[h, o] ⦃G1, L1, T1⦄ → IH_snv_lstas h o G1 L1 T1) → - (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h o G1 L1 T1) → - (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h o G1 L1 T1) → - (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≛[h, o] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h o G1 L1 T1) → - ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_snv_cpr_lpr h o G1 L1 T1. -#h #o #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] -[ #s #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #_ destruct -IH4 -IH3 -IH2 -IH1 -H1 - >(cpr_inv_sort1 … H2) -X // -| #i #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 - elim (snv_inv_lref … H1) -H1 #I #K1 #V1 #HLK1 #HV1 - elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2 - elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct - lapply (fqup_lref … G1 … HLK1) #HKL - elim (cpr_inv_lref1 … H2) -H2 - [ #H destruct -HLK1 /4 width=10 by fqup_fpbg, snv_lref/ - | * #K0 #V0 #W0 #H #HVW0 #W0 -HV12 - lapply (drop_mono … H … HLK1) -HLK1 -H #H destruct - lapply (drop_fwd_drop2 … HLK2) -HLK2 /4 width=8 by fqup_fpbg, snv_lift/ - ] -| #p #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 -IH1 - elim (snv_inv_gref … H1) -| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 - elim (snv_inv_bind … H1) -H1 #HV1 #HT1 - elim (cpr_inv_bind1 … H2) -H2 * - [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=8 by fqup_fpbg, snv_bind, lpr_pair/ - | #T2 #HT12 #HXT2 #H1 #H2 destruct -HV1 - /4 width=10 by fqup_fpbg, snv_inv_lift, lpr_pair, drop_drop/ - ] -| #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct - elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 - elim (cpr_inv_appl1 … H2) -H2 * - [ #V2 #T2 #HV12 #HT12 #H destruct -IH4 - lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 - lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2 - elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 -HV12 #XV #HVW2 #HXV - elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -HTU1 -HT12 #X #HTU2 #H - elim (cprs_inv_abst1 … H) -H #XW #U2 #HXW #_ #H destruct -IH1 -IH3 -IH2 -L1 - elim (cprs_conf … HXV … HXW) -W1 #W2 #HXV #HXW - lapply (scpds_cprs_trans … HVW2 … HXV) -XV - lapply (scpds_cprs_trans … (ⓛ{a}W2.U2) … HTU2 ?) - /2 width=7 by snv_appl, cprs_bind/ - | #b #V2 #W10 #W20 #T10 #T20 #HV12 #HW120 #HT120 #H1 #H2 destruct - elim (snv_inv_bind … HT1) -HT1 #HW10 #HT10 - elim (scpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30 -d0 - elim (snv_fwd_da … HV1) #d #HV1d - elim (snv_fwd_da … HW10) #d0 #HW10d - lapply (cprs_scpds_div … HW130 … HW10d … 1 HVW1) -W30 #HVW10 - elim (da_scpes_aux … IH4 IH1 IH2 … HW10d … HV1d … HVW10) /2 width=1 by fqup_fpbg/ - #_ #Hd (plus_minus_k_k d 1) in HV1d; // -Hd #HV1d - lapply (scpes_cpr_lpr_aux … IH2 IH3 … HVW10 … HW120 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW10 #HVW20 - lapply (IH2 … HV1d … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HV1d #HV2d - lapply (IH2 … HW10d … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10d #HW20d - lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 - lapply (IH1 … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10 #HW20 - lapply (IH1 … HT10 … HT120 … (L2.ⓛW20) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -HT10 #HT20 - @snv_bind /2 width=1 by snv_cast_scpes/ - @(lsubsv_snv_trans … HT20) -HT20 - @(lsubsv_beta … (d-1)) // - @shnv_cast [1,2: // ] #d0 #Hd0 - lapply (scpes_le_aux … IH4 IH1 IH2 IH3 … HW20d … HV2d … d0 … HVW20) -IH4 -IH3 -IH2 -IH1 -HW20d -HV2d -HVW20 - /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/ - | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -IH4 - elim (snv_inv_bind … HT1) -HT1 #HW0 #HT0 - elim (scpds_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct - elim (lift_inv_bind1 … HX) -HX #W3 #U3 #HW13 #_ #H destruct - elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 #XV #HXV0 #HXVW1 - elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU0 … HT02 (L2.ⓓW2)) /2 width=1 by fqup_fpbg, lpr_pair/ -HTU0 #X #HXT2 #H - elim (cprs_inv_abst1 … H) -H #W #U2 #HW3 #_ #H destruct -U3 - lapply (IH1 … HW02 … HL12) /2 width=1 by fqup_fpbg/ #HW2 - lapply (IH1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ #HV0 - lapply (IH1 … HT02 (L2.ⓓW2) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -L1 #HT2 - lapply (snv_lift … HV0 (L2.ⓓW2) (Ⓕ) … HV02) /2 width=1 by drop_drop/ -HV0 #HV2 - elim (lift_total XV 0 1) #XW #HXVW - lapply (scpds_lift … HXV0 (L2.ⓓW2) (Ⓕ) … HV02 … HXVW) /2 width=1 by drop_drop/ -V0 #HXWV2 - lapply (cprs_lift … HXVW1 (L2.ⓓW2) (Ⓕ) … HW13 … HXVW) /2 width=1 by drop_drop/ -W1 -XV #HXW3 - elim (cprs_conf … HXW3 … HW3) -W3 #W3 #HXW3 #HW3 - lapply (scpds_cprs_trans … HXWV2 … HXW3) -XW - lapply (scpds_cprs_trans … (ⓛ{a}W3.U2) … HXT2 ?) /2 width=1 by cprs_bind/ -W - /3 width=6 by snv_appl, snv_bind/ - ] -| #W1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 - elim (snv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1 - elim (cpr_inv_cast1 … H2) -H2 - [ * #W2 #T2 #HW12 #HT12 #H destruct - elim (snv_fwd_da … HW1) #d #HW1d - lapply (scpds_div … HWU1 … HTU1) -U1 -d #HWT1 - lapply (scpes_cpr_lpr_aux … IH2 IH3 … HWT1 … HW12 … HT12 … HL12) /2 width=1 by fqup_fpbg/ - lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/ - lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -L1 - /2 width=1 by snv_cast_scpes/ - | #H -IH3 -IH2 -HW1 -U1 - lapply (IH1 … H … HL12) /2 width=1 by fqup_fpbg/ - ] -] -qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/fpbs/fpbs_lfprs.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/fpbs/fpbs_lfprs.etc index ed03e166c..d6348d512 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/etc/fpbs/fpbs_lfprs.etc +++ b/matita/matita/contribs/lambdadelta/basic_2/etc/fpbs/fpbs_lfprs.etc @@ -1,7 +1,4 @@ (* -lemma cprs_fpbs: ∀h,o,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h] T2 → ⦃G, L, T1⦄ ≥[h, o] ⦃G, L, T2⦄. -/3 width=1 by cprs_cpxs, cpxs_fpbs/ qed. - lemma lprs_fpbs: ∀h,o,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, o] ⦃G, L2, T⦄. /3 width=1 by lprs_lpxs, lpxs_fpbs/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma new file mode 100644 index 000000000..e5a6ca6b7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbg.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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/rt_computation/fpbg_fqup.ma". +include "basic_2/rt_computation/cpms_fpbs.ma". + +(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************) + +(* Forward lemmas with proper parallel rst-computation for closures *********) + +lemma fqup_cpms_fwd_fpbg (h) (o): ∀G1,G2,L1,L2,T1,T. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T⦄ → + ∀n,T2. ⦃G2, L2⦄ ⊢ T ➡*[n,h] T2 → ⦃G1, L1, T1⦄ >[h,o] ⦃G2, L2, T2⦄. +/3 width=5 by cpms_fwd_fpbs, fqup_fpbg,fpbg_fpbs_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma new file mode 100644 index 000000000..4a65edb8b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_fpbs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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/rt_computation/fpbs_cpxs.ma". +include "basic_2/rt_computation/cpms_cpxs.ma". + +(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************) + +(* Forward lemmas with parallel rst-computation for closures ****************) + +(* Basic_2A1: uses: cprs_fpbs *) +lemma cpms_fwd_fpbs (n) (h) (o): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[n,h] T2 → ⦃G, L, T1⦄ ≥[h,o] ⦃G, L, T2⦄. +/3 width=2 by cpms_fwd_cpxs, cpxs_fpbs/ qed-. 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 3158b8b03..3649bada4 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm.ma @@ -125,8 +125,8 @@ lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[n, h] T2 → | ∃∃s. T2 = ⋆(next h s) & J = Sort s & n = 1 | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 & L = K.ⓓV1 & J = LRef 0 - | ∃∃k,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[k, h] V2 & ⬆*[1] V2 ≘ T2 & - L = K.ⓛV1 & J = LRef 0 & n = ↑k + | ∃∃m,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[m, h] V2 & ⬆*[1] V2 ≘ T2 & + L = K.ⓛV1 & J = LRef 0 & n = ↑m | ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I} & J = LRef (↑i). #n #h #J #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1 … H) -H * @@ -135,7 +135,7 @@ lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[n, h] T2 → | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 #H3 destruct /4 width=6 by or5_intro2, ex4_3_intro, ex2_intro/ | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 #H3 destruct - elim (isrt_inv_plus_SO_dx … Hc) -Hc // #k #Hc #H destruct + elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct /4 width=9 by or5_intro3, ex5_4_intro, ex2_intro/ | #I #K #V2 #i #HV2 #HVT2 #H1 #H2 destruct /4 width=8 by or5_intro4, ex4_4_intro, ex2_intro/ @@ -154,14 +154,14 @@ lemma cpm_inv_zero1: ∀n,h,G,L,T2. ⦃G, L⦄ ⊢ #0 ➡[n, h] T2 → ∨∨ T2 = #0 ∧ n = 0 | ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 & L = K.ⓓV1 - | ∃∃k,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[k, h] V2 & ⬆*[1] V2 ≘ T2 & - L = K.ⓛV1 & n = ↑k. + | ∃∃m,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[m, h] V2 & ⬆*[1] V2 ≘ T2 & + L = K.ⓛV1 & n = ↑m. #n #h #G #L #T2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H * [ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/ | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct /4 width=8 by or3_intro1, ex3_3_intro, ex2_intro/ | #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct - elim (isrt_inv_plus_SO_dx … Hc) -Hc // #k #Hc #H destruct + elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct /4 width=8 by or3_intro2, ex4_4_intro, ex2_intro/ ] qed-. @@ -262,7 +262,7 @@ lemma cpm_inv_cast1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ➡[n, h] U2 ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 & ⦃G, L⦄ ⊢ U1 ➡[n, h] T2 & U2 = ⓝV2.T2 | ⦃G, L⦄ ⊢ U1 ➡[n, h] U2 - | ∃∃k. ⦃G, L⦄ ⊢ V1 ➡[k, h] U2 & n = ↑k. + | ∃∃m. ⦃G, L⦄ ⊢ V1 ➡[m, h] U2 & n = ↑m. #n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_cast1 … H) -H * [ #cV #cT #V2 #T2 #HV12 #HT12 #HcVT #H1 #H2 destruct elim (isrt_inv_max … Hc) -Hc #nV #nT #HcV #HcT #H destruct @@ -272,7 +272,7 @@ lemma cpm_inv_cast1: ∀n,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓝV1.U1 ➡[n, h] U2 | #cU #U12 #H destruct /4 width=3 by isrt_inv_plus_O_dx, or3_intro1, ex2_intro/ | #cU #H12 #H destruct - elim (isrt_inv_plus_SO_dx … Hc) -Hc // #k #Hc #H destruct + elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct /4 width=3 by or3_intro2, ex2_intro/ ] qed-. 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 205227ec5..e6a1ea5d3 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 @@ -67,7 +67,7 @@ table { } ] [ { "t-bound context-sensitive parallel rt-computation" * } { - [ [ "for terms" ] "cpms" + "( ⦃?,?⦄ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_cpms" * ] + [ [ "for terms" ] "cpms" + "( ⦃?,?⦄ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ] } ] [ { "unbound context-sensitive parallel rst-computation" * } { diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma index dde95e8a7..932f95de2 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/arith.ma @@ -57,6 +57,13 @@ lemma plus_SO: ∀n. n + 1 = ↑n. lemma minus_plus_m_m_commutative: ∀n,m:nat. n = m + n - m. // qed-. +lemma plus_n_2: ∀n. n + 2 = n + 1 + 1. +// qed. + +lemma arith_l: ∀x. 1 = 1-x+(x-(x-1)). +* // #x >minus_S_S >minus_S_S plus_minus // >commutative_plus >plus_minus // @@ -69,9 +76,6 @@ qed-. fact plus_minus_minus_be_aux: ∀i,x,y,z. y ≤ z → z ≤ x → i = z - y → x - z + i = x - y. /2 width=1 by plus_minus_minus_be/ qed-. -lemma plus_n_2: ∀n. n + 2 = n + 1 + 1. -// qed. - lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p). /2 by plus_minus/ qed-. -- 2.39.2