]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/computation/lsx_lpxs.ma
- some renaming according to the written version of basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / lsx_lpxs.ma
index 2130d8b5144420af9d328f606907983fa0ff7476..d84202bbc7a60815b7533b9a6b27c6b1f7507992 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/computation/lpxs_lleq.ma".
 include "basic_2/computation/lpxs_lpxs.ma".
-include "basic_2/computation/lsx.ma".
+include "basic_2/computation/lsx_alt.ma".
 
 (* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************)
 
 (* Advanced properties ******************************************************)
 
-lemma lsx_leqy_conf: ∀h,g,G,L1,T,d. G ⊢ ⋕⬊*[h, g, T, d] L1 →
-                     ∀L2. L1 ⊑×[d, ∞] L2 → |L1| = |L2| → G ⊢ ⋕⬊*[h, g, T, d] L2.
-#h #g #G #L1 #T #d #H @(lsx_ind … H) -L1
-#L1 #_ #IHL1 #L2 #H1L12 #H2L12 @lsx_intro
-#L3 #H1L23 #HnL23 lapply (lpxs_fwd_length … H1L23)
-#H2L23 elim (lsuby_lpxs_trans_lleq … H1L12 … H1L23) -H1L12 -H1L23
-#L0 #H1L03 #H1L10 #H lapply (lpxs_fwd_length … H1L10)
-#H2L10 elim (H T) -H //
-#_ #H @(IHL1 … H1L10) -IHL1 -H1L10 /3 width=1 by/
-qed-.
-
-lemma lsx_lleq_trans: ∀h,g,T,G,L1,d. G ⊢ ⋕⬊*[h, g, T, d] L1 →
-                      ∀L2. L1 ⋕[T, d] L2 → G ⊢ ⋕⬊*[h, g, T, d] L2.
-#h #g #T #G #L1 #d #H @(lsx_ind … H) -L1
-#L1 #_ #IHL1 #L2 #HL12 @lsx_intro
-#K2 #HLK2 #HnLK2 elim (lleq_lpxs_trans … HLK2 … HL12) -HLK2
-/5 width=4 by lleq_canc_sn, lleq_trans/
-qed-.
-
-lemma lsx_lpxs_trans: ∀h,g,T,G,L1,d. G ⊢ ⋕⬊*[h, g, T, d] L1 →
-                      ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⋕⬊*[h, g, T, d] L2.
-#h #g #T #G #L1 #d #H @(lsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12
-elim (lleq_dec T L1 L2 d) /3 width=4 by lsx_lleq_trans/
-qed-.
-
-fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,d. G ⊢ ⋕⬊*[h, g, V, d] L1 →
-                        ∀Y,T. G ⊢ ⋕⬊*[h, g, T, ⫯d] Y →
+fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 →
+                        ∀Y,T. G ⊢ ⬊*[h, g, T, ⫯l] Y →
                         ∀L2. Y = L2.ⓑ{I}V → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 →
-                        G â\8a¢ â\8b\95â¬\8a*[h, g, â\93\91{a,I}V.T, d] L2.
-#h #g #a #I #G #L1 #V #d #H @(lsx_ind … H) -L1
-#L1 #HL1 #IHL1 #Y #T #H @(lsx_ind … H) -Y
-#Y #HY #IHY #L2 #H #HL12 destruct @lsx_intro
+                        G â\8a¢ â¬\8a*[h, g, â\93\91{a,I}V.T, l] L2.
+#h #g #a #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1
+#L1 #HL1 #IHL1 #Y #T #H @(lsx_ind_alt … H) -Y
+#Y #HY #IHY #L2 #H #HL12 destruct @lsx_intro_alt
 #L0 #HL20 lapply (lpxs_trans … HL12 … HL20)
 #HL10 #H elim (nlleq_inv_bind … H) -H [ -HL1 -IHY | -HY -IHL1 ]
