X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fdynamic%2Fcnv_aaa.ma;h=aa0c10865bfebc3f49e13d937606b7cab1028093;hb=f308429a0fde273605a2330efc63268b4ac36c99;hp=18e2459596ea08dffcbdc08acf48d66596d2c299;hpb=282511a928532676813d99d08594cd5f98fcb80e;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma index 18e245959..aa0c10865 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/dynamic/cnv_aaa.ma @@ -12,15 +12,17 @@ (* *) (**************************************************************************) +include "ground_2/lib/arith_2b.ma". include "basic_2/rt_computation/cpms_aaa.ma". +include "basic_2/rt_computation/lprs_cpms.ma". include "basic_2/dynamic/cnv.ma". -(* CONTEXT_SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) +(* CONTEXT-SENSITIVE NATIVE VALIDITY FOR TERMS ******************************) (* Forward lemmas on atomic arity assignment for terms **********************) (* Basic_2A1: uses: snv_fwd_aaa *) -lemma cnv_fwd_aaa (a) (h): ∀G,L,T. ⦃G, L⦄ ⊢ T ![a, h] → ∃A. ⦃G, L⦄ ⊢ T ⁝ A. +lemma cnv_fwd_aaa (a) (h): ∀G,L,T. ⦃G,L⦄ ⊢ T ![a,h] → ∃A. ⦃G,L⦄ ⊢ T ⁝ A. #a #h #G #L #T #H elim H -G -L -T [ /2 width=2 by aaa_sort, ex_intro/ | #I #G #L #V #_ * /3 width=2 by aaa_zero, ex_intro/ @@ -40,3 +42,40 @@ lemma cnv_fwd_aaa (a) (h): ∀G,L,T. ⦃G, L⦄ ⊢ T ![a, h] → ∃A. ⦃G, L /3 width=3 by aaa_cast, ex_intro/ ] qed-. + +(* Forward lemmas with t_bound rt_transition for terms **********************) + +lemma cnv_fwd_cpm_SO (a) (h) (G) (L): + ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∃U. ⦃G,L⦄ ⊢ T ➡[1,h] U. +#a #h #G #L #T #H +elim (cnv_fwd_aaa … H) -H #A #HA +/2 width=2 by aaa_cpm_SO/ +qed-. + +(* Forward lemmas with t_bound rt_computation for terms *********************) + +lemma cnv_fwd_cpms_total (a) (h) (n) (G) (L): + ∀T. ⦃G,L⦄ ⊢ T ![a,h] → ∃U. ⦃G,L⦄ ⊢ T ➡*[n,h] U. +#a #h #n #G #L #T #H +elim (cnv_fwd_aaa … H) -H #A #HA +/2 width=2 by cpms_total_aaa/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma cnv_inv_appl_pred (a) (h) (G) (L): + ∀V,T. ⦃G,L⦄ ⊢ ⓐV.T ![yinj a,h] → + ∃∃p,W0,U0. ⦃G,L⦄ ⊢ V ![a,h] & ⦃G,L⦄ ⊢ T ![a,h] & + ⦃G,L⦄ ⊢ V ➡*[1,h] W0 & ⦃G,L⦄ ⊢ T ➡*[↓a,h] ⓛ{p}W0.U0. +#a #h #G #L #V #T #H +elim (cnv_inv_appl … H) -H #n #p #W #U #Ha #HV #HT #HVW #HTU +lapply (ylt_inv_inj … Ha) -Ha #Ha +elim (cnv_fwd_aaa … HT) #A #HA +elim (cpms_total_aaa h … (a-↑n) … (ⓛ{p}W.U)) +[|*: /2 width=8 by cpms_aaa_conf/ ] -HA #X #HU0 +elim (cpms_inv_abst_sn … HU0) #W0 #U0 #HW0 #_ #H destruct +lapply (cpms_trans … HVW … HW0) -HVW -HW0 #HVW0 +lapply (cpms_trans … HTU … HU0) -HTU -HU0 +>(arith_m2 … Ha) -Ha #HTU0 +/2 width=5 by ex4_3_intro/ +qed-.