]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/static/fle_fqup.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / fle_fqup.ma
index 23e46034183feec47e74025cb04ceb78c1efd0c4..65237fbc1d60d4d617f5155ad3be6b0d295cc54f 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "basic_2/syntax/lveq_length.ma".
 include "basic_2/static/frees_fqup.ma".
 include "basic_2/static/fle.ma".
 
@@ -20,29 +21,45 @@ include "basic_2/static/fle.ma".
 (* Advanced properties ******************************************************)
 
 lemma fle_refl: bi_reflexive … fle.
-#L #T elim (frees_total L T) /2 width=5 by sle_refl, ex3_2_intro/
+#L #T
+elim (frees_total L T) #f #Hf
+/2 width=8 by sle_refl, ex4_4_intro/
 qed.
 
-lemma fle_bind_sn: ∀p,I,L,V,T. ⦃L, V⦄ ⊆ ⦃L, ⓑ{p,I}V.T⦄.
-#p #I #L #V #T
-elim (frees_total L V) #f1 #Hf1
-elim (frees_total (L.ⓑ{I}V) T) #f2 #Hf2
-elim (sor_isfin_ex f1 (⫱f2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #f #Hf #_
-/3 width=6 by frees_bind, sor_inv_sle_sn, ex3_2_intro/
+lemma fle_bind_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
+                      ∀p,I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
+#L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #p #I #T2
+elim (frees_total (L2.ⓧ) T2) #g2 #Hg2
+elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
+@(ex4_4_intro … g Hf1 … HL12) (**) (* full auto too slow *)
+/4 width=5 by frees_bind_void, sor_inv_sle_sn, sor_tls, sle_trans/
 qed.
 
-lemma fle_flat_sn: ∀I,L,V,T. ⦃L, V⦄ ⊆ ⦃L, ⓕ{I}V.T⦄.
-#I #L #V #T
-elim (frees_total L V) #f1 #Hf1
-elim (frees_total L T) #f2 #Hf2
-elim (sor_isfin_ex f1 f2) /2 width=3 by frees_fwd_isfin/ #f #Hf #_
-/3 width=6 by frees_flat, sor_inv_sle_sn, ex3_2_intro/
+lemma fle_bind_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2.ⓧ, T2⦄ → |L1| ≤ |L2| →
+                      ∀p,I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
+#L1 #L2 #T1 #T2 * #n1 #x1 #f2 #g2 #Hf2 #Hg2 #H #Hfg2 #HL12 #p #I #V2
+elim (lveq_inv_void_dx_length … H HL12) -H -HL12 #m1 #HL12 #H1 #H2 destruct
+<tls_xn in Hfg2; #Hfg2
+elim (frees_total L2 V2) #g1 #Hg1
+elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
+@(ex4_4_intro … g Hf2 … HL12) (**) (* full auto too slow *)
+/4 width=5 by frees_bind_void, sor_inv_sle_dx, sor_tls, sle_trans/
 qed.
 
-lemma fle_flat_dx: ∀I,L,V,T. ⦃L, T⦄ ⊆ ⦃L, ⓕ{I}V.T⦄.
-#I #L #V #T
-elim (frees_total L V) #f1 #Hf1
-elim (frees_total L T) #f2 #Hf2
-elim (sor_isfin_ex f1 f2) /2 width=3 by frees_fwd_isfin/ #f #Hf #_
-/3 width=6 by frees_flat, sor_inv_sle_dx, ex3_2_intro/
+lemma fle_flat_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
+                      ∀I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
+#L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #I #T2
+elim (frees_total L2 T2) #g2 #Hg2
+elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
+@(ex4_4_intro … g Hf1 … HL12) (**) (* full auto too slow *)
+/4 width=5 by frees_flat, sor_inv_sle_sn, sor_tls, sle_trans/
+qed.
+
+lemma fle_flat_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
+                      ∀I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
+#L1 #L2 #T1 #T2 * #n1 #m1 #f2 #g2 #Hf2 #Hg2 #HL12 #Hfg2 #I #V2
+elim (frees_total L2 V2) #g1 #Hg1
+elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
+@(ex4_4_intro … g Hf2 … HL12) (**) (* full auto too slow *)
+/4 width=5 by frees_flat, sor_inv_sle_dx, sor_tls, sle_trans/
 qed.