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 "ground_2/relocation/rtmap_id.ma".
16 include "basic_2/notation/relations/subseteq_4.ma".
17 include "basic_2/syntax/lveq.ma".
18 include "basic_2/static/frees.ma".
20 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
22 definition fle: bi_relation lenv term ≝ λL1,T1,L2,T2.
23 ∃∃n1,n2,f1,f2. L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 &
24 L1 ≋ⓧ*[n1, n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
26 interpretation "free variables inclusion (restricted closure)"
27 'SubSetEq L1 T1 L2 T2 = (fle L1 T1 L2 T2).
29 (* Basic properties *********************************************************)
31 lemma fle_sort: ∀L,s1,s2. ⦃L, ⋆s1⦄ ⊆ ⦃L, ⋆s2⦄.
33 /3 width=8 by frees_sort, sle_refl, ex4_4_intro/
36 lemma fle_gref: ∀L,l1,l2. ⦃L, §l1⦄ ⊆ ⦃L, §l2⦄.
38 /3 width=8 by frees_gref, sle_refl, ex4_4_intro/
41 (* Basic inversion lemmas ***************************************************)
43 fact fle_inv_voids_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
44 ∀K1,K2,n1,n2. |K1| = |K2| → L1 = ⓧ*[n1]K1 → L2 = ⓧ*[n2]K2 →
45 ∃∃f1,f2. ⓧ*[n1]K1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & ⓧ*[n2]K2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
46 #L1 #L2 #T1 #T2 * -L1 -L2
47 #f1 #f2 #L1 #L2 #n1 #n2 #Hf1 #Hf2 #HL12 #Hf12 #Y1 #Y2 #x1 #x2 #HY12 #H1 #H2 destruct
48 >H1 in Hf1; >H2 in Hf2; #Hf2 #Hf1
49 @(ex3_2_intro … Hf1 Hf2) -Hf1 -Hf2
51 elim (voids_inj_length … H1) // -H -HL12 -HY #H1 #H2 destruct
52 /2 width=5 by ex3_2_intro/
55 lemma fle_inv_voids_sn: ∀L1,L2,T1,T2,n. ⦃ⓧ*[n]L1, T1⦄ ⊆ ⦃L2, T2⦄ → |L1| = |L2| →
56 ∃∃f1,f2. ⓧ*[n]L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & ⫱*[n]f1 ⊆ f2.
57 /2 width=3 by fle_inv_voids_sn_aux/ qed-.