X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fi_dynamic%2Fntas_preserve.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fi_dynamic%2Fntas_preserve.ma;h=5d391caed00423c60f442fa801631e62a06131f4;hb=db020b4218272e2e35641ce3bc3b0a9b3afda899;hp=0000000000000000000000000000000000000000;hpb=d8f6494f48aa08bb32d9d1ac82fc16e9e41b76ac;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_preserve.ma new file mode 100644 index 000000000..5d391caed --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/i_dynamic/ntas_preserve.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||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/i_dynamic/ntas.ma". + +(* ITERATED NATIVE TYPE ASSIGNMENT FOR TERMS ********************************) + +(* Properties based on preservation *****************************************) + +lemma cnv_cpms_ntas (h) (a) (G) (L): + ∀T. ⦃G,L⦄ ⊢ T ![h,a] → ∀n,U.⦃G,L⦄ ⊢ T ➡*[n,h] U → ⦃G,L⦄ ⊢ T :*[h,a,n] U. +/3 width=4 by ntas_intro, cnv_cpms_trans/ qed. + +(* Inversion lemmas based on preservation ***********************************) + +lemma ntas_inv_appl_sn (h) (a) (m) (G) (L) (V) (T): + ∀X. ⦃G,L⦄ ⊢ ⓐV.T :*[h,a,m] X → + ∨∨ ∃∃n,p,W,U,U0. n ≤ m & ad a n & ⦃G,L⦄ ⊢ V :*[h,a,1] W & ⦃G,L⦄ ⊢ T :*[h,a,n] ⓛ{p}W.U0 & ⦃G,L.ⓛW⦄ ⊢ U0 :*[h,a,m-n] U & ⦃G,L⦄ ⊢ ⓐV.ⓛ{p}W.U ⬌*[h] X & ⦃G,L⦄ ⊢ X ![h,a] + | ∃∃n,p,W,U,U0. m ≤ n & ad a n & ⦃G,L⦄ ⊢ V :*[h,a,1] W & ⦃G,L⦄ ⊢ T :*[h,a,m] U & ⦃G,L⦄ ⊢ U :*[h,a,n-m] ⓛ{p}W.U0 & ⦃G,L⦄ ⊢ ⓐV.U ⬌*[h] X & ⦃G,L⦄ ⊢ X ![h,a]. +#h #a #m #G #L #V #T #X +* #X0 #HX #HVT #HX0 #HTX0 +elim (cnv_inv_appl … HVT) #n #p #W #U0 #Ha #HV #HT #HVW #HTU0 +elim (le_or_ge n m) #Hnm +[ elim (cnv_fwd_cpms_abst_dx_le … HT … HTU0 … Hnm) #U #H #HU0 + lapply (cpms_appl_dx … V V … H) [ // ] -H #H + elim (cnv_cpms_conf … HVT … HTX0 … H) -HVT -HTX0 -H (plus_minus_m_m_commutative … Hnm) in HTU0; #H + elim (cpms_inv_plus … H) -H #U #HTU #HU0 + lapply (cpms_appl_dx … V V … HTU) [ // ] #H + elim (cnv_cpms_conf … HVT … HTX0 … H) -HVT -HTX0 -H