X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fdynamic%2Fnta_preserve.ma;h=8d69b3ca21f7a2bc1246e88499586634eb6a363c;hb=dc20d16b32940a94d29a04de0d4fe1f80e00a73f;hp=e6dd70e6541dbd076880d9aa46aac0eda03938bc;hpb=de3a41b9a4e51dc1b09adce800273adf5ffa1215;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 index e6dd70e65..8d69b3ca2 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/nta_preserve.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "basic_2/rt_equivalence/cpcs_cprs.ma". -include "basic_2/dynamic/cnv_preserve.ma". +include "basic_2/rt_equivalence/cpcs_cpcs.ma". +include "basic_2/dynamic/cnv_cpcs.ma". include "basic_2/dynamic/nta.ma". (* NATIVE TYPE ASSIGNMENT FOR TERMS *****************************************) @@ -56,6 +56,47 @@ elim (cpms_inv_abst_sn … H) -H #X3 #X4 #HX13 #HX24 #H destruct #H destruct qed. +(* Basic_1: uses: ty3_sred_wcpr0_pr0 *) +lemma nta_cpr_conf_lpr (a) (h) (G): + ∀L1,T1,U. ⦃G,L1⦄ ⊢ T1 :[a,h] U → ∀T2. ⦃G,L1⦄ ⊢ T1 ➡[h] T2 → + ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T2 :[a,h] U. +#a #h #G #L1 #T1 #U #H #T2 #HT12 #L2 #HL12 +/3 width=6 by cnv_cpm_trans_lpr, cpm_cast/ +qed-. + +(* Basic_1: uses: ty3_sred_pr2 ty3_sred_pr0 *) +lemma nta_cpr_conf (a) (h) (G) (L): + ∀T1,U. ⦃G,L⦄ ⊢ T1 :[a,h] U → + ∀T2. ⦃G,L⦄ ⊢ T1 ➡[h] T2 → ⦃G,L⦄ ⊢ T2 :[a,h] U. +#a #h #G #L #T1 #U #H #T2 #HT12 +/3 width=6 by cnv_cpm_trans, cpm_cast/ +qed-. + +(* Note: this is the preservation property *) +(* Basic_1: uses: ty3_sred_pr3 ty3_sred_pr1 *) +lemma nta_cprs_conf (a) (h) (G) (L): + ∀T1,U. ⦃G,L⦄ ⊢ T1 :[a,h] U → + ∀T2. ⦃G,L⦄ ⊢ T1 ➡*[h] T2 → ⦃G,L⦄ ⊢ T2 :[a,h] U. +#a #h #G #L #T1 #U #H #T2 #HT12 +/3 width=6 by cnv_cpms_trans, cpms_cast/ +qed-. + +(* Basic_1: uses: ty3_cred_pr2 *) +lemma nta_lpr_conf (a) (h) (G): + ∀L1,T,U. ⦃G,L1⦄ ⊢ T :[a,h] U → + ∀L2. ⦃G,L1⦄ ⊢ ➡[h] L2 → ⦃G,L2⦄ ⊢ T :[a,h] U. +#a #h #G #L1 #T #U #HTU #L2 #HL12 +/2 width=3 by cnv_lpr_trans/ +qed-. + +(* Basic_1: uses: ty3_cred_pr3 *) +lemma nta_lprs_conf (a) (h) (G): + ∀L1,T,U. ⦃G,L1⦄ ⊢ T :[a,h] U → + ∀L2. ⦃G,L1⦄ ⊢ ➡*[h] L2 → ⦃G,L2⦄ ⊢ T :[a,h] U. +#a #h #G #L1 #T #U #HTU #L2 #HL12 +/2 width=3 by cnv_lprs_trans/ +qed-. + (* Inversion lemmas based on preservation ***********************************) lemma nta_inv_ldef_sn (a) (h) (G) (K) (V): @@ -135,60 +176,36 @@ elim (cnv_inv_appl … H1) * [ | #n ] #p #W #U #Hn #HV #HT #HVW #HTU lapply (cpms_step_dx … HTU 1 (ⓛ{p}W.U0) ?) -HTU [ /2 width=1 by cpm_bind/ ] #HTU | lapply (le_n_O_to_eq n ?) [ /3 width=1 by le_S_S_to_le/ ] -Hn #H destruct ] -lapply (cpms_appl_dx … V V … HTU) [1,3: // ] #HVTU -elim (cnv_cpms_conf … H1 … H2 … HVTU) -H1 -H2 -HVTU