]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/fle.ma
7340a8abc5b8ee924dc7a1809128481f13f46003
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / fle.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "ground_2/relocation/rtmap_id.ma".
16 include "basic_2/notation/relations/subseteq_4.ma".
17 include "basic_2/syntax/voids_length.ma".
18 include "basic_2/static/frees.ma".
19
20 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
21
22 inductive fle (T1) (T2): relation lenv ≝
23 | fle_intro: ∀f1,f2,L1,L2,n1,n2. ⓧ*[n1]L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 → ⓧ*[n2]L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 →
24              |L1| = |L2| → ⫱*[n1]f1 ⊆ ⫱*[n2]f2 → fle T1 T2 (ⓧ*[n1]L1) (ⓧ*[n2]L2)
25 .
26
27 interpretation "free variables inclusion (restricted closure)"
28    'SubSetEq L1 T1 L2 T2 = (fle T1 T2 L1 L2).
29
30 (* Basic properties *********************************************************)
31
32 lemma fle_sort: ∀L1,L2. |L1| = |L2| → ∀s1,s2. ⦃L1, ⋆s1⦄ ⊆ ⦃L2, ⋆s2⦄.
33 /3 width=5 by frees_sort, sle_refl, fle_intro/ qed.
34
35 lemma fle_gref: ∀L1,L2. |L1| = |L2| → ∀l1,l2. ⦃L1, §l1⦄ ⊆ ⦃L2, §l2⦄.
36 /3 width=5 by frees_gref, sle_refl, fle_intro/ qed.
37
38 (* Basic inversion lemmas ***************************************************)
39
40 fact fle_inv_voids_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
41                         ∀K1,K2,n1,n2. |K1| = |K2| → L1 = ⓧ*[n1]K1 → L2 = ⓧ*[n2]K2 →
42                         ∃∃f1,f2. ⓧ*[n1]K1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & ⓧ*[n2]K2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
43 #L1 #L2 #T1 #T2 * -L1 -L2
44 #f1 #f2 #L1 #L2 #n1 #n2 #Hf1 #Hf2 #HL12 #Hf12 #Y1 #Y2 #x1 #x2 #HY12 #H1 #H2 destruct
45 >H1 in Hf1; >H2 in Hf2; #Hf2 #Hf1
46 @(ex3_2_intro … Hf1 Hf2) -Hf1 -Hf2
47
48 elim (voids_inj_length … H1) // -H -HL12 -HY #H1 #H2 destruct
49 /2 width=5 by ex3_2_intro/
50 qed-.
51
52 lemma fle_inv_voids_sn: ∀L1,L2,T1,T2,n. ⦃ⓧ*[n]L1, T1⦄ ⊆ ⦃L2, T2⦄ → |L1| = |L2| →
53                         ∃∃f1,f2. ⓧ*[n]L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & ⫱*[n]f1 ⊆ f2.
54 /2 width=3 by fle_inv_voids_sn_aux/ qed-.