1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/syntax/voids_length.ma".
16 include "basic_2/static/frees_fqup.ma".
17 include "basic_2/static/fle.ma".
19 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
21 (* Advanced properties ******************************************************)
23 lemma fle_refl: bi_reflexive … fle.
25 elim (voids_refl L) #n #Hn
26 elim (frees_total L T) #f #Hf
27 /2 width=8 by sle_refl, ex4_4_intro/
30 lemma fle_bind_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
31 ∀p,I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
32 #L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #p #I #T2
33 elim (frees_total (L2.ⓧ) T2) #g2 #Hg2
34 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
35 @(ex4_4_intro … g Hf1 … HL12) (**) (* full auto too slow *)
36 /4 width=5 by frees_bind_void, sor_inv_sle_sn, sor_tls, sle_trans/
39 lemma fle_bind_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2.ⓧ, T2⦄ → |L1| ≤ |L2| →
40 ∀p,I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
41 #L1 #L2 #T1 #T2 * #n1 #x1 #f2 #g2 #Hf2 #Hg2 #H #Hfg2 #HL12 #p #I #V2
42 elim (voids_inv_void_dx_length … H HL12) -H -HL12 #m1 #HL12 #H #_ destruct
43 <tls_xn in Hfg2; #Hfg2
44 elim (frees_total L2 V2) #g1 #Hg1
45 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
46 @(ex4_4_intro … g Hf2 … HL12) (**) (* full auto too slow *)
47 /4 width=5 by frees_bind_void, sor_inv_sle_dx, sor_tls, sle_trans/
50 lemma fle_flat_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
51 ∀I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
52 #L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #I #T2
53 elim (frees_total L2 T2) #g2 #Hg2
54 elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
55 @(ex4_4_intro … g Hf1 … HL12) (**) (* full auto too slow *)
56 /4 width=5 by frees_flat, sor_inv_sle_sn, sor_tls, sle_trans/
59 lemma fle_flat_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
60 ∀I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
61 #L1 #L2 #T1 #T2 * #n1 #m1 #f2 #g2 #Hf2 #Hg2 #HL12 #Hfg2 #I #V2
62 elim (frees_total L2 V2) #g1 #Hg1
63 elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
64 @(ex4_4_intro … g Hf2 … HL12) (**) (* full auto too slow *)
65 /4 width=5 by frees_flat, sor_inv_sle_dx, sor_tls, sle_trans/