From 0c302a9fda708e5019e48d14c5419a8a65190745 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Sat, 29 Sep 2018 16:21:54 +0200 Subject: [PATCH] update in basic_2 and apps_2 + more results on typing + first results on iterated typing + minor corrections --- .../lambdadelta/apps_2/examples/ex_cnv_eta.ma | 2 +- .../lambdadelta/apps_2/web/apps_2.ldw.xml | 4 +- .../lambdadelta/basic_2/dynamic/nta_cpcs.ma | 1 - .../basic_2/dynamic/nta_preserve.ma | 37 ++++++++++++++++++ .../lambdadelta/basic_2/etc/nta/nta.etc | 23 +---------- .../lambdadelta/basic_2/i_dynamic/ntas.ma | 38 +++++++++++++++++++ .../ntas_lift.etc => i_dynamic/ntas_etc.ma} | 3 +- .../hod/ntas.etc => i_dynamic/ntas_nta.ma} | 25 +++--------- .../basic_2/notation/relations/colon_7.ma | 19 ++++++++++ .../basic_2/notation/relations/colonstar_6.ma | 19 ++++++++++ .../lambdadelta/basic_2/web/basic_2_src.tbl | 6 +-- 11 files changed, 128 insertions(+), 49 deletions(-) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas.ma rename matita/matita/contribs/lambdadelta/basic_2/{etc_2A1/hod/ntas_lift.etc => i_dynamic/ntas_etc.ma} (99%) rename matita/matita/contribs/lambdadelta/basic_2/{etc_2A1/hod/ntas.etc => i_dynamic/ntas_nta.ma} (74%) create mode 100644 matita/matita/contribs/lambdadelta/basic_2/notation/relations/colon_7.ma create mode 100644 matita/matita/contribs/lambdadelta/basic_2/notation/relations/colonstar_6.ma diff --git a/matita/matita/contribs/lambdadelta/apps_2/examples/ex_cnv_eta.ma b/matita/matita/contribs/lambdadelta/apps_2/examples/ex_cnv_eta.ma index f5bc8f427..704301fe0 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/examples/ex_cnv_eta.ma +++ b/matita/matita/contribs/lambdadelta/apps_2/examples/ex_cnv_eta.ma @@ -17,7 +17,7 @@ include "basic_2/dynamic/cnv.ma". (* EXAMPLES *****************************************************************) -(* Extended validy (basic?_2) vs. restricted validity (basic_1) *************) +(* Extended validy (basic_2B) vs. restricted validity (basic_1A) ************) (* Note: extended validity of a closure, height of cnv_appl > 1 *) lemma cnv_extended (h) (p): ∀G,L,s. ⦃G, L.ⓛ⋆s.ⓛⓛ{p}⋆s.⋆s.ⓛ#0⦄ ⊢ ⓐ#2.#0 ![Ⓕ,h]. diff --git a/matita/matita/contribs/lambdadelta/apps_2/web/apps_2.ldw.xml b/matita/matita/contribs/lambdadelta/apps_2/web/apps_2.ldw.xml index 8b3db76c3..c556f085c 100644 --- a/matita/matita/contribs/lambdadelta/apps_2/web/apps_2.ldw.xml +++ b/matita/matita/contribs/lambdadelta/apps_2/web/apps_2.ldw.xml @@ -38,7 +38,7 @@ - The Models component is started for λδ version 2. + The Models component is started for λδ-2B. The Examples component is moved from the Core directory. @@ -48,7 +48,7 @@ The Functional component is started - inside the specification of λδ version 2. + inside the specification of λδ-2A. The MLTT1 component is started. diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma index 4d695a3ec..0dd3441f2 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_cpcs.ma @@ -50,4 +50,3 @@ elim (cnv_inv_cast … H) -H #X1 #HX2 #_ #HX21 #H lapply (cpms_inv_sort1 … H) -H #H destruct /2 width=1 by cpcs_cprs_sn/ qed-. - diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma index ab3b33ad5..4e37eb806 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma @@ -31,6 +31,17 @@ elim (cnv_fwd_cpm_SO … HT) #U #HTU /4 width=2 by cnv_cpms_nta, cpm_cpms, ex_intro/ qed-. +(* Basic_1: was: ty3_typecheck *) +lemma nta_typecheck (a) (h) (G) (L): + ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ∃T0. ⦃G,L⦄ ⊢ ⓝU.T :[a,h] T0. +/3 width=1 by cnv_cast, cnv_nta_sn/ qed-. + +(* Basic_1: was: ty3_correct *) +(* Basic_2A1: was: ntaa_fwd_correct *) +lemma nta_fwd_correct (a) (h) (G) (L): + ∀T,U. ⦃G,L⦄ ⊢ T :[a,h] U → ∃T0. ⦃G,L⦄ ⊢ U :[a,h] T0. +/3 width=2 by nta_fwd_cnv_dx, cnv_nta_sn/ qed-. + lemma nta_pure_cnv (h) (G) (L): ∀T,U. ⦃G,L⦄ ⊢ T :*[h] U → ∀V. ⦃G,L⦄ ⊢ ⓐV.U !*[h] → ⦃G,L⦄ ⊢ ⓐV.T :*[h] ⓐV.U. @@ -106,6 +117,32 @@ elim (cpms_inv_cast1 … H2) -H2 [ * || * ] ] qed-. +(* Basic_1: uses: ty3_gen_cast *) +lemma nta_inv_cast_sn_old (a) (h) (G) (L) (X2): + ∀T0,T1. ⦃G,L⦄ ⊢ ⓝT1.T0 :[a,h] X2 → + ∃∃T2. ⦃G,L⦄ ⊢ T0 :[a,h] T1 & ⦃G,L⦄ ⊢ T1 :[a,h] T2 & ⦃G,L⦄ ⊢ ⓝT2.T1 ⬌*[h] X2 & ⦃G,L⦄ ⊢ X2 ![a,h]. +#a #h #G #L #X2 #T0 #T1 #H +elim (cnv_inv_cast … H) -H #X0 #HX2 #H1 #HX20 #H2 +elim (cnv_inv_cast … H1) #X #HT1 #HT0 #HT1X #HT0X +elim (cpms_inv_cast1 … H2) -H2 [ * || * ] +[ #U1 #U0 #HTU1 #HTU0 #H destruct + elim (cnv_cpms_conf … HT0 … HT0X … HTU0) -HT0 -HT0X -HTU0 +