X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Frelocation%2Flexs_length.ma;h=71467ba72319444401782e16aa8ef9d32d1c7392;hb=5c186c72f508da0849058afeecc6877cd9ed6303;hp=c8d3536de1c6c53cabf21c13fc0dbb65cc8c00d7;hpb=bb6e68b2cf746bb3108543807207a1ca628ab442;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/relocation/lexs_length.ma b/matita/matita/contribs/lambdadelta/basic_2/relocation/lexs_length.ma index c8d3536de..71467ba72 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/relocation/lexs_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/relocation/lexs_length.ma @@ -12,14 +12,35 @@ (* *) (**************************************************************************) -include "basic_2/grammar/lenv_length.ma". +include "basic_2/syntax/lenv_length.ma". include "basic_2/relocation/lexs.ma". -(* GENERAL ENTRYWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) +(* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) -(* Forward lemmas on length for local environments **************************) +(* Forward lemmas with length for local environments ************************) -(* Basic_2A1: includes: lpx_sn_fwd_length *) -lemma lexs_fwd_length: ∀RN,RP,L1,L2,f. L1 ⦻*[RN, RP, f] L2 → |L1| = |L2|. -#RM #RP #L1 #L2 #f #H elim H -L1 -L2 -f // +lemma lexs_fwd_length: ∀RN,RP,f,L1,L2. L1 ⪤*[RN, RP, f] L2 → |L1| = |L2|. +#RN #RP #f #L1 #L2 #H elim H -f -L1 -L2 // +#f #I1 #I2 #L1 #L2 >length_bind >length_bind // qed-. + +(* Properties with length for local environments ****************************) + +lemma lexs_length_cfull: ∀L1,L2. |L1| = |L2| → ∀f. L1 ⪤*[cfull, cfull, f] L2. +#L1 elim L1 -L1 +[ #Y2 #H >(length_inv_zero_sn … H) -Y2 // +| #L1 #I1 #IH #Y2 #H #f + elim (length_inv_succ_sn … H) -H #I2 #L2 #HL12 #H destruct + elim (pn_split f) * #g #H destruct /3 width=1 by lexs_next, lexs_push/ +] +qed. + +lemma lexs_length_isid: ∀R,L1,L2. |L1| = |L2| → + ∀f. 𝐈⦃f⦄ → L1 ⪤*[R, cfull, f] L2. +#R #L1 elim L1 -L1 +[ #Y2 #H >(length_inv_zero_sn … H) -Y2 // +| #L1 #I1 #IH #Y2 #H #f #Hf + elim (length_inv_succ_sn … H) -H #I2 #L2 #HL12 #H destruct + elim (isid_inv_gen … Hf) -Hf #g #Hg #H destruct /3 width=1 by lexs_push/ +] +qed.