From 21e6d5cb0c9b6d6a6b9975b78ae752120a969cd6 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Fri, 25 Oct 2019 17:59:07 +0200 Subject: [PATCH] update in basic_2 + cpce parked for now + some renaming --- .../lambdadelta/basic_2/dynamic/cnv_lpce.ma | 99 --------- .../lambdadelta/basic_2/dynamic/lsubv.ma | 2 +- .../lambdadelta/basic_2/etc/cnv_cpce.etc | 13 ++ .../cnv_cpce.ma => etc/cpce/cnv_cpce_1.etc} | 0 .../etc/cpce/{cnv_cpce.etc => cnv_cpce_2.etc} | 0 .../basic_2/etc/cpce/cnv_lpce_1.etc | 193 ++++++++++++++++++ .../etc/cpce/{cnv_lpce.etc => cnv_lpce_2.etc} | 0 .../cpce.ma => etc/cpce/cpce.etc} | 0 .../cpce_drops.ma => etc/cpce/cpce_drops.etc} | 0 .../cpce_ext.ma => etc/cpce/cpce_ext.etc} | 0 .../lpce.ma => etc/cpce/lpce.etc} | 0 .../lpce_drops.ma => etc/cpce/lpce_drops.etc} | 0 .../basic_2/etc/cpce/lsubv_cpce_1.etc | 56 +++++ .../basic_2/etc/cpce/lsubv_cpce_2.etc | 59 ++++++ .../lambdadelta/basic_2/web/basic_2_src.tbl | 4 +- 15 files changed, 325 insertions(+), 101 deletions(-) delete mode 100644 matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpce.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/etc/cnv_cpce.etc rename matita/matita/contribs/lambdadelta/basic_2/{dynamic/cnv_cpce.ma => etc/cpce/cnv_cpce_1.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/etc/cpce/{cnv_cpce.etc => cnv_cpce_2.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_lpce_1.etc rename matita/matita/contribs/lambdadelta/basic_2/etc/cpce/{cnv_lpce.etc => cnv_lpce_2.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_conversion/cpce.ma => etc/cpce/cpce.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_conversion/cpce_drops.ma => etc/cpce/cpce_drops.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_conversion/cpce_ext.ma => etc/cpce/cpce_ext.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_conversion/lpce.ma => etc/cpce/lpce.etc} (100%) rename matita/matita/contribs/lambdadelta/basic_2/{rt_conversion/lpce_drops.ma => etc/cpce/lpce_drops.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/etc/cpce/lsubv_cpce_1.etc create mode 100644 matita/matita/contribs/lambdadelta/basic_2/etc/cpce/lsubv_cpce_2.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpce.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpce.ma deleted file mode 100644 index 401b10bdb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_lpce.ma +++ /dev/null @@ -1,99 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||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_transition/lpr_drops.ma". -include "basic_2/rt_computation/cpms_lpr.ma". -include "basic_2/rt_computation/fpbg_fqup.ma". -include "basic_2/rt_conversion/cpce_drops.ma". -include "basic_2/rt_conversion/lpce_drops.ma". -include "basic_2/dynamic/cnv_drops.ma". - -(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) - -definition IH (h) (a): relation3 genv lenv term ≝ - λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] → - ∀n,T1. ⦃G,L0⦄ ⊢ T0 ➡[n,h] T1 → ∀T2. ⦃G,L0⦄ ⊢ T0 ⬌η[h] T2 → - ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ⬌η[h] L2 → - ∃∃T. ⦃G,L1⦄ ⊢ T1 ⬌η[h] T & ⦃G,L2⦄ ⊢ T2 ➡[n,h] T. - -(* Properties with eta-conversion for full local environments ***************) - -lemma pippo_aux (h) (a) (G0) (L0) (T0): - (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH h a G L T) → - IH h a G0 L0 T0. -#h #a #G0 #L0 * * -[ #s #_ #_ #n #X1 #HX1 #X2 #HX2 #L1 #HL01 #L2 #HL02 - elim (cpm_inv_sort1 … HX1) -HX1 #H #Hn destruct - lapply (cpce_inv_sort_sn … HX2) -HX2 #H destruct - /3 width=3 by cpce_sort, cpm_sort, ex2_intro/ -| #i #IH #Hi #n #X1 #HX1 #X2 #HX2 #L1 #HL01 #L2 #HL02 - elim (cnv_inv_lref_drops … Hi) -Hi #I #K0 #W0 #HLK0 #HW0 - elim (lpr_drops_conf … HLK0 … HL01) [| // ] #Y1 #H1 #HLK1 - elim (lpr_inv_pair_sn … H1) -H1 #K1 #W1 #HK01 #HW01 #H destruct - elim (lpce_drops_conf … HLK0 … HL02) [| // ] #Y2 #H2 #HLK2 - elim (lpce_inv_pair_sn … H2) -H2 #K2 #W2 #HK02 #HW02 #H destruct - elim (cpm_inv_lref1_drops … HX1) -HX1 * - [ #H1 #H2 destruct - elim (cpce_inv_lref_sn_drops_pair … HX2 … HLK0) -HX2 * - [ #H1 #H2 destruct -L0 -K0 -W0 - /3 width=3 by cpce_ldef_drops, ex2_intro/ - | #H1 #HW #H2 destruct -L0 -W2 -HW0 -HK02 - @(ex2_intro … (#i)) [| // ] - @(cpce_ldec_drops … HLK1) -HLK1 #n #p #V0 #U0 #HWU0 - /4 width=10 by lpr_cpms_trans, cpms_step_sn/ - | #n #p #W01 #W02 #V0 #V01 #V02 #U0 #H1 #HWU0 #HW001 #HW012 #HV001 #HV012 #H2 destruct - ] - | lapply (drops_isuni_fwd_drop2 … HLK1) [ // ] -W1 #HLK1 - #Y0 #X0 #W1 #HLY0 #HW01 #HWX1 -HL01 -HL02 - lapply (drops_mono … HLY0 … HLK0) -HLY0 #H destruct - lapply (cpce_inv_lref_sn_drops_ldef … HX2 … HLK0) -HX2 #H destruct - elim (IH … HW0 … HW01 … HW02 … HK01 … HK02) - [| /3 width=2 by fqup_fpbg, fqup_lref/ ] -L0 -K0 #W #HW1 #HW2 - elim (lifts_total W (𝐔❴↑i❵)) #V #HWV - /3 width=9 by cpce_lifts_bi, cpm_delta_drops, ex2_intro/ - | lapply (drops_isuni_fwd_drop2 … HLK1) [ // ] -W1 #HLK1 - #m #Y0 #X0 #W1 #HLY0 #HW01 #HWX1 #H destruct -HL01 -HL02 - lapply (drops_mono … HLY0 … HLK0) -HLY0 #H destruct - elim (cpce_inv_lref_sn_drops_ldec … HX2 … HLK0) -HX2 * - [ #_ #H destruct - elim (IH … HW0 … HW01 … HW02 … HK01 … HK02) - [| /3 width=2 by fqup_fpbg, fqup_lref/ ] -L0 -K0 #W #HW1 #HW2 - elim (lifts_total W (𝐔❴↑i❵)) #V #HWV - /3 width=9 by cpce_lifts_bi, cpm_ell_drops, ex2_intro/ - | lapply (drops_isuni_fwd_drop2 … HLK2) [ // ] -W2 #HLK2 - #n #p #W01 #W02 #V0 #V01 #V02 #U0 #_ #HW001 #HW012 #_ #_ #H destruct -V0 -V01 -U0 - elim (IH … HW0 … HW01 … HW001 … HK01 … HK02) - [| /3 width=2 by fqup_fpbg, fqup_lref/ ] -L0 -K0 #W #HW1 #HW2 - elim (lifts_total W (𝐔❴↑i❵)) #V #HWV - /4 width=11 by cpce_lifts_bi, cpm_lifts_bi, cpm_ee, ex2_intro/ - ] - ] -| #l #_ #_ #n #X1 #HX1 #X2 #HX2 #L1 #HL01 #L2 #HL02 - elim (cpm_inv_gref1 … HX1) -HX1 #H1 #H2 destruct - lapply (cpce_inv_gref_sn … HX2) -HX2 #H destruct - /3 width=3 by cpce_gref, cpr_refl, ex2_intro/ - -(* -lemma cpce_inv_eta_drops (h) (n) (G) (L) (i): - ∀X. ⦃G,L⦄ ⊢ #i ⬌η[h] X → - ∀K,W. ⇩*[i] L ≘ K.ⓛW → - ∀p,V1,U. ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V1.U → - ∀V2. ⦃G,K⦄ ⊢ V1 ⬌η[h] V2 → - ∀W2. ⇧*[↑i] V2 ≘ W2 → X = +ⓛW2.ⓐ#0.#↑i. - -theorem cpce_mono_cnv (h) (a) (G) (L): - ∀T. ⦃G,L⦄ ⊢ T ![h,a] → - ∀T1. ⦃G,L⦄ ⊢ T ⬌η[h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ⬌η[h] T2 → T1 = T2. -#h #a #G #L #T #HT -*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv.ma index 2ff320b82..6df83d988 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/lsubv.ma @@ -74,7 +74,7 @@ fact lsubv_inv_atom_dx_aux (h) (a) (G): qed-. (* Basic_2A1: uses: lsubsv_inv_atom2 *) -lemma lsubv_inv_atom2 (h) (a) (G): +lemma lsubv_inv_atom_dx (h) (a) (G): ∀L1. G ⊢ L1 ⫃![h,a] ⋆ → L1 = ⋆. /2 width=6 by lsubv_inv_atom_dx_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cnv_cpce.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cnv_cpce.etc new file mode 100644 index 000000000..c8e1d66ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/etc/cnv_cpce.etc @@ -0,0 +1,13 @@ +(* +lemma cpce_inv_eta_drops (h) (n) (G) (L) (i): + ∀X. ⦃G,L⦄ ⊢ #i ⬌η[h] X → + ∀K,W. ⇩*[i] L ≘ K.ⓛW → + ∀p,V1,U. ⦃G,K⦄ ⊢ W ➡*[n,h] ⓛ{p}V1.U → + ∀V2. ⦃G,K⦄ ⊢ V1 ⬌η[h] V2 → + ∀W2. ⇧*[↑i] V2 ≘ W2 → X = +ⓛW2.ⓐ#0.#↑i. + +theorem cpce_mono_cnv (h) (a) (G) (L): + ∀T. ⦃G,L⦄ ⊢ T ![h,a] → + ∀T1. ⦃G,L⦄ ⊢ T ⬌η[h] T1 → ∀T2. ⦃G,L⦄ ⊢ T ⬌η[h] T2 → T1 = T2. +#h #a #G #L #T #HT +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpce.ma b/matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_cpce_1.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_cpce.ma rename to matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_cpce_1.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_cpce.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_cpce_2.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_cpce.etc rename to matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_cpce_2.etc diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_lpce_1.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_lpce_1.etc new file mode 100644 index 000000000..807b9fdc7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/etc/cpce/cnv_lpce_1.etc @@ -0,0 +1,193 @@ +(**************************************************************************) +(* ___ *) +(* ||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_conversion/cpce_drops.ma". +include "basic_2/rt_conversion/lpce_drops.ma". +include "basic_2/dynamic/cnv_preserve.ma". + +(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) + +definition IH_cnv_cpce_cpm_conf (h) (a): relation3 genv lenv term ≝ + λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] → + ∀n,T1. ⦃G,L0⦄ ⊢ T0 ➡[n,h] T1 → ∀T2. ⦃G,L0⦄ ⊢ T0 ⬌η[h] T2 → + ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ⬌η[h] L2 → + ∃∃T. ⦃G,L1⦄ ⊢ T1 ⬌η[h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n,h] T. + +definition IH_cnv_cpce_cpms_conf (h) (a): relation3 genv lenv term ≝ + λG,L0,T0. ⦃G,L0⦄ ⊢ T0 ![h,a] → + ∀n,T1. ⦃G,L0⦄ ⊢ T0 ➡*[n,h] T1 → ∀T2. ⦃G,L0⦄ ⊢ T0 ⬌η[h] T2 → + ∀L1. ⦃G,L0⦄ ⊢ ➡[h] L1 → ∀L2. ⦃G,L0⦄ ⊢ ⬌η[h] L2 → + ∃∃T. ⦃G,L1⦄ ⊢ T1 ⬌η[h] T & ⦃G,L2⦄ ⊢ T2 ➡*[n,h] T. + +(* Properties with eta-conversion for full local environments ***************) + +fact cnv_cpce_cpms_conf_sub (h) (a) (G0) (L0) (T0): + (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpce_cpm_conf h a G L T) → + ∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpce_cpms_conf h a G L T. +#h #a #GX #LX #TX #HX #G #L0 #T0 #HX0 #HT0 #n #X1 #HX1 +@(cpms_ind_dx … HX1) -n -X1 +[ #T2 #HT02 #L1 #HL01 #L2 #HL02 + /2 width=8 by/ +| #n1 #n2 #T3 #T1 #HT03 #IH #HT31 #T2 #HT02 #L1 #HL01 #L2 #HL02 + lapply (cnv_cpms_trans … HT0 … HT03) -HT0 #HT3 + elim (IH … HT02 … L0 … HL02) -IH -HT02 [| // ] #T4 #HT34 #HT24 + elim (HX … HT3 … HT31 … HT34 … HL01 … HL02) + [| /2 width=4 by fpbg_cpms_trans/ ] -GX -LX -L0 -TX -T0 -T3 #T3 #HT13 #HT43 + /3 width=5 by cpms_trans, ex2_intro/ +] +qed-. + +fact cnv_cpce_cpm_conf_aux (h) (a) (G0) (L0) (T0): + (∀G,L,T. ⦃G0,L0,T0⦄ >[h] ⦃G,L,T⦄ → IH_cnv_cpce_cpm_conf h a G L T) → + IH_cnv_cpce_cpm_conf h a G0 L0 T0. +#h #a #G0 #L0 * * [|||| * ] +[ #s #_ #_ #n #X1 #HX1 #X2 #HX2 #L1 #HL01 #L2 #HL02 + elim (cpm_inv_sort1 … HX1) -HX1 #H #Hn destruct + lapply (cpce_inv_sort_sn … HX2) -HX2 #H destruct + /3 width=3 by cpce_sort, ex2_intro/ +| #i #IH #H0 #n #X1 #HX1 #X2 #HX2 #L1 #HL01 #L2 #HL02 + elim (cnv_inv_lref_drops … H0) -H0 #I #K0 #W0 #HLK0 #HW0 + elim (lpr_drops_conf … HLK0 … HL01) [| // ] #Y1 #H1 #HLK1 + elim (lpr_inv_pair_sn … H1) -H1 #K1 #W1 #HK01 #HW01 #H destruct + elim (lpce_drops_conf … HLK0 … HL02) [| // ] #Y2 #H2 #HLK2 + elim (lpce_inv_pair_sn … H2) -H2 #K2 #W2 #HK02 #HW02 #H destruct + elim (cpm_inv_lref1_drops … HX1) -HX1 * + [ #H1 #H2 destruct + elim (cpce_inv_lref_sn_drops_pair … HX2 … HLK0) -HX2 * + [ #H1 #H2 destruct -L0 -K0 -W0 + /3 width=3 by cpce_ldef_drops, ex2_intro/ + | #H1 #HW #H2 destruct -L0 -W2 -HW0 -HK02 + @(ex2_intro … (#i)) [| // ] + @(cpce_ldec_drops … HLK1) -HLK1 #n #p #V0 #U0 #HWU0 + /4 width=10 by lpr_cpms_trans, cpms_step_sn/ + | lapply (drops_isuni_fwd_drop2 … HLK2) [ // ] -W2 #HLK2 + #n #p #W01 #W02 #V0 #V01 #V02 #U0 #H1 #HWU0 #HW001 #HW012 #HV001 #HV012 #H2 destruct + lapply (cnv_cpms_trans … HW0 … HWU0) #H + elim (cnv_inv_bind … H) -H #HV0 #_ + elim (cnv_cpms_conf_lpr … HW0 … HWU0 0 W1 … K0 … HK01) [| // ] + [| /2 width=1 by cpm_cpms/ ]