-[ #HnV elim (lleq_dec V L1 L2 d)
+[ #HnV elim (lleq_dec V L1 L2 l)
   [ #HV @(IHL1 … L0) /3 width=5 by lsx_lpxs_trans, lpxs_pair, lleq_canc_sn/ (**) (* full auto too slow *)
   | -HnV -HL10 /4 width=5 by lsx_lpxs_trans, lpxs_pair/
   ]
@@ -62,20 +36,20 @@ fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,d. G ⊢ ⋕⬊*[h, g, V, d] L1 →
 ]
 qed-.
 
-lemma lsx_bind: ∀h,g,a,I,G,L,V,d. G ⊢ ⋕⬊*[h, g, V, d] L →
-                â\88\80T. G â\8a¢ â\8b\95â¬\8a*[h, g, T, â«¯d] L.ⓑ{I}V →
-                G â\8a¢ â\8b\95â¬\8a*[h, g, â\93\91{a,I}V.T, d] L.
+lemma lsx_bind: ∀h,g,a,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L →
+                â\88\80T. G â\8a¢ â¬\8a*[h, g, T, â«¯l] L.ⓑ{I}V →
+                G â\8a¢ â¬\8a*[h, g, â\93\91{a,I}V.T, l] L.
 /2 width=3 by lsx_bind_lpxs_aux/ qed.
 
-lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,d. G ⊢ ⋕⬊*[h, g, V, d] L1 →
-                     â\88\80L2,T. G â\8a¢ â\8b\95â¬\8a*[h, g, T, d] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 →
-                     G â\8a¢ â\8b\95â¬\8a*[h, g, â\93\95{I}V.T, d] L2.
-#h #g #I #G #L1 #V #d #H @(lsx_ind … H) -L1
-#L1 #HL1 #IHL1 #L2 #T #H @(lsx_ind … H) -L2
-#L2 #HL2 #IHL2 #HL12 @lsx_intro
+lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 →
+                     â\88\80L2,T. G â\8a¢ â¬\8a*[h, g, T, l] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 →
+                     G â\8a¢ â¬\8a*[h, g, â\93\95{I}V.T, l] L2.
+#h #g #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1
+#L1 #HL1 #IHL1 #L2 #T #H @(lsx_ind_alt … H) -L2
+#L2 #HL2 #IHL2 #HL12 @lsx_intro_alt
 #L0 #HL20 lapply (lpxs_trans … HL12 … HL20)
 #HL10 #H elim (nlleq_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ]
-[ #HnV elim (lleq_dec V L1 L2 d)
+[ #HnV elim (lleq_dec V L1 L2 l)
   [ #HV @(IHL1 … L0) /3 width=3 by lsx_lpxs_trans, lleq_canc_sn/ (**) (* full auto too slow: 47s *)
   | -HnV -HL10 /3 width=4 by lsx_lpxs_trans/
   ]
@@ -83,26 +57,6 @@ lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,d. G ⊢ ⋕⬊*[h, g, V, d] L1 →
 ]
 qed-.
 
-lemma lsx_flat: ∀h,g,I,G,L,V,d. G ⊢ ⋕⬊*[h, g, V, d] L →
-                â\88\80T. G â\8a¢ â\8b\95â¬\8a*[h, g, T, d] L â\86\92 G â\8a¢ â\8b\95â¬\8a*[h, g, â\93\95{I}V.T, d] L.
+lemma lsx_flat: ∀h,g,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L →
+                â\88\80T. G â\8a¢ â¬\8a*[h, g, T, l] L â\86\92 G â\8a¢ â¬\8a*[h, g, â\93\95{I}V.T, l] L.
 /2 width=3 by lsx_flat_lpxs/ qed.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma lsx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T,d. G ⊢ ⋕⬊*[h, g, ⓑ{a,I}V.T, d] L →
-                       G ⊢ ⋕⬊*[h, g, T, ⫯d] L.ⓑ{I}V.
-#h #g #a #I #G #L #V1 #T #d #H @(lsx_ind … H) -L
-#L1 #_ #IHL1 @lsx_intro
-#Y #H #HT elim (lpxs_inv_pair1 … H) -H
-#L2 #V2 #HL12 #_ #H destruct
-@(lsx_leqy_conf … (L2.ⓑ{I}V1)) /2 width=1 by lsuby_succ/
-@IHL1 // #H @HT -IHL1 -HL12 -HT
-@(lleq_lsuby_trans … (L2.ⓑ{I}V1))
-/2 width=2 by lleq_fwd_bind_dx, lsuby_succ/
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma lsx_inv_bind: ∀h,g,a,I,G,L,V,T,d. G ⊢ ⋕⬊*[h, g, ⓑ{a, I}V.T, d] L →
-                    G ⊢ ⋕⬊*[h, g, V, d] L ∧ G ⊢ ⋕⬊*[h, g, T, ⫯d] L.ⓑ{I}V.
-/3 width=4 by lsx_fwd_bind_sn, lsx_fwd_bind_dx, conj/ qed-.