X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbasic_2%2Fstatic%2Flfxs_length.ma;h=bba7867c7dd52fb3d29116777d084453e82752b1;hb=5c186c72f508da0849058afeecc6877cd9ed6303;hp=2d2b51d81afd059781fc1879a55a0e4c7f2f866b;hpb=75f395f0febd02de8e0f881d918a8812b1425c8d;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/basic_2/static/lfxs_length.ma b/matita/matita/contribs/lambdadelta/basic_2/static/lfxs_length.ma index 2d2b51d81..bba7867c7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/static/lfxs_length.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/static/lfxs_length.ma @@ -20,17 +20,40 @@ include "basic_2/static/lfxs_drops.ma". (* Forward lemmas with length for local environments ************************) (* Basic_2A1: uses: llpx_sn_fwd_length *) -lemma lfxs_fwd_length: ∀R,L1,L2,T. L1 ⪤*[R, T] L2 → |L1| = |L2|. +lemma lfxs_fwd_length (R): ∀L1,L2,T. L1 ⪤*[R, T] L2 → |L1| = |L2|. #R #L1 #L2 #T * /2 width=4 by lexs_fwd_length/ qed-. (* Properties with length for local environments ****************************) +(* Basic_2A1: uses: llpx_sn_sort *) +lemma lfxs_sort_length (R): ∀L1,L2. |L1| = |L2| → ∀s. L1 ⪤*[R, ⋆s] L2. +#R #L1 elim L1 -L1 +[ #Y #H #s >(length_inv_zero_sn … H) -H // +| #K1 #I1 #IH #Y #H #s + elim (length_inv_succ_sn … H) -H #I2 #K2 #HK12 #H destruct + /3 width=1 by lfxs_sort/ +] +qed. + +(* Basic_2A1: uses: llpx_sn_gref *) +lemma lfxs_gref_length (R): ∀L1,L2. |L1| = |L2| → ∀l. L1 ⪤*[R, §l] L2. +#R #L1 elim L1 -L1 +[ #Y #H #s >(length_inv_zero_sn … H) -H // +| #K1 #I1 #IH #Y #H #s + elim (length_inv_succ_sn … H) -H #I2 #K2 #HK12 #H destruct + /3 width=1 by lfxs_gref/ +] +qed. + +lemma lfxs_unit_length (R): ∀L1,L2. |L1| = |L2| → ∀I. L1.ⓤ{I} ⪤*[R, #0] L2.ⓤ{I}. +/3 width=3 by lfxs_unit, lexs_length_isid/ qed. + (* Basic_2A1: uses: llpx_sn_lift_le llpx_sn_lift_ge *) -lemma lfxs_lifts_bi: ∀R.d_liftable2_sn … lifts R → - ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ⪤*[R, T] K2 → - ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → - ∀U. ⬆*[f] T ≘ U → L1 ⪤*[R, U] L2. +lemma lfxs_lifts_bi (R): d_liftable2_sn … lifts R → + ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ⪤*[R, T] K2 → + ∀b,f. ⬇*[b, f] L1 ≘ K1 → ⬇*[b, f] L2 ≘ K2 → + ∀U. ⬆*[f] T ≘ U → L1 ⪤*[R, U] L2. #R #HR #L1 #L2 #HL12 #K1 #K2 #T * #f1 #Hf1 #HK12 #b #f #HLK1 #HLK2 #U #HTU elim (frees_total L1 U) #f2 #Hf2 lapply (frees_fwd_coafter … Hf2 … HLK1 … HTU … Hf1) -HTU #Hf @@ -39,11 +62,11 @@ qed-. (* Inversion lemmas with length for local environment ***********************) -lemma lfxs_inv_zero_length: ∀R,Y1,Y2. Y1 ⪤*[R, #0] Y2 → - ∨∨ Y1 = ⋆ ∧ Y2 = ⋆ - | ∃∃I,L1,L2,V1,V2. L1 ⪤*[R, V1] L2 & R L1 V1 V2 & - Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 - | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. +lemma lfxs_inv_zero_length (R): ∀Y1,Y2. Y1 ⪤*[R, #0] Y2 → + ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆ + | ∃∃I,L1,L2,V1,V2. L1 ⪤*[R, V1] L2 & R L1 V1 V2 & + Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2 + | ∃∃I,L1,L2. |L1| = |L2| & Y1 = L1.ⓤ{I} & Y2 = L2.ⓤ{I}. #R #Y1 #Y2 #H elim (lfxs_inv_zero … H) -H * /4 width=9 by lexs_fwd_length, ex4_5_intro, ex3_3_intro, or3_intro2, or3_intro1, or3_intro0, conj/ qed-.