X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fdynamic%2Fnta_preserve.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fdynamic%2Fnta_preserve.ma;h=ab3b33ad5675415276e73e442d97020695a87799;hb=5c92c318030a05c766b3f6070dbd23589cbdee04;hp=0000000000000000000000000000000000000000;hpb=e9b09b14538f770b9e65083c24e3e9cf487df648;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma new file mode 100644 index 000000000..ab3b33ad5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||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_equivalence/cpcs_cprs.ma". +include "basic_2/dynamic/cnv_preserve.ma". +include "basic_2/dynamic/nta.ma". + +(* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************) + +(* Properties based on preservation *****************************************) + +lemma cnv_cpms_nta (a) (h) (G) (L): + ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∀U.⦃G,L⦄ ⊢ T ➡*[1,h] U → ⦃G,L⦄ ⊢ T :[a,h] U. +/3 width=4 by cnv_cast, cnv_cpms_trans/ qed. + +lemma cnv_nta_sn (a) (h) (G) (L): + ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∃U. ⦃G,L⦄ ⊢ T :[a,h] U. +#a #h #G #L #T #HT +elim (cnv_fwd_cpm_SO … HT) #U #HTU +/4 width=2 by cnv_cpms_nta, cpm_cpms, ex_intro/ +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. +#h #G #L #T #U #H1 #V #H2 +elim (cnv_inv_cast … H1) -H1 #X0 #HU #HT #HUX0 #HTX0 +elim (cnv_inv_appl … H2) #n #p #X1 #X2 #_ #HV #_ #HVX1 #HUX2 +elim (cnv_cpms_conf … HU … HUX0 … HUX2) -HU -HUX2 +